Skip to content

How to Deploy Home Assistant on a VPS

Updated Sep 2026

We earn commissions when you shop through the links below. Full disclosure →

Self-host Home Assistant on your own VPS — the open-source hub for home automation, with local control of thousands of smart devices and automations that run entirely on your own hardware.

Before you start
  • A VPS with 2+ GB RAM
  • A domain or subdomain for HTTPS access
  • A fresh Ubuntu 24.04 or 26.04 server with root/sudo SSH access
Need a box for this guide? Kamatera's free tier lets you spin one up now.Start free on Kamatera → (opens in new tab)

What Home Assistant is

Home Assistant is the open-source hub for home automation — a single control plane for thousands of smart devices across Wi-Fi, Zigbee, Z-Wave, and every major cloud platform, with automations that run entirely on your own hardware. Everything stays on your server: device data, automation logic, and history never leave your box.

Hosting it on a VPS is the standard move for people who want maximum uptime and minimal fuss. A cloud box stays up when your home internet or power drops, is easy to back up, and you can reach it from anywhere. The trade-off is that devices that must live on your LAN need a bridge — but for cloud-connected devices and most automations, a VPS runs the same Home Assistant you'd run on a Raspberry Pi, with better specs. It's a Python stack rated 3 / 5 to deploy, and it hums along happily on 2 GB of RAM.

Server sizing — steady, with spikes

Home Assistant is a steady, light workload: it sits at a fraction of your VM's capacity most of the time, then spikes when automations fire or the dashboard refreshes.

  • 2 GB RAM — the comfortable floor for Home Assistant, the recorder, and a handful of integrations
  • 4 GB RAM — if you run media add-ons, Frigate for cameras, or many simultaneous integrations

The recorder database (history) grows over time, so plan for disk — 20–40 GB is plenty for years of history. A 2 vCPU / 4 GB VPS runs Home Assistant plus its add-ons with headroom to spare.

Prepare the server

Start from a fresh Ubuntu 24.04 or 26.04 server. Update and create a non-root user:

apt update && apt upgrade -y
adduser deploy
usermod -aG sudo deploy

Lock down the firewall:

ufw allow OpenSSH
ufw allow 80
ufw allow 443
ufw allow 8123/tcp
ufw enable

Port 8123 is Home Assistant's web UI. Keeping it open is optional — if you put Home Assistant behind a reverse proxy for everything, you can drop this line and rely on Caddy alone.

Install Docker:

curl -fsSL https://get.docker.com | sh
usermod -aG docker deploy

Log out and back in as deploy so the docker group takes effect.

Where to host itaffiliate disclosure
Hetzner Cloudrun it on
2 vCPU · 4 GB RAM · 80 GB SSD · $23.59/mo
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
1 vCPU · 1 GB RAM · 20 GB SSD · $4.00/mo
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
1 vCPU · 1 GB RAM · 25 GB SSD · $6.00/mo
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install Home Assistant

Home Assistant publishes an official container. Create a working directory:

mkdir ~/homeassistant && cd ~/homeassistant

Create a compose file. Home Assistant uses host networking for device discovery, which is a key difference from most other containers:

services:
  homeassistant:
    image: ghcr.io/home-assistant/home-assistant:stable
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./config:/config

Host networking lets Home Assistant see your network's multicast traffic, which is what makes auto-discovery of devices (and, later, a Zigbee/Z-Wave USB stick passthrough) work. The trade-off is that Home Assistant binds directly to host ports — the web UI comes up on port 8123 with no port mapping needed.

Start it:

docker compose up -d

Give it a minute to initialize, then load http://SERVER_IP:8123.

First-run setup

On the first load you'll set up:

  1. An admin account — your name, username, and a strong password. This is your only super-user; make it a good one.
  2. A location and time zone — Home Assistant uses this for sunrise/sunset automations and history.
  3. Device discovery — it scans your network automatically. Cloud-connected devices (Hue, Tuya, and so on) appear once you sign in to each integration.

The first-run experience is a guided flow, not a config file. Complete it before you enable remote access, and set up at least one device or integration so you have something to automate.

Connect your devices

The integrations you'll actually use depend on your hardware:

  • Cloud devices (Hue, Tuya, Tasmota, SmartThings) — add each integration from Settings → Devices & services → Add integration and sign in. These work identically on a VPS because the cloud talks to Home Assistant, not to your LAN.
  • Local Wi-Fi (Tasmota, Shelly, ESPHome) — add them by IP address. They must be reachable from the VPS, which usually means a VPN (see below) or a remote-access tool between your home network and the server.
  • Zigbee / Z-Wave — needs the USB stick physically attached to the machine running Home Assistant, so it pairs naturally with a local install. On a VPS you'd need to host the coordinator on a device at home and connect remotely.

For a VPS setup, cloud-connected devices are the seamless path; local-only devices are best reached through a secure tunnel.

Remote access to LAN devices

This is the one genuine difference from running Home Assistant on a Pi at home: to control local-only devices from a cloud box, you need a secure path back into your home network. The standard solution is a VPN — Tailscale or Headscale on the VPS and your home network, with a device at home advertising the local subnet. See Deploy Headscale on a VPS for the full setup. Once the tunnel is up, integrations reach local devices through it exactly as if Home Assistant were on your LAN.

HTTPS + domain

Home Assistant needs HTTPS, especially once you expose it beyond localhost. Point a reverse proxy at port 8123 and terminate TLS on 443.

The simplest path is Automatic HTTPS with Caddy. Point an A record for your hostname (say ha.example.com) at the server's public IP, then have Caddy reverse-proxy that hostname to 127.0.0.1:8123.

Alternatively, Home Assistant ships its own remote-access add-on that handles certificates for you — but a Caddy front door keeps everything else on the box behind the same TLS setup.

Backups

Home Assistant's entire configuration lives in the config directory — backing it up is the whole disaster-recovery story:

docker run --rm -v $(pwd)/config:/config -v $(pwd):/backup alpine \
  tar czf /backup/homeassistant-$(date +%F).tar.gz -C /config .

If your provider offers daily snapshots or a backup add-on, you get this at the box level too. Keep the recorder database and all your secrets.yaml in the same backup, and you can restore the entire installation — devices, integrations, automations, and history.

Upgrades

Pull the newer image and recreate:

docker compose pull
docker compose up -d

Home Assistant runs database migrations automatically on startup. Upgrading the minor release line is low-risk; major releases occasionally change integration configs, so read the release notes first. Take a backup before every upgrade — it's one command and it makes a botched migration a non-event.

Troubleshooting

Setup screen doesn't load. Home Assistant takes a minute to initialize on first boot. Check docker compose logs homeassistant | tail -20 for errors, and confirm port 8123 is open in both the OS firewall and your provider's network firewall.

No devices discovered. Home Assistant can't see your LAN through host networking if the traffic can't reach it. Cloud integrations work anywhere; local discovery needs the VPN path described above.

Automations don't fire. Check the recorder and integration states in Settings → Logs, and confirm the automation's conditions evaluate — sunrise times, for example, depend on the location you set at setup.

Slow dashboard. Usually the recorder database growing. Prune history via Settings → System → Storage, or size up the disk if you want years of retention.

Verification + next steps

You're done when you can: load the dashboard over HTTPS, sign in as your admin, add an integration that shows live device state, and create an automation that runs end to end.

From here, add media add-ons (Audiobookshelf, Jellyfin) or Frigate for cameras if you sized up to 4 GB, wire your LAN devices through a VPN, and set up the mobile apps so your automations travel with you. For the right box and the reliability argument, see Best VPS for Home Assistant for the ranked picks.

Next steps

How to self-host Home Assistant →Best VPS for Home Assistant →Automatic HTTPS with Caddy →Run Claude Code with Ollama on Your Own VPS →Deploy Coolify on a VPS →How to Deploy Actual Budget on a VPS →How to Deploy AnythingLLM on a VPS →How to Deploy Appwrite on a VPS →How to Deploy Audiobookshelf on a VPS →How to Deploy Authelia on a VPS →How to Deploy authentik on a VPS →How to Deploy Baserow on a VPS →How to Deploy Beszel on a VPS →How to Deploy Bitwarden on a VPS →How to Deploy BookStack on a VPS →How to Deploy CapRover on a VPS →How to Deploy Checkmate on a VPS →How to Deploy Directus on a VPS →How to Deploy docker-mailserver on a VPS →How to Deploy Docmost on a VPS →How to Deploy Dokku on a VPS →How to Deploy Dokploy on a VPS →How to Deploy Firefly III on a VPS →How to Deploy Forgejo on a VPS →How to Deploy Gatus on a VPS →How to Deploy Ghostfolio on a VPS →How to Deploy Gitea on a VPS →How to Deploy GitLab on a VPS →How to Deploy GlitchTip on a VPS →How to Deploy Grafana on a VPS →How to Deploy Graylog on a VPS →How to Deploy Headscale on a VPS →How to Deploy Healthchecks on a VPS →How to Deploy Immich on a VPS →How to Deploy Jan on a VPS →How to Deploy Jellyfin on a VPS →How to Deploy Karakeep on a VPS →How to Deploy Keycloak on a VPS →How to Deploy Leantime on a VPS →How to Deploy LibreChat on a VPS →How to Deploy Linkwarden on a VPS →How to Deploy LocalAI on a VPS →How to Deploy Mailcow on a VPS →How to Deploy Mailu on a VPS →How to Deploy Matomo on a VPS →How to Deploy Mattermost on a VPS →How to Deploy Meilisearch on a VPS →How to Deploy Memos on a VPS →How to Deploy n8n on a VPS →How to Deploy Navidrome on a VPS →How to Deploy NetBird on a VPS →How to Deploy Netdata on a VPS →How to Deploy Nextcloud on a VPS →How to Deploy Next.js to a VPS →How to Deploy Nginx Proxy Manager on a VPS →How to Deploy NocoDB on a VPS →How to Deploy ntfy on a VPS →How to Deploy Ollama on a VPS →How to Deploy Open WebUI on a VPS →How to Deploy OpenHands on a VPS →How to Deploy OpenObserve on a VPS →How to Deploy OpenProject on a VPS →How to Deploy Outline on a VPS →How to Deploy Pangolin on a VPS →How to Deploy Paperless-ngx on a VPS →How to Deploy Passbolt on a VPS →How to Deploy Plane on a VPS →How to Deploy Plausible Analytics on a VPS →How to Deploy Pocket ID on a VPS →How to Deploy PocketBase on a VPS →How to Deploy Prometheus on a VPS →How to Deploy Psono on a VPS →How to Deploy Radarr on a VPS →How to Deploy Rocket.Chat on a VPS →How to Deploy SigNoz on a VPS →How to Deploy Sonarr on a VPS →How to Deploy Stalwart on a VPS →How to Deploy Stirling-PDF on a VPS →How to Deploy Supabase on a VPS →How to Deploy Synapse on a VPS →How to Deploy Taiga on a VPS →How to Deploy TeamPass on a VPS →How to Deploy Tinyauth on a VPS →How to Deploy Traefik on a VPS →How to Deploy Trilium on a VPS →How to Deploy Twenty CRM on a VPS →How to Deploy Umami on a VPS →How to Deploy Uptime Kuma on a VPS →How to Deploy Vaultwarden on a VPS →How to Deploy Vikunja on a VPS →How to Deploy wg-easy on a VPS →How to Deploy Wiki.js on a VPS →How to Deploy Zabbix on a VPS →How to Deploy Zitadel on a VPS →How to Deploy Zulip on a VPS →Docker & Compose on Ubuntu 26.04 →Building AI Workflows with n8n →Install Open WebUI with Ollama →Adding AI-Powered Insights to Plausible Analytics →Building AI-Powered Apps with Supabase and pgvector →

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.