Sign inSign up

dersimn/mqtt-smarthome-webui

By dersimn

Updated 7 months ago

Image
0

10K+

dersimn/mqtt-smarthome-webui repository overview

title

Supported Tags

  • The tags are based on the SemVer convention, e.g.: 2, 2.1, 2.1.6 point to the same image (at least at one point in time).
  • Tags with simple versions are updated every time the base image is updated, so for example 2.1.6 will be a different SHA when the underlying base image is updated on Docker Hub.
  • If you want to stay on the same image and not receive any updates, use a timestamped tag, e.g.: 2.1.6-build20230915T0815.

Config

Provide a file data.yaml with the page structure you want to offer, see example for reference.

This image can proxy-pass the WebSocket connection from your MQTT broker, by setting the ENV variable WS_PROXY.
You have to enable WebSockets on your broker, see contrib folder for sample configuration files for the official Docker image of eclipse-mosquitto.

docker run -d --restart=always \
    -v $(pwd)/yourconfig.yaml:/www/data.yaml:ro \
    --add-host=host.docker.internal:host-gateway \
    -e "WS_PROXY=host.docker.internal:9001" \
    -p 80:80 \
    dersimn/mqtt-smarthome-webui
SSL / HTTPS

If you provide an SSL key/cert pair in /ssl, the Docker Image will also enable HTTPS:

  • /ssl/nginx.key
  • /ssl/nginx.crt

Additionally you can enable client-authentification via SSL certificates, by providing:

  • /ssl/client.crt

In case you have revoked clients, also prodive a /ssl/client.crl file.

A nice tutorial on how to generate your own certificates, is located here.

docker run -d --restart=always \
    -v $(pwd)/yourconfig.yaml:/www/data.yaml:ro \
    -v $(pwd)/ssl:/ssl:ro \
    --add-host=host.docker.internal:host-gateway \
    -e "WS_PROXY=host.docker.internal:9001" \
    -p 80:80 \
    -p 443:443 \
    dersimn/mqtt-smarthome-webui

If you want to change the default ports, specify it like this: -p 8001:80 -p 8443:443 -e "HTTPS_REDIRECT_PORT=8443".

HTTPS and client-auth are optional for clients connecting from a local IP, according to these IP ranges:

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16

If you don't want this behaviour, set -e WHITELIST_LOCAL_IP=false to force SSL and client-auth for everyone. You can also add own IP ranges to the whitelist with -e WHITELIST_IP="10.1.1.0/24 192.168.1.0/24".

Detailed access log

If you provide the file /nginx.log, nginx will enable a more detailed access log in the "logfmt" format. This file can be a regular file or a FIFO, to further process the logged data with e.g. Telegraf.

Source

https://github.com/dersimn/mqtt-smarthome-webui

Tag summary

Content type

Image

Digest

sha256:608c155ab

Size

66 MB

Last updated

over 2 years ago

docker pull dersimn/mqtt-smarthome-webui