Start OpenHAB

Start It Up

On this page

Test It!

You start OpenHAB with this command:

sudo /opt/openhab/
This will take a minute or two to start up, and it will write out everything that's happening. If all went well it should look like this:

OpenHAB starting
OpenHAB starting up. You might not see the lines with [DEBUG] as those are optional and need to be enabled.

Now you can open a web browser at (replace with your Pi's IP) and see the temperature update automatically!

Exiting: You can exit OpenHAB using CTRL+C. This will also make the site unavailable again.

Auto Start On Boot

You'll probably want both OpenHAB to start up automatically when you reboot your Pi, so you don't have to worry about them.

You can download this startup script and paste the contents into a file in /etc/init.d:

sudo nano /etc/init.d/openhab

Then make the script executable:

sudo chmod 755 /etc/init.d/openhab

Now you have access to a few useful commands for starting OpenHAB in the background, seeing the status, and stopping or restarting it:

sudo /etc/init.d/openhab start
/etc/init.d/openhab status
sudo /etc/init.d/openhab stop
sudo /etc/init.d/openhab restart

To make this script start up by default on boot:

sudo update-rc.d openhab defaults

If you ever want to undo this, run:

sudo update-rc.d -f openhab remove

Now after you reboot your Pi OpenHAB will automatically start up in the background. Remember OpenHAB needs a few minutes to start everything up.


Back to the Guides