Homelab & hosting

Infrastructure

How this website and my small self-hosted setup are put together. Everything here is something that is actually running; nothing is listed until it is real. Details that would help an attacker (addresses, ports, hostnames of private systems) are deliberately left out.

Reviewed 2026-11-27. Status labels are written by hand, not read live from the server: no monitoring endpoint is exposed.

Topology

How a request reaches this website, and how it is backed up

How a request reaches this website, and how it is backed upvisitor to dns; dns to fw; fw to caddy; caddy to nginx; caddy to restic; restic to pcVisitorbrowserDNSDuckDNS nameFirewallscloud + VMCaddyHTTPS, headersnginxstatic siteresticnightly snapshotsMy PCencrypted copyCloud backupboot volumeSolid: request path · dashed: backups

Services

8 components, grouped by role.

Hosting

Oracle Cloud Always Free

Running

One small virtual machine in the Zurich region hosts everything. It stays within the Always Free limits, so it costs nothing.

VM.Standard.E2.1.MicroZurichx86-64~1 GB RAM
  • A reserved public IP address keeps the DNS name stable if the VM is rebuilt.
  • A 2 GB swap file is the safety net for the small amount of memory.
  • The larger ARM (Ampere A1) shape is wanted for a real homelab but was not available in the region when tried.
Operating system

Ubuntu Server 24.04 LTS

Running

The VM runs Ubuntu 24.04 with a hardened SSH setup and automatic security updates.

Ubuntu 24.04OpenSSHfail2banunattended-upgrades
  • Key-only SSH on a non-standard port; password login and root login are disabled.
  • fail2ban bans addresses with repeated failed logins.
  • Only web traffic and SSH are reachable from the internet.
Containers

Docker and Compose

Running

Services run as containers described in one Compose file, with log rotation so logs cannot fill the disk.

Docker EngineDocker Compose
  • Two containers today: the reverse proxy and the web server.
  • The certificate volume is part of the backups.
Web

Caddy reverse proxy

Running

Caddy terminates HTTPS, requests and renews the Let's Encrypt certificate automatically, adds security headers, compresses responses and redirects HTTP to HTTPS.

Caddy 2Let's EncryptHSTSzstd/gzip
  • Images and icons are cached for a day, scripts and styles for a year.
  • Access logs rotate by size and age.
Networking

DNS: DuckDNS

Running

A free DuckDNS name points at the server's reserved public IP. A custom domain is a possible later step.

DuckDNSA record
  • The name is validated by Let's Encrypt for the certificate.
Self-hosted applications

This website and its apps

Running

A static website generated by Python scripts and served by nginx. It also hosts a browser game (Tower Defence) as a self-contained page.

Pythonnginxstatic siteno database
  • Project data is synced from the public GitHub API and cached.
  • No cookies, no trackers, no external requests from the pages.
Backups

Backup systems

Running

Three layers: nightly encrypted snapshots on the server, an encrypted copy pulled to my PC, and a manual boot-volume backup in the cloud console before risky changes.

resticcronencryptedrestore-tested
  • Retention: 7 daily, 4 weekly and 6 monthly snapshots.
  • A weekly integrity check reads part of the stored data.
  • A restore was tested and the restored files matched the originals.
Storage

Storage

Running

A single block volume holds the system, the containers, the site and the local backup repository.

100 GB boot volumeblock storage
  • Most of the space is free; the large photo gallery is served from the same disk.
  • Because the local backup shares the disk, the copy on my PC is the one that protects against losing the server.