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

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

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

  • qjkxbmwvz@startrek.website
    link
    fedilink
    English
    arrow-up
    0
    ·
    12 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
        0
        ·
        12 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.

  • Svinhufvud@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    0
    ·
    12 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.

  • UnpledgedCatnapTipper@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    12 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.

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

    i have a little program for dynamic dns running in docker that checks every few seconds for an IP change and swaps my DNS records if it gets rerolled.

    works well on my home network, I can use my domain for all my private services local and remote through wireguard :)

  • Brickfrog@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    12 days ago

    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

    Neither of those are requirements. Just buy a domain at a registrar that allows you to dynamically update an IP address with a domain you have there. Look into DDNS update scripts and/or your own internet router, many routers have that feature built-in already.

  • Encrypt-Keeper@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    12 days ago

    What are you asking? You can just buy a domain whenever you want. You can use it on your server without a VPS or static IP.

    Are you asking us how to make your services reachable at that domain publicly over the internet?

  • TrippinMallard@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    12 days ago

    You can use Netbird Cloud’s reverseproxy to point your domain to a device on your wireguard mesh.

    That way your home server can be under 3x NATs and dynamic IP and you’ll still be fine.

    Later if you want to own the netbird you can self host it on a VPS if you’re willing to migrate all devices to your self hosted wireguard mesh.

  • mic_check_one_two@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    12 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
      0
      ·
      12 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)

  • grue@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    12 days ago

    I have a domain, but all I use it for so far is email (with an email provider, not my own mail server, hosted locally or otherwise). I’d still call that “usable,” though.

  • IronKrill@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    11 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.

  • imetators@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    11 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.