Skip to main content
This guide walks you through setting up Home Assistant with ngrok. This combination lets you access your Home Assistant dashboard over the public internet.

What you’ll need

1. Run Home Assistant

This guide runs Home Assistant in Docker, but the same ngrok setup works with any installation method. If you’re starting from scratch, follow the Home Assistant installation docs and choose the Container method to run it with Docker Compose. Create a directory called home-assistant, then inside it create a config directory and a compose.yaml file similar to this:
Start the container:
Visit localhost:8123 in your browser to confirm you see the Home Assistant login page.

2. Configure ngrok to expose Home Assistant

Add ngrok to your compose.yaml under the services section:
In your terminal, restart your Docker container with this compose.yaml file:
Visit your ngrok dashboard to see the endpoint URL. If you visit the ngrok URL, you’ll get a 4xx response and see an error log line in your Docker Desktop logs for the Home Assistant container:
That’s because the Home Assistant configuration still needs to be updated to allow trusted proxies.

3. Allow trusted proxies in Home Assistant

Because ngrok forwards requests to Home Assistant as a reverse proxy, Home Assistant blocks them until you list the proxy as trusted. In your config directory, open configuration.yaml and add this snippet to the bottom:
For details on these settings, see the Home Assistant HTTP integration docs. Restart the Docker container so the updated Home Assistant configuration can take effect, then visit your ngrok endpoint URL to see your Home Assistant instance online.