Yet another noob who can't use Nginx Proxy Manager reddit / selfhosted ---------------------------------------------------------------------- Jirarchi · 2023-11-26 11:03 Hello! I came here looking for help after trying almost everything I could find on here and internet in general, I fear this may be an underlying problem of understating how things work properly. So, here's my setup: \-Freshly installed ubuntu server 22.04 \-CasaOS (Which I'm now starting to second guess, if you've got good alternatives let me know) \-Nginx Proxy Manager dockered \-Services that I want to access from outside (I have a Domain and DDNS, so my pc is fully reachable, I have a wildcard A record) So, as far as I understood, in order to reverse-proxy my services I need to put them in the same network as NPM and then create a proxy host (via IP:port ora docker hostname:port). When I try using docker hostnames it just gives me 502, if I use the IPs some work and some redirect to NPM and I can't figure out why. I'm fine with sticking with IPs, I'd love to use hostnames but the advantages of CasaOS would be defeated by the fact that I wouldn't install directly through the market but I would need to import a compose file for each service. I hope I was clear enough, there's probably one detail that I'm missing that messes everything up. Thanks for your help! ---------------------------------------------------------------------- Malossi167 · 2023-11-26 11:27 >so my pc is fully reachable So it is an exposed host or did you forward the ports 80 and 443? >When I try using docker hostnames it just gives me 502, if I use the IPs some work and some redirect to NPM and I can't figure out why. They have to be within the same docker network. ---------------------------------------------------------------------- RydRychards · 2023-11-26 11:31 You need to create an external network with docker and stick every host which is supposed to be reachable from nginx into that network (nginx too of course) ---------------------------------------------------------------------- Jirarchi · 2023-11-26 11:31 My bad, I was a little vague. Yes, I forwarded ports 80 and 443 to my server. And yes, they are on the same docket network, I’ve tried setting up the proxy host with both internal and external container ports, which led to bad gateway. ---------------------------------------------------------------------- zakafx · 2023-11-26 11:33 set up CNAME instead of wildcard A record. ---------------------------------------------------------------------- Jirarchi · 2023-11-26 11:50 I did! I created a nginx\_network and attached all containers including NPM. ---------------------------------------------------------------------- RydRychards · 2023-11-26 12:03 You could try docker network inspect nginx_network to see if the containers are actually part of the network. You could then enter one of the containers (docker exec - it containerid sh) and try to ping another container by name to troubleshoot. ---------------------------------------------------------------------- Jirarchi · 2023-11-26 12:11 Turns out I created two networks and I was using the wrong one. Thank you very much, now I can go back to study for my exams. ❤️