Guide: What the heck is self-hosting?
If you read Serverwise with any regularity, you've probably run into the term self-hosting before. And you might be wondering, "What is self-hosting, after all?" Let me explain.
Do you have an email account you log into every day? A to-do app? Maybe you have a folder in the cloud where you store and synchronize your files? You probably have a dozen of such services you use regularly. Web applications (web apps), particularly in the software as a service (SaaS) model, are so standard we barely even think about them anymore. They’re just part of our daily lives.
For reasons we’ll get into in a minute, some people are choosing to take control of their web experiences, and the data they give them, through self-hosting.
Only $122/yr for 48GB RAM and
480GB 960GB NVMe and free backups for LIFE!
Celebrating our 9 year anniversary! Capacity is limited and some deals will sell out. Get yours before they are gone!
“What’s that?” you might be asking. “Is it complicated? Is it hard? Why does it sound like being the only person who shows up for your own birthday party?”
Don’t worry — we’ll answer your questions in a minute. When it comes to friends, you’re on your own.
What's the BEST DEAL in cloud hosting?
Develop at hyperspeed with a Performance VPS from SSD Nodes. We DOUBLED the amount of blazing-fast NVMe storage on our most popular plan and beefed up the CPU offering on these plans. There's nothing else like it on the market, at least not at these prices.
Score a 16GB Performance VPS with 160GB of NVMe storage for just $99/year for a limited time!
What is this, a center for apps?
Before we define self-hosting clearly, we need quickly explain what a web app is, and how it works. For this discussion about self-hosting, a web app consists a frontend, a backend, and storage. In reality, it’s more complex than that, but let’s keep it simple.
The backend is both the brain and the messenger of the web app. It lives on a server, is written in one of many different languages, such as Node.js, Ruby, Python, Java, PHP, and others.
A backend not only relays information between the user and the storage but also makes important decisions, such as whether or not you entered your password correctly and how much information you should be seeing.
The storage is both information and files. Information goes into databases, which are similar to spreadsheets — lots of little cells holding a number or a piece of text. Files — which can include videos, photos, documents, gifs, your hopes and dreams, and more — are put into highly-organized folders. Not unlike a library, which uses a catalog system to keep track of its many books.
The frontend, backend, and database, which contains your information and that of many others, all live on a server. One that looks something like this:
So, the frontend talks to the backend, which in turn talks to the database. The database returns the information or files that you requested, and the backend then decides how you’ll view it. It sends these details back to the frontend, which formats the information and presents it via the interface.
Because the frontend and backend are independent, a web app can be used by many people all at once, or by one person with a few different devices.
Here’s a rough idea of what I’m talking about:
In typical web apps, someone else owns the server, stores your information, and runs the application. Here’s where self-hosting is different.
Self-hosting is when you put an application on your server, store the information in your own database, and create your own web experience.
So, I can host my own Gmail?
Unfortunately, not every web app that you use every day can be self-hosted. In fact, almost all of them can’t.
You can’t self-host Gmail for a lot of reasons, most important of which is that Google doesn’t release the project’s code to the public. Same goes for another popular service like Dropbox — the companies behind these web apps — keep the source code behind lock and key, also known as closed source.
The source code is all the programming that makes the frontend, backend, and storage function and talk to each other. Without that, you can’t self-host a thing.
But self-hosting advocates have been working for years on powerful and innovative open source alternatives to your favorite closed source web apps. Some of them are arguably better than their expensive competitors, and some offer features you can’t find elsewhere.
To self-host one of these open source alternatives, you need a server. Welcome to the world of web hosting.
This sounds… complicated
Remember that picture of a row of servers from above? That’s what you need to start self-hosting.
Well, you need just a tiny slice of one of those servers.
Yes, you can also self-host web apps from an old computer or something new like a Raspberry Pi, but we don’t recommend it.
Inside each of those racks — the things that look like freezer doors at your local grocery store — are hundreds of computers and hard drives. And each of those computers and hard drives are split into many smaller pieces through something that’s called virtualization.
Here’s a useful read that digs in a bit more into what virtualization actually is.
What you need to know is that one of these little slivers is called a virtual private server (VPS). Nowadays, many people use the word “cloud” synonymously with virtualized servers. Self-hosting is the same — instead of relying on Google’s cloud to save and display your email, for example, you’re creating your own cloud.
Once you have a VPS of your own, you’ll be able to get started building your cloud. You’ll need some basic experience with Linux and running commands on the shell, but we think this stuff is easier to learn than a lot of people think.
And with cool software like Docker, self-hosting has never been easier.
Why should I care?
There are a lot of reasons to favor self-hosting over using web apps created and hosted by one company or another.
First and foremost, self-hosting is (mostly) free! You need to pay for your server, but you can say goodbye to SaaS subscription fees and paid premium accounts.
Self-hosting is virtually limitless — you can run an email service, watch your videos from anywhere, keep your bookmarks safe and secure, run a chat service for your business, host a blog, synchronize your files in the cloud, and more, all from a single VPS.
A lot of self-hosting advocates like the fact that they control their own data, not some other company. Data breaches happen all the time these days, and it’s hard to know how a company plans to profit from your data. By self-hosting, you take back a bit of power.
Finally, self-hosting helps you learn a heck of a lot. If you’re hoping to find out more about development, there’s no better way than just jumping in headfirst.
The path to web app ownership
If you’re interested in self-hosting, you need just a few things to get started.
A VPS is your biggest priority. There are many VPS hosting providers out there. We’d be remiss not mentioning that SSD Nodes is one of them, and offer servers that beat the competition in benchmarks but will take a much smaller bite out of your wallet.
A VPS with 4GB of RAM should be more than enough to self-host quite a few web apps simultaneously. If you’re going to do a lot of things, or self-host a web app that lots of other people might use, look into 8GB or more of RAM.
You should also look for KVM offerings — that will allow you to run Docker and every modern web app.
After that, you need some web apps to run! We’ve put together a fairly comprehensive guide on self-hosted alternatives to some of the most popular web apps, organized by category.
There’s a great subreddit dedicated to self-hosting as well for more active discussions about finding and installing web apps for specific needs.
Generally speaking, these self-hosted web app will have a copy of their code on GitHub. You copy the code to your server, run through the installation process, and connect to the web app through your browser.
About that installation process…
It’s impossible to give one universal explanation on how to install self-hosted web apps. That’s just not how the technology works—it’s nothing like double-clicking on an
.exe file or copying an icon to your Applications folder. The good news is that actively-developed web apps come with good instructions on how to do it yourself.
Still, I can try to get you off on the right foot. A good first step is to install Docker. It’s not the easiest thing to do, especially for a beginner, but if you can get through it, installing other self-hosted web apps will be a lot easier.
We have a comprehensive tutorial on installing Docker available on our primary blog, which I encourage you to check out.
Once you’re done there, and have Docker running smoothly, let’s look at installing one popular use of self-hosting: hosting your own feed reader. This became a lot more popular after the death of Google Reader—while Feedly helped fill the gap, many people aren’t happy with that, either.
Miniflux is an excellent feed reader that I use every single day—it’s hard to underestimate the importance of a piece of software like that.
To get Miniflux running via Docker, all you need to do is run a single command:
docker run -d --name miniflux -p 80:80 miniflux/miniflux:latest
You can then type in the IP address of your VPS into your browser’s address bar and have your very own self-hosted feed reader!
Welcome to the freeing (and free!) world of self-hosting.
If you thought this piece helped explain what self-hosting is all about, and why you should dig in, mind giving it a share? We at SSD Nodes are always trying to think of new ways we can spread the word about self-hosting to those who might have not heard about it yet. Doubly so for those who already have a VPS and are looking for something else they can do with it.