What you’ll need
- Docker Desktop installed.
- Docker Compose installed.
- ngrok installed on your machine.
- Basic familiarity with the command line.
This guide walks through setting up Home Assistant in a Docker container from scratch.
The same principles apply if you already have a Home Assistant instance set up, or if you set it up using one of their other installation methods.
1. Initial setup
Create a directory calledhome-assistant and inside it:
- Create your Docker Compose file called
compose.yaml - Create a directory called
config
2. Run Home Assistant in a Docker container
Updatecompose.yaml:
compose.yaml file:
localhost:8123 in your browser.
You should see your Home Assistant login page.
3. Configure ngrok to expose Home Assistant
Add ngrok to yourcompose.yaml under the services section:
compose.yaml file:
4. Allow trusted proxies in Home Assistant
In your/home-assistant/config directory, look for the file called configuration.yaml.
By default, it should already have these settings: