Run VerneMQ rootless and secure by default!
3.7K

Run VerneMQ rootless and secure by default!
VerneMQβ (created by vernemqβ ) is a high-performance, distributed MQTT message broker. It scales horizontally and vertically on commodity hardware to support a high number of concurrent publishers and consumers while maintaining low latency and fault tolerance. VerneMQ is the reliable message hub for your IoT platform or smart products.

What can I do with this? Run one of the best and most modern MQTT brokers that exists, secured by default. It comes with a changed Redis authentication backend to write unauthenticated clients to the Redis DB for 15 minutes and allows multi-tenancy by using a mountpoint in the form of a FQDN.
Why should I run this image and not the other image(s) that already exist? Good question! Because ...
If you value security, simplicity and optimizations to the extreme, then this image might be for you.
Below you find a comparison between this image and the most used or original one.
| image | size on disk | init default as | distrolessβ | supported architectures |
|---|---|---|---|---|
| 11notes/vernemq | 152MB | 1000:1000 | β | amd64, arm64, armv7 |
name: "mqtts"
x-lockdown: &lockdown
# prevents write access to the image itself
read_only: true
# prevents any process within the container to gain more privileges
security_opt:
- "no-new-privileges=true"
services:
redis:
# for more information about this image checkout:
# https://github.com/11notes/docker-redis
image: "11notes/redis:8.2.2"
<<: *lockdown
environment:
REDIS_PASSWORD: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
networks:
backend:
volumes:
- "redis.etc:/redis/etc"
- "redis.var:/redis/var"
tmpfs:
- "/run:uid=1000,gid=1000"
restart: "always"
cli:
# for more information about this image checkout:
# https://github.com/11notes/docker-redis
depends_on:
redis:
condition: "service_healthy"
restart: true
image: "11notes/redis:8.2.2"
<<: *lockdown
environment:
REDIS_HOST: "redis"
REDIS_PASSWORD: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
entrypoint: ["/usr/local/bin/redis", "--cmd"]
command:
- SET client:[email protected]:mqttui {"mountpoint":"domain.com","passhash":"$2a$12$NZTnKE8a5e8/ey9Li6xwSeF92I0j1Us96jMl2zCESRlapx88u6Wxq","subscribe_acl":[{"pattern":"#"}],"publish_acl":[{"allowed_retain":true,"pattern":"#"}]} NX
networks:
backend:
vernemq:
depends_on:
redis:
condition: "service_healthy"
restart: true
image: "11notes/vernemq:2.1.1"
<<: *lockdown
environment:
TZ: "Europe/Zurich"
ports:
- "3000:3000/tcp"
- "8883:8883/tcp"
networks:
frontend:
backend:
volumes:
- "vernemq.etc:/vernemq/etc"
- "vernemq.var:/vernemq/var"
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β DEMO CONTAINER - DO NOT USE IN PRODUCTION! β
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# used to give an UI for the Redis database
redis-insight:
depends_on:
redis:
condition: "service_healthy"
restart: true
image: "redis/redisinsight"
environment:
RI_REDIS_HOST0: "redis"
RI_REDIS_PASSWORD0: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
ports:
- "3010:5540/tcp"
networks:
backend:
frontend:
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β DEMO CONTAINER - DO NOT USE IN PRODUCTION! β
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# web UI to visualize the MQTT messages sent
mqtt-web-client:
depends_on:
vernemq:
condition: "service_healthy"
restart: true
image: "terdia07/mqttui"
entrypoint: ["/bin/sh","-c"]
command:
- |
sed -i 's/mqttui_{os.getpid()}/{os.getenv('\''MQTT_CLIENT_ID'\'')}/' ./app.py
exec gunicorn --worker-class eventlet -w 1 -b "0.0.0.0:5000" app:app
environment:
TZ: Europe/Zurich
MQTT_BROKER: vernemq
MQTT_PORT: 1883
MQTT_USERNAME: [email protected]
MQTT_PASSWORD: vernemq
MQTT_CLIENT_ID: mqttui
ports:
- "3020:5000/tcp"
networks:
frontend:
backend:
restart: always
volumes:
vernemq.etc:
vernemq.var:
redis.etc:
redis.var:
redis-insight.var:
networks:
frontend:
backend:
internal: true
To find out how you can change the default UID/GID of this container image, consult the RTFMβ .
| Parameter | Value | Description |
|---|---|---|
user | docker | user name |
uid | 1000 | user identifierβ |
gid | 1000 | group identifierβ |
home | /vernemq | home directory of user docker |
| Parameter | Value | Default |
|---|---|---|
TZ | Time Zoneβ | |
DEBUG | Will activate debug option for container image and app (if available) |
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
It is my opinion that the :latest tag is a bad habbit and should not be used at all. Many developers introduce breaking changes in new releases. This would messed up everything for people who use :latest. If you donβt want to change the tag to the latest semverβ , simply use the short versions of semverβ . Instead of using :2.1.1 you can use :2 or :2.1. Since on each new version these tags are updated to the latest version of the software, using them is identical to using :latest but at least fixed to a major or minor version. Which in theory should not introduce breaking changes.
If you still insist on having the bleeding edge release of this app, simply use the :rolling tag, but be warned! You will get the latest version of the app instantly, regardless of breaking changes or security issues or what so ever. You do this at your own risk!
docker pull 11notes/vernemq:2.1.1
docker pull ghcr.io/11notes/vernemq:2.1.1
docker pull quay.io/11notes/vernemq:2.1.1
This image supports unraid by default. Simply add -unraid to any tag and the image will run as 99:100 instead of 1000:1000.
This image supports nobody by default. Simply add -nobody to any tag and the image will run as 65534:65534 instead of 1000:1000.
subscribe_acl and publish_acl to restrict your MQTTS clients to certain topics and do not allow everything by default[email protected], please create your own compose and do not copy/paste blindlyThis image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the releasesβ for breaking changes. If you have any problems with using this image simply raise an issueβ , thanks. If you have a question or inputs please create a new discussionβ instead of an issue. You can find all my other repositories on githubβ .
created 12.01.2026, 22:12:57 (CET)
Content type
Image
Digest
sha256:99ab81c7bβ¦
Size
78.9 MB
Last updated
about 1 year ago
docker pull 11notes/vernemq:2.1.1