Skip to content
🧮 Is Lifetime with ZapX Pass worth it? Work it out for your own servers in 30 seconds. Open the Lifetime calculator →

Set Up Zammad on a Linux Server – Helpdesk and Ticketing System for Your Support Team

Set up Zammad as a One-Click App or with Docker Compose on your VPS, and manage your team’s emails and requests as tickets.

2 December 202611 min read2 Views0 helpful

Introduction

Zammad is an open-source helpdesk and ticketing system. Requests from email, web forms, phone, and chat become tickets in one place. Your team can work on them together, and every reply remains visible in the ticket history. Zammad also includes groups and roles, text snippets, triggers for automatic replies, SLAs, a knowledge base, and full-text search across all tickets.

In this guide, we’ll show you two ways to get started: the easy way with a One-Click App, which gets Zammad running with its database, search index, and admin account in just a few minutes, and a manual installation with Docker Compose. Then you’ll learn how to connect your support inbox so incoming emails become tickets.

When It Makes Sense to Run Zammad on a VPS

Running your own Zammad instance makes sense if:

  • Several people need to share an inbox such as support@ or info@, and you’ve lost track of who replied to which email.
  • You want requests from multiple channels to come together, for example email and a contact form on your website.
  • You want to automate workflows, such as confirmations, assigning tickets to groups, or escalating them after a set amount of time.
  • You want to keep customer data in your control rather than with a SaaS provider, for example for privacy reasons.
  • You want to maintain a knowledge base for frequently asked questions right alongside your tickets.

Zammad is less suitable for very small servers: the stack consists of several services, including Elasticsearch for search, and needs at least 6 GB of RAM. If you’re the only person reading one inbox, a regular email program is enough.

Easy Option: Zammad as a One-Click App

With your VPS’s One-Click Apps, you can launch Zammad with all the services it needs: Rails server, scheduler, WebSocket, nginx, PostgreSQL, Redis, Memcached, and Elasticsearch. ZapX sets up your domain and HTTPS for you. During installation, the app creates the admin account using your details, so Zammad’s setup wizard is closed from the start.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See VPS: One-Click Apps for instructions.
  • At least 6 GB RAM, 2 vCPU cores, and 10 GB storage. We recommend 10 GB RAM, 4 vCPU cores, and 30 GB storage, especially if multiple agents work at the same time or you store many attachments.
  • An address for Zammad: either a free subdomain on zap.cloud or your own domain.
Info: Why Zammad needs so much RAM

Elasticsearch alone reserves 1 GB of RAM for the search index. The Rails server, background services, and database need additional memory. If your VPS has less than the recommended amount, the installation form will display a notice. You can still install the app, but it will run more slowly.

Install

  1. Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
  2. Search for “Zammad” in the App catalog and click Install app for Zammad.
  3. Enter a name under App name and, under Use a custom subdomain or zap.cloud, choose the address where Zammad should be available. Zammad will use HTTPS with a domain.
  4. Under App configuration, fill in the two required fields:
FieldMeaning
ADMIN_EMAILEmail address for the admin account, and your username for logging in
ADMIN_PASSWORDPassword for the admin account
  1. Click Queue installation.

The initial installation takes about 5 to 10 minutes: the server downloads the images, a setup container creates the database and search index, and your admin account is created. The web interface starts only after that, and the app’s status changes to Online.

Warning: Choose a secure password

The admin account is accessible over the internet. Use a long password with uppercase and lowercase letters and numbers, at least 10 characters long. This also meets the password requirements that Zammad checks when you change your password later.

First Login

Open Zammad using the app card’s Access link. Log in with the email address from ADMIN_EMAIL and the password from ADMIN_PASSWORD. If you’ve forgotten the values, you can find them in the app settings (gear icon) under App environment. These values are only used for the initial setup: changing them there later won’t change your password in Zammad. To change your password, do so directly in Zammad under Profile.

Your account has the Admin and Agent roles. Open the administration area using the gear icon in the lower-left corner. Here are three useful things to do first:

  1. Language and time zone: The interface uses your browser’s language. Change your own language under Profile and the system time zone under Settings > System > Base. The default is UTC.
  2. Branding: Under Settings > Branding, set the product name and logo shown on the login page and in emails. During setup, Zammad tries to find a logo that matches the domain in your admin email address. If it isn’t the right one, upload your own here.
  3. Groups and agents: Under Users, create accounts for your team. Under Groups, create groups such as “Support” and “Accounting.”
Info: Customers can register themselves

By default, the login page includes the Register as a new customer link. Anyone can use it to create a customer account and submit tickets through the web portal. To disable this, go to Settings > Security > Base and set New User Accounts to “no.” You’ll be the only one who can create agents and admins.

Set Up Email Notifications

Zammad won’t send emails right after installation. The Email Notification section contains a placeholder server (host.example.com) and a red error message. Until you change this, password reset emails, new customer confirmations, and notifications to agents won’t be delivered.

  1. Open the administration area (gear icon in the lower-left corner), then go to Channels > Email.
  2. In the Email Notification section, click Edit.
  3. Select SMTP and enter your email provider’s details: Host (for example, smtp.example.com), username, password, and Port 587.
  4. Click Continue. Zammad will test and save the connection.
Tip: Use port 587

On new VPSs, outgoing connections on ports 25 and 465 are blocked until you’ve verified a phone number in your account. Port 587 with STARTTLS is not affected and works right away.

To change the notification sender address (by default, noreply@ plus your domain), open the Settings tab on the same page and find Notification Sender. Use an address your email provider allows for your account; otherwise, the emails may end up in spam or be rejected.

Updates and Backups

  • Updates: Open the app settings (gear icon) > App update and click Check for updates. If a new version is available, install it with Apply update. Zammad adjusts the database on startup, so the first startup after an update takes a few minutes again.
  • Automatic backup: A dedicated backup service saves the database and files to the zammad-backup volume every day at 03:00 and keeps backups for 10 days. These backups are stored on the same VPS.
  • Create an additional backup: A backup of the VPS from the Backups tab includes all volumes, including postgresql-data (tickets, users, settings) and zammad-storage (attachments). Zammad can rebuild the search index in elasticsearch-data at any time.
  • Uninstall: Under App actions > Uninstall app, you can also delete the data volumes. This permanently removes all tickets, accounts, and backups.

Manual Installation

The rest of this guide covers the manual installation of Zammad with Docker Compose, for example on a server without One-Click Apps. You’ll use the official zammad-docker-compose repository, with nginx on the server making Zammad available over HTTPS.

Requirements

MinimumRecommended
CPU2 vCPU cores4 vCPU cores
RAM6 GB10 GB
Storage10 GB free30 GB

You’ll also need:

  • SSH access. See VPS: First access via SSH.
  • Docker with the Compose plugin, version 2.23.1 or later. See Set Up Docker on a Linux Server.
  • Git, for example, installed with sudo apt install -y git.
  • A domain with an A record pointing to your server, for example, helpdesk.example.com.

Elasticsearch needs a higher limit for memory-mapped areas. Set it permanently:

Code
echo "vm.max_map_count=262144" | sudo tee /etc/sysctl.d/99-zammad.conf
sudo sysctl --system

Prepare the Firewall

Only allow SSH, HTTP, and HTTPS from the outside:

Code
sudo apt install -y ufw
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

In the next step, you’ll bind Zammad to 127.0.0.1 only. This is important because Docker adds published ports to the firewall in a way that bypasses ufw. For more about ufw, see VPS: Open ports and manage the firewall on Linux.

Warning: Never leave the setup wizard open to the internet

A fresh manual installation displays a setup wizard on first access, where the first visitor can create the admin account. Bots often find new servers within minutes. Keep Zammad listening only locally and complete the wizard through an SSH tunnel before setting up the reverse proxy.

Install with Docker Compose

Download the repository and create the .env file:

Code
cd /opt
sudo git clone https://github.com/zammad/zammad-docker-compose.git zammad
cd /opt/zammad
openssl rand -hex 24

Create the file with sudo nano /opt/zammad/.env and insert the generated password:

Code
VERSION=7.3.0-0011
POSTGRES_PASS=DATENBANK_PASSWORT
NGINX_EXPOSE_PORT=127.0.0.1:8080
NGINX_SERVER_SCHEME=https
ZAMMAD_FQDN=helpdesk.example.com
ZAMMAD_HTTP_TYPE=https

Here’s what each line does:

  • VERSION sets the Zammad version. Without this line, the repository uses the version specified in its docker-compose.yml. Find the current version under Releases.
  • POSTGRES_PASS replaces the database’s default password, zammad.
  • NGINX_EXPOSE_PORT=127.0.0.1:8080 exposes Zammad only on the server itself, not on the internet.
  • NGINX_SERVER_SCHEME=https is required because your reverse proxy will handle HTTPS later. Without this line, login fails with “CSRF token verification failed.”
  • ZAMMAD_FQDN and ZAMMAD_HTTP_TYPE set the address Zammad uses in links and emails.

Start the stack:

Code
sudo docker compose up -d
sudo docker compose ps

The first startup takes a few minutes. It’s finished when zammad-nginx and zammad-railsserver show as healthy and zammad-init exits with code 0.

First Access

Open an SSH tunnel from your own computer:

Code
ssh -L 8080:127.0.0.1:8080 root@SERVER_IP

Then open http://localhost:8080 in your browser. The wizard guides you through setup: creating the admin account, setting your organization name and logo, configuring the system address, and optionally adding your first email account. Set up external access only after the admin account exists.

HTTPS Access Through a Reverse Proxy

Install nginx and create a server block for your domain, for example, /etc/nginx/sites-available/zammad:

Code
server {
    listen 80;
    server_name helpdesk.example.com;

    client_max_body_size 50M;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_read_timeout 300;
    }
}

Enable the site with sudo ln -s /etc/nginx/sites-available/zammad /etc/nginx/sites-enabled/, check it with sudo nginx -t, and reload nginx with sudo systemctl reload nginx. The Upgrade and Connection lines are required for live updates to the interface through WebSockets. Get the certificate with Certbot; see Set Up an SSL Certificate (Let's Encrypt) on a Linux Server. For more about nginx as a reverse proxy, see Set Up a Reverse Proxy with nginx.

Back Up Your Data

The zammad-backup service in the stack backs up the database and files to the zammad-backup volume every day at 03:00. To create a backup right away, run:

Code
cd /opt/zammad
sudo docker compose run --rm --env BACKUP_ONCE=true zammad-backup

Regularly copy your backups to another computer or storage location. Backups on the same server won’t protect you if the disk fails. Running docker compose down -v deletes all volumes, including the backups, so leave out -v.

Update Zammad

Before each update, read the notes in Releases, create a backup, and then set the new version:

Code
cd /opt/zammad
sudo git pull
sudo nano .env
sudo docker compose pull
sudo docker compose up -d

In .env, enter the new version for VERSION. Zammad applies database changes on startup and rebuilds the search index if necessary.

Connect Your Support Inbox to Zammad

To turn emails into tickets, connect an inbox as an email account. Zammad retrieves emails via IMAP and sends replies via SMTP through the same inbox.

  1. In the administration area, open Channels > Email and click New in the Accounts tab.
  2. Enter the Organization & Department Name (shown as the sender name), the Email address, and the inbox password.
  3. Select the Destination Group, where new tickets should go, for example “Users” or your “Support” group.
  4. Leave Change to channel email address selected for the sender address so replies from this group come from the support address.
  5. Click Connect. Zammad automatically detects the servers of well-known providers and sends test emails to finish setup.

If Zammad doesn’t detect the servers, click Experts and enter them manually: incoming IMAP on port 993 with SSL, and outgoing SMTP on port 587.

Warning: Zammad deletes retrieved emails from the inbox

By default, Zammad removes imported messages from the inbox, and sends an automatic confirmation for every imported email, including old ones. To keep the emails, set Keep messages on server to “yes” under Experts. If the inbox contains many old emails, use archive mode or disable automatic reply triggers first.

Limitations

  • No built-in mail server: Zammad doesn’t receive or send emails itself. It uses an existing inbox via IMAP and SMTP, so you need an email provider or your own mail server.
  • Microsoft 365 and Google: For Microsoft 365 or Gmail inboxes, Zammad uses dedicated channels with OAuth sign-in instead of a password. You’ll need to register an app with the relevant provider.
  • Resource use increases over time: Lots of attachments and a large search index need storage. Keep an eye on your VPS’s disk space and RAM as ticket volume grows.

Conclusion

With Zammad, you now bring emails and other requests from your support inbox together in a ticketing system that your team works on collaboratively. Next, Set Up BookStack on a Linux Server shows you how to give your team its own wiki for documentation and internal knowledge.

If you have any other questions or need help, our support team is available every day! 🙂

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

For most people, the One-Click App is the quicker option: all services, HTTPS, and the admin account are ready in a few minutes, the setup wizard is closed from the start, and you can install updates in the ZapX dashboard. Manual installation with Docker Compose makes sense if you’re running Zammad on a server without One-Click Apps, using your own reverse proxy, or want to set versions and options yourself in the .env file.
Plan for at least 6 GB RAM, 2 vCPU cores, and 10 GB storage. We recommend 10 GB RAM, 4 cores, and 30 GB storage. Elasticsearch alone reserves 1 GB for full-text search, with additional resources needed for the Rails server, background services, PostgreSQL, Redis, and Memcached. Zammad can start with less RAM, but it will respond slowly.
For the One-Click App, use the email address and password you entered during installation in ADMIN_EMAIL and ADMIN_PASSWORD. You can find both values in the app settings (gear icon) under App environment. For a manual installation, create the admin account in the setup wizard, preferably through an SSH tunnel before making Zammad accessible over the internet.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.