Lessons learned from running my own home lab

I started out as a PHP developer and eventually learned Java. Then I was introduced to docker and I really didn’t like it. It found it had just too many concepts. Luckily, my coworkers were happy to show me what they know. It allowed me to learn it very well, and I even went on to run my own proxmox cluster with VMS for k8s, docker swarm and some other stuff.

In this blog I want to share the lessons I learned along the way with you

Start Easy

Docker is a very powerful tool, but you shouldn’t use all it has to offer. For a home lab, starting with docker compose files and running them detached is a very good start.

Like this

docker compose -f stack.yml up -d

I even know people which are using this approach to run stuff in production with actual customers without any problems.

Personally, I run a one node swarm. Why? Because it allows me to control the resource allocation. That way, when some container (browserless for example), uses too much memory, it doesn’t crash out the rest of the swarm.

You rarely need more advanced features like clustering, even in production.

Don’t solve problems you don’t have yet, because you will have to maintain them aswel.

Start with something fun

A home lab should be fun! Do you like podcasts? Start with audio bookshelf. Do you like low code and tinkering with processes, use tools like n8n, node-red or budhibase.

There are two things to remember when doing side projects such as this:

  1. It needs to be fun, it shouldn’t feel like work
  2. Move to your first success quickly and celebrate it.

Do some stuff the right way

It is OK to take shortcuts, but some stuff will come back and bite you. For me this was committing secrets to the repository. If you want to show people what you have made, or share stuff, well guess what: you can’t.

How did I fix this? I kept an .env file and made sure it made it to the backups aswel. It did require me to update all my credentials.

In addition, the .env file makes it easy to share credentials across multiple services. Just use one central .env file. Do you have multiple stacks requiring SMTP email? You can just refer to the same credentials.

Keep it simple.

Backups are not too hard

I waited a long time before properly making backups. Why? Because it is not fun and it sounded tedious. A colleague showed me how to do this and I was wrong.

With tools like borg backup and borgmatic it is not too hard to make your backups in a good way. It also supports database backup of types of databases.

Ask for help

Helping people out gives it own satisfaction, so don’t be afraid that you’ll be bothering others. So don’t fear to ask for help.

Avoid Odroids, Rasberries etc

Sure they serve their purpose, but personally I found it very frustrating to use hardware based on ARM architecture. My containers kept crashing out if there even was a container for this architecture prebuilt. I was no reliable enough for me, especially while I also have friends using my swarm stack

This took out a lot of the fun for me and resulted in taking longer to learn how stuff can work.

The most fun, I’ve had with a stable platform. For a small home server a N100 (at the time of writing is a very good option. It is fanless, so it can stand in the living room without annoying anyone and is very capable

What do you have running?

On the home lab:

ssh <redacted>@daedalus
docker service ls
1e72cm2s1c4w   actual_actual                   1/1        actualbudget/actual-server:latest
w3g5auuxkfcq   audiobookshelf_audiobookshelf   1/1        ghcr.io/advplyr/audiobookshelf:latest
vp6efu0xpnos   docs_docs                       1/1        node:20-alpine
lhvzdza3knfs   filebrowser_filebrowser         1/1        hurlenko/filebrowser:latest
klerq2knp1b5   flame_flame                     1/1        pawelmalak/flame:latest
ug9uy6w4yluz   n8n_browserless                 1/1        browserless/chrome:latest
pze2bhs1yp1x   n8n_n8n                         1/1        n8n-friso:latest
u4hsrxlq7usm   n8n_tailscale                   1/1        tailscale/tailscale:latest
v81lun1ym5es   nix_nix                         1/1        nix:latest
ej00pq5owtzu   traefik_traefik                 1/1        traefik:2.10

Summarized:

  • An n8n instance to run my personal telegram bots and AI. It is custom build with some other tools in the container.
  • browserless for scraping.
  • Flame for an internal dashboard.
  • a Cryptpad instance for an office alternative.
  • A very nice podcast client.

On my production server:

ssh <redacted>@fri.so
docker service ls
iujr7h1jzopf   dev-blog_dev-blog             1/1        registry.gitlab.com/dev349/dev-blog:latest
nu8onurwob8d   download_download             1/1        caddy/caddy:2-alpine
uvsgjf8r7cz4   friso-app_backend             1/1        registry.gitlab.com/dev349/fri.so/fri.so-backend:0.1.1
teaxka2eal0p   friso-app_frontend            1/1        registry.gitlab.com/dev349/fri.so/fri.so-app:0.1.1
noo148hzfe3g   frss_frss                     1/1        freshrss/freshrss:latest
mdvqp02hmxq0   landing-pages_wordpress       1/1        wordpress:latest
zqregm6s13xb   mariadb_mariadb               1/1        mariadb:10.5.9
38wo7zvdzmto   mongodb_mongo-express         1/1        mongo-express:latest
vvsddvfy59q3   mongodb_mongodb               1/1        mongo:6-focal
vz0xb6axrw3a   rapid-apis_backend            1/1        registry.gitlab.com/dev349/rapid-apis:0.1.1
o050u7meinz6   regex_regexer                 1/1        winkelchri/regexr:latest
u02vzn09u9sh   traefik_afspraken             1/1        cryptkiddie2/redirector:latest
xmjgaul5zjuu   traefik_cv                    1/1        cryptkiddie2/redirector:latest
2m6vkkzmegdv   traefik_traefik               1/1        traefik:v2.7
kfx5l7y0l5ay   wordpress_wordpress           1/1        wordpress:latest

Summarized:

  • A redirect to my curriculum vitae under https://cv.fri.so/.
  • A calendar booking instance, which I still need to setup correctly.
  • A WordPress blog
  • This astrojs blog
  • A fresh rss reader instance.
  • A mongodb database.
  • A mysql database
  • The backend and the frontend for an app experiment.
  • A backend for some api’s I try to sell on rapid api.