86
submitted 1 year ago* (last edited 1 year ago) by starkcommando@lemmy.world to c/selfhosted@lemmy.world

I would like to host my own web server with a domain name I purchased but my public IP isn't static.

top 50 comments
sorted by: hot top controversial new old
[-] sleepybear@lemmy.myspamtrap.com 17 points 1 year ago

I run ddclient on a local machine and it updates my Cloudflare DNS records if my IP changes.

OPNSense has it built in too, if you use it. So does PFSense, I think. Been a while, might be misremembering.

[-] Greg@lemmy.ca 3 points 1 year ago

I do this too. I proxy my DNS which means my home IP isn't exposed

[-] krippix@feddit.de 1 points 1 year ago

Jup, I use my pfSense as DDNS client with Cloudflare

[-] Feliberto@programming.dev 16 points 1 year ago

I use duckdns.org , but if you are trying to host a webpage I totally recommend using Cloudflare, Cloudflare tunnels and a reverse proxy like nginx.

Setting it up may be a bit tricky, but it is a gamechanger. I followed Ibracorp's guides and I had no problem.

[-] vynlwombat@lemmy.world 10 points 1 year ago

I host my own ddns server in a debian container https://wiki.debian.org/DDNS

[-] starkcommando@lemmy.world 11 points 1 year ago* (last edited 1 year ago)

Here we go down another rabbit hole... 😆

[-] JurassicPork@lemmy.one 6 points 1 year ago

Right!!!! Lmao 😂 same boat as ya lol

[-] sam@lemmy.ca 10 points 1 year ago

I've been using freedns.afraid.org for about a year now.

[-] randy@lemmy.ca 1 points 1 year ago

I've also been on freedns.afraid.org for many years. Back when I switched from dyndns, it wasn't possible to get Let's Encrypt certificates on afraid.org's domains, but that might have changed. I worked around it by taking a domain I already owned and using a CNAME to point it at my afraid.org domain.

[-] sam@lemmy.ca 2 points 1 year ago

I use Let's Encrypt on my domains, but they're domains that my afraid.org subdomains point to.

[-] bdonvr@thelemmy.club 9 points 1 year ago

DNS managed by Cloudflare, and cf-ddns

[-] bigBananas@feddit.nl 2 points 1 year ago

2nd, but with just a bash script. Also, I'm forwarding http & https to different IPs and the best thing about cloudflare is that you can restrict those ports to only be open when coming from cloudflare's proxy. I like the extra layer of security, and dislike that they can see all traffic..

[-] bladewdr@infosec.pub 8 points 1 year ago

I'm using DuckDNS, it has a plugin for pfSense / OpnSense.

[-] hagerman@lemmy.world 8 points 1 year ago

I use a Cloudflare tunnel rather than a dynamic DNS provider. Some in the self hosting community are opposed to Cloudflare, but I appreciate the tools they provide (especially Zero Trust so I can put my self hosted apps behind Okta).

[-] p5f20w18k@lemmy.world 1 points 1 year ago

+1 for tunnels, easy to use and no port forwarding required

[-] betternotbigger@lemmy.world 7 points 1 year ago

If you only need public access to things like HTTP or SSH you don’t necessarily need to run dynamic ip and just setup Cloudflare Tunnels. So far I haven’t needed to put anything public that doesn’t run on the provided tunnels.

[-] starkcommando@lemmy.world 3 points 1 year ago

Where are the settings for these tunnels located in Cloudflare? I was looking around the website last night but didn't have any luck.

[-] karlthemailman@sh.itjust.works 1 points 1 year ago

It's confusing. I think they are under zero trust now

load more comments (1 replies)
load more comments (3 replies)
[-] theghostoutside_@lemmy.world 7 points 1 year ago

I use DuckDNS. There's been only one outage for the ~2 years I've been using it and it's free. I also use DuckDNS to acquire the SSL certificates for the reverse proxy.

[-] wernsting@lemm.ee 2 points 1 year ago

How gave you set it up out of curiosity?

[-] axzxc1236@lemmy.world 3 points 1 year ago* (last edited 1 year ago)

If you mean automatically update IP part, duckdns website has a very comprehensive guide.

If you mean getting a free SSL certificate, you can use acme.sh (this is what I used) which has integrated support for duckddns (To use let's encrypt you need to use --server letsencrypt in your command)

[-] uyuu@lemmy.4d2.org 2 points 1 year ago

I also use duckdns, but in the last year it went down like twice or something. Its good but not really reliable.

[-] nieceandtows@lemmy.world 1 points 1 year ago

I used duckdns for my jellyfin server, but after a week or so I started getting malicious site warnings from Firefox, and had to ‘accept the risk and continue’ every time. Ended up going back to noip. It’s a pain to renew every month, but I haven’t had any other problems with it.

[-] Bork@lemmy.world 2 points 1 year ago

What do you mean renew every month?

load more comments (2 replies)
[-] Josh@lemm.ee 2 points 1 year ago

I use noip as well, but because I only have an IP camera on that network, and the camera has built-in DDNS support for noip. But I hate it having to renew monthly.

[-] invaliduser@forum.bruvland.com 7 points 1 year ago

your domain provider probably has an api to update dns records i use cloudflare with their api because then i can hide my ip behind their proxy or if i don't have a public ip i can use their tunnels

load more comments (1 replies)
[-] lntl@lemmy.sdf.org 5 points 1 year ago* (last edited 1 year ago)

Does your domain provider have a DDNS service? I buy my domains from namecheap.com and use their DDNS service for exactly what you're describing.

[-] starkcommando@lemmy.world 2 points 1 year ago

I have NameCheap as well. I found their Windows client after I made this post. I'm still curious is there are better services out there. It seems Cloudflare may have the best tools for security for a webserver, i.e. hiding the real IP address.

[-] porksoda@lemmy.world 1 points 1 year ago

I use namecheap and dd client. Happy to share my config file if you need if.

load more comments (1 replies)
[-] beigeoat@lemmy.zip 4 points 1 year ago

First step would be to ensure that you can do port forwarding.

  1. Check if your IP address isn't a private one or CGNAT.
  2. Now set up reverse proxy and try connecting to your service. If it connects, you are okay.
  3. Now this is something i didn't know could happen but it did end up happening to me. I was happily port forwarding for a few months, until suddenly my port forwarding stopped working. Now I called my ISP, they said they did nothing(my ISP is a few guys who have no Idea about what they are doing, the other option to them is 512kbps DSL connection) at this point all my ingress ports are blocked and even outgoing ssh is blocked. Then the new month starts and everything is working again. I looked at my ISP website to get an idea of what may have caused this and the case seems to be that it was the first time I crossed 100GB in uploading. So my ISP has configured things such a way that port forwarding only works for the first 100GB of uploading.

This is why I strongly recommend cloudfare tunnel or any other similar solution.

[-] jeena@jemmy.jeena.net 3 points 1 year ago

The easiest thing to do is to use https://www.duckdns.org/ and then point your domain as a CNAME to this duckdns subdomain.

[-] SJ_Zero@lemmy.fbxl.net 3 points 1 year ago

If you're using godaddy, you can use a script to do your own dynamic DNS:

https://www.instructables.com/Quick-and-Dirty-Dynamic-DNS-Using-GoDaddy/

[-] Mountaineer@lemmy.world 2 points 1 year ago

I also use this.
Have had to update it in tiny ways in the last ~ 7 years?

[-] DunkinCoder@lemmy.world 3 points 1 year ago

I use this container, favonia/cloudflare-ddns, for Cloudflare and my domain.

[-] kamin@lemmy.kghorvath.com 3 points 1 year ago

My IP isn’t technically static but it hasn’t changed in the 3 years I’ve been with this ISP.

[-] calmluck9349@infosec.pub 3 points 1 year ago

This. But I use namecheap and the built in tool on pfsense to keep an A record up to date if it ever changed.

[-] kamin@lemmy.kghorvath.com 1 points 1 year ago

I should automate something like that too. I just have one A record pointing to my IP and all my subdomains CNAME’d to that so that if it ever changes, I just have to update that one record.

[-] starkcommando@lemmy.world 1 points 1 year ago

I have NameCheap as well. I was trying to set this up with the ddclient on OPNSense but the logs suggested it couldn't connect to NameCheap. What do you need to authenticate other than the DDNS passcode supplied by NameCheap?

load more comments (1 replies)
[-] problembasedperson@lemmy.world 3 points 1 year ago
[-] sifrmoja@mastodon.social 2 points 1 year ago

@starkcommando When I didn't have a static IP I was using CloudFlare for this with my own domain.

[-] morethanevil@lmy.mymte.de 2 points 1 year ago

I use myfritz.net for my homeserver. It is included in the routers of AVM 🐱

[-] RedditExodus@kbin.social 2 points 1 year ago

Afraid.org is what I've been using ever since dyndns started charging big prices for what used to be free.

[-] Bristlerock@kbin.social 2 points 1 year ago* (last edited 1 year ago)

DNS-O-Matic (recommended by CloudFlare, among others) combined with SWAG and Authelia will handle dynamic DNS, reverse proxying, SSL certificates, and MFA. SWAG (nginx, Let's Encrypt and Certbot) and Authelia (MFA) run nicely in a 2 container Docker stack.

Mine have been running for ~18 months on my NAS, though I have a fixed IP so no longer use a DDNS provider.

[-] alvaro@social.graves.cl 2 points 1 year ago

@starkcommando@lemmy.world dyndns worked fine. Duckdns is a preferred among self hosters. Also your domain name provider might also offer dynamic dns sometimes

[-] ComMcNeil@kbin.social 2 points 1 year ago

I use cloudflare and have a dyndns client running on my synology nas

[-] wernsting@lemm.ee 2 points 1 year ago

https://www.duckdns.org but to be fair I have not properly configured it in #opnsense yet!

[-] Hopfgeist@feddit.de 1 points 1 year ago* (last edited 1 year ago)

Aside from a brief scare a couple of months ago, when the owner/operator was unreachable and the configuration interface and some automatic update paths were not working, I have been using afraid.org, and it has proven to be a stellar service, and free for basic needs.

[-] erre@feddit.win 1 points 1 year ago* (last edited 1 year ago)

I've been using https://dnsomatic.com/ for a long while now. It updates Cloudflare which manages my DNS. It updates DNS at other providers too which is useful.

My router is able to send DDNS updates to it.

[-] blackstrat@lemmy.fwgx.uk 1 points 1 year ago

I pay an extra £1 a month to my ISP to get a static address. Figured it's well worth having no hassle.

[-] elscallr@kbin.social 1 points 1 year ago* (last edited 1 year ago)

I just have a cron script running on a machine that does something like this every 10 seconds

C_IP=`dig +short my.domain`
IP=`curl https://api.ipify.org`
if(C_IP != IP) {
    updateRoute53(IP)
}

This is just for my main home server. Gets the job done because if it's out of date for a few seconds nothing matters.

load more comments
view more: next ›
this post was submitted on 02 Jul 2023
86 points (94.8% liked)

Selfhosted

39677 readers
364 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