How to Install Zammad on VPS with Docker: Helpdesk Tickets from Email

Support mail has a habit of ending up where it is hardest to track: somebody's personal inbox. One person replies from their phone, another from a laptop, and nobody can say whether a message was handled or not. With a team of one, that is merely untidy. With three people, it breaks down fast — the same ticket gets answered twice, the hard questions sink, and a waiting customer has no reference number to ask about.

Zammad fixes that with a simple idea: every incoming email becomes one trackable ticket. The ticket carries a status, a priority, an owner, and the full conversation history. Agents work from one shared queue instead of their own inboxes. This guide installs Zammad on a VPS with Docker Compose using the project's official repository, connects it to a support mailbox, sets up agents and groups, and adds one automation trigger.

Before you start: what you need

  • A VPS with Docker and Docker Compose v2 installed, and at least 4 GB of RAM. Zammad runs several containers at once (the app, PostgreSQL, Elasticsearch, Redis, and Memcached), so a tiny VPS will feel cramped.
  • One dedicated support mailbox, such as support@yourdomain.com. Do not use a personal mailbox or the company's main mailbox for this step — the email step below explains why.
  • Port 8080 free on the VPS for the initial Zammad access.
  • A domain name if you want HTTPS access later. For the first install, the VPS IP address is enough.

Check Docker and Compose first:

docker --version
docker compose version

Expected output: both commands print a version number with no error.

Step 1: prepare the host for Elasticsearch

Zammad uses Elasticsearch for search, and Elasticsearch requires one kernel setting on the host. Run this on the VPS:

sudo sysctl -w vm.max_map_count=262144

Expected output: the terminal prints vm.max_map_count = 262144 with no error.

A value set with sysctl -w does not survive a reboot. To make it permanent, write it to a sysctl configuration file, for example /etc/sysctl.d/99-zammad-elasticsearch.conf, containing this single line:

vm.max_map_count=262144

Then reload it with sudo sysctl -p /etc/sysctl.d/99-zammad-elasticsearch.conf. This step looks trivial, but it is the most common reason a Zammad install fails to start: without this value, the Elasticsearch container exits over and over.

Step 2: clone Zammad's official Docker Compose repository

The official Zammad documentation does not ask you to hand-write a Compose file. The project ships a zammad-docker-compose repository containing the whole stack, and that is what this guide uses. Clone it onto the VPS:

git clone https://github.com/zammad/zammad-docker-compose.git
cd zammad-docker-compose

Expected output: the zammad-docker-compose folder contains docker-compose.yml and its supporting files. This is also why this guide shows no home-made copy of the Compose file: the official stack is maintained by the Zammad team, and a rewritten copy risks falling behind their changes.

One honest note from the official docs: Zammad's support for a Docker install covers the Zammad application itself, not Docker- or Compose-specific problems. If something looks wrong at the container layer, the container logs are the first place to look, not the application support forum.

Step 3: start the stack

From inside the zammad-docker-compose folder, run:

docker compose up -d

Expected output: Docker pulls the required images, then the containers run in the background. Check their status with:

docker compose ps

Expected output: every service reports as running. Do not panic if Zammad does not open within the first minute. The first initialization — creating the database schema, seeding initial data, and building the Elasticsearch index — takes a few minutes. Watch it through the logs if needed:

docker compose logs -f zammad-railsserver

Press Ctrl+C to leave the log view; the containers keep running in the background.

Once the stack is ready, open Zammad in a browser at the following address, replacing YOUR-VPS-IP with your VPS address:

http://YOUR-VPS-IP:8080/

Expected output: Zammad's initial setup wizard appears. Follow it: create the administrator account, fill in the organization name, and finish its steps. This administrator account is the one you will use to configure the email channel, groups, and agents.

Step 4: connect the support mailbox

This is the step that turns Zammad from a merely installed app into a working helpdesk. In the admin panel, open the email channel and add your support account. Zammad asks for inbound and outbound settings:

  • Inbound: IMAP is the sensible choice in almost every case. The usual port is 993 for IMAP with encryption. Enter your mail server host, username, and the password of the support account.
  • Outbound: SMTP, usually on port 587 or 465, depending on your mail provider's setup.
  • Destination group: pick the group that should receive tickets from this address. Tickets from support mail must not land in the wrong group, because the group decides who sees and handles them.

Two default Zammad behaviors must be understood before you press save. First, Zammad deletes emails from the inbox during import by default. Second, Zammad sends an auto-reply to every email it imports, including old ones. Both can be changed through the Experts dialog during account setup — for example, to keep messages on the server — but both are strong reasons to use a dedicated support mailbox rather than a personal mailbox holding an important archive.

Finally, Zammad verifies the account by sending a test email from the account itself, then waiting for that email to show up in the folder it fetches from. Setup is not complete until that test message arrives. If verification hangs, check the selected fetch folder and confirm that both the IMAP and SMTP credentials are correct.

Step 5: create groups and add agents

Tickets with no clear owner become a wild queue again, only now in digital form. Build a minimal structure before opening the service to customers:

  • In the admin panel, create one group per real support area in your team, for example General Support and Technical. One group for everything is fine at first, but splitting early is far easier than moving hundreds of tickets later.
  • Add agents through user management, then place each agent in the groups that match their work.
  • Send one test email to the support address. The ticket should appear in the group you set in step 4, and agents in that group should be able to see it.

Expected output: the test email becomes a single open ticket, with the email content as its first article. An agent can reply from inside the ticket, and the reply goes out through the support address, not the agent's personal address.

Step 6: add one automation trigger

A trigger in Zammad is an “if this, then that” rule that runs when a ticket is updated. Zammad ships with one active trigger by default: an auto-reply sent to the customer after a new ticket is created. You can disable it, change it, or leave it alone. For a first step, create one more trigger that is useful and easy to test — a group notification when a high-priority ticket is created:

  • In the admin panel, open Manage > Trigger and create a new trigger.
  • Set an action-based activator, the condition priority is high, and an action that sends a notification email to the relevant group.
  • Save it, then create a high-priority test ticket and check that the notification arrives.

Three things worth remembering about triggers. First, triggers are evaluated in alphabetical order of their names, so name them in a way that makes the order sensible. Second, an action-based trigger only runs when a ticket is updated through the Update button, not on changes that need no ticket update. Third, if a trigger sends email, the group involved must have an email address configured — without one, Zammad skips that trigger entirely.

Step 7: secure access with HTTPS

The install above runs over HTTP on port 8080, which is fine for initial setup on a network you control. For use over the internet, Zammad must be secured with HTTPS. The official documentation suggests two approaches that leave the Zammad stack untouched: a reverse proxy such as Nginx Proxy Manager (which offers Let's Encrypt integration through a graphical interface), or a Cloudflare Tunnel for SSL termination. Pick one, point your domain at it, and make sure the address agents and customers use is the final HTTPS address, not the raw IP with port 8080.

Updates and maintenance

This stack is updated through the same repository. Check the Zammad Docker Compose release notes first, because stack updates sometimes need extra steps or introduce breaking changes. Then, from inside the zammad-docker-compose folder, run:

git pull
docker compose pull
docker compose up -d

Expected output: the newest images are downloaded and the containers restart on the new version. Backup and restore for a Docker install differs from a package install, so before a major update, read the official Backup & Restore (Docker) documentation page and make sure you hold a copy of the data you can restore from.

Troubleshooting: the most common failures

The Elasticsearch container keeps restarting. The usual cause is vm.max_map_count not being set on the host. Repeat step 1, confirm the value is 262144, then run docker compose up -d again.

Zammad does not open after up -d, even though the containers run. The first initialization takes a few minutes. Check the logs with docker compose logs -f zammad-railsserver and wait until initialization activity stops. If port 8080 is already taken by another application, stop that application or change the port mapping in the stack configuration.

Old emails vanished after the channel was added. That is the default import behavior: imported messages are deleted from the inbox. For the next install, always use a dedicated support mailbox, and set the message-retention option through the Experts dialog before adding the account.

Long-time customers received an unexpected auto-reply. Zammad auto-replies to every imported email, including old ones. Disable or adjust the auto-reply through the Experts dialog before connecting a mailbox that holds an old archive.

Email account verification never finishes. Zammad waits for its own test email to appear in the fetch folder. Check the chosen folder, the IMAP/SMTP credentials, and whether any provider-side rule moves the test message elsewhere.

A trigger sends no email. Check two things: whether the group has an email address configured, and whether the ticket was actually updated through the Update button. Action-based triggers do not run for changes that need no ticket update.

Summary table

ComponentDetail
Install methodClone the official zammad-docker-compose repo, then docker compose up -d
Minimum RAM4 GB
Required host settingvm.max_map_count=262144 for Elasticsearch
Initial accesshttp://YOUR-VPS-IP:8080/
Inbound mailIMAP (usually port 993)
Outbound mailSMTP (usually port 587 or 465)
Default import behaviorEmails deleted from the inbox; auto-reply sent to every imported email
AutomationTriggers under Manage > Trigger, evaluated in alphabetical name order
HTTPSReverse proxy (e.g. Nginx Proxy Manager) or Cloudflare Tunnel
Updatesgit pull, check release notes, docker compose pull, docker compose up -d

Final checklist

  • vm.max_map_count is 262144 and stored permanently in the sysctl configuration.
  • The full stack runs, confirmed with docker compose ps.
  • The initial setup wizard is complete and the administrator account exists.
  • The support email channel is connected and verified, using a dedicated mailbox.
  • Groups and agents are created; a test email becomes a ticket in the right group.
  • One trigger is tested and its notification actually arrives.
  • Internet access uses HTTPS, not raw HTTP on port 8080.

One question for you: which support channel is the messiest in your team right now — email, chat, or messages arriving through a web form? Tell us in the comments, because that channel is the one most worth connecting to Zammad first.

Read also: the companion guide for teams whose internal notes are just as scattered is at https://blog.rnevio.com/2026/11/how-to-install-joplin-server-on-vps.html — a self-hosted Joplin Server for syncing notes across devices. If you still need an HTTPS reverse proxy in front of Zammad, the Rnevio article “How to Install Nginx Proxy Manager on VPS with Docker: Reverse Proxy and Automatic SSL from the Web UI” covers that path through a graphical interface.

Diskusi

Ada pertanyaan atau pengalaman yang ingin dibagikan?

0komentar

Komentar ditinjau sebelum ditampilkan. Mari berdiskusi dengan sopan dan sesuai topik.