site/public/blog/serverhost/index.gmi

28 lines
2.5 KiB
Plaintext

# Hosting my website
It's been a while since I originally created the website, but didn't get the chance to host it on real hardware until now.
When I initially set up my site, I had been planning on running it on a Raspberry Pi 4. If you've tried to get hold of a Pi 4 in the last three years, you'll know why that's not gonna work. I still have plans for getting my own SBC (specifically waiting for the Star64 to release), but in the mean time I found a different solution.
## Enter: A shitty broken Chromebook
A while ago, my parents bought me an Acer Chromebook 14 for school. It's a horrible thing, has broken and needed repair four times, is no longer supported for software updates, and looks ugly. It's my favourite laptop. Before it's most recent breakage, I had been running Fedora Linux off it for my schoolwork, with mixed results. Sadly, the LCD was broken after my bag fell off a desk, so it was no longer usable as a laptop.
What about as a server?
As I mentioned, the laptop (and most Chromebooks) can run Linux, so I figured that it could probably run webserver software as well as any other Linux box. I took the screen out to save power, disconnected the battery to stop it from being worn out, and installed NixOS on it. The nice thing about a Chromebook is it's pretty low wattage - the battery advertises 45 Watt-hours, which divided by the Chromebook's advertised 12-hour battery life gives 3.75 Watts, on average. I imagine (hope?) that it would be even lower for NixOS and without an LCD connected.
I'm not currently running my rocket.rs backend, instead running Apache httpd, configured through NixOS. This allows me to set up ACME "fairly easily" (big thanks to the NixOS Matrix channel for giving me a hand). I'm still on my home network, so dynamic IP is a problem. Thankfully, my DNS provider has a dynamic DNS protocol, and I found a shell script that can update it here [2].
=> /images/blog/laptopserver.jpg Embedded Image: /images/blog/laptopserver.jpg
I may migrate this to a different system when the Star64 arrives - I'm expecting an Ox64 at the same time, which could be perfect for a tiny task like this. I also intend to automate updating the website with git - currently I have to ssh into the machine and pull every time I want to update the website. I expect Gitlab could help me out here.
## References
=> https://nextnet.top/content/using-gandi-livedns-dynamic-dns-server [2] here (https://nextnet.top/content/using-gandi-livedns-dynamic-dns-server)
=> / Back to the Index
=> https://mossfet.xyz//blog/serverhost/ View this article on the WWW