Is it possible to have a usable domain without a VPS or a static IP address?
from Inkstainthebat@pawb.social to selfhosted@lemmy.world on 18 Mar 09:00
https://pawb.social/post/41330704

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

#selfhosted

threaded - newest

entheo@lemmy.world on 18 Mar 09:03 next collapse

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 on 18 Mar 09:52 collapse

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.

drone509@discuss.tchncs.de on 18 Mar 09:03 next collapse

It is possible to use a dynamic DNS service. They’re typically pretty cheap. I did for several years. It kind of sucked so I rented a VPS.

Inkstainthebat@pawb.social on 18 Mar 09:22 collapse

In what way did it suck?

drone509@discuss.tchncs.de on 18 Mar 09:43 collapse

Keeping hardware running 24/7 cheaply is difficult. Expanding an existing setup is expensive. Consumer grade ISP’s will block unexpected network protocols sometimes seemingly for no reason. Dynamic DNS isn’t super robust, so several times I went on vacation and the DNS service would flake. Maybe it’s better if you pay more for it, but I have no complaints about my VPS. It’s nice to be able to just reliably reach my web stuff and not worry a cat bumped the power cable.

ada@lemmy.blahaj.zone on 18 Mar 09:04 next collapse

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

mantra@lemmy.zip on 18 Mar 09:06 next collapse

Could you use dynamic DNS? Pretty sure there are some free options.

cmnybo@discuss.tchncs.de on 18 Mar 09:17 next collapse

One of the better free options is FreeDNS, but you are limited to 5 records.

If you want your own domain, I would suggest Porkbun. They have an API that can be used for dynamic DNS.

Bakkoda@lemmy.world on 18 Mar 12:50 next collapse

I have used FreeDNS for so long I don’t remember and never ever had a problem. I have a few domains i don’t even use set to public as well.

i_am_somebody@lemmy.sdf.org on 18 Mar 15:22 collapse

+1 for freedns!

lumen@feddit.nl on 18 Mar 13:17 collapse

Something like deSEC.io allows you to use your own domain for dynamic DNS for free.

eksb@programming.dev on 18 Mar 09:13 next collapse

If your home IP does not change often, you can use a dynamic DNS service. But your services will be unavailable from the time that your IP changes and the time the DNS record is updated and the cached responses expire.

Jozav@lemmy.world on 18 Mar 10:12 collapse

Do you need to update your (Let’s Encrypt) certificates after an ip change?

eksb@programming.dev on 18 Mar 10:37 next collapse

No.

Ooops@feddit.org on 18 Mar 10:47 collapse

No.

Let’s Encrypt checks if you have control over the server the name eventually leads to, usually by providing you with a token that you put on your server for retrieval. The way there, including the IP, is irrelevant.

marud@piefed.marud.fr on 18 Mar 09:26 next collapse

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 on 18 Mar 09:41 collapse

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.

Decronym@lemmy.decronym.xyz on 18 Mar 09:30 next collapse

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)

8 acronyms in this thread; the most compressed thread commented on today has 14 acronyms.

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

mhzawadi@lemmy.horwood.cloud on 18 Mar 09:33 next collapse

I use OVH for all things DNS, TIL: they have a dynhost thing that will do all the DNS updating for you!

help.ovhcloud.com/csm/en-gb-dns-dynhost?id=kb_art…

czl@lemmy.dbzer0.com on 18 Mar 09:38 next collapse

If you’re self hosting you could even use github.com/qdm12/ddns-updater and skip a third-party service (if your registrar accepts dynamic entries)

IsoKiero@sopuli.xyz on 18 Mar 09:47 next collapse

I have dynamic dns address and a handful of CNAME records on my domains pointing on that dyndns-address so I can use ‘proper’ names with my services. When my public IP changes it takes a few minutes for the records to update, but it usually happens only when my router reboots so it’s been good enough for me.

Also I use two separate dyndns providers so there’s likely at least one working DNS entry to my network.

rosco385@lemmy.wtf on 18 Mar 09:51 next collapse

<img alt="" src="https://lemmy.wtf/pictrs/image/fa3cfe4f-665a-4c26-9012-0c17d9965bdd.gif">

MentalEdge@sopuli.xyz on 18 Mar 10:09 next collapse

I don’t have a static IP, and I just make sure to never ever let my DHCP lease expire. My ISP provides the same IP to the same MAC when renewing the lease. My longest streak on the same IP was three years.

As long as I always turn my router off by cutting the power, it won’t release the lease, so I keep my IP even through reboots. My last one didn’t release the lease at all, so it only ever got a new IP if it was off for over a day, or if I set a new MAC.

When my IP does change, I’ve configured my DNS record to only last an hour. So updating the domain to point to a new IP only takes an hour to update.

tburkhol@lemmy.world on 18 Mar 10:10 next collapse

If you only need it to be accessible inside your home, then you just need to run your own DNS. Have your dhcp point at your DNS and your DNS declare itself the master for your domain.

To get full functionality, you’ll probably want to have your registrar point to the public IP you get from your ISP as the domain’s authoritative name server.You should be able to script it to update the registrar when your ISP changes your IP, but that usually happens infrequently enough to do manually. Obviously can’t do that if you’re behind CGNAT.

To get Lets Encrypt certificates, you can do the DNS challenge. If your ISP gives you a (even inconsistent) public IP, you can do fancy ‘views’ with your selfhosted DNS, where it responds with private IPs inside your network and your ISP-given IP outside your network. I have certbot set up to expose my DNS & web server just before it starts its renewal process, then close the firewall after. Once you have the certificate, you can move it to where ever it will actually be used.

foster@lemmy.hangdaan.com on 18 Mar 10:43 next collapse

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.

JetpackJackson@feddit.org on 18 Mar 11:09 collapse

TIL porkbun can do that. Would that help with hosting behind a CGNAT?

Sunnydmess@lemmy.world on 18 Mar 10:47 next collapse

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 on 18 Mar 13:23 collapse

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 on 18 Mar 16:50 collapse

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.

irmadlad@lemmy.world on 18 Mar 19:46 collapse

Well, that’s nice to know. I’m somewhat familiar with NetBird.

ragingHungryPanda@piefed.keyboardvagabond.com on 18 Mar 10:59 next collapse

I started with dynamic DNS on my home server, then moved to an encrypted tunnel. the issue with ddns is that your provider may block your ports. Mine eventually blocked 80, 443, and the wire guard port.

When I switched to tunnels, with cloudflare as my provider, there was nothing my provider could do about it.

So, I’d recommend tunnels since many providers don’t want residential users hosting servers.

fozid@feddit.uk on 18 Mar 11:10 next collapse

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.

Nikki@lemmy.blahaj.zone on 18 Mar 11:17 next collapse

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 :)

frongt@lemmy.zip on 18 Mar 11:21 next collapse

Yes it’s possible. You can buy a domain name and then do literally nothing else if you want.

If it’s just for LAN use, you don’t even need to buy a domain name. You can use anything under the home.arpa, test, or internal TLDs. en.wikipedia.org/wiki/Special-use_domain_name

mrnobody@reddthat.com on 18 Mar 11:40 next collapse

I’m late to the party, but could everyone answer me this- how often does you’re public IP actually change with any of your ISPs??

With the numerous companies I’ve used, the ONLY time I’ve ever seen my IP change is getting a new modem through, say, Comcast or whoever. It goes by MAC address, and if you use Comcast and then set to bridge mode and use your own device, that’s a new MAC so you’d get a new public IP. Swap ISPs obviously a new IP.

I’ve NEVER randomly received a new IP when using the same equipment consistently, so I’m not sure why everyone’s so worried about dynamic DNS stuff… Maybe outside the US is different? I’ve lived in a few States and it’s always the same. If you make a hardware change, just note you should also double check your IP and update it, that’s all.

pHr34kY@lemmy.world on 18 Mar 12:35 next collapse

Mine would go years without changing. The last few changes were caused by things like the upstream DHCP server failing and being replaced.

MUGv0@sh.itjust.works on 18 Mar 12:46 next collapse

Mine has stayed the same for about 3 years now. My friend has theirs change any time there’s a power cycle so a handful of times every year between power surges and firmware updates.

mrnobody@reddthat.com on 18 Mar 13:23 collapse

Oh wow! That’s pretty excessive lol. Is it CGNAT maybe?

Appoxo@lemmy.dbzer0.com on 18 Mar 13:55 collapse

Daily around 3 or 4 am (I can sort of control it by doing it within a timeframe.)

mrnobody@reddthat.com on 18 Mar 15:32 collapse

Really??? That’s insane it resets so much! Who is your ISP?

Appoxo@lemmy.dbzer0.com on 18 Mar 16:12 collapse

This is usual in Germanx on DSL.

Bakkoda@lemmy.world on 18 Mar 12:48 next collapse

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).

grue@lemmy.world on 18 Mar 12:59 next collapse

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.

qjkxbmwvz@startrek.website on 18 Mar 13:48 next collapse

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.

Inkstainthebat@pawb.social on 18 Mar 17:51 collapse

I’ll be honest, despite already having a reverse proxy on my home setup I did not think of doing something like that. That sounds like a great idea

qjkxbmwvz@startrek.website on 18 Mar 19:00 next collapse

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.

prenatal_confusion@feddit.org on 18 Mar 19:35 collapse

Pangolin and netbird are you friends.

Appoxo@lemmy.dbzer0.com on 18 Mar 13:54 next collapse

DynDNS is your friend.

cecilkorik@piefed.ca on 18 Mar 14:13 next collapse

You don’t have any great options but you do have some options. You’ll need dynamic DNS, which you can get for free by various providers. This will manage a “dynamic” DNS entry for your occasionally changing, non-static IP at home. The dynamic DNS entry won’t be on your own domain name, it will be on the provider’s domain name. But wait! That’s just step one.

You can still get your own, fully-functional domain name, and you can have all the domains and subdomains you want, and set them up however you want, with one important restriction: You can’t use IP addresses (because yours is dynamic, and changes all the time and you would have to be constantly updating your domain every time it does, and there would be delays and downtime while everything gets updated).

Instead, your personal domains have to use CNAME records. This substitutes the IP from a different domain INTO your domain. So you CNAME every entry on your own fancy domains to point at your dynamic DNS provider, which manages the dynamic part of the problem for you and always gives the real IP you need. Nobody sees the dynamic DNS name, it’s there, but it’s happening behind the scenes, they still see your fancy personalized domain names.

It’s still not going to be perfect, it won’t work well or at all for certain services like email hosting (self-hosting this is not for the faint of heart anyway) that are very strict about how their DNS and IP addresses need to be set up, but it will likely be good enough for 99% of the stuff you want to self-host.

Svinhufvud@sopuli.xyz on 18 Mar 14:56 next collapse

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.

brickfrog@lemmy.dbzer0.com on 18 Mar 15:29 next collapse

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.

UnpledgedCatnapTipper@piefed.blahaj.zone on 18 Mar 15:38 next collapse

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.

modcolocko@lemmy.blahaj.zone on 18 Mar 16:25 next collapse

The VPS I rent from Ionos for tunneling is $2 a month just so you know it’s not a major amount of money.

TrippinMallard@lemmy.ml on 18 Mar 16:44 next collapse

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.

fuckwit_mcbumcrumble@lemmy.dbzer0.com on 18 Mar 18:38 next collapse

My dynamic IP almost never changes. I’ve had 3 in the last 10 years. How often does yours change?

There’s also dynamic dns if yours changes often.

EncryptKeeper@lemmy.world on 18 Mar 18:47 collapse

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?