this post was submitted on 11 Nov 2024
24 points (90.0% liked)

Selfhosted

40132 readers
548 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
 

Hi guys!

I'm considering moving away from duckdns, as it's becoming increasingly unreliable. I'd like to check some other free dynamic DNS alternatives (I'm open to suggestions!).

My idea would be to have the server run under two different domains, but both directing to the same services. Is this possible? What shoudl I change in nginx in order to answer to two different domains/names?

Thanks!

top 22 comments
sorted by: hot top controversial new old
[–] Max_P@lemmy.max-p.me 41 points 2 days ago (1 children)

You just put both in the server_name line and you're good to go.

[–] neshura@bookwormstory.social 12 points 2 days ago* (last edited 2 days ago)

don't forget the additional ssl cert for the second domain (assuming it's not a wldcardable subdomain)

I liked FreeDNS when I used them, but that was something like 10 years ago. Could be worth looking into.

[–] unknowing8343@discuss.tchncs.de 8 points 2 days ago (3 children)

In what sense is DuckDNS unreliable?

[–] numanair@lemmy.ml 1 points 1 day ago

DNS cert renewal randomly stopped working for me.

[–] iturnedintoanewt@lemm.ee 4 points 2 days ago

It seems to frequently stop responding.

[–] 9point6@lemmy.world 3 points 2 days ago (1 children)

I was wondering the same, I've not had any issues personally

[–] iturnedintoanewt@lemm.ee 3 points 2 days ago* (last edited 2 days ago) (1 children)

Glad it works for you guys. Here it fails to respond at least once a week or so, and it can last one hour or more sometimes. It's unpredictable. And makes the server look buggy.

A sample for measure...there's a lot of these on reddit:

https://www.reddit.com/r/selfhosted/comments/1cyru6p/duckdns_dns_servers_down/

[–] catloaf@lemm.ee 2 points 2 days ago (1 children)

Does your IP address really change that often?

[–] iturnedintoanewt@lemm.ee 3 points 2 days ago* (last edited 2 days ago) (1 children)

Does it matter?

No, it does not change, but why is this something of concern? The problem is duckdns DOES NOT REPLY providing DNS replies, not to my own servers, but to people outside looking for my servers by typing their address. Duck fails to provide a response to those queries, and users get timeouts. I can frequently replicate this with either dig or nslookup, from different machines, either inside my network or at random connections.

I managed today to run certbot to register 2 new subdomains that yesterday consistently failed with a long timeout during THE WHOLE DAY. Today the same certbot command on the same server ran straight at the first attempt.

So...yeah. Unreliable.

[–] catloaf@lemm.ee 1 points 2 days ago (1 children)

Oh I thought you meant it just doesn't reply to DDNS updates. If it doesn't even reply to DNS queries, yeah that's a big issue. What did their support have to say about it?

[–] iturnedintoanewt@lemm.ee 1 points 2 days ago* (last edited 2 days ago) (1 children)

...what support? They barely reply any queries people post in their google groups. If you go there you'll see most people will try to reach them either due to servers down (the main issue at hand) or login issues which never get fixed (the longest standing issue, better create a different new subdomain) from what I've seen. I've also tried repeatedly to reach them regarding changing the token access, but with no luck. It's a free service so I can't complain, but the only support you actually will get is from other users, and for some scenarios that's not quite enough.

EDIT: Oh wow right after posting this I just saw they actually replied regarding the SSO/tokens issue most people have (SSO failed due to the reddit snafu, you end up with just the token and no chance to do any further changes to your account again). This has been an ongoing issue for over two years, I just saw they finally replied (I think for the first time) a couple of weeks ago.

[–] catloaf@lemm.ee 1 points 2 days ago

Oh if they don't even have support, yeah I would have moved away a long time ago.

[–] Sparky@lemmy.blahaj.zone 4 points 2 days ago* (last edited 2 days ago) (1 children)

I switched from duckdns about a year ago as it failed to resolve the addresses for my jellyfin server. I ended up buying a domain from cloudflare for 3 years for about $4, and I self-hosted ddns updater to automatically grab the dynamic ip, and set it to a subdomain.

As for your nginx config, I'd imagine you could make 2 separate config files in sites-enabled that are nearly identical, but listen for different domains. Something like this:


#config file 1 
server {
    listen 80;
    server_name example_a.com;

    location / {
        return 301 http://example_c.com$request_uri;
	#or use an ip instead of example_c.com
    }
}

#config file 2
server {
    listen 80;
    server_name example_b.com;

    location / {
        return 301 http://example_c.com$request_uri;
	#or use an ip instead of example_c.com
    }
}


#Or use "proxy_pass http://example_c.com;" in the location tag instead of "return 301..." if you want to reverse proxy the traffic

[–] iturnedintoanewt@lemm.ee 2 points 2 days ago (1 children)

Thanks. I'm seriously considering also a paid domain, so it's good to hear from your experience. I might go try some other free provider first though.

[–] cheesemoo@lemmy.world 2 points 1 day ago

I switched to a paid domain in the last few months and regret not doing it sooner - it just works, and it's nice knowing that I won't have to reconfigure all my stuff to point at a different domain name again in the future. Price was maybe $15/year on porkbun - very much worth it imo.

I've also used freedns in the past and had no complaints about them, except that I think wildcard subdomains are limited to paid supporters (very cheap though) and at the time my SWAG docker image maybe didn't support them? It's been a while. The service was great though. Never had problems like I did with duckdns.

[–] BennyInc@feddit.org 3 points 2 days ago (1 children)

I'm currently moving from duckdns to desec.io — with the hope of it being more reliable.

[–] iturnedintoanewt@lemm.ee 1 points 2 days ago

Great...thanks. I'm going to look them up.

[–] beerclue@lemmy.world 2 points 2 days ago (1 children)

How is duckdns unreliable? I use it just to have wireguard access, been using it for years. Just curious about your issues...

[–] iturnedintoanewt@lemm.ee 2 points 2 days ago* (last edited 2 days ago)

It will fail to resolve randomly, and then your services goes down. And you expend quite a while figuring out whatever might have failed until the typical "when in doubt, it's DNS" pops up. This also applies when you're trying to add/renew subdomains.

Just a sample...

https://lemmy.world/post/13565617

[–] mhzawadi@lemmy.horwood.cloud 2 points 2 days ago

Would recommend OVH for both domain name and DNS, they have DNS APIs so you can get certificates from lets encrypt with ease. Also you could update your zone when your home IP changes

[–] tofuwabohu@slrpnk.net 1 points 2 days ago

This should be possible, in nginx you would just have near identical entries that deliver the same content. The service itself sometimes takes a domain to build internal links etc, and those usually only take one.