Install Domoticz Inside Docker Container in Linux

Install Domoticz Inside Docker Container in Linux

Domoticz is an open-source home automation system that allows to monitor and configure smart home devices centrally. Domoticz has a dashboard that can be accessed via a web browser.

This tutorial explains how to install Domoticz inside a Docker container in the Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install Domoticz

  • Host network

Run the following command to create a container for Domoticz that uses host network:

docker run -d --name=domoticz --restart=always --network=host \
    -v /opt/domoticz/data:/opt/domoticz/userdata \
    domoticz/domoticz
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, Domoticz service is listening on port 8080. It can be changed with -p option.

docker network create app-net
docker run -d --name=domoticz --restart=always --network=app-net \
    -p 8081:8080 \
    -v /opt/domoticz/data:/opt/domoticz/userdata \
    domoticz/domoticz

Testing Domoticz

Open a web browser and go to http://<IP_ADDRESS>:8080, where <IP_ADDRESS> is the IP address of the system. Log in to the dashboard with the default username (admin) and password (domoticz).

Domoticz Inside Docker Container in Linux

Uninstall Domoticz

To completely remove Domoticz, remove its container:

docker rm --force domoticz

Remove Domoticz image:

docker rmi domoticz/domoticz

You can also remove Domoticz data:

sudo rm -rf /opt/domoticz

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.