Skip to content

Znuny Docker – Setup, docker-compose & commands (2026)

Related: Docker Compose installation · Staging & test system · Znuny REST API · Add-ons & plugins · OpenTicketAI

Znuny Docker runs the ticket system in isolated containers: the same runtime on every host, clear separation of services, and simple stack lifecycle. Docker is especially useful for demos, test systems, and staging before rolling changes to production.

:::caution Community stacks, not official Znuny does not publish an official Docker image or compose stack (see feature request #38). Community projects maintain Docker setups. For production architecture and bare-metal installs, follow doc.znuny.org. :::

New to Docker install? Start with the step-by-step guide: Installing Znuny with Docker Compose.

ProjectZnuny versionsHighlightsInstaller path
Erik-Donath/znuny-docker7.1+Apache, cron, daemon, MariaDB, healthchecks/znuny/installer.pl
juanluisbaptiste/docker-otrs6.x LTSMature stack, automated backups, SMTP relay, upgrade helpers/otrs/ (legacy path)
nyanmark/znuny-dockervariesMinimal Nginx + PostgreSQL example/otrs/installer.pl

Always check repository activity, open issues, and Znuny version support before choosing a stack for anything beyond local testing.

Typical workflow (details depend on your compose file):

  1. Install Docker — see Ubuntu or Debian
  2. Clone a compose project (e.g. Erik-Donath/znuny-docker)
  3. Replace default passwords in docker-compose.yaml
  4. Start: docker compose up --build -d
  5. Open the web installer (Znuny 7.x: http://<host>:8080/znuny/installer.pl)
  6. Use database hostname db (Compose service name), not localhost
  7. After version updates: Maint::Database::Upgrade in the app container
Terminal window
docker compose up -d
docker compose ps
docker compose logs -f znuny-app

Full walkthrough: Docker Compose installation.

Test system, demo, and staging with Docker

Section titled “Test system, demo, and staging with Docker”

A Znuny test system or demo environment is quick to spin up with Docker:

GoalRecommendation
Local demoSmall compose stack on a dev PC or VM
Test / stagingSeparate compose instance with anonymized production data
CI / E2EEphemeral stack in a pipeline, then docker compose down

Full staging workflow (data copy, disable mail, hardening): Znuny staging system.

:::tip AI automation in Docker OpenTicketAI runs as an additional on-premise container and uses the Znuny REST API — a practical add-on for test systems with AI routing. :::

Practical differences:

TopicDockerClassic (doc.znuny.org)
SetupCompose file + imagesApache, MariaDB/PostgreSQL, Perl modules on Linux
Configurationdocker-compose.yaml, env vars, volumesHost packages, Config.pm, SysConfig
PersistenceNamed volumes or bind mounts requiredFilesystem paths on the server
UpdatesRebuild image + Maint::Database::UpgradePackage/tar upgrade + console migration
Background jobsCron/daemon in app container or separate serviceCron.sh, systemd
Official supportCommunity stacks onlyDocumented by Znuny project

Many Znuny Docker setups split work across services. Names like znuny_web_1 are examples — Compose names containers from project and service names. Always check with docker ps.

Common roles:

  1. Web / app — HTTP access (Apache + mod_perl or PSGI)
  2. Database — MariaDB or PostgreSQL with a persistent volume
  3. Daemon / scheduler — background jobs (mail, Generic Agent, escalations)
  4. SMTP relay (optional) — outbound mail in stacks like juanluisbaptiste
  5. Reverse proxy (optional) — Nginx or Traefik for HTTPS

The Erik-Donath stack combines web, cron, and daemon in a single znuny-app container plus a separate db container.

Containers isolate processes and filesystem views while sharing the host kernel — lighter than full VMs. Persistent data lives in volumes or mounted directories; the container filesystem itself is ephemeral.

Controlling the Docker service (Linux with systemd)

Section titled “Controlling the Docker service (Linux with systemd)”

On Linux with systemd, Docker is usually a system service:

  • Start: sudo systemctl start docker
  • Enable on boot: sudo systemctl enable docker
  • Stop: sudo systemctl stop docker
  • Status: sudo systemctl status docker

On Docker Desktop (Windows/macOS), the app manages the daemon — no systemctl commands.

  • Running containers: docker ps
  • All containers: docker ps -a
  • Images: docker images
  • Logs: docker logs <container-name> (follow: docker logs -f <container-name>)
  • Start/stop: docker start <name> / docker stop <name>

With Docker Compose (v2):

  • Start stack: docker compose up -d
  • Stop: docker compose down (without removing volumes unless --volumes)
  • Rebuild after config change: docker compose up --build -d
Terminal window
docker ps
docker compose exec znuny-app bash

Service names differ per stack — znuny-app, web, znuny are common. Use docker compose ps to see yours.

Run from the Znuny install root inside the container — typically /opt/znuny on Znuny 7.x stacks.

Terminal window
bin/znuny.Console.pl --help
bin/znuny.Console.pl Maint::Database::Upgrade
bin/znuny.Console.pl Maint::Cache::Delete
bin/znuny.Console.pl Maint::Config::Rebuild

::: details CLI overview

znuny.Console.pl handles admin tasks without the web UI:

  • Maint::Cache::Delete — clear cache
  • Maint::Config::Rebuild — rebuild SysConfig
  • Admin::Package::Install — install OPM package
  • Admin::Package::UpgradeAll — upgrade packages from repos
  • Maint::Test::System — system self-test

:::

::: details Migration and updates

For OTRS migration or version upgrades, follow vendor docs and backups:

  • Dev::Tools::Migrate::OTRSToZnuny — migration tooling (check docs for your version)
  • Admin::Package::UpgradeAll — upgrade installed packages

Always backup database and volumes before major steps. Test in staging first.

:::

VolumeContents
znuny-varAttachments, cache, sessions, logs
znuny-configKernel/Config
znuny-customCustom code
db-dataMariaDB data files

Database dump (works on any stack):

Terminal window
docker compose exec db mysqldump -u root -p znuny > znuny-backup-$(date +%F).sql

Volume archive (stop stack first for consistency):

Terminal window
docker compose down
sudo tar -czf znuny-volumes-$(date +%F).tar.gz /var/lib/docker/volumes/
docker compose up -d

juanluisbaptiste stack — built-in daily backups to /var/otrs/backups; configure with OTRS_BACKUP_TIME, OTRS_BACKUP_TYPE, and related env vars. See the project README.

For backups, include database volumes and mounts with Znuny data (var, attachments, config) — not only a DB dump.

Install OPM packages inside the app container like on a classic server:

Terminal window
docker compose exec znuny-app bash
bin/znuny.Console.pl Admin::Package::Install /tmp/my-package.opm
bin/znuny.Console.pl Maint::Config::Rebuild
bin/znuny.Console.pl Maint::Cache::Delete

Copy OPM files into the container first (docker cp) or mount a host directory.

Browse Znuny add-ons on OpenITSMHub — see Znuny add-ons.

  • Change default passwords in compose files before first start.
  • TLS: use a reverse proxy or mount certificates (Erik-Donath: apache-certs volume).
  • Resources: plan 8 GB RAM for staging; more if you add Elasticsearch or heavy integrations.
  • Mail: disable outbound mail on test systems (SendmailModuleKernel::System::Email::DoNotSendEmail in SysConfig).
  • Monitoring: watch docker compose ps, container healthchecks, and Znuny daemon/cron logs.
  • Updates: never skip Maint::Database::Upgrade after image bumps.

Plan backup, package migration, and database upgrade. Console helpers include Dev::Tools::Migrate::OTRSToZnuny and Admin::Package::UpgradeAll — follow official migration docs and test in staging first.

Stacks based on juanluisbaptiste can restore OTRS backup directories with OTRS_INSTALL=restore — see that project’s documentation.