I have a few selfhosted services, but I’m slowly adding more. Currently, they’re all in subdomains like linkding.sekoia.example etc. However, that adds DNS records to fetch and means more setup. Is there some reason I shouldn’t put all my services under a single subdomain with paths (using a reverse proxy), like selfhosted.sekoia.example/linkding?

  • Saik0A
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    However, that adds DNS records to fetch and means more setup.

    If you don’t automate it… yeah.

    In my local setup I run OPNSense. It grabs the hostname and sends it off to my technitium instance. Automatically registers the hostname to a predetermined domain name.

    So if I run Lemmy on vlan 123 it will automatically register the domain lemmy.123.<internal domain>

    So when I go to configure my reverse proxy, I just have to point it to the hostname. Even when the dhcp renews… no problem, because OPNSense will negotiate the new address with my technitium instances. None of the fuss with paths and the nonsense that comes with it.

    For my external domains… it’s all just one big wildcard. *.saik0.com all forwards off to my reverse proxy (through cloudflare) with I think 2 or 3 exceptions? The reverse proxy pulls a wildcard cert and a top level cert for the domain and can just assign whatever subdomain it wants. No silly extra work. The only downfall is that because of the wildcard the 404’s all hit my server. But cloudflare can cache most of that, also it’s absurdly funny to serve a rickroll as my 404.