I would love to replace my slow old wordpress blog with something lighter, that I can host at home. Is that possible, without learning to code things from scratch? Do I need specialist things like a fixed IP address to host from an old laptop at home? #SelfHosting #DIY

@35millimetre To have a server at home that is to be accessed publicly, then you need a public static IP address, yes.

@levitte ah. There's my stumbling block then - thanks for the info!

@35millimetre @levitte ish...
you need a public IP, but a dynamic dns server can replace the need for fixed IP.
duckdns is free, easy and works (for me, so far) but limited name choices (so you'd prob end up pointing a dns forwarder to a duckdns name if you wanted something fancy)

@35millimetre @levitte also, works well enough for my mastodon instance and couple of other services, via 4g...
look for carriers that do NOT use something called CG-NAT if wanting a van server running off a 4g router ;)

@evilstevie @levitte nah I just have a Virgin router, although it did present me with some issues when trying to set up a pi-hole (couldn't set my own DNS). Sounds like it might be trickier than I thought 😅

@35millimetre @levitte it's not a DNS server you need, you just need to be able to set up port-forwards on the Virgin router. I wimped out on trying to fight mine and had my own router inboard of it (modem mode on the Hub is your friend) though it may offer something like a DMZ host if it doesn't allow port-forwards to be configured.
Static IP for your server, whatever it is, so it always has the same inside-IP (192.x.x.x) to point the port-forwards at.

Follow

@35millimetre @levitte After you have your server at least serving up http or https pages (static to begin with is fine) you can set up tcp/80 and tcp/443 to port-forwards on your router into your server (common http and https ports, default for most web servers) and on any device in your network visit
whatismyip.org
which should give you the (current) IP address as far as the internet sees your router.
go mobile, off wifi, open browser, type in that IP address into the address bar and punch it

@35millimetre @levitte hopefully you'll see your static page open up, if not double-check your port-forwards and any local firewalling going on with your server. servers work more consistently with string than wifi too.
assuming that works, and you have a hacky-way of seeing your server from outside, time to get a nicer name for it:
duckdns.org
create an account, choose a name, follow all the instructions on setting it up, including a script that runs on your server to update duckdns regularly

@35millimetre @levitte this "publishes" your current IP address (which is not static, though with Virgin tends to change on each router reboot) every 5 mins / hour / day / whatever you choose - it does this to keep the name you chose pointing to the right place - your Virgin router. your router then sees the traffic pointing at that name as inbound traffic to the web ports which it forwards on to your server.
so far, so good. works for http nicely.
https needs another thing, because why not...

@35millimetre @levitte to use https correctly as a server, you need to get a server certificate.
two options: money and pain, or just pain.
for just pain, visit
letsencrypt.org
while holding your server's nice shiny duckdns name you made earlier.
follow the instructions to create yourself a certificate and prove you own that name, and you're good for the next 90 days of being a server, yay.
to keep it going beyond that, add in certbot
certbot.eff.org/instructions
and let that take the strain.

@35millimetre @levitte at that point, you're basically good to go, although with potentially a not-so-great URL (duckdns have been better than dyndns for me - they just let you have a domain name and leave you to it. others tend to want to keep prompting you for "still active?" and "want to go premium?" every month or three).
if you have an Awesome URL and control it via some form of DNS control panel you can point your Awesome URL towards your duckdns name using a CNAME entry

@35millimetre @levitte be warned that this makes your certificate Bad and Wrong to anyone using the Awesome URL, as the name it's tied to is the duckdns one.
Plan ahead for this before you start - leave the letsencrypt stage until now, and set it up for the Awesome URL instead - means testing via the IP or duckdns name will get certificate errors, but using the AwesomeURL will work fine.

@35millimetre @levitte from inside your network it's going to need either a host entry on your router (if it lets you) pointing the URL to your inside server address. if the router lets you...
if not that, you're going to have to put a host entry on each device using the server for it to work, or use the local IP address internally instead I guess :)

and with that I'm done, good luck and shout up if you need any help bodging it further.

@evilstevie @levitte you are an absolute gem - thanks so much for typing all this out! I'm going to have a read through when I have a day free and feel up to the task, but I really appreciate all the information 💖

Sign in to participate in the conversation
mastod1.ddns.net

Mastod1 be nice. (sorry, closed for new registrations after a bunch of 'commercial/spamming' accounts jumped in - rule 3 on site)