SaaS vs Self-Hosted: The Hidden Costs
January 12, 2021·8 min read
Last updated on Nov 21, 2021.
These days a lot of businesses rely on SaaS or cloud based products. End-user spending is expected to reach $482 billion by 2022 - that's a +21.7% change vs the previous year!
It's easy to see why using managed software can make a lot of sense for companies. SaaS products can often save a lot of time and money, as their customers don't have to setup and operate their own servers, databases, plus everything that comes with it: security updates, troubleshooting, ensuring that the system is always up, and so on.
However, cost and time are not the only factors. Sometimes companies can't use a hosted service due to compliance requirements in highly regulated industries or due to privacy laws.
That's why, in this article I'll be walking you through some major factors and common pitfalls when deciding between self-hosting or paying for a SaaS to do it for you.
Let's get started!
Table of Contents
- What is the difference between hosted and self-hosted?
- Which one is better?
- Why self-host software?
- Why pay for a SaaS?
- How much does it cost to self host?
- Security considerations
- Which one should you pick?
What is the difference between hosted and self-hosted?
Self-hosting is when you install and run software on your own servers. In addition to the server costs you are also responsible for regular security patches, software updates, performance tuning and ensuring the system stays up.
Using hosted software means you're paying someone to take care of that for you as they run it on their own servers. You get access to the software, without having to worry about everything needed to keep it up and running.
Software-as-a-Service (SaaS), cloud-based, hosted or managed software all pretty much refer to the same thing: somebody else takes care of running the software for you.
Which one is better?
There’s lots of debate about whether companies should build software in-house, or buy ready-to-use products. There’s good points in favor of each of them, and it’s important to recognize that there is no right answer here.
As a software engineer, I actually enjoy managing infrastructure. After all, I founded a website monitoring SaaS. So I'd be lying if I told you that self-hosting software is no fun - it's what I do for a living!
However, I should clarify that I've been building and running software for nearly a decade, and had to learn several lessons along the way. From critical services randomly going down in the middle of the night to mitigating a large scale DDoS attack - it's an 24/7 effort.
As with most decisions, it comes down to making tradeoffs.
Why self-host software?
There are many benefits of self hosting software:
- You can customize the servers for your needs
- It could save you some money (if your usage is high enough)
- No need to trust a third party - the data is in your control
- You can use open source alternatives of popular tools
However, there's also several drawbacks:
- You are in control of every detail
- It requires operational skills (eg. databases, load balancers, security groups)
- It might end up costing you more down the line
- You're responsible for frequent security updates, bug fixes and maintenance
As you can see there's no clear cut answer. There's many factors to consider before self hosting the software your business might depend on.
Next let's talk about the pros and cons of using a SaaS.
Why pay for a SaaS?
There are many reasons why plenty of companies rely on SaaS products to do business. Off the top of my head:
- Save time by not having to deploy and run servers
- Don't worry about dealing with outages or troubleshooting server issues
- Save money by not having to pay for your own servers, and down the line possibly contractors to help keep things running smoothly
- Someone else takes care of security patches and keeps your software up-to-date
And here are some of the cons:
- Your data is hosted in someone else's servers - are they trustworthy?
- It can be more expensive depending on your usage
- You can't easily customize the infrastructure which runs your software - it's decided for you
- You might have compliance obligations that do not permit you to use a third party service
In short, when paying for a SaaS, you're simply letting a third party take care of improving and running the software for you, so you can instead focus on something else.
As you might have noticed, which option is cheaper depends on a lot of factors. Next, let's dive deeper into how much it would cost to self-host an open source Google Analytics alternative.
How much does it cost to self host?
Let's use a concrete example: What would it cost to self-host an open-source project like Matomo?
As a bare minimum you could rent a $5/mo DigitalOcean instance with 1 vCPU / 1 GB of RAM. That comes down to $60 per year for one server, which is actually a pretty good deal.
However, that's far from the full picture. For any serious project, it would be wise to invest in a more proper setup.
This is not only about reliability or performance, but also because if someone manages to hack into your server at 2AM, and leaks any sensitive data, you might end up losing trust from your customers, and likely get a hefty fine from the data protection authorities.
But let's continue exploring this idea. Matomo's minimum recommended server is actually 2 CPUs and 2 GB of RAM. So in reality you end up paying for the $15/mo instance ($180 per year), instead of the cheapest possible one.
Let's remember that's one single server, in reality you might end up needing multiple depending on your needs.
Fine, what else do we need?
- You probably also want to ensure your data is not lost in case of a server failure. So let's add backups, these can add up to 20% of the server costs every month.
- Do you need a separate domain name for your analytics or admin panel? Add another $10/year.
- Do you need an email server for the weekly/monthly reports? Add another $5/mo.
- Do you have visitors from around the world? You might want to add a CDN to avoid slowing down your site. Costs vary, but let's assume you pick a free CDN such as Cloudflare.
- Once you start handling more traffic, you'll probably want to set up a separate database ($15/mo) and multiple servers to handle the load and increase the availability of your service.
- If you go with a multi-server setup you'll need a load balancer too ($10/mo).
That means, for a single server setup you're looking at the very least $286/year, or for a more production-grade setup $500+/year.
Of course this doesn't factor in the time you’ll need to set it up, secure, maintain, and keep it up-to-date every month - don't underestimate how much time this can take.
Soon you may find yourself paying hundreds, if not thousands of dollars on infrastructure each year, which might also take a lot of your time.
If you are fine using your time for those things instead of running your business, then self-hosting can be a wonderful learning experience. But if you're looking to focus on growing your business, it's worth considering paying for a SaaS product instead.
For comparison, a Panelbear Pro subscription costs $29/mo (or $299/year) - everything taken care of. Plus you can upgrade or cancel anytime, which gives you a lot of flexibility.
By now it should be pretty clear that self-hosting has hidden costs: you are fully in control of every single detail. Having total control can be a good thing, but it has a price.
You have complete ownership over the server on which the data is stored. You can export, or destroy the data with the push of a button.
However, you're also now fully responsible to keep it safe from any threats on the internet. In case of a data breach, there are huge fines under various privacy regulations, which adds yet another thing to worry about.
When you opt for a hosted solution, things like security, compliance, backups, encryption at rest, and many other things should be fully taken care of, so that you can focus on doing what really matters for your business.
Which one should you pick?
With self-hosting you get to manage, and control every detail of your infrastructure, mainly at the expense of your own time. With SaaS products, you pay a company to use their software, and everything else is taken care of. That saves you time so you get to focus on your business instead.
I'd just like to finish this article by saying: please don't just blindly follow my advice (or any other random guy on the Internet for that matter). What's best for you highly depends on your own circumstances.
I like managing my own infrastructure, but when running a business I pay for software if it makes sense. That way I can let someone who better understands the topic take care of all the details, and I can focus on using my time to provide value to my customers - there's one less thing to worry about.
However, you should consider your own goals when deciding between self-hosting or paying for a SaaS.
So to finish, here's some questions you can ask yourself to help you decide which one is best for you:
- Do you have the time and skills needed to deploy the software?
- How much would the servers with enough capacity cost you?
- How much downtime are you willing to tolerate? What happens if your servers crash in the middle of the night?
- Do you have specific compliance requirements? Does HIPAA apply to you?
- Does using a SaaS product lead to vendor lock-in? Is this a problem for you?
- What's the total cost of ownership between the alternatives?
I hope this article sheds some light on the differences between self-hosted and SaaS products, and helps you decide which option is best for you.