Hey everyone. This is probably a super noob question, but I’m very much just an amateur when it comes to self-hosting.

I host several services that I access locally through 192.whatever:####, and when I occasionally need remote access, I use Tailscale and access through 100.whatever: ####. The duplicate bookmarks is mildly annoying though.

Can I just buy a personal domain, and have all my services be coolname.com:#### for both local and Tailscale access? Is that as simple a process as I want it to be?

Edit: I appreciate all the comments and I’ll probably just use Tailacale’s MagicDNS for simplicity, but one or my (unwritten, my bad) goals was to have one URL that works locally and remotely, regardless of Tailscale. I don’t leave Tailscale constantly connected because it overheats my phone (which already has terrible battery life).

  • Encom@lemmy.world
    link
    fedilink
    English
    arrow-up
    20
    ·
    9 hours ago

    Look at their MagicDNS for this. It uses the hostname of the system along with your tailnet to allow you to do just this

    • FedX@quokk.au
      link
      fedilink
      English
      arrow-up
      5
      ·
      8 hours ago

      This is the correct answer. You can even use it to force all the devices in your tailnet to use the same DNS server, and it’s really quite easy to host a sinkhole with either PiHole, AdGuard Home, or my preference, dnscryptproxy. Also works with just the hostname if you want. I.E. ssh MyLinuxBox works just as well as ssh MyLinuxBox.whatever.ts.net.

      If you want the service publicly accessible through the wider internet (the person doesn’t even need TS to access the website), check out TS Funnel.

      • lemmyvore@feddit.nl
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 hours ago

        The downside to the .ts.net approach is that you need to install multiple TS clients if you want multiple subdomains. Typically one per service.

        There are projects like TSD-Proxy that help with that. It makes it so you only use one Docker container instead of having to make a sidecar container for every service.

        Then you also have to resolve *.tailnet.ts.net on your LAN’s DNS and that’s it. Unless you ever want to use something other than Tailscale, that is.

    • soratoyuki@piefed.zipOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 hours ago

      So this definitely seems like the easiest solution, and MagicDNS is on by default, and the normal 100… address works fine, but no combination of the short or full domain seem to actually work. Not homeserver:#### nor homeserver.tail#.ts.net:#### nor even 100.100.100.100:####. Maybe it’s an issue with Unbound or something. Blargh.

      • FedX@quokk.au
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 hours ago

        What are you testing MagicDNS with? What are the DNS settings? What does trying dog myhost (or dig, or using about:networking in a Firfox derived browser (maybe Chrome too?) if you prefer) tell you? For reference, on a Linux host (I don’t remember exactly, so don’t quote me), you should se something like this in /etc/resolv.conf

        nameserver 127.0.0.1
        options edns0 trust-ad
        search xxxxxx.ts.net xxxxxxxxxx.local.net
        
        • soratoyuki@piefed.zipOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 hours ago

          So I was doing this from the (emulated?) terminal on my Android phone, and dig just returned command not found. I just got off work and moved to my desktop running Fedora, and on my desktop MagicDNS addresses work. Which I guess narrows things down.

          On my desktop, dig returns

           ; <<>> DiG 9.18.51-dev <<>> toshokun  
           # ;; global options: +cmd  
           ;; Got answer:  
           ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 6364  
           ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1  
           
           ;; OPT PSEUDOSECTION:  
           ; EDNS: version: 0, flags:; udp: 65494  
           ;; QUESTION SECTION:  
           ;toshokun.                      IN      A  
           
           ;; Query time: 3960 msec  
           ;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)  
           ;; WHEN: Sat Nov 14 15:46:41 EST 2026  
           ;; MSG SIZE  rcvd: 37  
          

          My resolv.conf is pretty similar. The namesever I’m pretty sure is correct for systemd reasons.

           nameserver 127.0.0.53  
           options edns0 trust-ad  
           search tail######.ts.net  
          

          I appreciate the help, but realistically the answer to “Is that as simple a process as I want it to be?” is no, not quite, at least at my knowledge level lol. I’ll do more documentation reading in the meantime.

          • FedX@quokk.au
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 hours ago

            Interesting. Does trying to simply ping myhost or myhost.xxx.ts.net work?

            • soratoyuki@piefed.zipOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 hours ago

              On Android (well, GrapheneOS) both return temporary failure in name resolution.

              Pinging the Tailscale IP (the 100. one) returns 100% packet loss even though opening 100.whatever:#### works in a browser.

              • FedX@quokk.au
                link
                fedilink
                English
                arrow-up
                1
                ·
                2 hours ago

                Ok, I think I am beginning to understand the issue. Can you try resolving the domain in your browser? If it’s a Firefox derivative, you can go to about:networking, and it gives you the ability to resolve a domain in the browser. Some Chrome based ones should have similar features, but YMMV.