The Real Cost of Self Hosting

How I feel when people tell me to "self-hosting is fun and cool!!!". Image is from a scene in the anime Toradora.
How I feel when people tell me to “self-hosting is fun and cool!!”

Every once in a while I took a look at the various services I self-host and think to myself? Is hosting $X service by myself really worth the cost? What is the cost? Would paying someone to host said service be more cost efficient?

That got me thinking about, what are the costs of self hosting? Let’s talk about it.

Financial

First let’s talk about the most obvious cost of self hosting, the one that can be measured in numbers. Financial costs, aka how much in $$$ you are paying to self host.

I am breaking these down into two further sub-categories of costs. Primary and Secondary.

Primary Financial Costs

Primary financial costs when it comes to self hosting are things that you absolutely need to self-host. The big one is server costs. Whether you are hosting servers in the Cloud ™ or you are hosting hardware in your own home, you are paying for it.

Depending on which cloud service provider you use, the financial costs can differ significantly. Buying your own hardware comes with large upfront financial costs and then also possibly recurring colocation costs.

Secondary Financial Costs

Secondary financial costs when it comes to self hosting are things that are essentially supportive to the various services you host. These include paying for things like offsite backup storage, domain name registrations/renewals, monitoring services.

If you are self-hosting at home, there is also the matter of paying for the additional electricity cost for running servers 24×7 along with power outage mitigation like a UPS and the battery replacements for said UPS. You also need to account for various hardware maintenance costs like replacing failed storage drives, power supplies, and fans along with any potential upgrades to processors and RAM.

Time

This is the cost that often gets overlooked when talking about self hosting. The time involved in all self hosting related activities can quickly add up and is worth thinking about before diving into a self-hosting project.

I break these down into two sub-categories. Initial Learning and Setup and Long Term Maintenance.

Initial Learning and Setup

This cost includes the time needed to learn a particular piece of software, how it works, its various resource and other requirements and how to set it up. Once you start setting it up, you are also spending a bunch of time, whether you are doing in a automated way (writing a Ansible playbook) or in a manual way (typing setup commands into a server’s shell). The more complex the software stack is the longer this takes.

If you are hosting services on your own hardware at home, there is also the time cost of learning how the hardware works and what its various quirks and requirements are.

Long Term Maintenance

The big hidden cost of self-hosting any given stack of software is the time involved in doing maintenance over the long term. I say “hidden” because it is a not a cost that is apparent when looking at a piece of software and reading its documentation. It changes from software to software and can also be variable throughout the duration of its use thus making it unpredictable.

This includes things like updating the software for security and/or feature updates. Troubleshooting and fixing any issues that crop up while the software is in use. Testing if your backups are working. The more complex the software stack is, the more time consuming all of this becomes. Sometimes the software you are using becomes unmaintained and needs to be replaced an equivalent.

Self-hosting is also self-maintenance so its important to think about such factors before diving into a new project. You can also see self-hosting as taking on a certain amount of technical debt that you then need to keep servicing to keep things going.

(Re)-Evaluating Your Self-Hosted Stuff

So using the two big metrics I have defined, I want to talk about how I use them to evaluate if something is worth self-hosting or not. I’ll provide some real examples here.

Some of my history with self-hosting

A long time ago, I used to self-host my email. Hosting email nowadays has both financial costs (domain name, server(s)) and also more significantly a large amount of time cost in both initial learning and setup and long term maintenance (backups, anti-spam efforts, DNS RBLs). Email is also a commodity service, in so far as there are lot of email providers out there and as such it is financially cheaper to have your email hosted by managed email provider.

Evaluating email along those lines means that for a long time now self hosting email just doesn’t make sense and so I don’t do it anymore. It is a high cost service to self-host especially if you consider time to be your most valuable resource. It is cheaper to host my email at Fastmail than it is to spend money *and* time self hosting it.

Another such service is authoritative DNS, I also used to host my own authoritative DNS and came to the realization that DNS is another commodity service. It is either very cheap or even free to have your domain’s DNS be hosted by someone else with a reasonable quality of service. As such, the combination of the long term maintenance and the financial costs of paying for servers meant that it is once again much cheaper to pay CloudDNS to host my DNS than it is to do it myself.

On the other hand there are services where it still makes sense to self-host. For example, I still self-host most of the websites I run (including this one). The costs for doing this (both financial and time) are low enough compared to the financial cost of managed web hosting that it makes sense to keep hosting all my sites myself.

Intrinsic Joy of Server Gardening

Of course, there are other factors that come into whether you would want to self-host something or not but I don’t really consider them “costs” in the same way I think about time and money. One such factor is pride, I know a lot of us take a certain amount of pride in hosting and maintaining our own services.

I often equate doing self-hosting server maintenance to maintaining your own small garden. There is a certain amount of intrinsic joy to be had from the various acts that involve self-hosting. You may value the pride and joy you get from self-hosting more than the time and money spent doing it and that’s also perfectly valid.

The way I see it is that while like maintaining a small garden of servers I don’t want to be maintaining an entire farm.

Final Thoughts

At the end of the day, the amount of time, money and effort you put into self-hosting is entirely up to you, your needs, desires, and abilities. Everyone will come to different conclusions as to when it makes sense to self-host vs. when you can just pay someone else to do it.

The overarching goal of this blog post is to get you thinking about the various costs involved in self hosting. It doesn’t matter if you are are new to the world of self-hosting or a long time veteran, both groups can benefit from doing a bit of cost/benefit analysis. I hope it is helpful on that front.

Thank you for reading!

P.S – If you enjoyed this post, share it with a friend and/or on your socials!