Phone:
 +947 601 49595
Email:
 mail[at]pasindudissan.xyz
Secondary Email:
 pasindudissan[at]proton.me

PGP key (Ed22519)
3300 B645 19CA C101 A0DD
D030 E40F 4B15 095C C7AF

© 2025 Pasindu Dissanayaka.

Posted by:

Pasindu Dissanayaka

Category:

Cloud Adminstration

Posted on:

Aug 5, 2024

Self-Hosting vs. The Cloud: The True Cost of Digital Independence

Introduction

In an era of increasing digital surveillance and rising cloud service costs, more individuals and businesses are returning to on-prem solutions. While self-hosting provides greater control and privacy, it also comes with its own set of challenges, from hardware costs to ongoing maintenance.

In this article, my goal is to break down the financial, technical, and security implications of self-hosting versus relying on the cloud, thus providing a detailed look at what true digital independence really costs.

💻 Self-Hosting Pros

When you self-host, your data stays on your own infrastructure, giving you full control of your data and software stack, ensuring long-term flexibility. It also means that third-party breaches don't necessarily leak your sensitive information.

Self-hosting typically requires an upfront investment in hardware but can be more cost-effective in the long run compared to ongoing cloud subscription fees.

For example: A basic VPS with only 2 GB of RAM and 1 TB of storage will cost you almost $20 per month. Setting up your own server for the same performance will only set you back about $200, which means within a year you'd have recovered your costs.

PS. Note: I am making a very theoretical calculation here, but in my personal experience, I was able to set up an always-on on-prem server running a Type 1 hypervisor for as little as LKR 50,000 (~US$150).

☁️ Cloud Hosting Pros

In my purview, there are two main perks of cloud hosting:

1. 99% Uptime

Self-hosting solutions in Sri Lanka face two constant problems: power outages and internet bandwidth limitations. So if you are hosting a critical piece of software or network infrastructure that must be online all the time, migrating it to a cloud solution is ideal.

2. Scalability

Cloud platforms offer flexible hardware allocation, making them ideal for deployments requiring auto-scaling. Keep in mind, though, that most VPS providers charge unbelievably high prices for large storage spaces—or will catch you off guard with hidden costs—looking at you, AWS.

Other default perks of cloud hosting, especially if you are a non-technical person, include:

Reduced Maintenance Responsibilities

Most cloud providers automatically handle software updates, security patches, and infrastructure scaling.

Access from Anywhere Without Complex Setups

Cloud services are built for seamless remote access, while self-hosting often requires additional configurations like VPNs (or the much-preferred Zero Trust Tunnels) for secure access.

💰 Cost Breakdown

Hardware and Energy Costs for Self-Hosting

  • Initial costs include servers, storage, networking equipment, and backup solutions.
  • Ongoing costs include electricity, cooling, and potential hardware replacements.

Subscription Fees for Cloud Platforms

  • Cloud services often have predictable monthly fees, but costs can quickly escalate with increased usage.
  • Data egress fees can add unexpected expenses when moving large amounts of data out of the cloud.

Time Investment as a Hidden Cost

  • Self-hosting requires ongoing management, including updates, security patches, and troubleshooting, which costs your time. And time is money.
  • Cloud platforms reduce hands-on effort but introduce dependency on external providers. However, technical support can be frustrating, often requiring form submissions and prolonged interactions with unhelpful bots before reaching a human—just to get redirected to L1 support when all you need is to run AutoSSL (for web hosting).

🔐 Security & Reliability

Now let's get into the real technical problems you have to keep in mind when setting up your services.

Self-Hosting: Firewalls, VPNs, and Physical Security

Self-hosting requires robust security measures, such as firewalls, intrusion detection, and encrypted backups. The physical security of hardware also becomes a factor, especially if you are setting up services for an organization.

Cloud: Dependence on Provider Security Protocols and Potential Outages

Cloud providers implement high-level security measures, but users must trust their policies. However, outages and data breaches can and do still occur, impacting availability. Encrypting databases (where possible) and properly auditing your code and any software you might be using is a critical next step.

🏡 My Personal Experience

I prefer a hybrid approach as it gives me the "best of both worlds." This means I have a low-cost cloud server, 'The Oracle,' which runs critical software including a messaging queue, an Ollama-based AI instance (auto-scales), and an uptime monitor.

As mentioned before, I also have a low-cost always-on LAN server, 'The Sentinel,' that runs Proxmox, which powers my private GitLab, CI/CD for DevOps, home automation, and a DIY-automated workflows platform. I use a Zero Trust Tunnel setup to allow my local services to be accessible regardless of my location.

Moreover, I set up a fault-tolerant internet connection by combining both an SLT Fiber and a Dialog 4G connection using an edge router. This way, if either provider fails, my servers remain online. In case of a power failure that my UPSs can't mitigate, the uptime monitor uses the messaging queue to notify me and my devices.

🎯 Conclusion

There is no one-size-fits-all solution when it comes to running your own services. Ultimately, the best you can do is plan for worst-case scenarios and how you can mitigate them. The choice between self-hosting and cloud hosting depends on factors like budget, technical expertise, and specific needs.

The hybrid approach, which I use, while effective, is also not the cheapest solution. However, understanding the trade-offs helps in making an informed decision about digital independence.