Running behind Traefik Reverse Proxy #543
-
Hi, Also, another question is, How to change the volume mount from a docker-volume to a host path mount? I added host path instead of docker volume, but container didn't even start and keep showing "nextcloud-aio | It seems like you did not give the mastercontainer volume the correct name?" |
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 63 replies
-
Hello, I currently see no way around using a traefik.toml if you want to run Nextcloud AIO behind Traefik (also see the network host option in the reverse proxy documentation). But I cannot help further here as I don't run Traefik myself. After someone figured this out I'll gladly add it to the reverse-proxy documentation.
There are these two options: https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive and https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir |
Beta Was this translation helpful? Give feedback.
-
I used docker-compose and added the apache port as shown below. nextcloud: Then in the traefik rules folder I created nc.toml with the following config [http.routers] [http.services] Now I have Nextcloud behind a Traefik2 (docker) reverse proxy. I hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Here is the error shown in the container, note that I tried to provide a (existing) folder and password, in case it wants to create a new backup: [Wed May 04 16:55:09.695316 2022] [php:notice] [pid 654] [client 127.0.0.1:43692] Slim Application Error\nType: GuzzleHttp\Exception\ServerException\nCode: 500\nMessage: Server error: If I don't enter anything and click the submit button, I very briefly see a circle, then nothing, as if it will not proceed without some sort of input. |
Beta Was this translation helpful? Give feedback.
-
@szaimen saw the updated doc. Looks look. Just an explanation why I personally am mapping the 16000 ports. I have other services running on 80, 8080 & 8443. |
Beta Was this translation helpful? Give feedback.
-
For anyone reading this, please follow the reworked reverse proxy documentation: https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md |
Beta Was this translation helpful? Give feedback.
-
Hi Simon I have a further update and shall share my files. Whilst it was working, I was still getting the following errors: The "X-Robots-Tag" HTTP header is not set to "none". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly. What I have done to setup my system is as follows: docker-compose file: volumes: Traefik/rules/nc.toml file: [http.routers] [http.services] Traefik/rules/middlewares.toml file: #added at the bottom Traefik/rules/middleware-chains.toml file added at the bottom[http.middlewares.chain-nc] No more errors and an A+ on the security scan. Cheers, |
Beta Was this translation helpful? Give feedback.
-
All of those and these two referrerPolicy = "same-origin" I assume this is because NextCloud is behind the reverse proxy. It works without any of this but I do get the warnings with I look at overview. |
Beta Was this translation helpful? Give feedback.
-
I keep getting the "The server is not reachable on port 443" error on the AIO setup page being behind Traefik. |
Beta Was this translation helpful? Give feedback.
-
You have to access the AIO page using port 8080, then you can hit the main Nextcloud page via 443.
…
On May 10, 2022 at 8:07 AM, <chrisbley ***@***.***)> wrote:
I keep getting the "The server is not reachable on port 443" error on the AIO setup page being being Traefik.
I configured the AIO container using docker labels; Traefik dashboard says that everything is ok, from entrypoint 443 to Service "nextcloud-aio-mastercontainer". I've used my portforwardings for ports 80 and 443 successfully with Nginx Proxy Manager in the past, so I don't think there's anything wrong with my port 443. Any advice how to debug would be very much appreciated - Cheers!
—
Reply to this email directly, view it on GitHub (#543 (comment)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/ALKJUX4EWH66FGHG5ZVZKV3VJJGPXANCNFSM5U2BWWYA).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
That's exactly what I cannot do - I am on the AIO setup page via my local
8181:8080 port mapping, and getting that port 443 error when putting in my
domain name.
Sent on the go.
Dave Campbell ***@***.***> schrieb am Di., 10. Mai 2022,
14:22:
…
You have to access the AIO page using port 8080, then you can hit the main
Nextcloud page via 443.
>
> On May 10, 2022 at 8:07 AM, <chrisbley ***@***.***)> wrote:
>
>
>
>
>
>
>
>
> I keep getting the "The server is not reachable on port 443" error on
the AIO setup page being being Traefik.
> I configured the AIO container using docker labels; Traefik dashboard
says that everything is ok, from entrypoint 443 to Service
"nextcloud-aio-mastercontainer". I've used my portforwardings for ports 80
and 443 successfully with Nginx Proxy Manager in the past, so I don't think
there's anything wrong with my port 443. Any advice how to debug would be
very much appreciated - Cheers!
>
>
>
> —
> Reply to this email directly, view it on GitHub (
#543 (comment)),
or unsubscribe (
https://github.com/notifications/unsubscribe-auth/ALKJUX4EWH66FGHG5ZVZKV3VJJGPXANCNFSM5U2BWWYA
).
> You are receiving this because you were mentioned.Message ID:
***@***.***>
>
>
>
—
Reply to this email directly, view it on GitHub
<#543 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXKZ5OD4SATRKI7PSRQUOI3VJJIJVANCNFSM5U2BWWYA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Yeah you will get that if the reverse proxy isn’t set correctly. I also had that issue. If you are on traefik (I assume you are since you are replying to this discussion) you have to set the url to http://yourip:11000 in your toml file
…
On May 10, 2022 at 8:25 AM, <chrisbley ***@***.***)> wrote:
That's exactly what I cannot do - I am on the AIO setup page via my local
8181:8080 port mapping, and getting that port 443 error when putting in my
domain name.
Sent on the go.
Dave Campbell ***@***.***> schrieb am Di., 10. Mai 2022,
14:22:
>
>
>
> You have to access the AIO page using port 8080, then you can hit the main
> Nextcloud page via 443.
>
>
>
>
>
>
>
>
>
>
> >
> > On May 10, 2022 at 8:07 AM, <chrisbley ***@***.***)> wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> > I keep getting the "The server is not reachable on port 443" error on
> the AIO setup page being being Traefik.
> > I configured the AIO container using docker labels; Traefik dashboard
> says that everything is ok, from entrypoint 443 to Service
> "nextcloud-aio-mastercontainer". I've used my portforwardings for ports 80
> and 443 successfully with Nginx Proxy Manager in the past, so I don't think
> there's anything wrong with my port 443. Any advice how to debug would be
> very much appreciated - Cheers!
> >
> >
> >
> > —
> > Reply to this email directly, view it on GitHub (
> #543 (comment)),
> or unsubscribe (
> https://github.com/notifications/unsubscribe-auth/ALKJUX4EWH66FGHG5ZVZKV3VJJGPXANCNFSM5U2BWWYA
> ).
> > You are receiving this because you were mentioned.Message ID:
> ***@***.***>
> >
> >
> >
>
>
> —
> Reply to this email directly, view it on GitHub
> <#543 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AXKZ5OD4SATRKI7PSRQUOI3VJJIJVANCNFSM5U2BWWYA>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub (#543 (comment)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/ALKJUX4WWQR23OBSRJN5LATVJJIU5ANCNFSM5U2BWWYA).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
thank you for your replies, @robotictacos! Had to make a break as this was eating too much of my time. I still haven't managed to get it working - this is my traefik config, after translating szaimen's reverse proxy guide to my yaml file: could you please have a quick look at it, maybe you can find the mistake? thank you! |
Beta Was this translation helpful? Give feedback.
-
Hey @robotictacos, seems my reply didn't get through last time. If you don't mind,
could you send me your working traefik config?
Thanks a lot!
Sent on the go.
Dave Campbell ***@***.***> schrieb am Di., 24. Mai 2022,
01:40:
… Hi Chris,
Sad to say, I gave up on AIO. I did manage to get it to work, but then if
you need to tweak something inside the container, like for me a path to a
folder, it's kind of impossible the way it's currently implemented. Also, I
despise volume mapping, I pretty much never ever do that simply because I
want access to the folders being mounted inside the guest, and this
implementation is absolutely riddled with volumes. It was quite a time sink
for not much payoff. If you like I can show my yaml with a more
conventional configuration which is performing nicely.
—
Reply to this email directly, view it on GitHub
<#543 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXKZ5OE4LPOYGQSPMMEISUDVLQJPPANCNFSM5U2BWWYA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hey Ruskin,
No I didn't get it working! It appears to be not about open ports, but
rather about headers.
I gave up on it.
Sent on the go.
Ruskin ***@***.***> schrieb am Mi., 17. Aug. 2022, 23:43:
… Hey @chrisbley <https://github.com/chrisbley> - did you get this working
in the end? I'm also getting the 443 error even though
https://portchecker.co/check says that the port is open 🤔 . Does that
perhaps resonate with any other error / misconfiguration that you've
encountered @szaimen <https://github.com/szaimen> ?
(and yes I tried the docs version first, but it didn't work for me, but
using labels did).
I also tried using Caddy too but it complains that the 443 has already
been bound because I've got Traefik runnning fine for a bunch of other
services on the same server. I'm open to ideas to get them playing nicely
together failing an update/tweak that gets Traefik working first.
Thanks in advance!
—
Reply to this email directly, view it on GitHub
<#543 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXKZ5OHOPZH5F72EN24QVETVZVMIZANCNFSM5U2BWWYA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I gave up on both. Maybe Traefik is just too complicated for me, but
there was several things that I failed to do with Trafik: safely expose
the API, configure header forwarding for any installation of Nextcloud
(docker, VM etc.) and other things.
I'm going to use the Nextcloud VM by Hansson and pay them for making it
work behind my Nginx Proxy Manager. I've dumped so much time in this
already that the 60 Euro per 30min for their service look like good
value to me.
------ Originalnachricht ------
Von "Ruskin" ***@***.***>
An "nextcloud/all-in-one" ***@***.***>
Cc "chrisbley" ***@***.***>; "Mention"
***@***.***>
Datum 22.08.2022 13:15:09
Betreff Re: [nextcloud/all-in-one] Running behind Traefik Reverse Proxy
(Discussion #543)
Ah shame. Thanks for the headers hint; I might dive deeper.
Did you give up on Traefik or AIO or both?
—
Reply to this email directly, view it on GitHub
<#543 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXKZ5OCYAEPWXVFLWCL4N6DV2NOL3ANCNFSM5U2BWWYA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
… |
Beta Was this translation helpful? Give feedback.
For anyone reading this, please follow the reworked reverse proxy documentation: https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
Feedback is welcome!