Currently my home server runs a few services that have a web UI. I currently access them by typing in the IP address and port number, but it’s now starting to get annoying to remember the ports.

What’s the best way to handle this?

I’ve thought of two solutions:

  1. I’m running a local DNS server, so I probably would be able to make CNAMEs from something like adguard.server.local to the IP, and do a reverse proxy with something like Caddy
  2. Maybe there’s some unified dashboard app that is a reverse proxy with some simple frontend where I can just navigate to server.local and click a button to choose which specific service I want to see?

What are your opinions on this?

  • @lal309@lemmy.world
    link
    fedilink
    English
    31 year ago

    If you are running everything in containers then there’s a very simple and straightforward solution for this. Run your reverse proxy (NPM, Caddy, whatever) on two network (internal and external or whatever you want to call them). In the external network is where you will map your host port to the reverse proxy container. For example, on NPM it’s 81 so you map host 81 to container 81. You should then be able to go to http://localhost:81. The internal network will be where your reverse proxy will talk to your other two web services you want to run so make sure you add your other services to this internal network.

    On your DNS (personally I run PiHole) point your service name (as guard) to the IP of the host running your reverse proxy. Do an nslookup on the name to make sure you actually get the right IP for the name you want.

    Login to your reverse proxy and configure a proxy host to point to the name of the container and the correct port. Since the reverse proxy is on the same “internal” network, they should be able to talk to each other via names rather than IPs.

    Test your connection to the service on your browser.

    Another solution (less technical but much faster) would be to runa dashboard service like Heimdall then just add a “link” to the service you want and the port it’s running on. Then you will have a single link to click on that will take you where you want without typing manually. You could even add the dashboard as your browser default page on startup.

    There are other ways to skin this cat but these two solutions will get you where you want to go quickly.