Home Assistant with Docker lets you run a private smart home control center on a VPS for remote dashboards, automations, and device monitoring. By deploying the Home Assistant Docker template on Hostinger, you can start the application without manually configuring the container, then access the dashboard, add integrations, and manage smart home routines from one place.
The main steps are:
- Prepare the VPS setup – check that you have a Docker-ready VPS, access details, a domain or server IP, and the smart devices or integrations you want to connect.
- Deploy the Home Assistant Docker template – launch the template from Hostinger’s Docker catalog and open the Home Assistant dashboard.
- Install Home Assistant manually if needed – use Docker Compose if you prefer to manage the container configuration yourself.
- Turn Home Assistant into a smart home hub – create dashboards, connect integrations, set up automations, and monitor devices remotely.
- Secure remote access – protect the dashboard with HTTPS, strong login details, limited open ports, and a VPN or secure tunnel when needed.
- Choose the right setup – compare Home Assistant with Docker and Home Assistant OS, then decide whether a VPS-based setup fits your smart home.
What do you need before installing Home Assistant with Docker?
Before installing Home Assistant with Docker, prepare a VPS, Docker environment, access details, and a secure way to reach the dashboard after deployment. These requirements help Home Assistant run continuously and store your smart home settings, dashboards, integrations, and automations safely.
You need the following:
- A VPS with Docker support – Home Assistant runs inside a Docker container, so the server must support Docker-based applications. A VPS is useful when you want an always-on smart home dashboard that you can access remotely.
- The Home Assistant Docker template – Hostinger’s Docker catalog provides a Home Assistant template, so you don’t need to create the container manually from scratch.
- A domain name or server IP address – You’ll use this to open the Home Assistant dashboard after installation. A domain is easier to remember and better for setting up HTTPS.
- Secure login details – Create a strong Home Assistant owner account during onboarding. This account controls the dashboard, integrations, automations, and user permissions.
- A firewall and remote access method – Since the dashboard is hosted on a VPS, restrict unnecessary ports and use HTTPS, a VPN, or another secure access method before exposing Home Assistant publicly.
- Smart devices or integrations to connect – Prepare the lights, sensors, cameras, thermostats, MQTT devices, or cloud integrations you want to manage from Home Assistant.
A VPS-based setup works best for dashboards, remote access, notifications, API-based integrations, MQTT, and multi-location monitoring. Devices that rely on local network discovery, Bluetooth, Zigbee, or Z-Wave may need a local bridge, VPN connection, MQTT broker, or compatible gateway to communicate with Home Assistant from your home network.
How to deploy the Home Assistant Docker template on Hostinger
You can deploy Home Assistant on Hostinger by selecting the Home Assistant Docker template from the VPS application catalog and launching it on a compatible VPS plan. The template installs Home Assistant as a Docker container, so you can start configuring your smart home dashboard without having to manually create the container.
1. Choose the Home Assistant Docker template
Go to Hostinger’s Docker catalog and open the Home Assistant template. The catalog is built for one-click application deployment, and the Home Assistant template is listed as an open-source home automation platform for controlling smart devices. Hostinger’s template page also highlights Home Assistant’s support for dashboards, automations, mobile apps, MQTT, Zigbee, Z-Wave, and 2,000+ integrations.
2. Select a VPS plan
Select a VPS plan with enough resources for Home Assistant, its integrations, automation history, and dashboard data. Hostinger’s Home Assistant template currently recommends the KVM 2 plan, which includes 2 vCPU cores, 8 GB RAM, 100 GB NVMe storage, and 8 TB bandwidth.
For a basic smart home dashboard, this is enough to start. Choose a larger plan if you plan to keep long-term history, connect many integrations, stream camera feeds, or run other Docker applications on the same VPS.
3. Deploy the template
Click Deploy on the Home Assistant template page and follow Hostinger’s VPS setup flow. During deployment, Hostinger provisions the server and installs the Docker application template for you.
After deployment, wait until the VPS and application status show that the setup is complete. This step replaces the manual process of pulling the Home Assistant image, creating a Docker Compose file, and starting the container yourself.
4. Open the Home Assistant dashboard
Open the Home Assistant dashboard using the access details provided after deployment. Home Assistant commonly runs its web interface on port 8123, so the dashboard address may use this format:
http://SERVER-IP:8123
Use your VPS IP address or the domain you configured for access, depending on how you configured access.
5. Complete the Home Assistant onboarding
Home Assistant starts with an onboarding screen. Create the owner account, set your location, choose your unit system, and confirm the time zone. These settings help Home Assistant calculate automations based on location, sunrise, sunset, weather, and device states.
After onboarding, add your first integrations. Start with cloud-connected services, MQTT devices, or integrations that do not depend on local network discovery. For Zigbee, Z-Wave, Bluetooth, or LAN-only devices, connect them through a local bridge, gateway, VPN, or secure tunnel so the VPS-based Home Assistant instance can communicate with your home network.
Once Home Assistant is running, create a simple dashboard view for your most important devices. For example, add cards for lights, sensors, thermostats, cameras, or energy usage.
Then create one basic automation to test the setup. For example:
When the sun sets, turn on the living room lights.
Testing a simple automation first confirms that Home Assistant, your integrations, and your VPS-based setup are working correctly before you build more advanced smart home routines.
How to install Home Assistant with Docker Compose manually
You can install Home Assistant with Docker Compose manually by creating a docker-compose.yml file, starting the container, and opening the Home Assistant dashboard on port 8123. Use this method if you want full control over the container setup instead of deploying the Hostinger template.
1. Create a Home Assistant directory
First, create a dedicated folder for the Home Assistant container files:
mkdir homeassistant cd homeassistant
This folder will store the Docker Compose file. The Home Assistant configuration itself will be stored in a separate config directory so your dashboards, integrations, users, and automations remain available after container updates.
2. Create the Docker Compose file
Create a docker-compose.yml file:
nano docker-compose.yml
Add the following configuration:
services: homeassistant: container_name: homeassistant image: "ghcr.io/home-assistant/home-assistant:stable" volumes: - ./config:/config - /etc/localtime:/etc/localtime:ro - /run/dbus:/run/dbus:ro restart: unless-stopped privileged: true network_mode: host environment: TZ: Europe/Vilnius
This Compose file uses the official stable Home Assistant container image, stores Home Assistant data in the ./config folder, and runs the container with host networking. Home Assistant’s official Linux container documentation also uses network_mode: host and starts the container with docker compose up -d.
Replace the timezone value with your server or home location if needed. For example:
TZ: Europe/London
3. Start the Home Assistant container
Start Home Assistant in the background:
docker compose up -d
Docker will download the Home Assistant image and create the container. After the command finishes, check whether the container is running:
docker ps
You should see a container named:
homeassistant
4. Check the container logs
Use the logs to confirm that Home Assistant started correctly:
docker compose logs -f homeassistant
Wait until the startup messages finish loading. Then press:
Ctrl + C
This exits the log view without stopping the container.
5. Open the Home Assistant dashboard
Open the Home Assistant web interface in your browser:
http://SERVER-IP:8123
Replace SERVER-IP with your VPS IP address. Home Assistant commonly uses port 8123 for the web dashboard.
If the page does not load, check three things:
- The Home Assistant container is running.
- Your VPS firewall allows access to port 8123.
- No other service is already using port 8123.
6. Complete the onboarding
After the dashboard opens, create your Home Assistant owner account. Then set your location, timezone, unit system, and basic preferences.
These settings affect location-based automations, sunrise and sunset triggers, weather integrations, and dashboard data.
7. Update Home Assistant later
To update Home Assistant manually, pull the latest image and recreate the container:
docker compose pull docker compose up -d
Your Home Assistant data remains in the ./config folder, so the update should not remove your dashboards, integrations, or automations. Back up the config folder before updating if your setup already controls important devices.
How to turn Home Assistant into a smart home hub
You can turn Home Assistant into a smart home hub by adding integrations, organizing devices into dashboards, and creating automations that control your devices from one place. After Home Assistant is running on your VPS, the dashboard becomes the control center for lights, sensors, cameras, thermostats, plugs, and other connected services.
1. Add your smart home integrations
Start by connecting the devices and services you want to control. Home Assistant supports integrations for smart lights, thermostats, cameras, speakers, sensors, energy monitors, weather services, and MQTT-based devices.
For a VPS setup, start with integrations that work over the internet or through a broker, such as:
- Cloud-connected smart home services.
- MQTT sensors and switches.
- Webhooks and API-based devices.
- Smart devices connected through a local bridge or gateway.
Devices that rely on Zigbee, Z-Wave, Bluetooth, or local network discovery often require additional setup because your VPS is outside your home network. Use a local hub, Zigbee or Z-Wave bridge, MQTT broker, VPN, or secure tunnel to pass device data between your home and the VPS.
2. Create a private smart home dashboard
A Home Assistant dashboard lets you monitor and control connected devices from one interface. Create separate dashboard views for rooms, device types, or routines to keep the control panel easy to use.
For example, you can create:
- Room views for the living room, kitchen, bedroom, or office.
- Device views for lights, cameras, sensors, thermostats, and plugs.
- Routine views for morning, evening, away mode, or vacation mode.
- Monitoring views for doors, motion sensors, temperature, humidity, and energy use.
Place the most important controls near the top of the dashboard. For example, show security sensors, lights, thermostat controls, and camera previews before less urgent device data.
3. Build your first automation
Automations make Home Assistant act on device states, schedules, or events. Each automation usually has three parts: a trigger, a condition, and an action.
For example:
Trigger: The sun sets. Condition: Someone is home. Action: Turn on the living room lights.
Start with simple automations before creating complex routines. Good first automations include:
- Turn on outdoor lights at sunset.
- Send a notification when a door opens.
- Lower the thermostat when nobody is home.
- Turn off all lights at midnight.
- Start recording when a motion sensor detects movement.
- Turn on a fan when the room temperature passes a set value.
Simple automations help you confirm that Home Assistant receives device data correctly and performs actions reliably.
4. Use scenes for repeated routines
Scenes let you save several device states and activate them together. Use scenes when you want multiple devices to change at the same time without creating a long manual routine.
For example:
Movie scene: - Dim living room lights. - Turn on the TV plug. - Close smart blinds. - Set thermostat to 21°C.
You can use scenes inside automations, dashboards, or voice assistant routines. This keeps repeated actions cleaner and easier to manage.
5. Monitor your home remotely
A VPS-based Home Assistant setup is useful for checking device status when you are away from home. You can open the dashboard in a browser or on a mobile device, review sensor states, and receive alerts from connected integrations.
Use remote monitoring for:
- Door and window sensors.
- Motion detection.
- Temperature and humidity.
- Camera snapshots or feeds.
- Energy usage.
- Water leak sensors.
- Device availability.
Secure remote access before relying on Home Assistant outside your home network. Use HTTPS, firewall rules, a VPN, or a private tunnel to prevent the dashboard from being unnecessarily exposed.
6. Expand the hub with MQTT and local bridges
MQTT helps connect devices, sensors, and services that need lightweight message-based communication. In a VPS setup, MQTT is especially useful because it can pass device data between your local network and the remote Home Assistant instance.
A common hybrid setup works like this:
Smart devices → local bridge or MQTT broker → VPS-hosted Home Assistant → dashboard and automations
This setup lets Home Assistant stay on the VPS while local hardware handles devices that need nearby radio or network access. Use this approach for Zigbee sensors, Z-Wave switches, Bluetooth trackers, or LAN-only devices.
How to secure remote access to Home Assistant on a VPS
Secure remote access to Home Assistant before connecting smart devices, automations, or sensitive integrations. Since a VPS is reachable from the internet, the Home Assistant dashboard should not be exposed with weak login details, unnecessary open ports, or unencrypted traffic.
Start with the essentials: use a strong password for the Home Assistant owner account, access the dashboard through HTTPS, and limit public access to only the ports your setup needs. If you use SSH to manage the VPS, restrict SSH access, use SSH keys instead of passwords, and keep the server up to date.
For a more private setup, access Home Assistant via a VPN or a secure tunnel rather than exposing the dashboard directly. This is especially important if Home Assistant controls cameras, smart locks, alarms, garage doors, heating, or other sensitive devices.
You should also regularly back up the Home Assistant config directory. This folder stores your dashboards, integrations, users, and automations, so it is the most important part of a Docker-based Home Assistant setup.
For a complete server protection checklist, follow our guide on VPS security best practices. It explains how to secure SSH, configure firewalls, update packages, monitor access, and protect your VPS from common threats.
Home Assistant with Docker vs Home Assistant OS
Home Assistant with Docker gives you more container-level control, while Home Assistant OS gives you a more complete managed setup with built-in add-ons, backups, and easier updates. Both options run Home Assistant, but Docker is better suited to VPS and Linux server users, while Home Assistant OS is better suited to users who want a simpler local smart home installation.
|
Setup |
Best for |
Main limitation |
|
Home Assistant with Docker |
VPS users, Linux server users, and people who want container-level control |
Does not include the full Home Assistant OS add-on experience |
|
Home Assistant OS |
Beginners and users who want the easiest managed Home Assistant setup |
Less flexible if you want to run Home Assistant as part of a custom Docker stack |
|
Home Assistant in a VM |
Users who want isolation, snapshots, and easier rollback options |
Requires more server resources and virtualization setup |
|
Dedicated local device |
Smart homes that depend on Zigbee, Z-Wave, Bluetooth, or USB dongles |
Less convenient for VPS-based remote access |
Choose Home Assistant with Docker if you want to deploy Home Assistant on a VPS, manage it alongside other containers, and use it for dashboards, remote access, MQTT, APIs, and cloud-connected integrations. Choose Home Assistant OS if you want a local-first setup with the easiest add-on management and less manual container maintenance.
Should you run Home Assistant with Docker on a VPS?
You should run Home Assistant with Docker on a VPS if you want an always-on smart home dashboard for remote access, notifications, automations, and cloud or API-based integrations. This setup is useful when you want to manage devices from outside your home network, monitor multiple locations, or keep Home Assistant running without depending on a personal computer.
Home Assistant on a VPS works best for dashboards, MQTT devices, webhooks, cloud-connected services, and integrations that do not require direct access to your local network. For example, you can use it to check sensor data from another location, trigger alerts from internet-connected devices, or manage routines from a private browser-based dashboard.
However, a VPS should not be the only control layer for every smart home setup. If your devices depend on Zigbee, Z-Wave, Bluetooth, USB dongles, or LAN discovery, connect them through a local bridge, gateway, MQTT broker, VPN, or secure tunnel. This keeps local device communication inside your home while the VPS handles remote access and dashboard control.
For users who want a private smart home control center with server-based access, the Home Assistant Docker template offers a faster way to deploy Home Assistant on Hostinger VPS and start building dashboards and automations.
All of the tutorial content on this website is subject to
Hostinger’s rigorous editorial standards and values.
Apply for Premium Hosting
Source Credit: https://www.hostinger.com/in/tutorials/how-to-install-home-assistant-with-docker
