Choose the method that fits your stack. We recommend Docker Compose for persistent setups.
Best for long-term usage with persistent data.
services:
d2ha:
image: ghcr.io/arborae/docker2homeassistant:latest
container_name: d2ha
restart: unless-stopped
ports:
- "12021:12021"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data:/app/data
environment:
D2HA_SECRET_KEY: "change-this-secret"
Good for testing quickly without a compose file.
docker run -d \ --name d2ha \ -p 12021:12021 \ -v /var/run/docker.sock:/var/run/docker.sock:ro \ -v $(pwd)/data:/app/data \ -e D2HA_SECRET_KEY="change-me" \ ghcr.io/arborae/docker2homeassistant:latest
MQTT_BROKER, MQTT_USERNAME, etc., to
pre-configure MQTT.
:nightly for the latest features
(potentially unstable).
Username: admin
Password: admin
You will be prompted to change these immediately.