logo

How to Set Up Home Assistant Using Docker

O

Ohidur Rahman Bappy

MAR 22, 2025

How to Set Up Home Assistant Using Docker

Introduction

Learn how to set up Home Assistant, an open-source home automation platform, using Docker. This guide will walk you through the installation process to help you control and automate your smart home devices efficiently.

Requirements

  • Docker installed on your system
  • Basic understanding of Docker commands
  • Internet access for downloading images

Step-by-Step Guide

1. Create a Docker Compose File

Start by creating a homeassistant.yml file for Docker Compose. This file will define the Home Assistant service.

docker-compose -f homeassistant.yml up -d

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /dkr/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host

2. Deploy with Docker Compose

Run the following command to deploy Home Assistant with Docker Compose:

docker-compose -f homeassistant.yml up -d

This will download the latest stable version of Home Assistant and start it in detached mode.

3. Access the Home Assistant Dashboard

After starting the container, access the Home Assistant dashboard via your web browser by navigating to:

http://host:8123

Replace host with your server's IP address or hostname.

Conclusion

Congratulations! You now have Home Assistant up and running. You can start configuring your smart home devices and explore various integrations. Enjoy your automated home!