breaking free
for a few years this site was on github pages, which was honestly pretty nice. i pushed to github, github did its little github thing, and then the website existed. no servers to look after, no logs to stare at, life was """good"""
for the longest time (about 7 years) i have used github pages as my website host. i had no way to pay for a host, when i got my bank account no funds to buy one and eventually i had better things to spend money on. github pages was free and useful for a generic website.
i wanted more, so very conveniently @getagripgal (how the fuck do i link a tags in markdown?*) approached me about being able to host my website on her own server! yippee!
now my creative mind has been unleashed and i have been improving my website between work hours every day since the end of july. so far, i am very happy with the things i have done!
as a wise man once said "do not trust a computer you cannot throw out of the window".
i do not expect Lara to be happy if i do that, though...
goodbye python
the site used to run on a small Python server. it did the job. it read the blog files, kept the guestbook around, counted visitors, made pastes, generated rss, all that stuff. i could have moved that exact thing onto the new server and called it a day.
i created a small python executable to server the webpage with all sorts of features because was it easy to make. today, or rather yesterday as it is now 00:27 while writing this... i rewrote it in C after letting a local LLM make a mockup to give me an idea of how it should be done. local testing has become 20x faster. what the fuck!
i just run
that is pretty much it. run it, listens on a port, a browser asks it for something, it sends some html back. it is all just sockets and strings and hoping i remember to close it after testing and not let it run in the background for 7 days :3
best part of all, there is no fucking framework!! there is no fucking 1000002823931 packages i have to download in a virtual environment before i can go ahead and do shit!
why C?
it depends on how you look at it. python is way easier to write, you have a million tutorials and you can even just steal it from someone else and it will likely just work[trademark sign].
the upside that it is fast as fuck. it has zero delay. it just works as soon as you write it correctly.
but that is kind of why i wanted to do it. a personal site is a good place to poke at the underneath bits without accidentally taking down anything important. HTTP is just somebody sending your computer a bunch of text. your computer sends a different bunch of text back. then, if you got it right, a cat image appears on their screen. very elegant.
also i have been writing C for other things and wanted an excuse to make something stupid with it. this qualified.
what the tiny server does
the little C server does the bits that used to need Python:
- rendering Markdown blog posts
- serving the blog index, RSS feed, and sitemap
- the guestbook and its rate limit
- basic visitor statistics
- paste creation and expiry
- webmention storage
- static files like images and CSS
- a few small external integrations
the content is still intentionally boring: Markdown files in blog/, images in assets/, and JSON files for the stuff that has to stick around. i might use sql later... i like that adding a post is still just making a file and shoving it in a folder.
self-hosting is different
github pages was deploy-and-forget. self-hosting is deploy-and-then-remember that DNS exists, certificates expire, processes die, disks fill up, and permissions will ruin your day for reasons known only to god.
i mean that affectionately. the site is running on a real machine belonging to someone i know, and i can see the process that serves it. if something goes wrong, there is a thing to inspect and a reason it went wrong. usually. probably.
it feels a lot more like having a website now, instead of renting a tiny patch of github's lawn.
is this sensible?
not remotely. there are easier ways to host a website and much easier ways to write a web server. but this website is mine, so a weird little C executable living on a friend's server feels right.
if it breaks, i get to fix it. if it works, i will act like that was the plan the whole time. + i get to learn along the way. i have become familiar with nginx, http, and some other cool stuff as well!
also, take back & free the web. make your own website, make webrings, and fuck corporations preying on individuals by asking 29 euros a month for hosting a html file.
1 https://getagripgal.nl
2 visit her website, check out her cool ass projects!