Running Zabbix in production with Docker Compose: when it fits
Compose is a sound production shape when one team owns a single Zabbix installation on a small number of Docker hosts, wants every component declared in files it can review and version, and has no existing Kubernetes platform that would carry the workload. The official Zabbix images cover the server, the web frontend, and the database, with optional components such as proxies, agents and web service available as additional services in the same project. Because the whole stack is described in one place, the team can rebuild it, copy it to a second environment, and compare its state with what is running. This page answers how to run that stack. It does not argue whether Zabbix is the right monitoring tool for your environment.
Before choosing Compose over operating system packages or a Kubernetes deployment, weigh three questions. First, who will patch the host operating system and the Docker engine, and on what schedule? Compose puts that work on your team, not on a package manager or a cluster scheduler. Second, can you tolerate a single Docker host as the failure domain? Compose does not provide the cluster-level restart and placement that Kubernetes offers, and Zabbix server high availability needs several server nodes sharing one database, which you must arrange yourself. Third, does your organization already run Kubernetes with the skills to operate stateful database workloads on it? If it does, the Kubernetes path may be easier to govern. If it does not, Compose keeps the number of moving parts lower.
Confirm the details against the current container documentation before you commit to a design, starting with the image tag scheme, the database versions supported by your target Zabbix release, and how the Compose files expect persistent data and environment files to be laid out. Ask whether your security team needs the database and frontend on separate networks, and whether your backup tooling can capture the database volume consistently while the stack runs. Those answers decide whether a single-host Compose project is acceptable or whether the environment needs a different shape from the start. The Zabbix containers installation guide is the natural next read for those checks.
Choosing between Compose, packages and Kubernetes for Zabbix
Single-host Compose runs the Zabbix server, frontend, database and optional components as containers defined by the official images and Compose files on one Docker host. It suits a small platform team or a single application owner who wants a self-contained stack that can be rebuilt from files, and it keeps the number of moving parts low. The operator is usually the team that owns the Docker host, and that team must maintain the host OS, the Docker engine, the image tags in use, the .env file, the per-component env_vars files, and the persistent data directory.
- Operator: one team owns the host, the containers and the backups, so responsibility is clear but concentrated.
- Maintenance: pinning image tags, applying host patches, testing each Zabbix upgrade by tag and keeping the persistent data directory backed up.
- Database placement: you decide whether the database runs in its own container or on a managed or separate host, and that choice changes your backup and restore path.
- Where Compose stops: when you need server high availability across hosts, when the host itself becomes a single point of failure, or when your organization already runs a cluster scheduler that should own restarts and scaling.
- Cost: the software is free to use, so cost is mostly staff time, host capacity and the support tier you choose separately.
Before committing, confirm with your own infrastructure team how the host will be patched, restored and monitored, and what recovery time your Zabbix service must meet.
A package-based install puts the Zabbix server, frontend and agents on hosts managed by the operating system package manager, usually with a database and web server on the same or separate machines. Many regulated teams prefer this model because it fits existing configuration management, patch cycles and host hardening standards. The operator is typically the systems team that already runs the Linux estate, and that team must maintain the OS, the Zabbix packages from the chosen repository, the web server, the database and the configuration files.
- Operator: the systems or infrastructure team, with the same change process used for other servers.
- Maintenance: OS patching, Zabbix package upgrades following the release line you chose, database maintenance and web server certificates.
- Repository choice: the Zabbix repository and distribution packages can differ, so confirm which source your security team has approved.
- Where it fits best: organizations with mature configuration management and little appetite for container runtimes on monitoring infrastructure.
- Where it struggles: rebuilding a host quickly depends on documented automation, so undocumented manual steps become a recovery risk.
Confirm the exact package names, supported operating system versions and database pairing against the Zabbix requirements page before you pick a distribution, because those details change between releases.
Running the Zabbix server on Kubernetes places the server, frontend and their dependencies under cluster scheduling, storage classes and cluster networking. It is a different decision from monitoring a Kubernetes cluster, and it adds the cluster itself to the monitoring platform's dependency chain. The operator is usually a platform engineering team that already runs and upgrades clusters, and that team must maintain the cluster, the chart or manifests, storage, database operations, secrets and the upgrade sequence for both Kubernetes and Zabbix.
- Operator: a platform team with cluster experience and on-call coverage for the cluster, not only for Zabbix.
- Maintenance: cluster upgrades, persistent volume behavior, database high availability and backups, and chart or manifest versioning.
- Database requirement: confirm which PostgreSQL or TimescaleDB versions your chosen deployment method supports before design begins.
- High availability: Zabbix server HA works across nodes that share one database, so the database and storage design matter as much as the pod count.
- Where it struggles: if the cluster is down, monitoring of the cluster may be down with it, so plan an independent alert path.
Ask the platform team to document how the monitoring stack will be recovered if the cluster itself fails, since that scenario decides whether this model is acceptable.
The right model depends less on feature access, since the open source software has no feature gates, and more on who will operate the platform and how it must recover. Teams should compare the three models against their existing skills, change control and the failure modes they must survive. A small, well-documented Compose stack can be the simplest option for a single team, while a package install or a cluster-hosted server may fit organizations that already standardize on those operating models. Any of them can run production monitoring if the operating burden is funded and owned.
- Skills already in place: pick the model your operators already maintain well, not the one that looks newest.
- Recovery target: write down how long the monitoring service may be unavailable and test whether the model meets that target.
- Change control: check whether your change process can accept image tag changes, package upgrades or chart changes on the same schedule.
- Support needs: paid support tiers are sold separately from the software and come with stated response times, so ask which tier matches your operating hours.
- Mixed approaches: some teams run the server in one model and proxies in another, which changes the set of hosts to maintain.
Before choosing, ask DeployOpen or your own architects to write a one-page comparison against your environment, covering operator, maintenance, recovery and upgrade steps for each option.
Image tag, base OS and Compose options compared
This table compares the tag styles, base OS choice, database backend and Makefile options that shape a production Compose stack. Read each row as a decision: what it gives you, and when a moving tag or a pinned tag is the safer choice for your change control.
| Option | What it gives you | When it fits | Main trade-off |
|---|---|---|---|
| latest (no OS prefix) | Tracks the newest image, built on Alpine by default | Test or lab stacks where you accept changes on each pull | Upgrades can happen without a planned change, so it is hard to audit |
| <os>-X.X-latest | Follows the newest patch within one Zabbix minor line on a chosen OS | Non-production stacks that should receive patch fixes within a line | Patches still arrive without a review step, so pin before production cutover |
| <os>-X.X.* (pinned) | A fixed release on a named OS, changed only when you edit the file | Production, where each upgrade is a tested change with a rollback plan | You must schedule and test every patch release yourself |
| Alpine base (default for latest) | Smallest default image with an Alpine base | Teams that want the default and accept the Alpine packaging and libc differences | Check that any extra packages or agents you add work on Alpine before using it |
| Other OS variants (for example Ubuntu or Rocky) | Matches the OS your security team already patches and scans | Organizations with a standard base image policy or a required scanner baseline | Confirm the tag exists for your Zabbix version and test the image before adoption |
| Database backend (MySQL, MariaDB, PostgreSQL, TimescaleDB) | Sets the database engine and its version range for the stack | Choose the backend your DBA team runs, within the range the requirements page lists for your version | Changing the backend later is a migration, so decide before the first start |
| Makefile OS, DB and profile options | Generates Compose files for the chosen OS, database and profile | Teams that want a generated, repeatable stack instead of hand-written files | The generated output changes with the repository, so review it after each pull |
| Optional components (for example proxies or web service) | Adds components beyond server, frontend and database | Only when you have a sized need for them, such as a proxy in a remote segment | Each component adds images to patch, certificates to manage and ports to control |
Setting up the Zabbix Compose stack step by step
This sequence takes a team from choosing an image tag and base OS to a running Zabbix server, frontend and database that have been checked for connectivity. Each step leaves a verifiable result before the next one starts.
Choose the image tag and base OS
The platform engineer selects the Zabbix version and the base operating system before anything else is written, because every later choice depends on them. Image tags follow the pattern zabbix/<image>:<os>-<version>, and a tag without an OS prefix, such as latest, resolves to Alpine. Pin a specific version tag (for example, an <os>-X.X.* tag) rather than a floating tag so that the same stack can be rebuilt later. Confirm the chosen version's support window in the Zabbix life cycle policy before you commit. Done when the team has a written list of the exact image tags for the server, frontend, agent and database images, and each one has been checked against the Zabbix containers documentation.
Prepare the .env file
The engineer creates the top-level .env file that the Compose setup reads, setting the image tags, the OS choice and the project-level values agreed in the previous step. Keep credentials out of this file where your secrets process allows it, and record who owns the file in version control. Check the file against the Zabbix containers documentation, since variable names must match what the Compose files expect. Done when a dry parse of the Compose configuration shows the expected image references and no unresolved variables.
Create per-component env_vars files
Next, the engineer writes one env_vars file for each component: the server, the frontend and the database. These files hold settings such as database host, database name, user names and the timezone, and they must agree with each other on every shared value. Mismatched database credentials between the server and the database are the most common reason the stack fails to start, so the team should compare the files side by side. Done when each component's file exists, the shared values match across files, and no placeholder text remains.
Create the zbx_env directory for persistent data
The engineer creates the zbx_env directory on the Docker host and confirms that the Compose setup maps its subdirectories to the containers that need persistent data. Persistent storage keeps database files, alert scripts and external check data across container restarts and image upgrades. Set ownership and permissions so the container users can write to the mapped paths, and place the directory on storage covered by your backup policy. Done when the directory exists on a volume with a recorded backup owner, and a test file written from inside a container is visible on the host.
Select the database and check its version
The engineer chooses the database engine, MySQL or Percona, MariaDB, PostgreSQL with or without TimescaleDB, and confirms that the planned version falls inside the range Zabbix 7.4 supports. The requirements page lists the supported ranges, for example PostgreSQL 13 to 18 and TimescaleDB 2.13 to 2.29 for that release, so check the version you plan to run against the page for your Zabbix version. If your target version differs from 7.4, confirm its ranges in the Zabbix requirements documentation. Done when the database image tag, the Zabbix version and the TimescaleDB version (if used) are written down together and each sits inside its supported range.
Generate the Compose project with the Makefile
The engineer runs the Makefile options that generate the Compose project for the chosen OS, database and profile, using the values fixed in the earlier steps. Review the generated files before starting anything, looking for the image tags, volume mappings and environment file references you set. Keep the generated output under version control so that later changes are reviewable. Done when the generated Compose configuration validates and matches the decisions recorded in the previous steps, with no tag or path that differs from the plan.
Start the stack and check the database connection
The engineer starts the database container first, waits for it to report healthy, and then starts the server and frontend. Check the database logs for a successful initialization and confirm that the server container can open a connection to it using the credentials in its env_vars file. A server that starts but cannot reach the database will log connection errors and restart, so these logs are the first place to look. Done when the database accepts connections from the server container and the server logs show no repeated database errors.
Verify server, frontend and database connectivity
Finally, the engineer confirms that the frontend loads in a browser, logs in with the initial administrator account, and shows the server as available in the administration views. Then check that the frontend reaches the database and that the server processes start without errors in the container logs. Record the verified image tags and the check results so the team can compare them after the next upgrade. Done when the frontend login succeeds, the server reports as running, and the verification results are stored with the configuration files.
How the Compose components and persistent data connect
The diagram starts at the operator's .env file and per-component env_vars files, which set the image tag, base OS and database settings before any container starts. Those settings feed the Zabbix server, the web frontend and the database service, all on the internal Compose network. Optional components such as proxies or agents join through the same network. The persistent data directory, zbx_env, sits outside the containers so data survives image upgrades. Check that only the frontend crosses the trust boundary to users, and that the database is never published to them.
Compose services, env inputs, persistent data and the boundary to users.
Keeping persistent data and environment files safe
The zbx_env directory is where the Compose setup keeps data that must survive container rebuilds, so protecting it matters more than any single container setting. Treat it as the database and state layer of your Zabbix installation. Before you change an image tag, edit an environment file or rebuild a container, make a copy of zbx_env and of the database itself, taken while the stack is stopped or from a consistent database dump. Confirm with your own database team how that dump should be produced for the database engine you chose, and record where the copy is stored and who can read it. Backup frequency and retention should come from your recovery requirements, not from a default in the Compose files.
The env_vars files carry component settings and credentials, including database passwords that the server, frontend and any proxies use to connect. Restrict them to the account that runs Docker, typically with owner-only read permissions, and verify the permissions after every deployment or copy, because files created by an automation tool often inherit broader defaults. Keep the .env file and the env_vars files out of version control, and commit only sanitized examples with placeholder values. If a secret reaches a repository, rotate it in the database and in every env_vars file that uses it, then review the history of the repository before you reuse it. Secret stores and vault integrations are a separate design question that your team should decide before scale-out.
A backup you have never restored is an assumption. Schedule a restore test into a separate environment at least once for each new stack, and again after any change to the database engine, the image tag or the directory layout. The test should bring up the containers against the restored data, log in with a known account, confirm that hosts, items and recent history are present, and check that the server starts without schema errors. Write down the time the restore took and the steps that needed manual intervention, so the next restore is predictable. Ask your administrators to confirm that the restore procedure works with your current permissions model and that no secret was left in a plain-text file on the test system.
Security and operational considerations for containerized Zabbix
A Compose deployment puts the server, frontend, database and secrets in one place, so a weak choice in any one of them affects the whole monitoring stack. The cards below cover the controls that most often decide whether the setup stays safe and recoverable after the first day. Use them as a review checklist before go-live and again before each upgrade.
Pin image tags and scan images
Zabbix image tags follow the pattern zabbix/<image>:<os>-<version>, and the tag latest without an OS prefix means Alpine. Pinning a full version tag, such as one from the <os>-X.X.* family, keeps a restart or redeploy from pulling a different release without a planned change. Record the exact tag in your change log and scan each pulled image with the scanner your security team already uses. Confirm with your team how often base-image rebuilds are pulled and who approves them.
Protect env_vars and .env secrets
The Compose setup reads a .env file and per-component env_vars files that hold database credentials and admin settings. Keep these files out of version control, set restrictive file permissions on the host, and limit who can read the directory that contains the zbx_env persistent data. Rotate the database and Zabbix passwords after any staff change and when a file is copied to a workstation. Ask your secrets owner whether a vault or Docker secrets fits your change process better than plain files.
Restrict exposed ports on frontend and database
Only the web frontend and, where agents or proxies must reach it, the server trapper port should be published to the network. The database port should stay on an internal Compose network with no host binding, so it is reachable only by the Zabbix server and frontend containers. Review the ports section of the Compose file during each change and confirm with a port scan from outside the monitoring segment. Put the frontend behind TLS termination that your team controls.
Choose the authentication method
Zabbix supports internal, HTTP, LDAP, SAML and MFA authentication. Just-in-time provisioning can create Zabbix user accounts on first login through LDAP or SAML, which removes manual account setup but also means group mapping must be right before go-live. Decide which accounts stay internal, such as a break-glass admin, and document how that account is protected. Confirm which MFA method your identity provider supports for the frontend login flow in your version.
Zabbix authentication docsTest backup and restore regularly
A backup of the database volume is only useful if a restore has been run on a separate host. Back up the database with its native dump or snapshot tool, and copy the zbx_env persistent data alongside it so configuration and file-based state are captured together. Schedule a restore into an isolated Compose project at a set interval and check that the server starts, the frontend logs in and recent history is present. Record the time the restore took so the recovery estimate is based on measurement, not assumption.
Monitor the Zabbix server's own health
A monitoring server that fails silently leaves the rest of the estate unwatched. Enable the internal items that report server process usage and queue length, and create a trigger on the queue and on the database connection state. Send these alerts through a path that does not depend on the Zabbix server itself, such as an external probe or a second instance. Confirm which internal items your version exposes before you build triggers on them.
Questions buyers ask about running Zabbix with Docker Compose
What drives the cost of running Zabbix with Docker Compose in-house versus with a partner?
The main cost driver is the time your engineers spend on work that is not visible in the first install: choosing the image tags and base OS, designing persistent storage and backups, wiring the database and TLS, testing upgrades, and keeping the stack current. An in-house build costs salaried hours, plus the risk of rework if the first design does not survive an upgrade. A partner build is paid for by the written scope, so the quote should list the components (server, frontend, database, proxies, optional components), the environments (test and production), the hardening and backup work, and the handover documentation. Ask whether each item is one-time work or a recurring retainer for upgrades and support, and whether the quote covers testing of a version upgrade.
How long does Zabbix Compose setup and hardening take?
Duration depends on scope more than on the Compose file itself. A single-host test stack with default settings is a small job, while a production stack with external database, persistent volumes on your storage, identity integration, backups, monitoring of Zabbix itself and a documented upgrade procedure takes considerably longer. The factors that stretch the timeline are waiting on network and DNS changes, database sizing decisions, approvals for change windows and the number of proxies or optional components. DeployOpen does not publish durations; the timeline is agreed in writing as part of a fixed-scope engagement once those factors are known. Ask for the scope list, the dependencies on your side and the acceptance tests before you sign.
What must our team provide before a Zabbix Compose deployment starts?
Your team provides the infrastructure and the decisions that only you can make. That usually includes:
- A Docker host or hosts with supported OS, sized CPU, memory and disk, and access to your image registry or a mirror
- A database platform you approve, such as MySQL, MariaDB, PostgreSQL or TimescaleDB, with a named owner and backup policy
- Identity decisions for the frontend, such as LDAP or SAML, and the group mapping that just-in-time provisioning would need
- Backup storage, retention rules and a restore test owner
- Change windows for upgrades, DNS and certificate records, and access for the people who will operate the stack
Ask the partner to list each dependency in the written scope so that delays are visible early.
Can one engineer deploy and run Zabbix with Docker Compose alone?
A single capable engineer can deploy a small Zabbix stack alone, especially if the environment is a test lab or a single monitored site. Production use is different because the stack depends on several disciplines at once: container runtime, database administration, backup and restore, TLS and identity, and monitoring Zabbix itself. The risk is key-person dependency, since upgrades and incidents usually happen when that engineer is unavailable. Before deciding, check whether two people can restore the database, run an upgrade in a non-production copy and read the logs. If not, a partner can implement the stack and document it, or provide a retainer for upgrades and support.
Is Docker Compose suitable for a highly available Zabbix server?
Compose on a single host does not provide high availability for the Zabbix server by itself, because a host failure stops the stack. Zabbix has its own server high availability model, where several server nodes share one database, one node is active and the others stand by, and failover happens after a configurable failover delay between 10 seconds and 15 minutes. Achieving that across hosts requires planning the database availability, shared configuration, node placement and health checks, which is a different design from a single Compose file. Use Compose for a clear single-node or test deployment, and confirm the HA design against Zabbix's high availability documentation before you promise it to users.
How do we test a Zabbix upgrade by changing the image tag?
Changing the image tag in your environment file is the easy part; the test is whether the new version starts, migrates the database, and keeps your templates, proxies and integrations working. Pin the tag to a specific version rather than relying on latest, because the latest tag without an OS prefix means Alpine and can change under you. Run the upgrade first against a copy of production data with the same database engine, check the Zabbix release notes for the target version, verify the frontend login, data collection, alerting and proxy connections, and keep a tested database backup from before the change. Zabbix life cycle dates help you choose the target line; the 7.0 LTS line has full support until 30 June 2027, so confirm the planned path with your team before each upgrade.
What does a fixed-scope Zabbix Compose engagement with DeployOpen cover?
A DeployOpen engagement is fixed-scope, so the scope, deliverables and timelines are agreed in writing before work starts. For this topic the scope would normally name the target OS and image tag policy, the database and persistent data layout, the environment file and per-component settings, the backup and restore test, the upgrade procedure with a test run, and the handover documentation. Ongoing upgrades, support and continuous testing are available as retainers. Ask for the written scope to show what is excluded, such as Zabbix server high availability, custom templates or identity integration, so that you can decide whether those belong in a separate scope.
Official Zabbix container and requirements documentation
Before you write a Compose file, read the official container installation guide. It covers the image tags, environment variables and volume layout that the Zabbix containers expect, and it is the reference your Compose file should be checked against at every upgrade. Use Zabbix installation from containers as the starting point, and record the exact version, base OS and database image you select in your change record so the next engineer can reproduce the stack.
Next, check the requirements page for the database you plan to run. The supported versions differ by engine and by Zabbix release, and the list changes between major lines, so confirm the database image tag against the requirements for your target Zabbix version rather than the one you used last time. If you plan to use TimescaleDB, confirm the extension version as well. Keep this check in your upgrade checklist, because a database that was supported at install time can fall outside the list after a Zabbix upgrade. Review Zabbix requirements before you pin any image.
Finally, read the high availability page before you commit to a single-host Compose stack. A Compose project runs on one Docker host, so it gives you no server failover. If the monitoring must keep working through a host failure, the native server cluster needs several server nodes sharing one database, which a single-host Compose design cannot provide on its own. Confirm your availability target with the people who own the monitored services, and decide early whether one host with tested backups is acceptable. See Zabbix high availability for the failover model.
How DeployOpen scopes, builds and supports Zabbix on Compose
DeployOpen plans and runs Zabbix Compose deployments inside the client's own infrastructure, from image tag and base OS selection through persistent data and upgrades. Each engagement starts from a written scope, so the team, the platform owners and the reviewers agree on what is built, tested and handed over before work begins.
How we scope
- Confirm the Zabbix version line, image tags and base OS against your support lifecycle and upgrade plan.
- Map which components run in Compose, such as server, frontend, database and any proxies or optional services.
- Agree in writing how persistent data, environment files and secrets are stored, backed up and restored.
How we build
- Configure the Compose project with the official images, environment files and the persistent data directory layout.
- Test server, frontend and database connectivity, then run a rehearsed upgrade by tag in a non-production copy.
- Document the image pinning rules, resource settings and network exposure so reviewers can trace each choice.
How we hand over
- Deliver the Compose files, environment templates, runbooks and the test results agreed in the scope.
- Walk your operations and security teams through backup, restore, upgrade and rollback procedures.
- Provide a record of the configuration decisions so auditors and internal reviewers can check them independently.
How we support
- Offer ongoing support, version upgrades and continuous testing as a retainer, scoped separately from the build.
- Plan each upgrade against the Zabbix release and support dates published by the vendor, then retest.
- Ask your Zabbix vendor or support provider to confirm subscription tier and response times for production incidents.

