Homelab for Beginners: Self-Host on $50 of Hardware

A first homelab can run on a secondhand computer costing about $50. Covers finding hardware, installing Linux, SSH, Docker, and self-hosting a password manager, an RSS reader and a Fediverse instance.

By
Brennan Kenneth Brown
Published
Updated
Reading time
24 minutes
Level
Beginner
You need
  • An old computer or a cheap mini PC
  • Willingness to use the command line
Rack of servers with blue and yellow status lights
Server racks at the NOIRLab Headquarters Computer Server Room in Tucson, Arizona, in 2011. | Wikimedia Commons

A homelab is a small server at home, usually built from cheap or secondhand hardware, that runs services you would otherwise rent from a company. This guide covers choosing a machine (often one you already own), installing Linux, setting up SSH keys, making services reachable from the internet, and running Docker, Caddy, monitoring, backups and a first set of self-hosted apps. I run mine on a used ThinkPad laptop at folk.zone, and the old tower it replaced now hosts another site.

I came to this from the front end, where static hosts such as Netlify and Vercel are convenient and usually free, and I still use them. They also depend on a company that can start charging or change its terms, so running some of my own infrastructure is part of how I try to build for the long web. If you only need a static site, see static site generators for beginners first.

What Can Be Self-hosted, and Why?

Self-hosting is the practice of running your own software on your own hardware. A service you don't control can shut down, change its pricing, get acquired or start monetizing your data, and self-hosting avoids that dependency. Here are some common replacements:

  • Instead of Google Drive/Dropbox → Nextcloud or Seafile. Your files synced to all your devices.
  • Instead of 1Password/LastPass → Vaultwarden, a lightweight Bitwarden-compatible password manager you host yourself.
  • Instead of Feedly/Feedbin → FreshRSS or Miniflux. Read the web on your own terms.
  • Instead of GitHub → Forgejo or Gitea. Your repositories, with no Microsoft or genAI training on your code.
  • Instead of Discord/Slack → Matrix/Synapse or Mattermost. Private and federated.
  • Instead of Google Photos → Immich. A beautiful, fast, self-hosted photo library with mobile backup.
  • Instead of Notion → AppFlowy or a simple DokuWiki. Flat-file format with no lock-in.
  • Instead of Twitter/Mastodon (someone else's instance) → GoToSocial or Mastodon. Your own Fediverse node, so your posts live on your server.
  • Instead of Substack → Ghost or a static site generator like Hugo.
  • Instead of Google Analytics → Umami or Plausible. Privacy-respecting analytics that don't treat website visitors as products.

The Spectrum of Homelab

It's important to be mindful that homelabbing is a very wide spectrum: You can have 48U 4-post cabinets in a dedicated, soundproofed, climate-controlled server room with redundant 30 kVA online double-conversion UPS systems backed by a natural-gas automatic standby generator.

Or you can have an old Android phone or a $15 Raspberry Pi Zero with a 2GB microSD serving index.html with the command darkhttpd /home/pi/site --port 8080.

The overwhelming majority of home servers are far closer to the Pi Zero: A decommissioned work laptop, or a tower pulled from someone's curb, a SFF (small form factor) desktop bought at a garage sale. A machine considered e-waste can actually run web services, drawing only ~40–60 watts from the wall.

What Is This Guide's Approach?

A popular reason to start a homelab is private media streaming. This guide skips that, because media servers like Jellyfin are resource-intensive compared to the services covered here. Hardware transcoding, large media libraries, and multiple simultaneous streams ask too much of modest old hardware.

My homelab, running at folk.zone, is a privacy-focused, self-hosted community commons built on sustainable principles.

Why?

  • Privacy: Take back control of personal data
  • Learning: Understand the technology you use on a daily basis
  • Sustainability: Make use of existing hardware rather than consuming new resources
  • Freedom: Avoid vendor lock-in and tracking

Principles

  • IndieWeb: Own your content, interact with others on your terms
  • Permacomputing: Sustainable, mindful computing practices
  • FOSS: Free and Open Source Software exclusively
  • Privacy: Zero tracking, no surveillance, respect for users

Step Zero: Finding Your Hardware

Ideally, you don't buy anything at all. With both RAM and storage becoming increasingly, absurdly expensive, the best server is the device already sitting in your closet.

  • An old laptop. This is the best beginner server there is! It has a built-in screen and keyboard for troubleshooting, built-in Wi-Fi, low power draw—and the battery works as a free UPS, so short power outages won't take your site down. My stack now runs on a used ThinkPad X270 laptop. Anything from the last ~12 years will do.
  • An old desktop or tower. Louder and more power-hungry than a laptop, but also just as good (as long as you also have a screen, keyboard and mouse).
  • An old Android phone or tablet. Install Termux (a Linux terminal for Android, available via F-Droid) and you can run SSH, a web server, even Docker-adjacent tooling on a device that sips 2–3 watts. I have a little guide for this!
  • A Raspberry Pi or other single-board computer. If you have one forgotten in a drawer, that's a server. (I don't recommend buying one new.)

If you have nothing to reuse, then buy used from the following places:

  • Thrift stores and Goodwill: In many cities, you can walk into a Value Village or local Goodwill and find towers and desktops from 2010–2016 selling for $20–$40. They're usually wiped, sometimes missing a hard drive, occasionally missing RAM. That's fine. Bring a USB stick with a Linux live image. Boot it up in the aisle (yes, you can ask staff). Check that the machine POSTs, that the CPU fans spin, that USB works.
  • Facebook Marketplace and Kijiji: Search "computer" filtered under $60 and sort by distance. You will find a graveyard of machines people are desperate to get out of their spare rooms. HP EliteDesks, Dell OptiPlexes, Lenovo ThinkCentres. All workhorses built for enterprise, which means they're far more reliable and better-cooled than consumer hardware of the same era. Look for machines with an Intel Core i3/i5/i7 from the 3rd–7th generation, or an AMD FX series, ideally with at least 4 cores and 8 GB of RAM.
Spec Minimum Sweet Spot
CPU 2 cores, 2.4 GHz 4–8 cores, 3.0+ GHz
RAM 4 GB 8–16 GB
Storage 120 GB HDD 250 GB+ SSD
Network 100 Mb/s 1 Gb/s Ethernet
Power Anything with a standard ATX PSU -

Having a solid state drive will be far faster than a mechanical hard drive (the shiny metal ones that are much heavier), though they do have a shorter lifespan. If the machine you're buying has an HDD, you can often find a used SATA SSD (Samsung 860 Evo, Crucial MX500) to swap in—though prices have climbed lately, so it's also completely fine to just run the HDD it came with and upgrade later. Keep the HDD for backups either way.

What To Avoid

  • Small form factor HP/Dell machines with proprietary power supplies (they fail, and replacements cost more than the machine itself, I learned this the hard way)
  • Anything with a Core 2 Duo or older unless you're only serving the most basic webpages.
  • Machines that have been stored in damp conditions (smell the vents)

What Hardware Does My Homelab Use?

Component Specification
CPU Intel Core i5-7300U, 4 threads @ 2.60 GHz
RAM 7.5 GiB DDR4
Storage 240 GB NVMe SSD
Network Wi-Fi (DHCP reserved) + Gigabit Ethernet
OS Xubuntu 26.04 LTS, running headless
Power draw ~10–15 watts at idle

When I originally wrote this guide, everything ran on the old tower described below. I have since migrated to a used ThinkPad X270 laptop in a spare bedroom. It idles at a fraction of the tower's power draw, its battery is a built-in UPS, and it has a screen and keyboard. Used ThinkPads are easy to find and repairable.

The tower still runs and now hosts fanfiction.lol. Its specs:

Component Specification
CPU AMD FX-4130, 4 cores @ 3.8–3.9 GHz
RAM 7.24 GiB DDR3-1333
Storage 228 GiB SSD (Samsung Evo 820)
Motherboard Gigabyte GA-78LMT-USB3 (AM3+ socket)
Network 1 Gb/s onboard Ethernet + USB Wi-Fi adapter
OS Lubuntu 26.04 LTS (Resolute Raccoon)
Desktop LXQt / Openbox

The tower is a custom Acer Gigabyte full-tower I bought off Kijiji at the start of the pandemic, advertised as a "gaming PC". It couldn't handle gaming, and it is terrible as a desktop: moving a window stutters, and I suspect a problem with the integrated graphics. As a server I never look at, it works well. It came with a low-end dedicated graphics card (a GT 700-series), which I pulled out because the connector pins looked possibly corroded. I didn't investigate further.

The SSD came from an HP Elite Compaq 8200 I salvaged for parts. Those HPs are nifty machines, but they use a proprietary power supply that costs as much as the machine to replace.

A Beszel server monitoring dashboard showing the "cafe" host: status Up, running Ubuntu 26.04 LTS on an AMD FX(tm)-4130 Quad-Core Processor with 7.24 GB RAM and 52 hours uptime. The dark-themed interface displays stacked area charts for Docker CPU usage (peaking around 11%, total 5.29% across containers including coolify, gotosocial, and redis), Docker Memory Usage (steady near 2 GB), and Docker Network I/O (peaking at 1.3 MB/s).
A reading of the old tower from monitor.folk.zone using Beszel

What's Running

Here's everything currently live on folk.zone, a little community commons of self-hosted services. Most are open to everyone and don't even need an account:

Collaborate

Community & Writing

  • 💬 IRC: Ergo + The Lounge — old-school chat, alive and well. irc.folk.zone
  • ✍️ Write: WriteFreely — minimalist long-form blogging, federated via ActivityPub. write.folk.zone
  • 📖 Wiki: DokuWiki — flat-file wiki: no database, just plain files on disk. It started as my own homelab notebook—commands I keep forgetting, troubleshooting notes, configs. It is now open for community guides. wiki.folk.zone

Read & Archive

  • 📰 RSS: FreshRSS — self-hosted RSS/Atom reader with a solid web interface and mobile app support. I read the web through FreshRSS instead of through algorithmic feeds. rss.folk.zone
  • 🌉 Bridge: RSS-Bridge — turns sites that don't have feeds into feeds. bridge.folk.zone
  • 🔖 Links: Linkding — bookmark manager and reading list. links.folk.zone
  • 📦 Archive: ArchiveBox — self-hosted internet archiving. Save web pages before they disappear; the web is more ephemeral than anyone admits. archive.folk.zone

Utilities

  • 📋 Paste: PrivateBin — end-to-end encrypted pastebin, no account needed. paste.folk.zone
  • 🔗 Go: Kutt — open URL shortener. go.folk.zone
  • 🧑‍💻 Gist: OpenGist — self-hosted code snippets, a GitHub Gist alternative. gist.folk.zone
  • 🧰 Tools: IT-Tools — a big collection of single-purpose developer utilities, all client-side. tools.folk.zone
  • 🧑‍🍳 Chef: CyberChef — GCHQ's "cyber swiss army knife" for encoding, decoding, and data transforms. chef.folk.zone
  • 🛏️ Pillow: Pillowexport — a small custom tool that converts a Pillowfort archive into Markdown for static site generators. pillow.folk.zone

Other Things

I also used to run the heavy federated services—Mastodon, Lemmy, Forgejo, Pixelfed, BookWyrm, an AzuraCast radio station—but I put them all on hiatus after they kept OOM-killing the machine and, honestly, hardly anyone was using them. Learning what your hardware can actually support is part of homelabbing. These days I post from @brennan@social.lol instead.

Honourable Mentions

Not every service from the earlier brennan.cafe setup was kept.

  • FileBrowser (files.brennan.cafe): the web-based file manager. I just manage files over SSH and rsync now.
  • Uptime Kuma (status.brennan.cafe): replaced by the small custom status dashboard.
  • Duplicati (backup.brennan.cafe): retired in favour of simpler, script-based encrypted backups.
  • Coolify (deploy.brennan.cafe): swapped for Dockge, using less RAM.
  • GoToSocial (social.brennan.cafe): gone with the rest of the Fediverse experiments. These days I post from @brennan@social.lol.

And the Resource Usage?

This little laptop is currently running twenty-plus web services, using:

  • ~3–4 GB out of 7.5 GB RAM
  • ~50 GB storage
  • Load average around 0.2 (basically idle)

A 15-watt mobile CPU from 2017 and an SSD are enough for all of this.

Service Recommendations

Before you start deploying services, it's helpful to know what's realistic for your hardware. Here are the resource requirements for common self-hosted services:

Service RAM (Idle) Storage Priority Notes
Vaultwarden 10–30 MB ~100 MB 🔴 High Password manager, Bitwarden-compatible
Beszel + Agent ~35 MB ~100 MB 🔴 High Server monitoring hub
Uptime Kuma ~150 MB ~200 MB 🔴 High Uptime/status monitoring
Dozzle ~20 MB ~0 MB 🔴 High Real-time Docker log viewer
Duplicati ~50 MB idle ~200 MB 🔴 High Encrypted backup solution
FreshRSS ~50 MB ~500 MB 🟡 Medium RSS/Atom feed reader
Miniflux ~30–50 MB ~500 MB 🟡 Medium Minimalist RSS reader (requires PostgreSQL)
Linkding ~70 MB ~200 MB 🟡 Medium Self-hosted bookmark manager
Shlink ~120 MB ~200 MB 🟢 Low URL shortener with analytics
Pi-hole ~130 MB ~500 MB 🟢 Low Network-wide ad blocker

Note: These are idle/typical usage. RAM and storage will increase with actual usage (more feeds, more bookmarks, larger vaults, etc.).

On an 8 GB machine with the services listed above, you'd use roughly 655 MB of RAM and 2 GB of storage, leaving headroom for additional services.

Services to Avoid

Not every self-hosted service is suitable for older, modest hardware. Here are services that will overwhelm a machine like the one described in this guide:

Service Why
Jellyfin / Plex Requires hardware video transcoding for smooth playback. Software transcoding on a 4-core CPU will peg the processor and affect all other services.
Elasticsearch Requires 2+ GB RAM minimum. Designed for enterprise-scale search workloads.
ClickHouse Column-store OLAP database designed for high RAM environments.
Nextcloud Technically possible, but heavy on CPU for file processing, thumbnail generation, and previews. Can slow down the entire server.
GitLab Requires 4+ GB RAM recommended. The self-hosted version is resource-intensive.
Mastodon / Lemmy Full ActivityPub stacks with Postgres + Redis + job workers easily eat 3+ GB RAM. GoToSocial is the lightweight Fediverse alternative.
Matrix Synapse The original Matrix server is RAM-heavy. Consider a lighter alternative like Conduit if you need Matrix.

Build up to these! Start with lightweight services and understand your machine's limits. Only tackle heavier workloads when you're ready to upgrade hardware or dedicate more resources.


How Do I Set Up a Homelab, Step by Step?

This is not a single-sitting setup. Expect a weekend project, maybe two. Each piece builds on the last, and once the foundation of OS, SSH, tunnel and Docker is in place, everything else is running commands.

Before You Begin

If the steps below look intimidating, start much smaller.

The five-minute server. You can have a working web server right now, on the computer you're reading this on. If you're on Linux or macOS, open a terminal and run:

python3 -m http.server 8000

Then, from your phone or another device on the same Wi-Fi, visit http://YOUR-LOCAL-IP:8000 (find your local IP with ip addr on Linux, or ipconfig getifaddr en0 on macOS). That is a web server. No domain, no DNS, no Docker, no tunnel. Everything else in this guide is just variations on that theme.

You don't need to be public. Plenty of homelabs are LAN-only: services that exist solely on your home network at 192.168.x.x addresses. Two of my own servers (a Retroid Pocket handheld and a Lenovo tablet) are this. You can skip Step 5 (port forwarding / tunnels) entirely until you want the outside world involved.

You only need a handful of commands. For the first few steps, ls, cd, ssh, sudo apt install, systemctl, and docker will carry you.

Here are some free additional beginner resources:

  • Linux Journey: a free course covering Linux and the command line from zero
  • ExplainShell: paste any command from this guide and it breaks down what each part does
  • Ubuntu Server tutorials: official, click-by-click install walkthroughs
  • awesome-selfhosted: a giant directory of everything self-hostable
  • The r/selfhosted and r/homelab wikis: community FAQs, hardware advice, and beginner guides
  • wiki.folk.zone: my own public homelab wiki, rewritten for general readers—terminal guides, incident writeups, and more

Step 1: Choosing Your OS

There are many different options for what operating system your server runs. Most guides will point you toward Ubuntu Server, and that's reasonable. It's lean, stable, well-documented, and has a massive community.

But Ubuntu Server is headless, which means there's no graphical interface at all. You get a black screen, a blinking cursor, and a login prompt. Everything is done through the terminal. That's fine if you're technical, and it does free up RAM and CPU that would otherwise go to running a desktop environment.

My personal recommendation for beginners, though, is Lubuntu. Here's why:

  1. It has a GUI when you need it. Headless server software will give you only a terminal, which can be intimidating and annoying. Lubuntu's LXQt desktop is lightweight enough that it costs you almost nothing in resources while giving you a familiar interface.
  2. It behaves like Ubuntu underneath. Same package manager, same community documentation, same apt install everything.
  3. It's forgiving. If you mess up your SSH config and lock yourself out, you can still physically sit down at the machine and fix it without needing a rescue USB.

Ubuntu Server uses around 200–300 MB less RAM, so keep that in mind. If you want to start with Ubuntu Server anyway, go for it. This guide will work for both.

Step 2: Using Micro

If you're not used to working in the terminal, I recommend you install Micro to start. This is the text editor you'll use for everything configuration-related on the server.

sudo apt install micro

Most Linux guides assume you use nano or vim. Nano is fine and Vim is powerful, but Vim has a steep learning curve. (To exit Vim, press Esc, then type :q! and press Enter, or :wq to save first.)

Micro, on the other hand, has cursor support and uses familiar shortcuts. Ctrl+S to save, Ctrl+Q to quit, Ctrl+Z to undo. It feels more like a GUI text editor.

Step 3: SSH Keys

Next, you'll need to get the local IP address of your server, run ip addr on the server itself for that. When you set up Ubuntu/Lubuntu, you'll provide a username. You put these together:

your-username@your-server-local-ip

For example, mine is brennan@192.168.1.85

SSH (Secure Shell) allows for everything else. It lets you connect to your server from any other machine, like your laptop in the living room, or in a coffee shop, anywhere really—and run commands as if you were sitting in front of the server.

Instead of logging in with a password (which is less secure and more annoying), we use a key pair: a private key that lives on your computer, and a public key that goes on the server. The server will only let in machines that have the matching private key.

There are detailed guides for this on ssh.com, but the short version:

# On your local machine (not the server)
ssh-keygen -t ed25519 -C "your-email@example.com"

This generates two files: ~/.ssh/id_ed25519 (your private key, NEVER share this) and ~/.ssh/id_ed25519.pub (your public key, this goes on the server and can be shared).

I also made a handy script for generating keys at once that I originally made for omg.lol. You can see all my public keys on my /keys page!

Next, copy your SSH key to your server:

ssh-copy-id -i ~/.ssh/id_ed25519.pub your-username@your-server-local-ip

Once your key is copied over, harden the SSH config:

sudo micro /etc/ssh/sshd_config

Set these values:

PasswordAuthentication no
PubkeyAuthentication yes
PermitRootLogin no

Save, then restart SSH:

sudo systemctl restart sshd

From this point forward, you can connect from your desktop computer to the server with the command:

ssh your-username@your-server-local-ip

Step 4: Keep the Server Running Indefinitely

By default, a desktop like Lubuntu will put itself to sleep after a period of inactivity. Great for a desktop, bad for a server. Here's how to disable that:

# Disable systemd sleep targets
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

# Disable screen blanking (add to ~/.bash_profile or run at login)
xset s off
xset -dpms
xset s noblank

If you're using a laptop as your server, also disable lid-close sleep:

sudo micro /etc/systemd/logind.conf

Set:

HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore

Then:

sudo systemctl restart systemd-logind

To prevent the display from turning off (optional, but nice if the machine has a monitor you occasionally glance at):

sudo micro /etc/X11/xorg.conf.d/10-noblank.conf
Section "ServerFlags"
  Option "BlankTime" "0"
  Option "StandbyTime" "0"
  Option "SuspendTime" "0"
  Option "OffTime" "0"
EndSection

If you're using WiFi for server connectivity (instead of Ethernet), the WiFi adapter may enter power-save mode and stop responding to connections. For me, this caused a confusing situation where your site is online but you can't SSH in.

Symptoms:

  • Local SSH unreachable but Cloudflare Tunnel works
  • ARP table shows "incomplete" for server IP
  • ip link shows WiFi interface in DORMANT state

Disable WiFi Power Save:

# Find your WiFi interface name
ip link show
# Look for something like wlxbc071d481e84 or wlan0

# Disable power save immediately (replace with your interface name)
sudo iw dev YOUR_INTERFACE set power_save off

# Verify it's disabled
sudo iw YOUR_INTERFACE get power_save
# Should show: Power save: off

Make it persistent across reboots:

# Create a systemd service
sudo tee /etc/systemd/system/wifi-powersave-off.service > /dev/null << 'EOF'
[Unit]
Description=Disable WiFi power save
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/iw dev YOUR_INTERFACE set power_save off

[Install]
WantedBy=multi-user.target
EOF

# Enable and start the service
sudo systemctl enable wifi-powersave-off.service
sudo systemctl start wifi-powersave-off.service

Replace YOUR_INTERFACE with your actual WiFi interface name from ip link show.

Alternative: NetworkManager configuration

sudo tee /etc/NetworkManager/conf.d/wifi-powersave.conf > /dev/null << 'EOF'
[connection]
wifi.powersave = 2
EOF

sudo systemctl restart NetworkManager

Note: If possible, use Ethernet instead of WiFi for your server. Ethernet is more reliable, has lower latency, and doesn't have power management issues.

Step 5: Port Forwarding vs. Cloudflare Tunnel

Most beginner guides gloss over an important decision: You have a server running on your home network, but how does the outside world reach it? Here are two approaches:

Option A: Port Forwarding

Your home router sits between the internet and your devices. By default, it blocks all incoming connections from the outside. Port forwarding allows a specific port for people to visit from: "if someone requests port 80 (HTTP) or 443 (HTTPS), send them to this machine."

You configure this in your router's admin interface (usually at 192.168.1.1 or 192.168.0.1). And the password is usually on the modem. The process varies by router, but you're looking for "Port Forwarding" or "Virtual Servers" in the settings.

Pros:

  • No third party involved
  • Fully direct connection, lowest latency
  • No dependency on Cloudflare's uptime

Cons:

  • Your home IP address is publicly visible
  • If your ISP gives you a dynamic IP (which most residential ISPs do), your address changes periodically: you need a Dynamic DNS (DDNS) service like DuckDNS to keep a stable domain pointing at it
  • Some ISPs block incoming connections on port 80/443 on residential plans
  • You are directly exposing your home network to the internet: if your server has a vulnerability, it's reachable

Option B: Cloudflare Tunnel

Cloudflare Tunnel (formerly Argo Tunnel) works differently from port forwarding. Instead of opening your router, a small daemon called cloudflared runs on your server and reaches out to Cloudflare's network, establishing a persistent encrypted connection. Cloudflare then proxies requests through that tunnel to your server.

Your home IP is never exposed, and you don't need to configure your router. It works even if your ISP blocks port 80/443. It works behind CGNAT (the thing some ISPs do where multiple households share a single IP address, making traditional port forwarding impossible).

Pros:

  • No router configuration
  • Home IP stays private
  • Works with CGNAT and restrictive ISPs
  • Free tier is generous for personal use
  • SSL certificates are handled automatically

Cons:

  • Cloudflare sits between you and your visitors (they see your traffic)
  • Dependency on Cloudflare's infrastructure
  • Against Cloudflare's ToS to serve large media files through a tunnel

My recommendation for beginners: start with Cloudflare Tunnel. It requires less networking knowledge and configuration, and you can always switch to port forwarding later. The privacy tradeoff is there, but for a personal homelab, I think it's reasonable.

I ran everything through a tunnel at first, and folk.zone now runs entirely on port forwarding with Caddy handling Let's Encrypt certificates directly (DNS managed at Porkbun).

Here's how you set up Cloudflare tunnel:

  1. Create a free account at cloudflare.com and add your domain
  2. Install cloudflared:
# Add Cloudflare's apt repo
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo dpkg -i cloudflared.deb
  1. Authenticate and create a tunnel:
cloudflared tunnel login
cloudflared tunnel create my-homelab
  1. Configure your tunnel in ~/.cloudflared/config.yml:
tunnel: YOUR-TUNNEL-ID
credentials-file: /home/youruser/.cloudflared/YOUR-TUNNEL-ID.json

ingress:
  - hostname: files.yourdomain.com
    service: http://localhost:8080
  - hostname: blog.yourdomain.com
    service: http://localhost:2368
  - service: http_status:404
  1. Route DNS and start the tunnel:
cloudflared tunnel route dns my-homelab files.yourdomain.com
sudo cloudflared service install
sudo systemctl start cloudflared

Step 6: Docker and Caddy

Docker is what makes running a dozen services on one machine practical. Instead of installing each piece of software directly on your OS (where they'd fight over dependencies and configurations), Docker packages each service in its own isolated container. Each container has everything it needs. They run side by side without interfering with each other. When you want to remove a service, you remove the container. The host machine stays clean.

Install Docker:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER

Log out and back in. Now you can run Docker commands without sudo.

Caddy is a web server and reverse proxy. A reverse proxy sits in front of all your services and routes incoming requests to the right container. When someone visits pad.folk.zone, Caddy looks at the domain name and forwards the request to the container serving Etherpad.

Caddy provisions and renews SSL certificates from Let's Encrypt automatically, with no extra configuration.

A Caddyfile looks like this:

files.yourdomain.com {
    reverse_proxy localhost:8080
}

wiki.yourdomain.com {
    reverse_proxy localhost:8090
}

Install Caddy:

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

Edit /etc/caddy/Caddyfile with your subdomains and service ports, then:

sudo systemctl reload caddy

Step 7: Setting Up Monitoring

Before you deploy a bunch of services, set up monitoring so you can actually see what's happening on your server. You can't manage what you can't measure. This is also a great way to understand how Docker works.

Beszel: Internal server monitoring (CPU, RAM, disk, network, per-container stats)

Install Beszel with Docker:

docker run -d \
  --name beszel \
  --restart unless-stopped \
  -p 3000:3000 \
  -v /beszel_data:/beszel_data \
  henrygd/beszel:latest # This is the entire service!

Access the dashboard at http://your-server-ip:3000 and follow the setup wizard to add your server as an agent.

Uptime Kuma: External uptime monitoring (checks if services are up from the outside)

Install Uptime Kuma with Docker:

docker run -d \
  --name uptime-kuma \
  --restart unless-stopped \
  -p 3001:3001 \
  -v uptime-kuma:/app/data \
  louislam/uptime-kuma:1

Access at http://your-server-ip:3001 and add monitors for your services.

Dozzle: Real-time Docker log viewer

Install Dozzle with Docker:

docker run -d \
  --name dozzle \
  --restart unless-stopped \
  -p 8080:8080 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  amir20/dozzle:latest

Access at http://your-server-ip:8080 to view logs from all your containers in real-time.

Step 8: Setting Up Backups

Before you add more services, set up a backup strategy. Duplicati is a good choice, as it supports multiple destinations (Backblaze B2, S3, SFTP, Google Drive, OneDrive) and handles encryption, scheduling, and deduplication automatically.

Install Duplicati with Docker:

docker run -d \
  --name duplicati \
  --restart unless-stopped \
  -p 8200:8200 \
  -v duplicati_config:/data \
  -v /home/YOUR-USERNAME:/source \
  duplicati/duplicati:latest

Access at http://your-server-ip:8200 and configure:

  1. Add a backup destination (Backblaze B2 is affordable and reliable)
  2. Select the directories to back up (your compose stacks, such as /home/YOUR-USERNAME/homelab, plus Docker volumes)
  3. Set a schedule (daily at 3 AM is reasonable)
  4. Enable encryption with a strong passphrase

Important: Test your backup by performing a restore. A backup you can't restore is not a backup.

Step 9: Deploying Services with Coolify

Coolify is a self-hosted alternative to Heroku, Netlify, or Vercel: a web dashboard where you connect a git repository, configure environment variables, and click Deploy. It handles the Docker build, the container orchestration, the reverse proxy config, and the SSL certificate.

For beginners who don't yet want to write docker-compose.yml files manually, Coolify is an easy on-ramp. It comes with one-click installers for Nextcloud, Ghost, WordPress, n8n, Gitea, Plausible Analytics, and dozens of other services.

Install Coolify with one command:

curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash

Then access the dashboard at http://your-server-ip:8000 and follow the setup wizard. You'll configure your domain, set up SSH key access to the server (Coolify uses this to manage containers), and you're off.

A note on resource use: Coolify itself is more resource-intensive than running containers manually, I've found it uses 300–500 MB of RAM at rest. On an 8 GB machine, that's fine. On a 4 GB machine, you might prefer managing Docker Compose files directly.

What I use now: these days I run Dockge at deploy.folk.zone instead. It's a much lighter option (~50 MB RAM) and has a tidy web UI for editing and managing docker-compose.yml files rather than a full app platform. If you're comfortable editing a compose file (which you will end up doing as you add services), Dockge is the friendlier middle ground; if you want one-click app installs, Coolify is still the way to go.

Deployment Order

If you're following this guide from start to finish, here's a recommended order for deploying services. This builds incrementally and gives you useful tools early:

  1. Dozzle: Fastest to deploy, immediately useful for debugging
  2. Beszel + Agent: Get visibility into your server ASAP
  3. Uptime Kuma: Monitor all your existing services
  4. Duplicati: Set up backups before you add more services
  5. Vaultwarden: Move passwords off commercial providers
  6. Coolify: Set up your deployment platform
  7. FreshRSS or Miniflux: Needs PostgreSQL if using Miniflux
  8. Linkding: Quick single-container deploy
  9. Shlink: Quick single-container deploy
  10. Pi-hole: Requires network-level DNS config change on your router

Step 10: Host a Static Blog with Hugo

Hugo generates a static site from plain Markdown files, with no database, no PHP and no runtime: a folder of .md files becomes a folder of .html files.

I made the bash tool writer-cli for this use-case (how it works), and the Hugo theme the Hugo blog theme IndiePaper for people who want built-in IndieWeb support. The workflow is:

  1. Write a post in Markdown with my writer-cli script
  2. Hugo rebuilds the site (takes about 200ms for a large site)
  3. Caddy serves the static output

To run Hugo in Docker:

FROM klakegg/hugo:ext-alpine AS builder
COPY . /src
WORKDIR /src
RUN hugo --minify

FROM caddy:alpine
COPY --from=builder /src/public /usr/share/caddy

Or just install Hugo directly:

# Download the latest release
wget https://github.com/gohugoio/hugo/releases/download/v0.128.0/hugo_extended_0.128.0_linux-amd64.deb
sudo dpkg -i hugo_extended_0.128.0_linux-amd64.deb

And serve the site:

hugo server --bind 0.0.0.0 --baseURL https://blog.yourdomain.com

Step 11: The Wiki (Document As You Go)

A wiki for the homelab itself is a useful first project. Document everything and keep notes as you go.

DokuWiki is my choice because it's flat-file (no database), and the search works great. But Wiki.js, or even a plain Obsidian vault synced to your server would work fine.

What goes in the wiki:

  • Every command you run that you had to look up
  • Every config file you edited and what you changed
  • Every error you encountered and how you fixed it
  • Port assignments for all your services (so you don't accidentally give two things the same port)
  • Your Docker Compose files, in full
  • Notes on what broke and why

When something stops working months from now and you can't remember how you set it up, the notes will save time. You can read my own wiki that I wrote while setting up my homelab.

Step 12: Security Beyond SSH

SSH hardening is a good start, but there are a few more security basics worth implementing.

UFW (Uncomplicated Firewall): A simple firewall management tool

sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

This blocks all incoming traffic except SSH, HTTP, and HTTPS, which is all you need for a web server.

Fail2ban: Ban brute-force attackers

sudo apt install fail2ban
sudo systemctl enable fail2ban
sudo systemctl start fail2ban

Fail2ban monitors log files and bans IPs that show malicious signs (too many failed SSH login attempts, etc.).

Automatic Security Updates

sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades

This will automatically install security updates on your system, reducing the window of vulnerability.

Appendix: Power Consumption and Cost

Running a server 24/7 has an ongoing cost in electricity, and here's where the laptop-as-server really shines. My old AMD FX tower had a 125W TDP CPU and drew 40–60 watts at idle—call it $4–$6 a month. The ThinkPad X270 that replaced it has a 15W TDP mobile chip and idles around 10–15 watts.

Monthly cost calculation (laptop):

  • Average draw: 12 watts
  • Hours per day: 24
  • Days per month: 30
  • Total kWh: 12W × 24h × 30d ÷ 1000 = 8.6 kWh
  • Cost at $0.12/kWh: 8.6 × $0.12 = ~$1.04/month

Roughly a dollar a month to run twenty-plus services. Even a hungrier tower at $4–$6 a month is still significantly less than the monthly cost of hosting with a VPS, or using cloud services.

If you're concerned about power use, consider:

  • Using a more efficient CPU (Intel NUC, Raspberry Pi, or modern low-power desktop)
  • Aggressively power-managing the machine (CPU frequency scaling, aggressive sleep settings on unused services)
  • Running the server on a schedule (only on when you need it)

What Should I Expect When Things Break?

You will hit bugs and errors, and sometimes things stay broken for a while. I have mostly worked as a front-end developer, so devOps was the hard part for me. Repeated attempts improved my practices, and my homelab now has better uptimes than GitHub:

An Uptime Kuma monitoring dashboard on a dark background listing eleven services with their uptime percentages and green bar history indicators: Archive (99.31%), Backup (99.38%), Blog (100%), Café (99.65%), Deploy (97.57%), Files (99.44%), Logs (99.65%), Monitor (99.72%), RSS (99.74%), Social (99.84%), and Wiki (99.79%). All bars are fully green, indicating no recent downtime.
The uptime statuses of the services running on my homelab, back in the Uptime Kuma days. Visit status.folk.zone to see them now.

Start where you are, use what you have, and do what you can. Troubleshooting the problems yourself, rather than offloading them, is how you learn what the Internet is and how to build it.