The idea of "self-hosting" is uh. Kind of a return to what computers were like before the Cloud took over. I guess. That's the vibe, anyway.
Instead of entrusting all of my everything to the giant tech companies of the world, who then do with it whatever they want, how about. Running your own little cloud services. Just for you, or for your friends and family, or for a small group of internet strangers.
Self-hosting is hard. Really hard. Once you know how to do what you want, it's mostly OK, but like.
I'm renting a VPS to run my website on, among other things. It's not really self hosting, it's a company I'm paying like $5 a month to host it for me. But I'm responsible for all the server admin, installing and setting up software, keeping things up to date, all that stuff, so it's largely the same skillset. I just don't have to make my home network accessible from the internet.
My god, it's a pain in the arse. Take a look, for instance, at this Initial Server Setup with Ubuntu tutorial on DigitalOcean, one such cloud hosting company. We log in remotely, we create a new user, we grant that user certain privileges, we set up a firewall. These are very basic steps that need to be taken on a brand new Linux computer to set up the most basic level of security. It's a series of incantations typed into the terminal that I have to look up again every time I want to do it. # usermod -aG sudo sammy
? Excuse me?
It only gets worse from here. To have a website, we need to run a piece of software called a web server. There are a couple of these around, and the one that I'm familiar with is called Nginx. Nginx is controlled with one or more config files, that look something like this:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
}
We are uh. Listen
ing 80 default_server;
? Is that right? But we're also listen
ing [::]:80 default_server;
?
Since I have been using Nginx for a while I can tell you that default_server
can be replaced with a domain name that points to this server's IP address, and makes it possible for the same computer to serve many different websites, depending on what name you use to connect to it. The root /var/www/html;
line refers to the folder on the computer where it can find the website, in this case /var/www/html
. And so on.
Keeping all this knowledge in my head. Constantly looking things up again whenever I want to do the same things I haven't done in a while. I think "painful" is the right word? It sucks.
So, the idea of pulling more of my online life off of other people's computers. Running my own git server, or email server, or fediverse server. It appeals to me as a technical challenge. It would be really cool to get all this stuff up and running, to be able to use it in a customisable way. It just makes me so tired when I think about doing it. It makes me think, damn, maybe Microsoft having control over all the code I write isn't so bad!