openHAB - installation
2025-02-10 / 2025-07-23 | ||
_ _ _ ____
___ ___ ___ ___ | | | | / \ | __ )
/ _ \ / _ \ / _ \ / _ \| |_| | / _ \ | _ \
| (_) | (_) | __/| | | | _ | / ___ \ | |_) )
\___/| __/ \___/|_| |_|_| |_|/_/ \_\|____/
|_|
Installation
# !!! wird aktuell benötigt, da es noch kein 21er JRE im Debian Package-Tree gibt.
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null
echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
update
install temurin-21-jre
curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor > openhab.gpg
sudo mkdir -p /usr/share/keyrings
sudo mv openhab.gpg /usr/share/keyrings
sudo chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg
echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab.list
update
install openhab openhab-addons
sudo systemctl daemon-reload
sudo systemctl enable openhab
sudo systemctl start openhab
sudo reboot
reverse proxy
openhab konfigration
sudo nano /etc/default/openhab
# Port Änderung einfach nice to have um die Standard-Ports ggf. für anderes frei zu haben.
# Da die Ports nicht exposed sind, kann hier bequem geändert wrden.
OPENHAB_HTTP_PORT=9080
OPENHAB_HTTPS_PORT=9443
OPENHAB_HTTP_ADDRESS=127.0.0.1
apche reverse proxy
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName openhab.l337.l11
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPass / http://127.0.0.1:9080/
ProxyPassReverse / http://127.0.0.1:9080/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache.crt
SSLCertificateKeyFile /etc/ssl/private/apache.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName www.l337.l11
ServerAlias l337.l11 *.l337.l11
. . .