Servers and System Administration
A Linux VPS and a Raspberry Pi at home that I set up and run myself: Docker services behind Traefik, my own DNS, a self-hosted mesh VPN between all my devices, backups and monitoring.
Overview
One Linux VPS runs my everyday services and the backends of my side projects. Every service runs in a container, defined in one Docker Compose project; databases sit on internal networks that the proxy can't reach. Mass storage lives on remote storage boxes instead of the VPS disk, so storage and compute can be sized separately. A Raspberry Pi at home runs DNS, a network share and VPN-only containers, and a self-hosted mesh VPN connects it with the VPS.
Routing and TLS
Traefik is the reverse proxy in front of all services. Let's Encrypt issues and renews the certificates automatically, HTTP redirects to HTTPS, and HSTS is on for every service.
Services
| Service | Purpose |
|---|---|
| Nextcloud | File sync and cloud storage, backed by a remote storage box |
| Navidrome | Music streaming from the Nextcloud music library |
| Matrix / Synapse | Encrypted messaging homeserver |
| Element Web | Web client for Matrix |
| Coturn | TURN server for Matrix voice and video calls |
Dev deployments
Two of my projects run on the same VPS:
- Chess server: the backend of The King's Game
- This portfolio: a GitHub Actions workflow builds the image and runs
docker compose pullandup -don the server
Storage
The VPS does the processing, and the remote storage boxes hold the data: Nextcloud files and media libraries. Storage can grow without a larger server.
Home server
A Raspberry Pi at home runs its own Docker stack:
- DNS for the whole network with AdGuard Home: ad and tracker blocking for every device, and local names for the home services.
- A network share on a LUKS-encrypted drive that unlocks on boot.
- VPN-only containers: they share the network namespace of a WireGuard VPN container, so they reach the internet only through the tunnel (kill switch).
- Traefik with wildcard certificates for the home services, issued through a DNS challenge that a small DNS server on the VPS answers.
- Uptime monitoring with push notifications.
Mesh VPN
All my devices (VPS, Raspberry Pi, PC, phone) are in one mesh VPN coordinated by Headscale, which I host on the VPS. The mesh pushes the home DNS to every device, so ad blocking and the home services work away from home too.
Backups and updates
The VPS backs up its databases, volumes and configs every night to a storage box. Nextcloud files go to a second provider, encrypted on the client before upload. Images are updated weekly by a script that pulls and restarts only the containers that changed.