Skip to Content

Cloud? Here's how you can have the cloud at home. Self-hosting, with Cloudflare

23 July 2026 by
Cloud? Here's how you can have the cloud at home. Self-hosting, with Cloudflare
Elvin Luff
| No comments yet


Self-hosting doesn't need a rack full of servers. You only need one, and it can even just be a Raspberry Pi. High Availability is for suckers. Here's how I use my home server to power not just my home, but the website you're currently viewing. This blog isn't meant to be a how-to guide, but more just an overview of my setup, and pointers to the tools I use to make your own. Everyone has different needs, and I hope this will help you decide what you need for yours!

What do I need to run?

There's a large community of people who self-host just about everything you can think of, and you'll find them over at r/homelab on Reddit. However it's easy to go down the rabbithole of creating a problem in search of a solution, i.e. buying an entire rack of servers, and then finding ways to justify it.

One full-size PC can do a whole lot of things at once. Sure, it's missing some redundancy, but we're not running a hospital here. Things can go down for an hour or 2 here or there. It's a mix of personal and business things - it serves:

  • NAS for backing up computers
  • Storage for all the footage out of my camera to make videos
  • Website host (this website)
  • Business operations, accounting, manufacturing, eCommerce, etc
  • Home Assistant, running the house
  • Matrix server for chatrooms
  • Databases for many of the above items
  • Jellyfin server, for my backed up media

The majority of these things are fairly lightweight, and don't use up much CPU. The main thing to do is keep things isolated and separated, and I use Kubernetes for this, specifically k3s. I think I need to add more machines in the future, but with the current market, I'm holding out as long as I can.

The up-front investment

Prior to starting elvinhome, I worked for 8 years as a Cloud Architect. A common saying you'll hear, and it's not completely wrong, is that the cloud is super expensive. There's a right and a wrong way to approach anything and if you just spin up a bunch of linux servers and shift your entire workload as-is, then this saying will very much be true. The big thing the cloud does though is remove the up-front investment. Instead of paying one big lump sum at the beginning and getting stuck with a server for its entire lifetime, you pay in smaller instalments. Lower risk, higher overall expenditure.

But I'm not running something enterprise scale any more. I just want to host my little website, and dammit, that 10-20 euros per month adds up and I'm aiming for a more noble goal; cloud independence, and retaining full ownership of my data. I'm building the CTRL ONE, a fully local, offline room control device, and I want to extend that philosophy to everything I do.

For a simple website hosting a blog, a Raspberry Pi would do the job. Granted, they're not as cheap as they used to be, but if you want something that you can throw next to your router and have something online 24/7, it's the simplest way to do it. For me, I do a whole lot more than this, so I built a full server inside of a tower PC case that tucks nicely into my closet.

Especially when running it home, it's good to focus on power efficiency (which a Raspberry Pi will get you) but also low noise. We don't want flashy RBG lighting, and we're not going to look at it day-to-day, so get the most functional case you can.

My go-to is the Fractal Design Define 7, specifically with the black side panel - not transparent. The main reason is that this case can fit tons of hard drives, all down the front, while still having enough space to fit a full ATX motherboard and a hefty GPU. The sides panels come with solid sound deadening material on all sides and paired with some high quality fans (I went all in with Noctua), it's barely a whisper.

So yes, sure, it's an up-front investment, and there's a few things that you'll want to do to make sure you have room to expand, like a good case, motherboard and power supply. Especially with today's RAM-pocalypse, it's better to start small. Start with a simple CPU and 1-2 sticks of memory. CPUs sell well on the second-hand market; I used this to upgrade it at not much expense recently. Choose a memory kit where you can buy a second set to double it up in the future, if the prices hopefully go back to a semblance of normality. And the best GPU is an old one that's past its gaming life.

A case like this will give you room to expand in the future. I didn't start with a GPU, opting to add it later once I needed to upgrade my main PC and put the hand-me-down into here. It originally handled just transcoding video, and while the 8GB VRAM in the Nvidia RTX 3070 Ti is a little limited, it can do basic AI work too.

The single largest investment has to be the 80TB of hard drives. It's 5 x 16TB drives, put into a raidz1 configuration. It uses ZFS as the file system, which handles combining them all together into one virtual drive, and managing redundancy. It gives me an effective capacity of 64TB, and I can lose one drive without losing any data. Even for short-form video content, it's surprising how quickly I'm starting to fill this up, but the Fractal Design case can easily accommodate another 5 of these drives if I need to level up in the future.

How to run it all

I've spent years running Linux systems so I chose to go the hard way and do full Kubernetes, but for one system, that's plain overkill. What I would absolutely say is a must-have is that everything runs as a container. Containers ensure that each application has its own filesystem and it's not easy for them to mess with each other's configurations, and Docker is a well-established name at this point.

You'll find a container for just about every piece of software you want to self-host, often made by the people who make the software, and if not, maintained by a reputable third party. Updating is as simple as restarting the container with the latest image. Oftentimes you might be lagging behind updates when installed directly onto a Linux OS as the operating system maintainers might be slightly slower in providing those updates.

A really simple place to start could actually be Home Assistant OS. If you're planning to run Home Assistant anyway, it comes with a really great add-ons store that is essentially just a fancy UI over some Docker containers, all managed for you. And it'll run on everything from that Raspberry Pi all the way up to the full PC. Another option could be HexOS if you're looking for the primary usecase to be a NAS, but I've had no personal experience with it.

For me, I chose Flatcar Linux. For those unafraid of a command line, it's an almost unbreakable OS that auto-updates and is purely focused on running containers. I found it easy enough to make it also run ZFS to be a NAS, and I can just SSH to it over the network.

Exposing it to the internet

For many people, you'll set up a Home Assistant instance, and maybe a Jellyfin server, and call it done. These are all things that don't need to be accessed from the internet and I would highly advise keeping it that way! If you're wanting to access things from outside of your house, the most secure way is with a VPN.

I use Tailscale for this. I have the app on all my devices, and it creates a virtual network that I can use to directly connect to all the other devices within it. I can access my Home Assistant from anywhere, without it being exposed directly to the internet.

If you're wanting to make something available to the public however, then you will want to expose it to the internet. My top tip:

Don't just open a port on your router and call it done.

Opening a port on your router and forwarding that port to your server will absolutely have the intended effect. If you go to your home's IP address, you'll see your self-hosted website straight away! Job done. Or is it?

First of all, your home's IP address is your website. For your small blog that might be fine, but it opens yourself to a number of potential attacks. If somebody decides that they don't like what you have to say, it would be trivial to launch a DDoS (Distributed Denial of Service) attack and render your website completely offline. But it's not just your website... it'll be your entire home internet connection too. Most residential ISPs don't take kindly to you hosting content off a home internet connection, and their response if this happens more often is likely to just terminate your contract.

Then there's the performance side. The internet is a complicated place, behind the scenes. A single packet may have to traverse multiple networks before reaching its destination, even if that destination is close to your geographically. This shows up in the form of latency, and cloud providers spend vast amounts of time and money optimising for this. Netflix is a classic example, often even running servers in the network of the ISP to cut down on bandwidth, latency and costs.

One home residential ISP user connecting to another home residential ISP user is not a route that is very well optimised. You might have a great experience 90% of the time, but there can be edge cases where you end up with very high latency, or entire disconnections.

Instead of opening up the website directly from your home connection, it's best to use a Content Delivery Network, known as a CDN. Their entire job is to optimise the connection between the end user and their cloud, a provide a much more reliable experience for everyone involved. There's a number of providers out there, such as Fastly, Amazon CloudFront, and more.

For me though, I chose Cloudflare, because they offer this entirely for free. You register your website, and point it to your home IP address as the origin. As far as your home ISP sees, it's just traffic coming from one place, and Cloudflare will handle security aspects such as DDos mitigation.

But there's a super neat feature of Cloudflare that I took full advantage of. What if you want to have the public internet connectivity that a CDN provides, but with the security of a VPN? Cloudflare tunnels works by having your server reach out to Cloudflare and essentially set up an encrypted "VPN" or tunnel, over which all data travels between you and Cloudflare. From the outside, it just looks like one regular VPN connection, and instead of having to open a port and have many incoming requests, it's just 1-2 outbound connections that are held open. There's nothing for your ISP to take issue with, and no way for an attacker to uncover your home IP address and attach it directly.

Sign in to leave a comment
Does my cat drink enough? Making a smart water bowl