I am trying to set up Nextcloud AIO and have run into some SSL issues when trying to run it behind a reverse proxy. I will try to provide as much info as I can, and please let me know if I have missed something. I have replaced some info/addresses with placeholders.
Basic info:
- Running on a Synology NAS DS920+
- Reverse proxy is Nginx Proxy Manager in a Docker container, because…
- …ports 80 and 443 cannot be used due to the NAS already using them
- No certificate files have been intentionally placed on the NAS or Docker containers, as my understanding is that NPM handles this
~
ERROR
Here is the error from the Nextcloud AIO setup page:
Domain does not point to this server or the reverse proxy is not configured correctly. See the mastercontainer logs for more details. ('sudo docker logs -f nextcloud-aio-mastercontainer')
and the detailed error in the log…
[Tue Oct 25 16:48:48.740562 2022] [php:notice] [pid 165] [client 127.0.0.1:44796] The response of the connection attempt to "https://<sub.domain.tld>:443" was: , referer: https://<local-ip>:7380/containers
[Tue Oct 25 16:48:48.740600 2022] [php:notice] [pid 165] [client 127.0.0.1:44796] The error message was: SSL certificate problem: self signed certificate, referer: https://<local-ip>:7380/containers
[Tue Oct 25 16:48:48.740594 2022] [php:notice] [pid 165] [client 127.0.0.1:44796] Expected was: <hash>, referer: https://<local-ip>:7380/containers
where:
- sub.domain.tld is the FQDN I have registered
- local-ip is the local IP address of the NAS
- hash is the expected response from the Apache server within the AIO, if I understand correctly
~
This error displays at the AIO setup page, when trying to submit my domain, shown below:
~
DOCKER SETUP
Here is my docker-compose file for the AIO:
version: "3.8"
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
services:
nextcloud:
image: nextcloud/all-in-one:latest
restart: unless-stopped
container_name: nextcloud-aio-mastercontainer
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 7380:8080
environment:
- APACHE_PORT=11000
- APACHE_DISABLE_REWRITE_IP=1
- NEXTCLOUD_TRUSTED_DOMAINS=<sub.domain.tld> <local-ip> # Your domain name + proxy host IP
- TRUSTED_PROXIES=<local-ip> # proxy host IP
~
My docker-compose file for the reverse proxy:
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
container_name: nginx-proxy-manager
restart: unless-stopped
ports:
- '6780:80'
- '6781:81'
- '28443:443'
environment:
DB_MYSQL_HOST: ~
DB_MYSQL_PORT: ~
DB_MYSQL_USER: ~
DB_MYSQL_PASSWORD: ~
DB_MYSQL_NAME: ~
volumes:
~
depends_on:
- db
db:
image: 'jc21/mariadb-aria:latest'
container_name: npmdb
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ~
MYSQL_DATABASE: ~
MYSQL_USER: ~
MYSQL_PASSWORD: ~
MYSQL_TCP_PORT: ~
MYSQL_UNIX_PORT: ~
volumes:
~
~
The AIO setup page states that port 80 and 443 of my server should be open. Because the AIO will be run behind the reverse proxy, I will be opening the mapped ports for 80 (6780) and 443 (28443) on my router like so:









