Build a homelab: hardware, network, and when a VPS wins
How to start a homelab for self-hosting: hardware choices, power cost, the CGNAT problem, reaching apps from outside, and when renting a VPS is the better call.
A homelab is a computer at home that you run services on — for learning, for privacy, or because a spare machine is cheaper than another subscription. It can be a full rack or a single mini PC on a shelf. This guide covers the decisions that matter for running real apps on one, and the cases where a rented VPS is simply the better tool.
Homelab or VPS?
- A homelab wins on storage (large disks are cheap to own), on local access (media, backups of your own devices, home automation), on privacy of data that never leaves the house, and on learning by breaking things.
- A VPS wins on reachability (a public IP, open ports, a fast uplink), on reliability (the provider handles power and hardware), and on effort.
- Many people end up with both: a VPS for things that must be reachable from anywhere, and a homelab for storage-heavy and private things — with backups flowing between them.
Hardware
For self-hosting apps, the useful starting point is modest: a used office mini PC or small desktop with a recent-ish x86 processor, 8–16 GB of RAM and an SSD. That runs a hypervisor or Docker host with plenty of apps. Single-board computers such as a Raspberry Pi work for light loads, but SD cards wear out — boot from an SSD if you can.
- RAM matters more than CPU for most self-hosted apps.
- Use an SSD for the system and app data; add larger hard drives for media and backups.
- A small UPS lets the machine shut down cleanly in a power cut instead of corrupting a database.
- Wired Ethernet, not Wi-Fi, for anything other people depend on.
Power: do the arithmetic
A machine that runs all year costs its average power draw times 8,760 hours. The formula is: watts × 24 × 365 ÷ 1000 = kWh per year, then multiply by your electricity price. A machine averaging 15 W uses about 131 kWh a year; one averaging 60 W uses about 526 kWh. Measure your own with a plug-in power meter rather than trusting the label — idle draw varies a lot between machines.
Software layout
Two common layouts. Bare metal: install Ubuntu or Debian directly and run Docker — simplest, least overhead. Hypervisor: install Proxmox VE and run several virtual machines or LXC containers — more flexible, lets you snapshot and experiment without risking the main setup. If you run Docker inside an LXC container, give it enough memory and disk; the small defaults are a common source of out-of-memory kills.
The network problem: CGNAT
The hard part of a homelab is rarely the hardware. It is being reachable from outside. Many home connections sit behind carrier-grade NAT (CGNAT), where your public IP is shared with other customers and no port on it leads back to you. Port forwarding on your router then does nothing, and certificates that need ports 80 and 443 cannot be issued. Our guide “Self-hosting without a public IP (behind CGNAT)” covers how to tell and the ways out.
- Keep it private: reach apps only on your home network, or over a VPN such as WireGuard or Tailscale. Often the best answer for personal apps.
- Ask your ISP for a public IP, sometimes for a fee, then forward 80 and 443.
- Use a tunnel that connects outward from your machine to a provider’s edge, such as Cloudflare Tunnel. Note that the provider terminates TLS and can see the traffic.
- Rent a small VPS as a front door and connect it to home over a VPN.
Remote access without opening ports
For apps only you and your family use, a VPN is often better than exposing anything. WireGuard is built into the Linux kernel and needs one UDP port forwarded on the router — which itself requires a public IP. Behind CGNAT, mesh VPNs such as Tailscale, or the self-hosted Headscale control server, connect devices through outbound connections and relays, so no port forwarding is needed at all.
The trade-off is that every device that wants access needs the VPN client. That is fine for your phone and laptop, awkward for a webhook from an outside service or a link you want to send a friend. Many homelabs end up with both: private apps on the VPN, and the few public ones through a tunnel or a VPS.
Running apps on a homelab with Keenrig
Keenrig installs on a machine at home the same way as on a VPS, as long as it runs Ubuntu 22.04, 24.04 or 26.04 on amd64 or arm64. The installer warns if the machine has under 2 GB of RAM or under 10 GB free, and it gives Proxmox LXC-specific hints when it detects one. The admin panel opens on the machine’s local IP with no domain needed.
curl -fsSL https://get.keenrig.com | sudo shAfter installing, the installer tests ports 80 and 443 from outside and tells you plainly if nothing answers — the usual sign of CGNAT or a missing port forward. If you pair the machine with Keenrig Cloud and it still cannot be reached, the installer sets up a Cloudflare tunnel — but that tunnel only carries the admin panel, not installed apps. Apps still need ports 80 and 443 reachable from outside; behind CGNAT, that still means a dedicated IP from your ISP or a small VPS instead.
Limits
- Your uptime is your home’s uptime: power cuts, router reboots and ISP outages take the apps down.
- Home upload speed is often much lower than download; serving large files to many people can saturate it.
- Some ISPs’ terms forbid running servers on residential plans; check yours.
- Through the tunnel, Cloudflare can read the traffic. For sensitive data, prefer a VPN-only setup or a VPS with a public IP.