How to Install OpenHAB on Fedora CoreOS Latest

OpenHAB is an open-source home automation platform that enables communication between devices from different manufacturers. Fedora CoreOS is a container-focused operating system. Installing OpenHAB on Fedora Core OS requires several steps that we will outline in this tutorial.

Prerequisites

Step-by-Step Guide

Step 1: Launch Terminal

Step 2: Install Java

sudo dnf install java-11-openjdk-devel

Step 3: Download Latest OpenHAB package

sudo mkdir /opt/openhab
cd /opt/openhab 
sudo wget https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.12%2Fopenhab-2.5.12.zip
sudo unzip download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.12%2Fopenhab-2.5.12.zip

Note: Replace the version number with the latest version available for download.

Step 4: Configure User Permissions

sudo useradd --system --user-group openhab
sudo usermod -G audio,video,storage openhab

Step 5: Start OpenHAB Service

sudo /opt/openhab/userdata/bin/karaf
systemctl enable openhab.service --user openhab
systemctl start openhab.service --user openhab

Note: The first command, sudo /opt/openhab/userdata/bin/karaf, starts the Karaf console, which is the command-line interface of OpenHAB. Type logout to exit the Karaf console after the OpenHAB service starts.

Step 6: Check OpenHAB Status

systemctl status openhab.service --user openhab
● openhab.service - openhab
   Loaded: loaded (/home/openhab/.config/systemd/user/openhab.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2021-10-06 15:07:44 EDT; 5s ago
  Process: 42406 ExecStart=/opt/openhab/runtime/bin/karaf server (code=exited, status=0/SUCCESS)
 Main PID: 42407 (java)
    Tasks: 33 (limit: 2256)
   Memory: 332.6M
   CGroup: /user.slice/user-1000.slice/user@1000.service/openhab.service
           └─42407 /usr/lib/jvm/java-11-openjdk-11.0.12.0.7-0.fc34.x86_64/bin/java -Dopenhab.home=/opt/openhab -Dopenhab.runtime=/opt/openhab/runtime -Dkaraf.home=/opt/open> 

Step 7: Access OpenHAB Dashboard

http://localhost:8080

Congratulations! You have successfully installed OpenHAB on Fedora Core OS. You can now customize and configure OpenHAB as needed. Visit the OpenHAB documentation for more information.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!