Configuration
Everything is optional: D2HA works with the example compose file as it is. The full list is also in .env.example.
Environment variables
| Variable | Default | What it does |
|---|---|---|
DOCKER_HOST | the mounted socket | How D2HA reaches Docker. With the socket proxy: tcp://docker-proxy:2375. |
D2HA_CHECK_INTERVAL_HOURS | 6 | Hours between update checks on a new install; later, Settings decides. |
D2HA_GITHUB_TOKEN | — | A GitHub token without scopes: release notes for 5,000 lookups per hour instead of 60. |
D2HA_TELEGRAM_TOKEN | — | The token of your Telegram bot (Telegram). |
D2HA_TELEGRAM_CHAT_ID | — | The chat that receives the messages; several, comma separated. |
D2HA_READ_ONLY | false | true: notifications and logs only, no updates or image cleanup. |
D2HA_FRAME_ANCESTORS | — | Addresses allowed to show D2HA in an iframe, such as a Home Assistant dashboard; space separated. |
D2HA_DATA_DIR | /app/data | Where D2HA keeps its files inside the container. |
D2HA_SECRET_KEY | generated | The key that signs sessions. Leave it empty: D2HA creates one and keeps it in the data folder. |
D2HA_LOG_LEVEL | INFO | DEBUG, INFO, WARNING or ERROR. |
After a change, recreate the container: docker compose up -d.
Container labels
Labels on your containers that D2HA reads:
| Label | Effect |
|---|---|
d2ha.notify=false | No crash or unhealthy alerts for this container (Telegram). |
com.docker.compose.project | Set by Compose: the stack the container is grouped under. |
Labels of the images that D2HA reads, for those who build them:
| Label | Used for |
|---|---|
org.opencontainers.image.version | The version shown, and the release to look for. Also io.hass.version, org.label-schema.version, version. |
org.opencontainers.image.source | The GitHub repository of the release notes. Also org.opencontainers.image.url, org.label-schema.vcs-url. |
The data folder
Mounted on /app/data. Back it up with your other Docker data.
| File | Contents |
|---|---|
d2ha.json | The account (password hash, two-factor secret), the hash of the API token, the settings, which containers Home Assistant sees, and the session key |
state.json | The results of the last check, and which updates were already announced on Telegram |
Keep it private
d2ha.json holds the two-factor secret and the session key: treat the folder like a password.
Port
D2HA listens on port 12021 inside the container. Publish it as you need, ideally on 127.0.0.1 only, as in the example.
Something wrong or missing on this page? Open an issue.