Hi. I’ve got a NextBox on my home network which I want to put behind different ports. Originally it was the only server I had, but now that I have a second one, I want to open ports 80 + 443 to Caddy so I can reverse proxy to different services on my LAN.
However, I found this was really difficult to do, as NextCloud is running in a Docker container. I haven’t been able to find any documentation or guide complete enough to figure this out, and now I’m pretty much stuck with an inaccessible NextCloud instance - I must have made some mistakes trying to clean up prior attempts.
So how can I open NextCloud on my NextBox to alternate ports so that Caddy can reverse proxy to it?
Hello,
in your router you can open what ever port you want corresponding to your local NextBox IP.
Then for the TLS certificate you will need to specify this port.
Hi, thank you for your response - but either I am misunderstanding your advice or else I don’t think that answers the question. I am not port forwarding to my NextCloud instance with my router. Perhaps I can try that if this ends up too difficult. But I am trying to use a reverse proxy (also on the NextBox), which listens on the standard ports 80/443 and redirects cloud.mydomain.tld traffic to localhost:12380 (arbitrary port i choose for NextCloud-on-Docker to listen to). This is so that I don’t have to specify a port with the custom subdomain e.g. cloud.mydomain.tld:12380.
However, I have read (and experienced) that it’s difficult and poorly documented to get NextCloud in a Docker container to accept reverse proxy traffic. Perhaps I do need to update the TLS certificate for NextCloud on cloud.mydomain.tld to use the new Docker ports, even though web traffic will be arriving via standard ports 80/443? I can research that and try again in the near future. But it would be helpful for me if the total necessary configuration in Docker and NextCloud could be made more explicit.