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?

26 points

A reverse proxy will achieve what you’re looking for, yes. I do precisely what you’re describing. I use “local DNS” on my pihole, with CNAMEs for each service pointing to my server IP address. I’m running Caddy on the server, specifically this (because my services are running in Docker containers): https://github.com/lucaslorentz/caddy-docker-proxy

As far as a “dashboard” app, you have options there as well. I’m using Heimdall currently, but Homarr also looks pretty nice.

permalink
report
reply
4 points

I’ll probably do the first thing, since the server is running AdGuard Home already.

permalink
report
parent
reply
2 points

Is pihole alone enough to do the reverse proxy, or do you need caddy as well? I’m only somewhat familiar with how these things work

permalink
report
parent
reply
6 points
*

PiHole can’t specify specific ports for each cname, which is what you need a reverse proxy for.

Typically, you create all of your cnames in pihole and direct them to your reverse proxy server IP. From your reverse proxy of choice, you specify each url to the specific ip:port of your service.

permalink
report
parent
reply
1 point

How can I use my Pi-hole as DNS Server also over VPN? I run Wireguard on Unraid. And while the VPN works, I can’t seem to the DNS over VPN to go my way.

permalink
report
parent
reply
10 points

Lots of good suggestions, but no one has mentioned the simple option of browser bookmarks?

Any good browser has built in sync, so bookmarks are already shared across all of your devices.

permalink
report
reply
1 point

Unfortunately I specifically opted out of any sync, because I want everything in my NixOS config also on mobile I use a different browser

permalink
report
parent
reply
1 point

There are other tools like Floccus, Nextcloud Bookmarks, etc that will handle sync across multiple browsers, so that could be an option if you wanted to do that.

permalink
report
parent
reply

I mean, if you’re problem is just remembering to type “10.0.0.100:8080” you could just have browser bookmarks. But that’s not very selfhosty. 😁

Personally, I’ve got a bit of #1 and #2 going on.

I’ve got Nginx Proxy Manager in docker that rev proxies pretty much everything and adds SSL on top. I am running an inside DNS zone, so I have a bunch of CNAMEs that all point to the host running NPM. Lastly, I’m using Dashy as the front end to it all.

permalink
report
reply
7 points

Heimdall

permalink
report
reply
-2 points

I don’t know why people keep suggesting reverse proxy when this is what OP is looking for.

permalink
report
parent
reply
2 points

OP listed two solutions they were considering, one of which explicitly mentioned using a reverse proxy. The other mentioned using a “dashboard app”. Commenters have given useful advice regarding both.

permalink
report
parent
reply
1 point

I might do both for easier finding of the URL, but still being able to remember it and access the apps by a URL if I ever need it

permalink
report
parent
reply
4 points

Short answer: something like nginx proxy manager with a single wildcard dns entry makes this super simple.

permalink
report
reply
2 points

Thanks ended up doing a wildcard dns entry but not with Nginx Proxy Manager but with Caddy. On NixOS I can just add like 3 lines of code to declare a reverse proxy for a specific service in the same file where I enable same service.

permalink
report
parent
reply
1 point

Wait, does it mean I can use something like *.example.com in my pihole for all services? Atm Im using jellyfin.example.com, nextcloud.example.com, etc.

permalink
report
parent
reply
1 point
*

Exactly.
As long as you don’t need something like mail.example.com to point somewhere else.
I have a subdomain for my home stuff (so jellyfin.h.example.com and h.example.com is the wildcard) so that any other subdomains are still usable for internet things.

Only thing is, Pihole doesn’t have it in the UI. It’s widely requested, so I’m sure it will come soon™

If you are happy SSHing in, tweaking some files, then it’s doable.
https://hetzbiz.cloud/2022/03/04/wildcard-dns-in-pihole/

Edit: I actually use my router as my DNS, with its DNS set to be the pihole. My router can do wildcard DNS overrides. However, I do lose insights from the pihole metrics: all requests are from 10.0.0.1

permalink
report
parent
reply
1 point

Nice, thank you. Ill try that

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 4.4K

    Monthly active users

  • 3.8K

    Posts

  • 81K

    Comments