About Self-Hosting

About Self-Hosting
Photo by Luke Chesser / Unsplash

Let's start this with the definition of Self-Hosting. In the blog post at How-To Geek, Jason Fitzpatrick explains that:

Self-hosting is when you—either using a computer on your local network at home or a remote "bare metal" server host you've purchased—host your own services for various purposes.

To put it simply, self-hosting means hosting your own services on your own computer.


Why Should I Self-Host?

With the rapid development of technologies of telecommunication system, companies can now easily sell their software as a service (SaaS). Google Drive from Google, iCloud from Apple, are some of the examples that people most commonly use.

However, it may get very costly once you have to pay a subscription fee for lots of services. There are some type of services that I consider to improve my QoL (Quality of Life), including: 

  1. Google Drive – 2,400 KRW/month, for 100GB cloud storage and e-mail
  2. OneDrive – 2,900 KRW/month, for 100GB cloud storage for Samsung
  3. Netflix – 13,500 KRW/month, Full HD resolution on 2 devices
  4. YouTube – 14,900 KRW/month
  5. YNAB – 19,950 KRW/month, for finance and budgeting
  6. Wordpress.com – 5,300 KRW/month, for a website
  7. Ghost – 14,630 KRW/month, for a blog and newsletter platform

Totaling to around 73,000 KRW/month, for all the subscriptions to those services, and that is not a small amount.

Sometimes, it is not always about the cost, but also about the control you have to your own data. You have to rely on those companies to handle your data, let alone your personal and precious data. I could never trust a company to handle all my personal files, scanned documents, finance information, and personal photos, especially when those companies live by munching our data and claims to provide tailored and personalized services to use.

Other than those services I mentioned earlier, I'm also using:

  1. Password Manager
  2. PDF Editor
  3. Flowchart Maker
  4. Idea Sketch Canvas

There are some free websites that offers those services, but we cannot be sure that they do not keep our data for their own private gains. I would rather find the open-source alternatives, and run the service myself.


How Do I Self-Host?

Computing Resource

First, you need a computing resource, which means: a computer and an operating system. The computer can be a physical computer, or a virtual computer that you purchased from VPS (Virtual Private Server) providers. If you have an old laptop you're no longer using, I would recommend using it to save cost.

💡
Since your computer will be running 24/7, it would probably best if your laptop has a removable battery. You can remove the battery, and use it while plugged to the wall.

I am using my old Lenovo laptop, G40-70 model, with Intel i3-4005U CPU and 16GB of RAM. I found that 16GB is a bit too much as I do not think that my CPU has enough power to run that many things. 8GB RAM is the sweet spot for many.

I also installed 256GB SSD for system boot, and another 2TB SSD for storage, as I was going to use this laptop as NAS (Network Attached Storage) as well.

Lenovo G40-70 I bought in 2015

As for the OS (Operating System), the folks at Reddit communities r/selfhosted recommend to use Debian (stable), as it has steady security updates and large repository of things we need during setting up our self-hosting system.

Software

Containerization is the key! It adds isolation between the applications you are installing and your system. When we install an applications to the system directly without containerization, it may somehow mess up with our system, and it may be difficult to recover the system problem, as it depends on small things we already did with our system.

I am currently using Docker. I could not recommend any other container management tools as Docker is the only one I use and I feel comfortable using it. I do not see any reasons why I should find another tools.

Docker Orchestra

Docker Orchestra is the collection of all self-hosted applications I have set up and tried. Head to my personal GitHub to retrieve the Docker Compose files. Think Docker Compose as the text-based installation instruction that Docker can follow to install the self-hosted application.

Take a look at this docker compose for Uptime Kuma, an easy-to-use self-hosted monitoring tool:

name: uptimekuma

services:
  web:
    image: louislam/uptime-kuma:latest
    restart: unless-stopped
    networks:
      - router
    hostname: uptime-kuma
    volumes:
      - web-data:/app/data

volumes:
  web-data:

networks:
  router:
    external: True

My Uptime-Kuma Docker Compose

I will explain the meaning of each line in the upcoming post, as we dig deeper in setting up our self-hosted applications.


Summary

If you have old laptop laying around and unused, you can use it to serve the applications you may find essential for your life. No more paying for only 100GB cloud storage, you can have as much storage as you want! In fact, I'm actually writing this blog using Ghost blogging platform that I am hosting on my server.

Here is the services I am currently hosting on my server:

Services I am hosting on my server. An eye-candy, right?

Stay tune for more detailed guides!