Expose services running on the same server reddit / selfhosted ---------------------------------------------------------------------- claud10r · 2023-12-21 18:22 Dear all, I'm just configuring my first Raspberry Pi 4 server. At the moment, I'm only running two services: Portainer and Immich. I can successfully access these services at localhost:{port} (2283 for Immich, 9443 for Portainer). My router is a FritzBox 7590, so I'm using pi.fritz.box:{port} to also access these services from other devices in the same network (pi is the hostname of the Raspbery). Everything works as expected. Now, I'd like to have these same services accessible by using either subdomains or subdirectories, whatever is easier to configure. I do not want these services accessible over the internet, just in my local network. So, for example: Immich, I'd like it to be accessible at either [photo.pi.fritz.box](https://photo.pi.fritz.box) or pi.fritz.box/photo. Going for the subdirectory way, I've tried installing Nginx Proxy Manager, but I don't understand how it works. I've set up a new proxy host like this: Domain name: [pi.fritz.box](https://pi.fritz.box) Scheme: http Forward hostname/ip: localhost Port: 80 Then, in custom location: Location: /photo Scheme: http Forward hostname/ip: localhost Port: 2443 However, when I try to access [pi.fritz.box/photo](https://pi.fritz.box/photo) I get a 502 Bad Gateway. Doing a similar configuration, [pi.fritz.box/portainer](https://pi.fritz.box/portainer) doesn't work either. Can you help me understanding what I'm doing wrong? Thank you! ---------------------------------------------------------------------- arcadianarcadian · 2023-12-21 19:24 in your case, localhost means NPM itself. If everything running on docker containers you have to tell the NPM which services running on which container and port. (subdomain is simple buy the way.) Domain name: pi.fritz.box Scheme: http Forward hostname/ip: localhost Port: 80 Then, in custom location: Location: /photo Scheme: http Forward hostname/ip: immich Port: 2283 ​ http://pi.fritz.box/photo ---------------------------------------------------------------------- e2021d · 2023-12-21 21:57 Facing the same problem right now. I'll have a try with Traefik tomorrow. ---------------------------------------------------------------------- lazyzyf · 2023-12-25 04:10 use caddy local certificate + pihole