So maybe I am missing something obvious, but here goes:

I’ve got a small server at home, and I have simply.com pointing various domains to it. Works fine, nginx routs the traffic where it needs to go.

But whenever I am at home and connected to wifi I have to use the internal address and port to reach my server, e.g. 192.168.0.192:8096 for my Jellyfin server. If I use the public URL at home, i hit the login page to my router.

This is annoying when I use apps, as I need to switch between the public URL and the internal address as I come and go from my home…

What are my options for doing something about this? I want to use the public URL at home too…

3 points

usually in your router settings you can change local DNS settings. you can set your domains and subdomains to point to your server’s local IP.

permalink
report
reply
3 points

I strongly recommend the NAT loopback route over attempting split-horizon dns.

permalink
report
reply
1 point

I did go for that 😁 was a simple checkbox in the router settings.

permalink
report
parent
reply
1 point

FYI, this is called “split horizon” DNS, where the location you get directed is based on the network you adk from. Make sure you have short TTLs set on your DNS records, or devices can have problems moving between networks and still having records cached from the prior network

permalink
report
parent
reply
2 points

Based on my setup, I use adguard to DNS rewrite all *.example.com domains to the IP of my Nginx proxy. I have the proxys setup on NPM. On my router I have adguard set as the home network DNS. Cloudflare is used as the external DNS so that the *.example.com domains work outside of my network (and point to thr Nginx server).

My setup is relatively basic, unraid dockers etc.

permalink
report
reply
3 points

It depends if your reverse proxy is inside your home network or outside. It should work without any other configuration if you forward ports 80&443 from external domain with something similar to rathole and configure reverse proxy inside home network.

This is not an answer to your question about using the same url, but see this article, it might be helpful. Tl;dr: mdns + reverse proxy.

permalink
report
reply
1 point

If your ISP provides IPv6, set that up. Everything will have a globally routed address, so your domains will work from your LAN and the internet. If you don’t have IPv6 available, get a free tunnel from Hurricane Electric.

permalink
report
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

  • 5.2K

    Monthly active users

  • 1.8K

    Posts

  • 19K

    Comments