Infrastructure and security Running 24/7

Home server

A second-hand desktop running Ubuntu Server. It hosts this website, my photos, music, code and monitoring.

Open inbound ports
0. Traffic arrives through an outbound Cloudflare Tunnel
Attack blocking
CrowdSec bans scanners and brute-force attempts
Isolation
Services split across 6 Docker networks
This website
A+ on securityheaders.com, no third-party scripts
Live from the server, updated every 5 minutes.
Hardware
HP EliteDesk 800 G1
OS
Ubuntu Server 24.04
Storage
4 drives, about 5 TB
Running since
2025

What runs on it

  • This website, served by nginx.
  • Photo backup (Immich), music (Navidrome, used by Decked), media (Jellyfin) and private Git hosting (Forgejo).
  • Monitoring: Uptime Kuma and Beszel, plus drive health checks.
  • The APIs behind MaxOS and M-dash.

Services run as Docker Compose stacks, each on its own Docker network.

How it is secured

For its first year the server sat on a shared university network that I did not control, so I treated the network as untrusted.

  • No open inbound ports. Everything public goes through a Cloudflare Tunnel, which connects outwards.
  • SSH is key-only, root login is off, and fail2ban bans an address for 24 hours after 3 failures.
  • CrowdSec reads the SSH and nginx logs, blocks scanners and brute-force attempts at the firewall and in nginx, and posts bans worth a look to Discord.
  • Admin tools sit behind Cloudflare Access login.
  • This site scores A+ on securityheaders.com, with a strict Content Security Policy and nothing loaded from other domains.

Problems I solved

  • Password login was still on. Ubuntu's cloud-init ships an SSH config file that turns password login on, and the first file to set a value wins. My settings file is named so it loads first. Editing the main config alone would have looked right and done nothing.
  • Docker ignored the firewall. Docker writes its own firewall rules ahead of UFW, so a published container port was open to the whole network. I found it by port-scanning the server from another machine. A boot-time service now rebuilds Docker's own filter chain to drop everything not allowed.
  • Bans were hitting the wrong address. Through the tunnel every visitor looked like localhost to nginx. Restoring the real client address from Cloudflare's header made the logs, and the bans, correct.

Contact

Looking for internship, part-time or contract work in tech, security most of all. Studying cybersecurity at Victoria University of Wellington.

Email
[email protected]
Phone
027 210 1490
CV
Download the CV (PDF)