Repository for building docker containers for openHAB (Home Automation Server).
Comments, suggestions and contributions are welcome!
This clone of the core openhab image has been extended to include Habmin 0.16
If you are unsure about what your needs are, you probably want to use
prebuilt Docker Images can be found here: Docker Images
Important To be able to use UPnP for discovery the container needs to be started with
The following will run openHAB in demo mode on the host machine:
docker run -it --name openhab --net=host openhab/openhab:amd64-online server
NOTE Although this is the simplest method to getting openHAB up and running, but it is not the preferred method. To properly run the container, please specify a host volume for the
docker run \ --name openhab \ --net=host \ -v /etc/localtime:/etc/localtime:ro \ -v /etc/timezone:/etc/timezone:ro \ -v /opt/openhab/conf:/openhab/conf \ -v /opt/openhab/userdata:/openhab/userdata \ -d \ --restart=always \ openhab/openhab:amd64-online
--- openhab: image: 'openhab/openhab:amd64-online' restart: always ports: - "8080:8080" - "8443:8443" - "5555:5555" net: "host" volumes: - '/etc/localtime:/etc/localtime:ro' - '/etc/timezone:/etc/timezone:ro' - '/opt/openhab/userdata:/openhab/userdata' - '/opt/openhab/conf:/openhab/conf' command: "server"
then start with
docker-compose up -d
Accessing the console
docker exec -it openhab console
You can start the container with the command
docker run -it openhab/openhab debug to get into the debug shell.
-p 8080- the port of the webinterface
-v /openhab/conf- openhab configs
-v /openhab/userdata- openhab userdata directory
--device=/dev/ttyUSB0- attach your devices like RFXCOM or Z-Wave Sticks to the container
Building the image
Checkout the github repository and then run these commands:
$ docker build -t openhab/openhab . $ docker run -it openhab/openhab server
When not explicitly set, files are placed under EPL license.