Part 1 of 3 on the home lab I run. This one covers the network and how I reach it. Part 2 is monitoring, and Part 3 is media and home automation.
Why write this up
I spend my working days on endpoints, identity and the experience people have with their technology. At home I run a small lab that does the same jobs on a smaller scale: a router, DNS, a file server, media, home automation and monitoring.
People ask how it fits together. This series is the answer, minus anything that would help someone get into it.
One box, many jobs
Everything runs on one small, quiet PC under the stairs: a six-year-old four-core desktop CPU with 32 GB of RAM and a 240 GB SSD. It runs Proxmox, a free hypervisor, and every service lives in its own virtual machine or container:
- the router and firewall (OPNsense)
- a DNS filter (AdGuard Home)
- a NAS for files and media
- a media server and a live TV channel builder
- Home Assistant
- a monitoring container (Uptime Kuma)
- a small “ops” container that runs the scripts and keeps the backups
One box is a single point of failure, and I accept that. The trade is low power, low noise and one thing to understand. If it dies, the backups described below get me back.
The router is a virtual machine
The fibre line comes in and connects straight to OPNsense, running as a VM with its own network ports. The ISP’s hub is still on the network, but only as a Wi-Fi access point. It doesn’t route anything.
That sounds risky, and it is the part I treat most carefully. A mistake in the router’s VM or in the host’s network bridges cuts the internet for the whole house, including for the person trying to fix it. So that VM and those bridges sit on a short list of things nothing automated is allowed to touch. Changes there are planned in writing, backed up first and applied by hand.
The network is split into VLANs: trusted devices, the lab, IoT and guests. Smart plugs and cameras don’t need to see my laptop, and a guest’s phone doesn’t need to see anything.
DNS I can see
Every device asks AdGuard Home for DNS, and AdGuard forwards upstream over encrypted DNS (DNS over HTTPS) to two public resolvers. The router forwards its own lookups to AdGuard too.
Two firewall rules make that stick. Any plain DNS request to an outside server is quietly redirected back to AdGuard, and DNS over TLS on port 853 is blocked. Devices that hard-code their own DNS still get filtered, and I get one place to see what is talking to what.
Nothing open to the internet
The router has no port forwards. Not one.
Remote access is Tailscale only. Tailscale builds a private, encrypted network between my own devices. One node at home advertises the home subnet, so from my phone on mobile data I can open the hypervisor, Home Assistant or the monitoring page as if I were in the house.
A couple of services get a proper HTTPS name inside that private network, so they work in apps that insist on a certificate. None of them is reachable from the public internet.
The effect is that the attack surface from outside is the router’s WAN interface and nothing else. If a service has a vulnerability, someone has to be on my tailnet first to reach it.
Access with limits
The ops container runs scripts every day: backups, a morning report, health checks. That means it holds credentials. The rule is that every credential gets the smallest job that works:
- The hypervisor API token is read-only. It can report on the box, but not change it.
- The router has two API keys. One can download the config backup and nothing else. The other can manage DHCP reservations and nothing else. Firewall and DNS changes still happen by hand.
- Admin access to the hypervisor is a separate SSH key that is only accepted from the ops container’s own address.
- Credentials live in files outside the git repository, readable only by their owner.
I learned the next lesson this weekend. While setting up a GitHub connection for a new project, I ran ssh-keygen and accepted the default file name. That overwrote the key the ops container used to reach the hypervisor. Within a minute the health check couldn’t log in and raised an alert.
Nothing was down, and the fix took five minutes from the hypervisor’s console. The cause was a key doing two jobs. Now each key has a name that says what it is for, and the SSH config pins each host to its own key. A key should have one job.
Backups that leave the house
Every night the ops container downloads the router’s config and commits it, with the hypervisor’s guest configs and the DNS settings, to a private git repository. Certificate private keys are stripped out before the commit. Because those backups still contain password hashes, the repository must never be public.
Home Assistant backs itself up daily, encrypted, to cloud storage, keeping the last three. The encryption key lives in my password manager, not on the box.
Every change I make goes into a changelog in the same repository: what changed, why, and how to undo it. Six months from now I will not remember why the TV has a fixed IP address. The log will.
Try this
If you run anything at home, take ten minutes and answer these:
- Which ports does your router forward, and do you still need each one?
- Which devices can reach your NAS or your cameras, and should they?
- For each password, token or key your scripts use, what is the most it can do? Could it do less?
- If the box under the stairs died tonight, what would you restore from, and when did you last check it?
Count the answers you aren’t sure about. That is your list.
Next time: how the lab watches itself, and the AI on-call engineer that diagnoses problems but is never allowed to fix them.
