this post was submitted on 27 Jul 2024
50 points (96.3% liked)

Selfhosted

39980 readers
524 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Im sure this has been asked before i juat can't find where it has been - Maybe need to work on how to search Lemmy better. But...

Id like to eventually self host some sevices that require external access. While I have IpV6 addresses my IPV4 is dynamic.

Whats the best free way to be able to point some domains/ subdomains I have to my external dynamic IP and keep it updated. Im running OpenWrt on my router. - So possibly should be posting there.

Free Dyndns services seem to be a bit crap. Do I need to pay for a VPS? (seems to defeat the point of self hosting)

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 3 months ago

Get your own domain, find a free DNS service that provides an API, and it becomes a simple matter of updating a DNS A record whenever your IP changes.

Here's a starting point: https://community.letsencrypt.org/t/dns-providers-who-easily-integrate-with-lets-encrypt-dns-validation/86438

Don't use a DynamicDNS service, they're usually crap and they make you depend on a domain you don't own.

[–] [email protected] 1 points 3 months ago

I use digital ocean as dns host. They have an API, so I check my IP with a script and update if needed.

[–] [email protected] 3 points 3 months ago

If you go down the VPS route, a headscale server on a cheap $3.50 VPS would be the way to go. Wouldn't even have to deal with IP addresses at that point, while still being able to self-host all your services, with the cheap VPS being a glorified switch/firewall.

[–] [email protected] 2 points 3 months ago* (last edited 3 months ago)

Cloudflare has an api for easy dynamic dns. I use oznu/docker-cloudflare-ddns to manage this, it's super easy:

docker run \
  -e API_KEY=xxxxxxx \
  -e ZONE=example.com \
  -e SUBDOMAIN=subdomain \
  oznu/cloudflare-ddns

Then I just make a CNAME for each of my public facing services to point to 'subdomain.example.com' and use a reverse proxy to get incoming traffic to the right service.

[–] [email protected] 2 points 3 months ago

I've used big names like ns1 and Cloudflare for free.

[–] [email protected] 9 points 3 months ago (3 children)

Since you run already OpenWrt, you can check out https://openwrt.org/docs/guide-user/services/ddns/client

There is a list on this page of compatible services. If you don't want to use one more service (DNS), you can use a domain registrar with an API (like porkbun) and find online tools that work with that.

Be aware of the risks of hosting your websites publicly from home, make sure to run them in very isolated environments. Having your VPS compromised is bad, but having your home network compromised is much worse!

[–] [email protected] 4 points 3 months ago

Be aware of the risks of hosting your websites publicly from home, make sure to run them in very isolated environments. Having your VPS compromised is bad, but having your home network compromised is much worse!

Agree - Not something I will throw myself into.

[–] [email protected] 3 points 3 months ago (2 children)

Yes I use no-ip but have to confirm the domain name every month or so and cant use my own domain on the free tier. (Maybe im just being cheap) - Also I haven't been able to figure out how I would use / get SSL certificates.

[–] [email protected] 4 points 3 months ago

Try duckdns, it doesnt nag you every month and it just works

[–] [email protected] 3 points 3 months ago (1 children)

Yes, I have used it in the past and it was annoying...

You can get SSL certs with letsencrypt, but you need to use the http verification method.

[–] [email protected] 2 points 3 months ago

Not anymore, it supports txt records now

[–] [email protected] 4 points 3 months ago

That lists afraid.org as a ddns provider.

They are pretty great, I use them as my domain host.

[–] [email protected] 5 points 3 months ago

Script that checks your external IP and updates your DNS provider via API.

[–] [email protected] 3 points 3 months ago (1 children)

Namecheap domains include a dynamic DNS application for free and it works well. Be aware that it only runs on Windows.

[–] [email protected] 1 points 3 months ago* (last edited 3 months ago)

also keep in mind for people not on windows, namecheaps API only functions for business grade, and also is not clearly documented, there is a "dynamic dns setup page" but it isn't up to date. I find myself trying to use openwrt's DDNS pages for it but it still isn't accurate, I am likely going to transfer elsewhere when im closer to the end of my lease. This API restriction also prevents you from easily automating your SSL process using letsencrypt as you are locked down to subdomain based entries instead of wildcard domains.

[–] [email protected] 1 points 3 months ago (1 children)

Don't expose your services directly to the internet. Instead rent a VPS and the use Wireguard to bring the traffic back home. In your home network your services should be in there own VLAN and everything should be isolated and sandboxed. Everything has the potential to be compromised so always practice least privilege and defense in depth.

[–] [email protected] 2 points 3 months ago

Or just set up your home network and services properly. Ideally with reverse proxies and maybe a proper DMZ.

[–] [email protected] 8 points 3 months ago
[–] [email protected] 5 points 3 months ago

I'm using cloudflare as my nameserver and the free API seems to work just fine with ddclient.

[–] [email protected] 2 points 3 months ago

Wow thanks everyone. I think I need to take another look at some of the DynDNS provides and digest all your great feedback.

Id like to go beyond personal self hosting stuff and maybe run some stuff that requires Federation. Im just thinking at the moment.

[–] [email protected] 12 points 3 months ago* (last edited 3 months ago) (1 children)

I use afraid.org to keep my dynamic dns pointed at my routers ip. With afraid.org dns you only need a curl statement scheduled on the open~~dns~~wrt router to keep the dynamic ip updated.

[–] [email protected] 1 points 3 months ago (1 children)

Afraid.org gives you subdomains on other people's domains, who can decide to stop letting you use them at any moment.

[–] [email protected] 1 points 3 months ago (1 children)

Yeah, you don't have to share yours if you don't want to.

[–] [email protected] 1 points 3 months ago (1 children)

I was assuming that you don't own a domain. If you do why would you use Afraid? There are lots of reliable DNS services to choose from and you can have interface and features that aren't frozen in 1995.

[–] [email protected] 1 points 3 months ago (1 children)

I own a lot of domains. Why would I want to run my own DNS when I can use a simple uncomplicated system that is time proven and reliable. They could of course set it up with a fisher price interface for thumb suckers who need flash. What feature do you need beyond standard records and a simple dynamic feature? The price isn't that bad either.

[–] [email protected] 1 points 3 months ago (1 children)

You don't run your own DNS, they are services hosted by someone else, just like Afraid. The difference, on top of the interface, is that they support modern record types, they have redundant servers all over the world, there's a team working on them instead of just one guy, they have APIs that can let you manage your many domains easier, they have zone backup and restore etc.

I've used Afraid too, back when I was starting out and didn't know any better, but once I've seen some of the other services out there I've never looked back. You'll never know what extra features you could want if your current service doesn't offer you any.

[–] [email protected] 1 points 3 months ago (1 children)

You don't think you can run your own DNS? Currently I'm using local bind server at work to filter using commercial blocklists. It forwards all windows domain queries to the local AD servers DNS ensuring all internal windows related domains function normally. The external DNS queries though goes through bind and doesn't care about anything except the root servers. I have firewall rules in place that prevent anyone from using any other DNS. Even DNS over TLS traffic is diverted to my DNS or blocked. It doesn't rely on anything or any other organization other than the root servers.

In the twenty something years I've used afraid.org for personal use I've had very little down time. I've tried other services many, many times and other than something like cloudflare there is no point in switching. If you don't want to use it, don't. It works just fine and you can't match the price anywhere else. To give you a sense of how many years I've been doing my own DNS I set my first DNS server for a dial up ISP in 95.

Finally, what record types are you referring to not being supported?

[–] [email protected] 1 points 3 months ago (1 children)

what record types are you referring to not being supported?

AFAIK it only supports a small subset of all the types currently in use.

[–] [email protected] 1 points 3 months ago (1 children)

I guess I'll worry about the obscure when its needed for something.

[–] [email protected] 1 points 3 months ago (1 children)

CAA and DNSSEC aren't obscure. I would not even consider managing any domain nowadays without them.

Neither are ALIAS/DNAME/HTTPS, which you'll be running into more and more in the future if you haven't already. You could argue there are multiple competing standards at work there but Afraid doesn't implement any of them.

[–] [email protected] 1 points 3 months ago (1 children)

I'll worry about it when it happens until then its obscure and of no importance.

[–] [email protected] 1 points 3 months ago (1 children)

If anything ever happens that involves [the lack of] DNSSEC or CAA you'll have to buy another domain because the old one will be on every block list.

[–] [email protected] 1 points 3 months ago

Go away dude. I get that you have hived down the subject to the point of obsession but I've got websites that have been up for decades and if they go on a blocklist it will be for another reason. Not because of two barely used DNS records. Further if they become required then I'm sure they will be supported.

[–] [email protected] -1 points 3 months ago

If you can avoid it, don’t open ports in your firewall, don’t publish your home IP address, and keep everything behind a VPN. If only you and your family will be using these services, go with Tailscale or one of its competitors. Otherwise, VPS or cloudflare tunnel/competitor.

[–] [email protected] 3 points 3 months ago* (last edited 3 months ago)

I think you got enough recommendations for several tunneling solutions.

Apart from that (and free DynDNS) you could also use a regular paid DNS provider. Some of them also offer DynDNS or an API. I think I saw some regular providers in the list of my DynDNS client on my router, next to the super cheap or free ones.

[–] [email protected] 3 points 3 months ago* (last edited 3 months ago) (1 children)

Free Dyndns services seem to be a bit crap

Why do you say that? https://freedns.afraid.org/ and https://www.duckdns.org are very solid and if you're looking for something more corporate even Cloudflare offers that service for free.

[–] [email protected] 1 points 3 months ago

DuckDNS is great... but they have had some pretty major outages recently. No complaints, I know it's an extremely valuable free service but it's worth mentioning.

[–] [email protected] 1 points 3 months ago (2 children)

I've been using No-IP free plan for years without issues. Inputted the credentials to my routers DDNS client and then basically forgot about it. Free users need to confirm their account once a month via email but that's just one click.

If your domain registrar happens to have an API to update DNS entries, you could implement DDNS yourself by writing a simple automated script to check the external IP (e.g. via ipify.org) and if it's changed from the last check then call the API to update the DNS entries.

[–] [email protected] 2 points 3 months ago

Yeah been using No-ip free but I worry that one day I will forget to confirm and ill ge cut-off.

[–] [email protected] 2 points 3 months ago (1 children)

No-IP

Don't recommend that. There are plenty of better alternatives such as https://freedns.afraid.org/ and https://www.duckdns.org/ that aren't run by predatory companies that may pull the plug like DynDNS did.

[–] [email protected] 1 points 3 months ago

Sure. I'm not recommending anything, just stating what has worked for me. For simple use cases, I think most of the DDNS services are pretty much the same anyway and it's easy to switch to an another one if one stops working for some reason.

[–] [email protected] 5 points 3 months ago

There are two options, one is tunneling (e.g. tailscale, cloudfare tunnels, or a VPS either with special software or plain old SSH port forward constant connection). The other option, the most popular answer (I think, influenced by how yoy asked) is Dynamic DNS or DynDNS (e.g. duck, hurricane, freedns, etc.) this second one is like the classic solution.

[–] [email protected] 3 points 3 months ago (1 children)

How often does your IP actually change? Mine changes so rarely (during extended power outages, say) that I am able to just update my IP manually when it does.

I even used to run my own authoritative DNS server at home (the one offered by my registrar isn't configurable enough, think SRV and TXT records) - for that, I have a web UI at my registrar to set the IP addresses of the DNS server.

[–] [email protected] 3 points 3 months ago

I have dyndns, have since they were 10$ a year, and I've gradually realized that my ISP changes my IP on average less than once a year...

load more comments
view more: next ›