• paequ2@lemmy.today
    link
    fedilink
    English
    arrow-up
    20
    arrow-down
    1
    ·
    23 days ago

    Actually, one thing I want to do is switch from services being on a subdomain to services being on a path.

    immich.myserver.com -> myserver.com/immich
    jellyfin.myserver.com -> myserver.com/jellyfin
    

    I’m getting tired of having to update DNS records every time I want to add a new service.

    I guess the tricky part will be making sure the services support this kind of routing…

    • suicidaleggroll@lemmy.world
      link
      fedilink
      English
      arrow-up
      23
      ·
      23 days ago

      Why are you having to update your DNS records when you add a new service? Just set up a wildcard A record to send *.myserver.com to the reverse proxy and you never have to touch it again. If your DNS doesn’t let you set wildcard A records, then switch to a better DNS.

      • Scrath@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        10
        arrow-down
        1
        ·
        23 days ago

        Not OP but a lot of people probably use pi-hole which doesn’t support wildcards for some inane reason

        • Croquette@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          5
          ·
          23 days ago

          That’s my case. I send every new subdomain to my nginx IP on pi-hole and then use nginx as a reverse proxy

          • Scrath@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            1
            ·
            23 days ago

            That was my exact setup as well until I switched to a different router which supported both custom DNS entries and blocklists, thereby making the pi-hole redundant

            • Croquette@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              23 days ago

              I run opnsense, so I need to dump pi-hole. But I don’t have the energy right now to do that.

              Pi-Hole was pretty straightforward at the time and I did not look back since then. Annoying, but easy.

              • Scrath@lemmy.dbzer0.com
                link
                fedilink
                English
                arrow-up
                1
                ·
                23 days ago

                I use a MikroTik Router and while I do love the amount of power it gives me, I very quickly realized that I jumped in at the deep end. Deeper than I can deal with unfortunately.

                I did get everything running after a week or so but I absolutely had to fight the router to do so.

                Sometimes less is more I guess

        • qjkxbmwvz@startrek.website
          link
          fedilink
          English
          arrow-up
          2
          ·
          23 days ago

          I switched to Technitium and I’ve been pretty happy. Seems very robust, and as a bonus was easy to use it to stop DNS leaks (each upstream has a static route through a different Mullvad VPN, and since they’re queried in parallel, a VPN connection can go down without losing any DNS…maybe this is how pihole would have handled it too though).

          And of course, wildcards supported no problem.

        • Klajan@lemmy.zip
          link
          fedilink
          English
          arrow-up
          2
          ·
          23 days ago

          It does support it, you just have to add it to dnsmasq. I have it Setup under misc.dnsmasq_lines like so:

          address=/proxy.example.com/192.0.0.100
          local=/proxy.example.com/
          

          Then I have my proxied service reachable under service.proxy.example.com

    • CorvidCawder@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      17
      ·
      23 days ago

      Wildcard CNAME pointing to your reverse proxy who then figures out where to route the request to? That’s what I’ve been doing - this way there’s no need to ever update DNS at all :)

      I find the path a bit clunky because the apps themselves will oftentimes get confused (especially front-ends). So keeping everything “bare” wrt path, and just on “separate” subdomains is usually my preferred approach.

    • shadowtofu@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      3
      ·
      23 days ago

      I had the same idea, but the solution I thought about is finding a way to define my DNS records as code, so I can automate the deployment. But the pain is tolerable so far (I have maybe 30 subdomains?), I haven’t done anything yet