Nextcloud behind reverse proxy on another machine

I have Nextcloud-all-in-one installed as a docker image on one machine, running Debian. And I have Apache, serving a public web site (mydomain.dk), running on another machine on the same, local network. Following the guidelines here (all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub), I’ve tried to setup the public web server as a reverse proxy for the Nextcloud server.

But I’m a little bit confused about this note:
“If you need HTTPS between Nextcloud and the reverse proxy because it is running on a different server in the same network, simply add another reverse proxy to the chain that runs on the same server like AIO and takes care of HTTPS proxying (most likely via self-signed certificates). Another option would be to create a VPN between the server that runs AIO and the server that runs the reverse proxy which takes care of encrypting the connection.”

How do I “simply add another reverse proxy”?

Hi,
I’m currently using a very similar setup to yours – Nextcloud AIO runs on one server, while my NGINX Proxy Server (specifically, NGINX Proxy Manager) runs on a separate machine within the same local network.

This setup works great for me because I self-host around 15 different services at home – including Nextcloud, Bitwarden, personal websites, monitoring tools, streaming apps, and more. The NGINX Proxy Server makes it all much easier to manage and connect to from the outside.


:white_check_mark: Why use an NGINX Proxy Server?

1. Automatic subdomain routing

Each service gets its own subdomain:

  • nextcloud.example.com → 192.168.1.101:8080
  • bitwarden.example.com → 192.168.1.102:8081
  • media.example.com → 192.168.1.103:8096

The services can run on different devices, and the proxy simply routes traffic based on the subdomain. You manage everything from a single interface.

2. Automatic SSL certificates

NGINX Proxy Server (through NGINX Proxy Manager) handles:

  • issuing Let’s Encrypt SSL certificates
  • renewing them automatically

So all your services are securely accessible over HTTPS, with zero manual SSL setup required.

3. Beginner-friendly setup

You don’t need to be an IT expert to make this work:

  • Just forward ports 80 and 443 on your router to the local IP where the NGINX Proxy Server is running
  • Use the simple web interface to add a new proxy host with your subdomain, internal IP, and port – done!

4. I prefer Docker-based setups

Most of my services, including NGINX Proxy Manager and Nextcloud AIO, run in Docker containers.
I prefer Docker because it makes deploying and managing applications straightforward and repeatable, without needing to manually install and configure everything on the host system.


:link: I’ve shared my working setup and experience here:
My working setup with NGINX Proxy Server