Comment on Custom domains and Tailscale
lemmyvore@feddit.nl 2 weeks ago
Can I just buy a personal domain, and have all my services be coolname.com:####
It’s actually better. If you get a domain and install a reverse proxy on the server (Nginx Proxy Manager is easy to use) it will help you get free SSL certificates and make subdomain “aliases” so you’ll be able to use https://service.cooldname.com/ links. And they’ll have the little shield in browsers and everything.
for both local and Tailscale access? Is that as simple a process as I want it to be?
The Tailscale access is a bit more involved. Here’s the general steps:
- Get Tailscale running on the server with all the services and the reverse proxy. Tailscale will create a network interface with a 100.64.x.x IP address.
- Have the reverse proxy listen on that 100.64 IP. Generally this should happen automatically since it tends to listen on all interfaces by default. You should be able to see the reverse proxy admin page at http://100.64.x.x:8081 (or whatever the admin port is).
- In order to reach the reverse proxy when you type service.coolname.com you will need to tell your LAN DNS server to resolve
*.coolname.comto the LAN IP of your server. - Next you need to install a small DNS server and also have it listen only on the Tailscale IP. Dnsmasq is a tiny server you can use for this. You want to configure it to resolve
*.coolname.comto the Tailscale IP (100.64.x.x). - Then you go to the Tailscale admin page under the “DNS” section, click on “Add nameserver”, choose “Custom nameserver”, put in that Tailscale IP, check the “Restrict to domain” box and put “coolname.com” in there.
After that, when you’re at home but NOT connected to Tailscale you will have coolname.com pointing at the reverse proxy via the LAN IP, and when you ARE connected to Tailscale (whether at home or not) it will be pointing to the Tailscale IP and go through the Tailscale VPN. So you’ll be able to use https://service.coolname.com/ all the time everywhere.