+-------------------------------------------------------------------------------
| Running openhab on OpenBSD
+-------------------------------------------------------------------------------

Listen on localhost only
========================

openHAB is configured by sourcing environment variables from /etc/openhab.conf.
By default, openHAB listens on 0.0.0.0 port 8080 (http) and 8443 (https).

We've opted to default to 127.0.0.1 for obvious security reasons. To restore the
original behavior make the following change in /etc/openhab.conf:

OPENHAB_HTTP_ADDRESS=0.0.0.0

Refer to https://www.openhab.org/docs/ for more details.

Access to serial devices
========================

openHAB runs as user _openhab. By default, this user will not be able to access
serial devices. If, for example, you plan to access a locally connected USB
dongle for Zigbee or Z-Wave, you will need to add the _openhab user to the
'dialer' group.

Please note, you will need a library to access serial ports from Java. The
example of passing "-Dgnu.io.rxtx.SerialPorts" uses the rxtx library, which is
currently unsupported on OpenBSD. However, 100% Java implementations such as
PureJavaComm and jSerialComm are known to work.

Refer to https://www.openhab.org/docs/ for more details.

Preserve shell history
======================

By default, the openHAB console attempts to save its command history to a
directory that is not writable by the _openhab user, preventing history from
being preserved.

To enable and configure shell history, add the following property to
/var/db/openhab/etc/custom.system.properties:

karaf.history=${openhab.userdata}/.karaf/history

This evaluates to /var/db/openhab/.karaf/history. Note that this file will be
created with world-readable permissions by default. To restrict access,
pre-create the directory with secure permissions before launching the service:

# install -d -o _openhab -g _openhab -m 0750 /var/db/openhab/.karaf

Refer to https://www.openhab.org/docs/ for more details.
