I know there are already a bunch of nginx proxy manager related questions but I’m pretty sure I’ve gone through all of them today and I’m still stumped.
I have my domain’s dns with Cloudflare and I have next.mydomain.com successfully pointing to my server’s public ip address.
I’ve managed to get the install partially done, and the only way I was able to get it was with the proxy host setup below. It won’t work with http, or localhost, or even with the 11000 apache port.
as of right now I can get it to show https://next.mydomain.com/containers and it starts up all the containers and then there is a ‘open your nextcloud’ button, I click on it and it just redirects back to the /containers page.
Ok i’ve done a full reset and followed the guide again. This is where I’m at.
this is my docker-compose.yml file that starts the master container, I’m able to load up https://ip.address.of.the.host:8080 and go through the initial setup of receiving my passphrase and logging in. it then redirects me to /containers where I can select the containers I want and it starts them all up successfully. I checked the logs and everything looks good.
Now this is where I’m confused with the npm proxy setup. The guide says to use network_mode host. but if i do that then the mastercontainer tries to run on port 80 which obvsiouly conflicts, the only way for it to run on 8080 is to comment network_mode and add the ports: -8080:8080 manually.
Any combination of ip-address, “localhost”, “127.0.0.1” causes the redirect loop error in the browser when I go to https://next.mydomain.com
but then how do i set the port to 81? if i enable network_mode: host, the ports i set are discarded and I cant access npm web ui
~/docker/nginx-proxy-manager$ docker-compose up -d
[+] Running 2/2
✔ Container nginx-proxy-manager-app-1 Started 0.0s
! app Published ports are discarded when using host network mode
this is my npm compose:
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: always
ports:
# - '80:80'
- '81:81'
# - '443:443'
environment:
DB_MYSQL_HOST: "localhost" # Use the service name of your existing MySQL container
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "PASSWORD"
DB_MYSQL_NAME: "npm"
volumes:
- /srv/storage/npm/data:/data
- /srv/storage/npm/letsencrypt:/etc/letsencrypt
network_mode: host