<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Self-Hosting on Arve's Playground</title><link>https://www.arvesv.com/tags/self-hosting/</link><description>Recent content in Self-Hosting on Arve's Playground</description><image><title>Arve's Playground</title><url>https://www.arvesv.com/images/og-image.png</url><link>https://www.arvesv.com/images/og-image.png</link></image><generator>Hugo</generator><language>en-US</language><copyright>Arve Svendsen. All rights reserved</copyright><lastBuildDate>Mon, 23 Nov 2026 10:08:06 +0100</lastBuildDate><atom:link href="https://www.arvesv.com/tags/self-hosting/index.xml" rel="self" type="application/rss+xml"/><item><title>Web Application Hosting - My Way</title><link>https://www.arvesv.com/posts/2026/hostingwebapps/</link><pubDate>Mon, 23 Feb 2026 13:54:38 +0100</pubDate><guid>https://www.arvesv.com/posts/2026/hostingwebapps/</guid><description>Hosting stateless web apps with zero downtime on a 7W Intel NUC homelab server using Docker, MicroK8s, Nginx Proxy Manager, and Tailscale.</description><content:encoded><![CDATA[<p>There are <em>many</em>  ways to host web applications. You can run them in the cloud or on-premises, using everything from “copy some PHP files into a folder” to full container orchestration on Kubernetes — and everything in between.</p>
<h3 id="my-requirements">My Requirements</h3>
<p>I optimize for deployments with:</p>
<ul>
<li>Zero downtime — users shouldn’t get kicked out during updates. This means the application must be stateless, with all state stored externally.
(Also useful when I inevitably get millions of users 😊)</li>
<li>Proper HTTPS</li>
<li>Low operating cost</li>
<li>Fast and easy to update</li>
</ul>
<p>Your requirements may be different, but mine are tuned for a homelab software developer who deploys often to a professional‑looking “test environment.”
Updates should be simple, quick, and not disrupt anyone using the app.</p>
<h3 id="the-small-computer-in-my-homelab">The Small Computer in My Homelab</h3>
<p>In my homelab I run an Intel N150‑based NUC with 16 GB RAM and an NVMe SSD. The CPU is a bit slow, but it’s very power‑efficient — around 7 W idle, which is roughly 100 NOK / $10 per year to run 24×7. The SSD keeps the database snappy; operations on a million‑row table take about a second.</p>
<p>The machine runs Ubuntu Server, and hosts:</p>
<ul>
<li>Docker
<ul>
<li>Nginx Proxy Manager</li>
<li>Various databases like postgres, valkey and more</li>
<li>&ldquo;Stable&rdquo; web apps like <a href="https://immich.app/">Immich</a></li>
</ul>
</li>
<li>MicroK8S
<ul>
<li>Kubernetes registry</li>
<li>Web applications under active development</li>
</ul>
</li>
<li>And other software like <a href="/posts/2026/tailscale/">Tailscale</a> and a GitHub Actions runner</li>
</ul>
<p>When deploying a new service, I typically:</p>
<ul>
<li>Package the web app in a container</li>
<li>Create Docker Compose files for databases and supporting services</li>
<li>Push the container image to the local Kubernetes registry</li>
<li>Create a Kubernetes deployment and expose it as a NodePort</li>
<li>Add a reverse‑proxy forwarder for the desired URL</li>
</ul>
<p>To update an app I need to</p>
<ul>
<li>Rebuild and push the container</li>
<li>Run database migrations if needed (not often)</li>
<li>kubectl restart deployment &hellip;</li>
</ul>
<p>A full update takes about 45 seconds when no migration is required, and the whole process is easily scriptable.</p>
<h3 id="questions">Questions</h3>
<ul>
<li>
<p>Why not use cloud options like Google Cloud Run or Azure Container Apps?
These services are great — especially Google’s, which can be nearly free. Azure’s offering is less attractive because you often need a paid Azure Container Registry.
But the real issue is databases: managed cloud databases are expensive.</p>
</li>
<li>
<p>Could this be run on a VM in the cloud?
Yes, I have run this setup on the cheapest <a href="https://www.hetzner.com/">Hetzner</a> VM, and it works great. I have Ansible scripts that sets it up in minutes.</p>
</li>
<li>
<p>Could I use Debian instead of Ubuntu, or K3s instead of MicroK8s?
Yes. I’ve tried both, and they worked perfectly.</p>
</li>
<li>
<p>Could I use a Raspberry Pi instead of an Intel N150 based machine?
Maybe. A Pi is slower, but it should work. Use an SSD and make sure you have enough RAM. Both Docker and K3S runs on a Pi.</p>
</li>
</ul>
]]></content:encoded></item><item><title>Network Attached Storage: Replacing the Synology box</title><link>https://www.arvesv.com/posts/doyouneedanas/</link><pubDate>Mon, 09 Feb 2026 00:00:00 +0000</pubDate><guid>https://www.arvesv.com/posts/doyouneedanas/</guid><description>Replacing a 10-year-old Synology NAS with an energy-efficient NUC and external SSD storage for better performance, lower power bills, and backups.</description><content:encoded><![CDATA[<p>After more than a decade of running Synology NAS devices in my home, I&rsquo;m making a significant change to my setup. This post explores why and what I will be doing.</p>
<h2 id="why-have-a-nas">Why Have a NAS?</h2>
<p>I&rsquo;ve had multiple Network Attached Storage (NAS) devices in my home over the last 15 years - Synology boxes for more than 10 years. A NAS can serve many needs like:</p>
<ul>
<li>It can replace OneDrive, DropBox, iCloud, Google Drive.</li>
<li>It can host your media</li>
<li>Automatic backups of computers</li>
<li>Depending on the NAS, the more capable Synology supports lots of applications for domain management, office work, and run Docker containers.</li>
<li>It can provide disks to other machines using iSCSI</li>
</ul>
<p>and more that I have not explored.</p>
<h2 id="the-problems">The Problems</h2>
<p>The maximum capacity I had was 15 TB, and that is too much - you become a data hoarder. Just dump everything on the NAS and don&rsquo;t think about the structure. My problems include:</p>
<ul>
<li>Finding stuff is difficult without structure. I did not have a good structure</li>
<li>Many spinning disks running at 24x7 is visible on the electricity bill</li>
<li>As the Synology runs lots of services, you become afraid of touching it in case something stopped working. This is not good for potential disaster recovery</li>
<li>Backup of the Synology is difficult</li>
</ul>
<h2 id="the-new-plan">The New Plan</h2>
<p>The 10 year old Synology box will no longer get software updates from Synology - I am not complaining as 10 years of updates is very good. But it&rsquo;s an opportunity for me to change things. The plan is:</p>
<ul>
<li>All services (databases, applications) will run from a power efficient NUC with an SSD. Apps and services will run from Proxmox, Docker, k3s.</li>
<li>I will also have a backup NUC where I can experiment - and test backup and recovery scenarios</li>
<li>Maybe attach an external USB drive that hosts the photos and media for Immich, Jellyfin, Calibre. This should hopefully be in suspended mode when not used (i.e. most of the time)</li>
<li>I will take away the extension cabinet on the NAS and only use it as a fileshare with Wake On Lan</li>
</ul>
<h2 id="expected-benefits">Expected Benefits</h2>
<p>I hope this will give me better structure on my files, lower electricity bill, faster databases and applications.</p>
]]></content:encoded></item><item><title>Where Should You Run Your Web Application? It Depends.</title><link>https://www.arvesv.com/posts/deploywebapp/</link><pubDate>Tue, 11 Nov 2025 00:00:00 +0000</pubDate><guid>https://www.arvesv.com/posts/deploywebapp/</guid><description>Comparing web app hosting options—containers on Cloud Run, Fly.io, and Hetzner VPS vs. Kamal and single-node MicroK8s/k3s—for cost and simplicity.</description><content:encoded><![CDATA[<p>I’ve built a web application—and that needs a home. What should I deploy it to? There are many platforms to choose from, I decided to turn the deployment decision into a mini project with three phases:</p>
<ol>
<li><strong>Design</strong> the ideal platform and deployment process</li>
<li><strong>Implement</strong> the design</li>
<li><strong>Learn</strong> from the experience</li>
</ol>
<p>I’m usually skeptical of too much upfront planning—real-world constraints tend to surprise you—but I’m giving it a shot.</p>
<hr>
<h2 id="-requirements">🧾 Requirements</h2>
<p>Here’s what I need from the platform:</p>
<ul>
<li>Must support a web server and a database</li>
<li>Must allow zero-downtime deployments</li>
<li>Must be internet-accessible with HTTPS</li>
<li>Occasional downtime for patching is acceptable</li>
<li>Downtime due to hardware failure is fine—recovery should be reasonable</li>
<li>Monthly operating cost should be <strong>≤ 6€</strong> (e.g., Hetzner’s cheapest VPS)</li>
<li>Fast deployment turnaround—code changes should go live quickly</li>
<li>Code is hosted on GitHub. Deploys should be possible both from GitHub actions and the local developer machine</li>
<li>This is a <strong>learning project</strong>, optimized for fast iteration and feedback</li>
</ul>
<hr>
<h2 id="-design-choices">🧱 Design Choices</h2>
<h3 id="-containers">✅ Containers</h3>
<p>Containers offer consistent runtimes and portability. There is no reason to choose anything else.</p>
<h3 id="-scale-to-zero-container-runtimes">☁️ Scale-to-Zero Container Runtimes</h3>
<p>Platforms like <strong>Fly.io</strong>, <strong>Google Cloud Run</strong>, and <strong>Azure Container Apps</strong> let you run containers that can scale to zero when idle. They also handle updates, load balancing, and HTTPS certificates.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Easy deployment</li>
<li>Managed infrastructure</li>
<li>HTTPS out of the box</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Cold starts can be slow</li>
<li>Longer deployment turnaround</li>
<li>Higher cost if always running</li>
</ul>
<p>These platforms are excellent—but for this project, I think there’s a better alternative.</p>
<p><strong>Fly.io</strong> deserves a shoutout: it’s affordable and can build your container directly, eliminating the need for a separate registry.</p>
<hr>
<h2 id="databases-in-the-cloud">Databases in the Cloud?</h2>
<p>Hosting web apps in the cloud is cheap. Hosting databases? Not so much.</p>
<p>Managed databases come with replicas, backups, and high availability—and those features cost money. I don’t need them (yet).</p>
<p>Serverless databases exist, but startup latency is a concern.</p>
<hr>
<h2 id="-self-hosting-on-a-vps">🧑‍🔧 Self-Hosting on a VPS</h2>
<p>The downside of self-hosting? You manage everything.</p>
<p>The upside? A <strong>5€ Hetzner VPS</strong> (4GB RAM, 40GB SSD) or even my <strong>Intel N150 mini machine</strong> can host multiple apps and databases.</p>
<p>There are tools that help you manage web apps on your own infrastructure:</p>
<ul>
<li><a href="https://kamal-deploy.com">Kamal Deploy</a></li>
<li><a href="https://uncloud.run">Uncloud</a></li>
<li>Local Docker + custom scripts</li>
</ul>
<p>You learn a lot by manually setting up an reverse proxy and running containers yourself.</p>
<p><strong>Kamal Deploy</strong> works well, though complexity is growing as it adds features. I haven’t tried <strong>Uncloud</strong> yet, but it looks promising.</p>
<hr>
<h2 id="kubernetes">Kubernetes</h2>
<p>Given my requirements, I believe a small server where I install a one node &ldquo;mini&rdquo; Kubernetes is the best option. A machine with 4 GB of RAM can run <strong>microk8s</strong> or <strong>k3s</strong>, with enough power to host multiple apps and databases. I can run a local registry  can even run <strong>Valkey</strong> if needed.</p>
<ul>
<li>Kubernetes is made for running web apps with, it handles updates without downtime</li>
<li>I can run a databases, redis etc.</li>
<li>I will learn a lot of Kubernetes</li>
<li>With a local build/registry on the Kubernetes machine the turnaround time (for code change to live) will be way faster than any other container based deployment.</li>
</ul>
<p>It will be a lot of work, but a lot of learning. Is this the best option for you? It depends.</p>
<p>I hope to revisit this in the future with some benchmark numbers, some experiences richer.</p>
]]></content:encoded></item></channel></rss>