smb-mgmt
Modern web management console for Samba file servers — Samba + UI in one container.
1.3K
Modern web management console for Samba file servers — Samba and its management UI in one container. Built with Go and Angular, published multi-arch for amd64 and arm64.
The image ships Samba 4.24.x (Debian trixie) together with the smb-mgmt console, which supervises smbd/nmbd/winbind itself: the services you started come back after a restart, redeploy or --force-recreate, and accounts created through the app are recreated on boot with their original uid/gid.
docker run -d --name smb-mgmt \
-p 8080:8080 -p 139:139 -p 445:445 \
-v smb-mgmt-data:/var/lib/smb-mgmt \
-v samba-lib:/var/lib/samba \
-v samba-etc:/etc/samba \
-v /path/to/your/shares:/srv/samba \
--restart unless-stopped \
fernandodelucca/smb-mgmt:latest
Open http://localhost:8080 — the first visit asks you to create the initial admin account. SMB itself is served from the same container on ports 139/445.
services:
smb-mgmt:
image: fernandodelucca/smb-mgmt:latest
ports:
- "8080:8080"
- "139:139"
- "445:445"
environment:
SMB_MGMT_LOG_DIR: /var/log/smb-mgmt
# SMB_MGMT_TERMINAL: "1" # enable the recorded, admin-only web terminal
# SMB_MGMT_TLS_SELF_SIGNED: "1" # HTTPS with a persisted self-signed cert
volumes:
- smb-mgmt-data:/var/lib/smb-mgmt # app database (accounts, config history, audit)
- samba-lib:/var/lib/samba # Samba passdb (SMB password hashes)
- samba-etc:/etc/samba # smb.conf (seeded on first boot)
- ./shares:/srv/samba # your share data
- ./logs:/var/log/smb-mgmt # access.log / error.log (CLF)
- ./samba-logs:/var/log/samba # Samba daemon logs (shown in the UI)
restart: unless-stopped
volumes:
smb-mgmt-data:
samba-lib:
samba-etc:
smb.conf parameter of Samba 4.24.x in a schema-driven UI — search, one tab per functional group, type-aware validation, defaults, and descriptions translated into English, Portuguese, Spanish and German.testparm, writes smb.conf atomically with a backup, reloads Samba and rolls back automatically on failure. Visual diff before applying, drift detection for out-of-band edits, full history with restore, and drafts can be discarded into history and applied later./metrics (admin session required), optional recorded web terminal (admin-only, off by default).viewer (read-only), operator (manage Samba), admin (everything). Session cookies, same-origin enforcement, rate-limited login.HEALTHCHECK; tini as PID 1.| Tag | Meaning |
|---|---|
X.Y.Z | A specific release, byte-for-byte the CI-tested image |
X.Y | Latest patch of a minor line |
latest, release | The most recent release |
| Port | Purpose |
|---|---|
8080/tcp | Web UI + REST API (/metrics for Prometheus, /healthz for probes) |
445/tcp | SMB |
139/tcp | SMB over NetBIOS session service |
137-138/udp (optional) | NetBIOS name service/datagrams (nmbd discovery on the LAN) |
| Path | Contents | Persist? |
|---|---|---|
/var/lib/smb-mgmt | App database: accounts/uid-gid records, config versions, audit, sessions, terminal recordings | Yes — required |
/var/lib/samba | Samba state incl. passdb (SMB password hashes) | Yes — required |
/etc/samba | smb.conf (a minimal one is seeded on first boot if absent) | Yes |
/srv/samba | Default root for share data | Yes (bind-mount your storage) |
/var/log/smb-mgmt | Console access.log/error.log (Common Log Format) | Optional |
/var/log/samba | Samba daemon logs, listed in the UI's log viewer | Optional |
Persist /var/lib/smb-mgmt and /var/lib/samba together: the first holds the account records the entrypoint restores on boot, the second holds the matching SMB password hashes.
| Variable | Default | Purpose |
|---|---|---|
SMB_MGMT_LISTEN | :8080 | Listen address (IP:port to bind one interface) |
SMB_MGMT_DATA_DIR | /var/lib/smb-mgmt | Data directory |
SMB_MGMT_LOG_DIR | <data-dir>/logs | Console access/error logs |
SMB_MGMT_SMB_CONF | /etc/samba/smb.conf | Path to smb.conf |
SMB_MGMT_TLS_CERT / SMB_MGMT_TLS_KEY | — | PEM cert/key: serve HTTPS directly (TLS 1.2+, HSTS, Secure cookies) |
SMB_MGMT_TLS_SELF_SIGNED | — | 1 = HTTPS with a self-signed cert persisted in the data dir |
SMB_MGMT_SECURE_COOKIES | — | 1 = mark session cookies Secure (use behind a TLS reverse proxy) |
SMB_MGMT_TERMINAL | off | 1 = enable the recorded, admin-only web terminal |
This is a privileged management console — treat it like one:
SMB_MGMT_LISTEN=10.0.10.5:8443) and use TLS — either terminated by the app (cert/key or self-signed) or by a reverse proxy (then set SMB_MGMT_SECURE_COOKIES=1 and keep the app on loopback).viewer/operator accounts for daily use.Pull the new tag and recreate the container — state lives in the volumes. Rolling back the image is equally safe: database migrations are additive.
docker pull fernandodelucca/smb-mgmt:latest
docker compose up -d
MIT
Content type
Image
Digest
sha256:76b62be5a…
Size
80.4 MB
Last updated
1 day ago
docker pull fernandodelucca/smb-mgmt:sha-c972783