A homelab is a server you’re responsible for — and that responsibility includes security. The good news: most homelab breaches come from a handful of avoidable mistakes, not sophisticated attacks. Fix those, and you’ve covered 95% of the risk.

Here are ten rules, in rough order of importance. They’re practical, not paranoid.

1. Keep everything updated

Outdated software is the #1 cause of self-hosted breaches. Run docker compose pull && docker compose up -d weekly, and update the host OS regularly. Most of the scary CVE headlines are fixed by an update you haven’t applied yet.

2. Don’t expose services to the internet

The single biggest mistake. Every port you forward is a door attackers can knock on. Instead, use Tailscale for private access — your services stay invisible to the public internet.

3. Use strong, unique passwords

Every service needs its own strong password — and a password manager is the only sane way to manage them. Run Vaultwarden, then use it for everything.

4. Enable HTTPS everywhere

Plain HTTP sends passwords and data in the clear. Put a reverse proxy like Caddy in front of your services and get automatic HTTPS on everything.

5. Back up, then test your restores

A backup you’ve never restored is just a hope. Automate backups of your volumes and configs, and — once in a while — actually restore one to confirm it works. Ransomware and disk failure don’t warn you first.

6. Use a firewall

Enable UFW on the host and only allow the ports you need. A homelab shouldn’t have a wide-open host firewall by default.

7. Isolate your services

Don’t run everything as one giant privileged container. Use separate containers, non-root users where possible, and Docker’s built-in network isolation. If one service gets compromised, isolation limits the blast radius.

8. Monitor for problems

You can’t fix what you don’t see. Uptime Kuma tells you when a service is down or misbehaving — a surprisingly useful early warning for compromise.

9. Follow least privilege

Give every user and every service only the access it needs. Your editor doesn’t need admin on the server. Your media container doesn’t need write access to your password vault. Minimal permissions mean minimal damage.

10. Have a recovery plan

Know the answer before you need it: if a service is compromised, how do you shut it down, restore from backup, and figure out what happened? Writing down the steps — even roughly — turns a panic into a procedure.

Harden your SSH access

SSH is how you administer your server, which makes it a prime target. Three changes make it dramatically safer:

  • Use SSH keys, not passwords. Keys are immune to brute-force guessing.
  • Disable password authentication once keys work.
  • Change the default port from 22 to something non-standard, if you expose SSH at all.

Better yet, don’t expose SSH publicly in the first place — reach it through Tailscale and your SSH port stays invisible to the internet.

Container security specifics

Docker adds its own security surface. A few container-specific habits help:

  • Run as a non-root user inside containers where possible.
  • Pin image versions instead of blindly pulling latest, so updates are deliberate.
  • Don’t mount the Docker socket into containers that don’t need it — the socket is root-equivalent.
  • Use read-only volumes for containers that only need to read data.

None of these are exotic; they’re the difference between a homelab and a hardening checklist you can mostly ignore.

Enable two-factor authentication

Wherever a service supports it, turn on 2FA — especially your password manager, your reverse proxy admin, and anything exposed remotely. A stolen password is only useful to an attacker if it’s the only thing standing in the way.

The rule of thumb: anything reachable from outside your home network gets 2FA. Services that stay purely internal can relax.

Common mistakes to avoid

  • Forwarding ports “just for one service” — it’s still a door.
  • Reusing one password everywhere — one leak compromises everything.
  • Backing up to the same disk — a dead drive takes your backup with it.

FAQ

Is my homelab really a target?

Most attacks are automated and opportunistic — bots scanning for open ports and default passwords. You’re a target simply by being on the internet. Following these rules removes the easy wins for attackers.

Do I need a dedicated firewall?

Not necessarily — UFW on the host covers most homelabs. A dedicated router/firewall is for when you outgrow that.

What’s the single most important rule?

Don’t expose services to the internet. Tailscale or a VPN removes the biggest attack surface in one move.

A quick security checklist

If this all feels like a lot, here’s the whole thing distilled into a checklist you can work through in a single weekend:

  • Updates are automated, or at least run weekly.
  • No ports forwarded to the internet — remote access goes through Tailscale.
  • Strong, unique passwords stored in Vaultwarden.
  • HTTPS via Caddy on every public service.
  • Nightly backups, and you’ve actually tested a restore once.
  • UFW firewall enabled on the host.
  • Two-factor authentication on anything reachable remotely.

Tick those seven boxes and your homelab is more secure than most small businesses. Everything beyond that — intrusion detection, network segmentation, honeypots — is nice-to-have, not essential. Start with the basics and you’re already ahead of the vast majority of self-hosters.

The bottom line

Homelab security isn’t a rabbit hole — it’s ten habits. Updates, backups, no open ports, strong passwords, HTTPS, and least privilege. Do those, and your homelab will be safer than most small businesses, with a fraction of the effort.