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?

  • Foster HangdaanA
    link
    fedilink
    English
    arrow-up
    2
    ·
    17 hours ago

    You do not need a static IP address or dynamic DNS if your domain registrar provides a REST API. My current registrar is Porkbun and they have a REST API. I simply have a cron job that regularly checks if my public IP[1] differs from the domain’s A-record. If it does, it updates the record to match the public IP address using their API.


    1. I use Porkbun’s ping endpoint to obtain my public IP. There are also alternatives such as Ipify. ↩︎