I’ve been thinking about finally getting myself a proper domain for my server, but a friend told me that to get one I either need a VPS with a public ip (which just takes all the fun out of selfhosting) or purchase a static ip, which is beyond what I’m willing to spend for a hobby. Do I have any good options or should I just let it go?

Also, if this isn’t the correct community for this, I’d appreciate being pointed to the right one, thank you

Update: after reading the comments the two main options I’m considering now are either a cheap VPS to use as proxy for my network via wireguard, or DynamicDNS. I’ll see if I can figure out the rest from here, thank you!

  • fozid@feddit.uk
    link
    fedilink
    English
    arrow-up
    19
    ·
    7 days ago

    I’ve had a domain with a dynamic up for over a year with no problems. I have a simple script that runs every 30mins to check if my IP has changed, then updates the DNS records when required.

  • Ada@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    12
    ·
    7 days ago

    Our setup uses a domain pointed at a dynamic (but stable) IP with a script to update it periodically

  • UnpledgedCatnapTipper@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    12
    ·
    7 days ago

    I run a variety of self hosted things via my domain on a dynamic IP. I just have dynamic dns set up to check my current public IP periodically, and update the dns entry if it changes.

  • Svinhufvud@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    11
    ·
    7 days ago

    It is very much possible to have a dynamic IP and a usable domain.

    Both Cloudflare and desec.io (for example) have APIs that you can hit everytime your public IP changes.

    I have a script that checks every minute whether my public IP has changed from the last check, and if it has, an API call will be sent.

    With a scheme like this, your downtime will be minimal, if ever even noticed.

  • mic_check_one_two@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    10
    ·
    7 days ago

    What you’re looking for is called Dynamic DNS. I use Cloudflare for my DNS (which feels a little like making a deal with the devil) and Cloudflare-DDNS to automatically update my DNS records when my WAN IP changes. Basically, the container checks the current WAN IP, checks the current Cloudflare DNS records, and pushes a change if they don’t match. It runs every few minutes, and then rests again until the next check. I’m sure other DNS providers have similar ways to set up DDNS.

    It’s not a 100% foolproof thing, because your WAN IP changing will take a few minutes to update. But a few minutes of downtime is much better IMO, when the alternative is needing to manually VPN into my server (if the VPN even still works, since the WAN IP changed), and troubleshoot it every time the IP address changes.

    • Joelk111@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 days ago

      You can configure it to run as often as you want (well, I’m not sure about cloudflare, but with other services you can, like DuckDNS)

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

        Yeah, I personally prefer to keep things running fairly light. I’m not running a 99.9% uptime server with hundreds/thousands of users, so I can tolerate a 0-5 minute downtime every few days.

  • qjkxbmwvz@startrek.website
    link
    fedilink
    English
    arrow-up
    8
    ·
    7 days ago

    VPS with a public ip (which just takes all the fun out of selfhosting)

    Why do you say this? My VPS only runs a reverse proxy and WireGuard, with all services hosted on my computers at home.

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

        Cool, I recommend it!

        I have my public facing reverse proxy point to my public services, and I also have it set up as a “roadwarrior” VPN to my home. So, I can connect my phone via WireGuard to my VPS, and a local DNS resolves my private services to the private IP addresses in my home network (so, I also run a reverse proxy on my server, for internal services).

        I also have an off-site backup using this — just a raspberry pi and an HDD at family’s, that rsyncs+snapshots over the WireGuard network.

        I’m sure I’m not following all the best practices here, but so far so good.

  • Bakkoda@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    7 days ago

    I’ve been self hosting for 20 years with the same domain(s) and have never owned a static IP. Use a reliable DNS service with simple update tools (curl on a cron job for example).

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    3 days ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    CF CloudFlare
    CGNAT Carrier-Grade NAT
    DHCP Dynamic Host Configuration Protocol, automates assignment of IPs when connecting to a network
    DNS Domain Name Service/System
    IP Internet Protocol
    NAT Network Address Translation
    VPN Virtual Private Network
    VPS Virtual Private Server (opposed to shared hosting)

    [Thread #181 for this comm, first seen 18th Mar 2026, 09:30] [FAQ] [Full list] [Contact] [Source code]

  • entheo@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    7 days ago

    I believe cloudflare has some sort of tunneling option but I’ve never really looked into it, it might get around that.

    • Dave@lemmy.nz
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 days ago

      It does, yeah. If you aren’t averse to cloudflare then it’s a great option.

      From memory I think it’s limited to http/https traffic, but that’s normally not an issue, just have all your services behind a reverse proxy.

  • Sunnydmess@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    7 days ago

    I use this, Cloudflare zero trust. I run a connector (tunnel) named cloudflared on a raspberry pi which connects to cloudflare. The zerotrust tunnel configuration (in CF dashboard) lets me route http traffic into my local network by domain. The Application access policy in zero trust lets me secure it.

    • irmadlad@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 days ago

      I realize there is a lot of back and forth among selfhosters about Cloudflare’s usage, but I am thoroughly pleased with the set up. The only thing I chuckle about is their promotional emails.

      Your site saw more threats last month than the average site on Cloudflare. Here’s what that means:
      The good news is that these threats were mitigated by Cloudflare with the basic web application firewall (WAF) and bot protection you have on the Free plan.
      The bad news is that more complex and sophisticated cyber attacks may not be stopped by your current web application security posture.
      

      …however they promise if I spend some money, that will all go away, and it might, but it’s good now so don’t wake the sleeping dog.

      • TrippinMallard@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        You can use Netbird reverse proxy to connect your domain to any device on your mesh. Netbird cloud supports the reverseproxy too now if you don’t want to self host netbird on a VPS.

  • IronKrill@lemmy.ca
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 days ago

    My dynamic IP rarely changes. When it does, it gets updated by a Docker favonia/cloudflare-ddns image. I have yet to notice downtime.

  • marud@piefed.marud.fr
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 days ago

    If you already have a domain name and don’t want to switch to something else, know that some DNS registrar have an API to handle the domains. For a short period of time I had to rely on this and had a little python script to get my current IP and apply it to every A record in my DNS zone.
    It worked well (but then I took an arrow in the knee had static IP)

    • tofu@lemmy.nocturnal.garden
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 days ago

      Yeah I still do this. I have a cronjob on one of my servers that runs every five minutes, checks if the upstream DNS IP matches my public IP and, if not, sets it. Adding 60s TTL, this means an average downtime of 3 minutes per change, max 6 minutes.

      It’s also possible to use different nameservers than the one the registrar provides, in case the registrar doesn’t have a proper API for DNS.

  • imetators@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 days ago

    My ISP changes IP somewhere around once a month. I own a domain on porkbun and they offer a simple docker compose script that updates my records to a current IP.

    I believe other domain selling platforms also have similar scripts or solutions.