Top
Best
New

Posted by todsacerdoti 4/10/2025

.localhost Domains(inclouds.space)
302 points | 196 commentspage 4
radel 4/10/2025|
I think you don't really need the /etc/hosts entry, I use this since google started using .dev domains and switched to using .localhost for everything local.

Never needed the entry

oulipo 4/10/2025|
and you're still setting up a proxy for the port forwarding?
_def 4/10/2025||
I recently tried to use the dnsmasq method mentioned at the very end but had some issues with fallthrough, as most of my dns traffic went trough my dev setup then first, which I didn't want. In the end I configured a "real" domain and let it point to 127.0.0.1, because I need arbitrary wildcard subdomains.. but I'm still not very happy with it because it feels like an unecessary dependency.
accrual 4/10/2025||
Neat setup! I do something similar on OpenBSD. I have a CSV file that maps IP, MAC address, and hostname for various devices on my LAN. A shell script reads the file and creates a matching hosts file, dhcpd config, and unbound config, then restarts dhcpd and unbound (caching DNS server).

Whenever a host requests a DHCP lease it receives its assigned IP which matches the unbound record, then I can always access it by hostname.

VikingCoder 4/10/2025||
Tailscale is another neat way. You can have ephemeral nodes. I want to learn how to do it with Docker, but apparently it's not too bad.
techn00 4/12/2025||
I have a small go binary that uses caddy and dns-sd on mac to have any kind of domain names on my local network (uses mdns) with https. Really nice for accessing websites from my phone.

https://github.com/DeluxeOwl/localhttps

politelemon 4/11/2025||
This feels like more work than necessary, I'm not seeing an advantage. Ideally any kind of dev setup should be as contained/localized as possible, but if I'm having to modify OS components, then that feels like sprawl. Or, it's like /etc/hosts but with extra steps.
sabslikesobs 4/11/2025|
Yes, I felt like this too. I like that it's cute and how it removes the need to inject ports into any "this is my URL" environment variables, but I agree it does sound like "sprawl." Browser bookmarks serve the same purpose.
mrweasel 4/10/2025||
We have a separate domain registered, where you can add any wildcard subdomain, so webui.company-test.com and that will resolve to 127.0.0.1. Then we can do pretty much the same.

I'm not entirely sure how I feel about it, but at least it's on a completely separate domain.

pwdisswordfishz 4/10/2025||
Or you could have /etc/hosts resolve them to other addresses in the 127.0/8 block.
whalesalad 4/10/2025|
I have a public domain that resolves to a static lease in my internal network, which is running nginx proxy manager.

When I add a new site to my local setup, I just define a CNAME in Cloudflare and add an entry in Nginx proxy manager. It handles SSL via wildcard cert.

More comments...