This page describes the way to install Docker on a Raspberry Pi and configure it to run Appdaemon for the Dashboards of Home Assistant.
Installation:
when the operating system is dietpi then run ‘dietpi-software’ and select both ‘docker-compose’ and ‘docker’ for installation.
Once the installation is complete, run the following command to start docker daemon:
sudo systemctl start docker.service
Check that everything is ok by running the following command:
sudo systemctl status docker.service
Go the docker hub (https://hub.docker.com) and search for keyword ‘appdaemon’ and select the choice corresponding to your liking (in my case ‘acockburn/appdaemon’).

Copy the Docker Pull Command and paste it in the terminal of your Home Assistant device. Hit Enter key and the Appdaemon packages will be downloaded and extracted. This operation can take some time, in particular if the host running docker is connected to the Internet through wireless interface.
In the folder /home/homeassistant, create a script ‘first_docker_appdaemon.sh’ which will look like this:
docker run --rm -it -p 5050:5050 \
-e HA_URL="http://home-yann.duckdns.org:8130" \
-e TOKEN="THE TOKEN CREATED IN HOME ASSISTANT" \
-e DASH_URL="http://$HOSTNAME:5050" \
-v /home/homeassistant/.homeassistant/appdaemon:/conf \
acockburn/appdaemon:latest
Analysis of docker run command (refer to https://docs.docker.com/engine/reference/commandline/run/):
–rm : remove one or more containers
-it : Keep STDIN open even if not attached and Allocate a pseudo-TTY
-p (external/internal port)
-e: Set environment variables
-v: Bind mount a volume
Make this script executable (chmod +x first_docker_appdaemon.sh).
Execute the script (./first_docker_appdaemon.sh). Docker will pull all packages for running Appdaemon (that can take some time (download and extract)).
Upon completion, run the following command:
docker ps -a
It is very likely that the name given to the container will not relate at all to appdaemon. You can rename the container as follows:
docker rename old_name new_name
Recommendation: set new_name as ‘appdaemon’ (a script (check_system.sh) on Home Assistant host checks that appdaemon container is running – crontab)
In the folder /home/homeassistant (for example), create a script ‘docker_appdaemon.sh’ which will look like this:
docker run --name appdaemon \
--detach \
--restart=always \
--network=host \
-p 5050:5050 \
-v <config file of appdaemon>:/conf \
-e HA_URL="http://home-yann.duckdns.org:8130" \
-e TOKEN="the token which has been created in Home Assistant" \
acockburn/appdaemon
CTRL+x, Y to save the modifications
sudo chmod +x docker_appdaemon.sh (to make the script executable)
Then run the script:
./docker_appdaemon.sh
If the Docker Pull Command has not been executed earlier, then docker will not find any appdaemon module and will start pulling them as needed.
Once completed, use your browser to go to your Home assistant dashboard. That should be working.
Note: if the system cannot be displayed properly, that may be due to the inconsistency between the TOKEN recorded in Home Assistant and the TOKEN mentioned in the script start_appdaemon.sh (see above).