Docker
The official Docker image runs VibeMQ.Server.Host: a standalone broker with configuration from environment variables and an optional config file.
Quick Start
Build and run (from repository root):
docker build -f docker/Dockerfile -t vibemq .
docker run -p 2925:2925 vibemq
Clients can connect to localhost:2925. By default the broker runs without authentication.
Using Docker Compose
docker compose -f docker/docker-compose.yml up -d
The broker listens on port 2925. Edit docker/docker-compose.yml to change ports or add environment variables.
Configuration
The image uses the same options as the rest of VibeMQ (see Configuration). Two mechanisms are supported:
Environment variables — recommended for Docker/Kubernetes. Use the
VibeMQ__prefix and double underscore for nested keys.Config file — optional JSON file (e.g.
appsettings.json). SetVIBEMQ_CONFIG_PATHto the full path of the file; it is loaded first, then env vars override.
Environment variables (examples)
Variable |
Description |
|---|---|
|
TCP port (default: 2925) |
|
Max concurrent connections (default: 1000) |
|
Max message size in bytes (default: 1048576) |
|
|
|
Legacy token when |
|
Superuser login (username/password auth) |
|
Superuser password on first run (e.g. from secret) |
|
Path to SQLite auth DB (default: auth.db) |
|
|
|
Path to SQLite queue DB when |
|
Log level: Debug, Information, Warning, Error |
Config file path
Set VIBEMQ_CONFIG_PATH to load an additional or custom JSON config file (e.g. mounted in the container):
docker run -p 2925:2925 \
-v /host/path/appsettings.json:/app/config/appsettings.json \
-e VIBEMQ_CONFIG_PATH=/app/config/appsettings.json \
vibemq
The built-in appsettings.json in the image provides defaults; env vars override any value from config.
Example: auth and port
Token-based auth on port 9000:
docker run -p 9000:9000 \
-e VibeMQ__Port=9000 \
-e VibeMQ__EnableAuthentication=true \
-e VibeMQ__AuthToken=your-secret-token \
vibemq
Username/password auth with persistent auth DB:
docker run -p 2925:2925 \
-e VibeMQ__EnableAuthentication=true \
-e VibeMQ__Authorization__SuperuserUsername=admin \
-e VibeMQ__Authorization__SuperuserPassword=secret \
-e VibeMQ__Authorization__DatabasePath=/data/auth.db \
-v vibemq-data:/data \
vibemq
Example: SQLite persistence
docker run -p 2925:2925 \
-e VibeMQ__StorageType=Sqlite \
-e VibeMQ__SqliteStorage__DatabasePath=/data/vibemq.db \
-v vibemq-data:/data \
vibemq
Image details
Base:
mcr.microsoft.com/dotnet/runtime:8.0Entrypoint:
dotnet VibeMQ.Server.Host.dllWorking directory:
/appExposed port: 2925 (override with
VibeMQ__Portand republish)
The host project is VibeMQ.Server.Host in the repository; it uses DI Integration and binds Configuration from the VibeMQ section.