Published on 1st of August, 2024.
Over time I have started to self-host more and more services. For most services, there are paid alternatives, and I don’t mind paying even. The main reason I like to self-host is the experience I get from it. It is fun, and if it saves a buck in the process all the better.
In this blog post, I’ll give some details on how I have been managing my self-host stack, which you could use as a starting point to host some useful services yourself. This is mostly a rant, but you’ll find something useful here.
If you want to copy some of my setup, all of my (non-secret) configurations for my self-hosted services are available on GitHub.
I made this website myself using
Cloud storage is one of the most useful things to self-host. Not that I do not trust cloud storage providers with my data, but it is nice to have full control over my most important data.
I was using Owncloud until recently, which works OK, but the client is a bit outdated and eats CPU cycles like a madman when syncing. I resolved part of that by cutting down on the number of files in my storage, but Nextcloud is just a more modern cloud storage system. Nextcloud was originally forked from Owncloud but is kept fully open source and has more features (that I don’t need).
It was surprisingly tricky to get working properly, and the documentation is a bit lacking. Still, overall I do think it’s an upgrade over owncloud.
Password managers are surprisingly tricky to get right. I’ve used LastPass and Keeper, and they’re good (but not free) services. I then switched to GNU pass, which is OK and has fantastic CLI tools, but the browser extensions suck and are hard to install and syncing is annoying (especially to my phone).
Recently I switched to Vaultwarden, a self-hosted alternative repository compatible with Bitwarden. It is as good as the paid password managers but gives me full control over the data. It was really easy to set up too.
I have a bunch of important documents, like contracts, birth certificates, tax documents, etc. I had originally just put them in a folder structure in my cloud storage, but things can still be hard to find.
Paperless solves this problem by performing OCR on all documents (as well as supporting manual/automatic tags). All your documents are then just searchable, and it becomes incredibly easy to find whatever document you’re looking for. It also makes it very easy to share documents with other people. I only recently started to use it, but I think it’s a great piece of software.
All my self-hosted services run on docker containers (more on that later), and it’s really useful to have some tools to monitor the containers remotely. With Portainer I can remotely see logs, CPU usage, and other stats. It also allows me to remotely restart a container. I would also be able to do this when SSH’ed into my server, but doing it via a web browser can be much more convenient.
Portainer also has tools for deploying and launching the docker stack, but I haven’t felt the need for that in my use case.
Some time ago I made an interactive dashboard to help understand the visitors to my site better. (Where are they from? How do they use the website? Which pages are more popular than others?). It turns out that this is a lot of work, and there are better solutions. I wanted something that is open source, and doesn’t rely on cookies to track people.
This leads to using
There are a lot more things I could be self-hosting. But I just haven’t gotten around to it yet. See also awesome-selfhosted for a large list of useful self-hosted projects.
Great media-streaming. I am fine for most of my media needs with YouTube+Netflix and Spotify, but occasionally I want to watch a movie or series that’s not on there and it’s quite a hassle. With Jellyfin I download these and then stream them to whatever device.
I am currently using Gmail and Outlook both as a mail server and as a webmail client. Since I have my own domain, I could host my own mail server and have an email address like
. I could even buy theI can run a local DNS server that blocks ads automatically. If set up properly, you shouldn’t see any ads on any of your devices connected to your home network. One can do this with the well-known pi-hole service as well, but I had mixed results with that and got rid of it. I also hear that AdGuard Home is nowadays the better option.
All my photos are stored in the Google cloud. This is super convenient; if I have a new phone all the photos I recorded on any of my previous phones are already on there. However, Google doesn’t store the photos at the highest fidelity, so there is some loss. I honestly don’t care too much about that, but at the same time syncing all my photos automatically to a photo storage service (such as the one that comes with Nextcloud), is not much work.
I know how to cook a lot of dishes for different cuisines. At the same time, I rarely actually do this. I tend to mostly cook the same foods, out of laziness and convenience. At some point, I had a spreadsheet with all the dishes that I knew how to cook together with some of the most important ingredients. Then when I had an ingredient, I would just look up what kind of dishes I could make with that to get inspired. I should be doing that again, and with self-hosted services like Mealie, KitchenOwl or RecipeSage that is possible. They have the option to search recipes by ingredients, and to add different links to recipes, or scrape instructions and ingredients from an online recipe. Sounds great, but does take a while to set up with >100 recipes.
Even though I use Obsidian for most of my notes and to-do lists, there is one particular use case that just doesn’t work well with it and that’s shopping lists. To me, it’s very important to be able to add items to my shopping list within a few seconds of opening my phone. It is equally important to mark items as done and remove them from the list when I’m in the shop at a similar speed. Right now I’m using Google Keep for that, and it’s excellent. But Google products never last forever it seems, so I could use an alternative. Fortunately, both KitchenOwn and RecipeSage also have shopping list features (that even integrate with the recipe functionalities). That sounds like a great solution for me.
To run self-hosted services properly a bunch of infrastructure needs to be in place first.
First, you need a device to run the services on. There are essentially two options: use your own device, or use a server. I am using both.
VPS: I’m using Contabo as a VPS. I have been using them for a while, and I can’t find anything cheaper with similar specs. Their current cheapest offer is just €4.50/m for a server with 4 cores, 6GB RAM, 400GB SSD storage, and (practically) unlimited traffic. For the things that I’m doing this is more than enough.
Home server: I bought a second-hand 2015 NUC locally, and upgraded it with more RAM and storage (using parts I had lying around). It has an interesting quirk where the BIOS doesn’t support booting of the NVME storage I installed, and it needs to boot from USB or SATA. As a result, it has a USB stick permanently plugged in that will make it boot. Any mini-PC will do just fine because most self-host services are pretty lightweight. You don’t even need to use a mini-PC, but since this is a device that’s going to run 24/7, it’s better to pick something power-efficient. You could use a Raspberry Pi or other mini-PC, but a second-hand device is probably the cheapest.
When I type e.g.
Usually, a service makes itself available on a certain port, e.g.
There are multiple reverse proxy services out there. Probably the most popular is
Each of my services runs inside a docker container, with all configurations specified in a
Most services I’m using could also be installed directly (either as a package or from source). But different services may have conflicting dependencies which may change over time. This could be a nightmare to maintain. While setting stuff up with
I want to be able to reach my home server from outside the local network, without exposing my local network and opening myself up to security risks. This can be done using a tunnel. Since I’m already using Cloudlfare, I decided to use
Self-hosting means keeping a lot of valuable data on a server. Anything can go wrong, so all of this data needs to be properly backed up. I used to do my backups with
Whenever I want to update my website, I just want to make the required changes on the main git branch, and then my website should simply reflect those changes automatically. This automates the step of SSH’ing into the server, pulling the changes, building the website and restarting the containers. This can be done using services like GitHub Actions. You just have to create a configuration file specifying what scripts/commands to run whenever there is a push to the main branch. In this case, the command goes and SSH’es into my server, so it also requires a secret SSH key to be added. It should also be possible to have a service running on my server that serves as a webhook and runs a script whenever it gets a ping from GitHub. Honestly, however, SSH is much easier to set up and I suppose that I can trust GitHub enough with those secret credentials to my server.
Services can fail, and for some services, I need to know about it as soon as possible and get notified. For example, if my website is down, then I want to receive a notification so that I can investigate the issue. This is however quite unlikely to fail, and also quite visible if it goes down. The most important service that I must be sure I can rely on is my backups. This is also because it is the least visible if it does fail. To monitor my backups I’m using
Ideally, I should also get notified if any of my containers are down, specific services are down, or if either of my two servers is down. I haven’t set that up yet, however.
Self-hosting services can be fun, save money and be a great way to learn. I learned about a lot of different technologies in this process. It is also a big time sink, and I have spent more hours on this than I initially intended. It’s certainly not for everyone, but I don’t regret doing what I did either.
Rik Voorhaar © 2024