Here are the steps to install Home Assistant in Docker:
- Install Docker: Firstly, you need to install Docker on your computer. You can follow the official documentation for your operating system on the Docker website to install it.
- Create a Docker container: Once you have installed Docker, you need to create a new container for Home Assistant. Open the terminal or command prompt and run the following command:
docker create --name=homeassistant --restart=always -v /PATH_TO_YOUR_CONFIG:/config -e TZ=YOUR_TIME_ZONE -p 8123:8123 homeassistant/home-assistant:stable
Here, replace/PATH_TO_YOUR_CONFIG
with the location where you want to store your Home Assistant configuration files. ReplaceYOUR_TIME_ZONE
with your time zone, such asAmerica/Los_Angeles
. This command will create a new Docker container with the namehomeassistant
. - Start the container: Once the container is created, you need to start it using the following command:
docker start homeassistant
- Access Home Assistant: After the container is started, you can access Home Assistant by opening a web browser and navigating to
http://localhost:8123
. If you are running Docker on a remote server, replacelocalhost
with the IP address or domain name of the server. - Configure Home Assistant: Once you have accessed Home Assistant, you can start configuring it according to your needs. You can add integrations, customize the user interface, and set up automations.
That’s it! You have now installed Home Assistant in Docker and can start building your smart home.