Install openHAB in Docker on Ubuntu 20.04

Install openHAB in Docker on Ubuntu 20.04

The openHAB is an open-source home automation application for controlling smart home devices centrally. The openHAB provides dashboard that can be accessed via a web browser.

This tutorial shows how to install openHAB in Docker on Ubuntu 20.04.

Prepare environment

We can install and run openHAB in Docker container. So make sure you have installed Docker in your system. You can read post for installing it.

Install openHAB

Run the following command to create container for openHAB:

docker run -d --name=openhab --restart=always --network=host \
    -v /opt/openhab/conf:/openhab/conf \
    -v /opt/openhab/userdata:/openhab/userdata \
    -v /opt/openhab/addons:/openhab/addons \

The openHAB configuration files, logs, database, addons, and other related files can be found in /opt/openhab directory.

Testing openHAB

Open a web browser and navigate to http://<IP_ADDRESS>:8080, where <IP_ADDRESS> is IP address of the system.

For the first time you will be asked to create the administrator account of openHAB. Enter a username, password and click "Create Account" button. Next, you can select language, region, time zone, location of your home. Once configuration is finished, you will be redirected to openHAB dashboard.

openHAB dashboard on Ubuntu

Uninstall openHAB

If you decided to completely remove openHAB, delete it's container:

docker rm --force openhab

Remove openHAB image:

docker rmi openhab/openhab

You can also remove openHAB related files:

sudo rm -rf /opt/openhab

Leave a Comment

Cancel reply

Your email address will not be published.