You don't need a domain name, use the hostname from tailscale.
But you still need to remember the port of the service you're trying to reach, which isn't great.
Not OP, but taking this approach doesn't give you tls, the browser will complain the connection is not secure (even though it is because of Tailscale)
If you are running a Pi-hole you can set the IP to a domain in the local DNS, then add this DNS in the Tailscale settings.
But you'll need a reverse proxy if you want to avoid having to put in ports. The reverse proxy takes the traffic sent to the normal HTTP ports and redirects it to the port of the service based on the domain name. Some common reverse proxies for docker are traefik, caddy, or nginx (web server) set up as a reverse proxy.
Here's how I do it, it's the simplest way I've found.
Make a directory for your certificates like /etc/nginx/certs Use "tailscale certs YourDomainName.ts.net" Put the certificate in the certificate directory. The nginx config:
server { listen 80; server_name YourDomainName.ts.net;
location / { return 301 https://$host$request_uri; } }
server { listen 443 ssl http2; server_name YourDomainName.ts.net;
ssl_certificate /etc/nginx/certs/YourDomainName.ts.net.crt;
ssl_certificate_key /etc/nginx/certs/YourDomainName.ts.netkey;
location / { proxy_pass http://127.0.0.1:8080; //Change it for the port you want to forward proxy_http_version 1.1; proxy_buffering off; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; } }
If you’re only accessing them via tailscale just sync your bookmarks between browsers and use them.
I do this exact same thing with Firefox sync - so anytime I make a change it sends it instantly to all the other devices. Regardless of the OS or if it’s a cell, tablet, laptop, pc, or vm. All browsers have the same bookmarks.
Brave, Chrome, and other browsers offer the same functionality.
Self-Hosted Main
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.
For Example
- Service: Dropbox - Alternative: Nextcloud
- Service: Google Reader - Alternative: Tiny Tiny RSS
- Service: Blogger - Alternative: WordPress
We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.
Useful Lists
- Awesome-Selfhosted List of Software
- Awesome-Sysadmin List of Software