site/public/blog/serverhost/index.html

80 lines
4.8 KiB
HTML

<!DOCTYPE html>
<html lang="en"><link rel="alternate" type="text/gemini" href="gemini://mossfet.xyz/blog/serverhost/index.gmi" title="Mossfet's site" />
<link rel="stylesheet" href="/css/style.css" type="text/css" media="all" />
<body>
<div style="margin: 2%"><header>
<nav class="navbar">
<a href="/index.xml"><img src="/images/feed.svg" style="height: 20px; width: 20px; float: left;" alt="RSS Feed"></a>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/blog">Blog</a></li>
<li><a href="/links">Links</a></li>
<li><a href="https://git.solarpunk.moe/mossfet.site">Source</a></li>
</ul>
</nav>
</header>
<section class="section border">
<nav class="ring">
<div class="ring-prev">
<a href="https://mossfet.xyz/blog/newsite/">Previous post - Reworking the site frontend</a>
</div>
<div class="ring-next">
</div>
</nav>
<hr>
<article>
<div class="blog-header">
<h1 class="blog-title">Hosting my website</h1>
<h5>Written February 14, 2023</h5>
<h5>Last modifed February 14, 2023</h5>
<h5>Written by Mossfet</h5>
</div>
<div class="blog-content">
<p>It&rsquo;s been a while since I originally created the website, but didn&rsquo;t get the chance to host it on real hardware until now.</p>
<p>When I initially set up my site, I had been planning on running it on a Raspberry Pi 4. If you&rsquo;ve tried to get hold of a Pi 4 in the last three years, you&rsquo;ll know why that&rsquo;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.</p>
<h2 id="enter-a-shitty-broken-chromebook">Enter: A shitty broken Chromebook</h2>
<p>A while ago, my parents bought me an Acer Chromebook 14 for school. It&rsquo;s a horrible thing, has broken and needed repair four times, is no longer supported for software updates, and looks ugly. It&rsquo;s my favourite laptop. Before it&rsquo;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.</p>
<p>What about as a server?</p>
<p>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&rsquo;s pretty low wattage - the battery advertises 45 Watt-hours, which divided by the Chromebook&rsquo;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.</p>
<p>I&rsquo;m not currently running my rocket.rs backend, instead running Apache httpd, configured through NixOS. This allows me to set up ACME &ldquo;fairly easily&rdquo; (big thanks to the NixOS Matrix channel for giving me a hand). I&rsquo;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 <a href="https://nextnet.top/content/using-gandi-livedns-dynamic-dns-server">here</a>.</p>
<p><img src="/images/blog/laptopserver.jpg" alt="The laptop running a webserver"></p>
<p>I may migrate this to a different system when the Star64 arrives - I&rsquo;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.</p>
</div>
</article>
<hr>
<nav class="ring">
<div class="ring-prev">
<a href="https://mossfet.xyz/blog/newsite/">Previous post - Reworking the site frontend</a>
</div>
<div class="ring-next">
</div>
</nav>
</section>
<footer class="footer">
<div>
This site (frontend and backend) is licensed under the <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">AGPLv3</a> or later, with images and text also available under the <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode">CC-BY-SA 4.0</a>, at your discretion.
</div>
<hr>
<div class="webring"><a href="https://fediring.net/previous?host=mossfet.xyz" title="Previous Webring site">Previous</a> <a href="https://fediring.net">Fediring</a> <a href="https://fediring.net/next?host=mossfet.xyz" title="Next webring site">Next</a></div>
</footer>
</div>
</body>
</html>