Skip to content

Homelab: how it all fits together

A homelab is one machine at home that runs everything you would normally rent: websites, game servers, Discord bots and your own tools. This page shows how the pieces connect: which traffic is allowed in, how it gets in, and what stops a compromised app from reaching the rest of your home network.

Three kinds of people need to reach the server, and each one gets its own door. The important part is what each door costs at your router: only the game server needs an open port.

Home routerDMZ — untrustedHome LAN — trustedWebsite visitorbrowserHTTPSCloudflareDNS · HTTPS · tunnelno open porttunnel dials outcloudflared → reverse proxy→ your web appsMinecraft playergame clientTCPTCP proxye.g. TCPShield1 port openproxy IPs onlyGame server VMVelocity proxy → serversYou, anywherephone / laptopVPNTailscaleWireGuard meshno open portpeer-to-peerTailscale subnet router→ Proxmox, firewall, NAS
Public traffic only ever lands in the DMZ. The only path into the home LAN is the private VPN, which only your own devices can join.

Websites go through a Cloudflare Tunnel: a small program in your network opens an outbound connection to Cloudflare, and requests ride back in over it. Your router never accepts a new incoming connection. Game servers speak raw TCP, which the free tunnel can’t carry, so one port is forwarded and only accepts the TCP proxy’s IP ranges. Admin access (Proxmox, the firewall, SSH) is never public; it is reached over Tailscale.

The physical machine runs Proxmox VE, a hypervisor. Proxmox runs virtual machines (VMs) and lightweight containers (LXC), and the VMs run the actual apps, mostly as Docker containers. Each layer is a wall: if a bot gets hacked, it is stuck inside its container, inside its VM, inside the DMZ.

Proxmox VE — hypervisor · ZFS mirror · snapshots · backupsFirewall VMOPNsenseroutingfirewall rulesDHCP + DNSLAN ↔ DMZApps VMCoolifyreverse proxywebsitewikiDMZDocker VMDockgecloudflaredDiscord botsdashboardDMZGames VMPterodactyl + WingsVelocity proxylobbysurvivalDMZLXC containerTailscalesubnet routerLANHardware — CPU · RAM · 2 mirrored NVMe drives
One box, many isolated guests. The firewall VM is the only guest connected to both networks; everything public lives in the DMZ.
GuestTypeExample sizeWhy separate
FirewallVM2 vCPU · 2–4 GBOwns the DMZ network; nothing else should be able to change the rules
Apps (Coolify)VM4 vCPU · 8 GBWebsites deploy here from GitHub; one bad deploy can’t touch the game servers
DockerVM4 vCPU · 8 GBSmall always-on things: the tunnel, bots, a dashboard
GamesVM8 vCPU · 32 GB+Game servers want lots of RAM and CPU and get restarted often
TailscaleLXC1 vCPU · 512 MBTiny, and sits on the LAN so it can reach the admin interfaces

Your normal home network (PCs, phones, the Proxmox host itself) is the LAN. Everything that faces the internet goes into a separate network, the DMZ, behind a firewall VM. The rules are one-directional: you can manage the DMZ from home, but the DMZ can never start a connection into your home.

InternetanyoneHome router192.168.1.1Home LAN · 192.168.1.0/24Your PCProxmoxOPNsense VM10.0.0.1DMZ10.0.0.0/24Apps VMGames VMDMZ → internet: allowed (updates, downloads)DMZ → home LAN: blockedLAN → DMZ: admin ports only (SSH, web UIs)
The firewall VM sits between the two zones. Its WAN side is just another device on your home network; its LAN side is the DMZ.

Written as firewall rules on the DMZ interface, in this order (first match wins):

#SourceDestinationAction
1DMZ netFirewall, port 53 (DNS)Allow
2DMZ netThe firewall itselfBlock
3DMZ net192.168.1.0/24 (home LAN)Block
4DMZ netAnyAllow (internet)

What happens when someone opens wiki.example.com. Note where the request crosses into your home: over a connection that was opened from inside.

InternetYour homelabBrowserwiki.example.comCloudflare edgeHTTPS ends herecloudflaredruns in the DMZReverse proxyTraefik / CoolifyApp containere.g. Apache + PHPHTTPStunnelHTTP:801. DNS for the domainpoints at Cloudflare2. Certificate, caching,DDoS protection3. Keeps an outboundconnection open4. Picks the app byits hostname5. Only reachable onthe Docker networkhome router: no open port
HTTPS stops at Cloudflare; the tunnel is already encrypted, so everything after it can be plain HTTP inside your network.

Why a tunnel instead of port forwarding

  • Your home IP stays hidden. DNS points at Cloudflare, not at your house.
  • Nothing to attack directly. Port scans of your IP find no web server.
  • Free HTTPS. Cloudflare handles certificates for every subdomain.
  • One route for everything. A wildcard route (*.example.com → reverse proxy) means new sites need no tunnel changes at all.

With the wildcard route in place, a new website never touches the router, the firewall or the tunnel:

  1. Push the code to GitHub, with a Dockerfile in the repo.
  2. In Coolify: New application → pick the repo → build pack Dockerfile → set the port the app listens on.

  3. Set the domain, e.g. http://blog.example.com, and add any environment variables.
  4. Deploy. Coolify builds the image, starts the container and registers the hostname with its reverse proxy.
  5. Open https://blog.example.com. The wildcard tunnel route already sends it to Coolify.

Every later git push redeploys automatically.

Minecraft is a raw TCP protocol, not HTTP, so the free tunnel can’t carry it. Instead:

  • A TCP proxy such as TCPShield sits in front, so players connect to the proxy and never see your home IP.

  • Exactly one port is forwarded on the home router, to the firewall VM.
  • The firewall only accepts that port from the proxy’s published IP ranges and passes it to the Velocity proxy on the games VM.

  • Backend servers (lobby, survival, …) only listen internally; the Velocity proxy is the only way in.

The game panel’s web UI and the Wings node are HTTP, so those can go through the tunnel. Put the panel behind Cloudflare Access for an extra login step.

A mirrored disk protects against a dead drive, not against a deleted folder, a bad update or ransomware. Aim for 3 copies of your data, on 2 different kinds of storage, with 1 copy off the machine.

  • Nightly Proxmox backups of every VM and container (Datacenter → Backup).
  • A second copy on another device: an external USB disk, a NAS, or a Proxmox Backup Server.
  • Test a restore once. A backup you have never restored is a hope, not a backup.
  • Proxmox web UI and SSH reachable from the LAN only; from outside, only over the VPN.
  • Your own admin user with 2FA (TOTP), and 2FA on root as well.
  • SSH with keys only; password login disabled.
  • A trusted certificate on admin UIs (Let’s Encrypt via a DNS challenge works even for LAN-only names).
  • Every public app in the DMZ; nothing public on the LAN.
  • No router ports open except the single game port, restricted to the proxy’s IPs.
  • Updates: Proxmox, the firewall and each VM’s OS, on a schedule.