How to Install Zammad on AlmaLinux 9 or Rocky Linux 9
Set up the Zammad ticket system on AlmaLinux 9 or Rocky Linux 9 from the official packages, with Elasticsearch, Nginx, HTTPS and the first-run wizard.
This guide installs the Zammad help desk and ticketing system from the project's official packages on AlmaLinux 9 or Rocky Linux 9, together with Elasticsearch for search, and publishes it at https://zammad.example.com through Nginx. The same packages exist for RHEL 10 compatible systems, Debian 11 to 13 and Ubuntu 22.04 to 26.04; the differences are noted where they matter.
Zammad 2.0 and CentOS 7 are both long out of support: CentOS 7 reached end of life in June 2024, and Zammad is now in its 7.x series with different requirements. In particular, PostgreSQL is the only database listed as supported, and Redis has become mandatory.
Requirements
- A fresh AlmaLinux 9 or Rocky Linux 9 server and a user with
sudorights. Zammad's documentation gives 2 CPU cores and 6 GB of RAM as the minimum, plus 4 GB more when Elasticsearch runs on the same machine. - PostgreSQL 15 or newer and Redis 7 or newer. Both are pulled in as dependencies of the package, but see step 1 for the versions.
- Elasticsearch, which is optional but strongly recommended. Zammad 7.2 and later work with Elasticsearch 8.15 up to, but not including, 10; this guide installs the 9.x series.
- A DNS record such as
zammad.example.compointing to the server.
Step 1: Prepare the system
Install the tools the Zammad instructions ask for and enable EPEL:
sudo dnf install curl epel-release
Zammad needs a UTF-8 system locale. Check it and set one if the output does not end in .UTF-8 or .utf8:
localectl status | grep LANG
sudo localectl set-locale LANG=en_US.UTF-8
RHEL 9 compatible systems install PostgreSQL 13 and Redis 6.2 by default, which are older than Zammad requires. Newer versions are provided as module streams. List them and enable streams that meet the requirements before installing anything else:
dnf module list postgresql redis
sudo dnf module enable postgresql:16 redis:7
If your release offers different stream names, pick any PostgreSQL stream from 15 upwards and a Redis stream from 7 upwards.
Step 2: Install Elasticsearch
Elasticsearch has to be installed before Zammad. Import Elastic's signing key and add the 9.x repository:
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
sudo tee /etc/yum.repos.d/elasticsearch.repo <<'EOF'
[elasticsearch]
name=Elasticsearch repository for 9.x packages
baseurl=https://artifacts.elastic.co/packages/9.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
type=rpm-md
EOF
The repository is disabled by default so that a routine system update never upgrades Elasticsearch by accident. Enable it only for this installation:
sudo dnf install --enablerepo=elasticsearch elasticsearch
The installer prints a generated password for the built-in elastic superuser. Copy it; you need it in step 5. If you missed it, create a new one later with sudo /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic.
Zammad recommends raising the maximum request size so that large attachments can be indexed. Add this line to /etc/elasticsearch/elasticsearch.yml:
http.max_content_length: 400mb
Then start the service:
sudo systemctl enable elasticsearch.service --now
Step 3: Install Zammad
Import the package signing key and add the repository for RHEL 9 compatible systems (for a RHEL 10 compatible system, replace 9.repo with 10.repo):
sudo rpm --import https://go.packager.io/srv/rpm/zammad/zammad/gpg-key.asc
sudo curl -fsSL "https://go.packager.io/srv/zammad/zammad/stable/installer/el/9.repo" \
-o /etc/yum.repos.d/zammad.repo
Install the package. It brings in PostgreSQL, Redis and Nginx as dependencies, creates the database and installs Zammad to /opt/zammad:
sudo dnf update
sudo dnf install zammad
Read the output of the installation scripts to the end; errors there mean an incomplete setup. Then confirm the services are running and that the versions are the ones you expect:
sudo systemctl status zammad postgresql redis --no-pager
psql --version
The package repository host may not be reachable from IPv6-only servers.
Step 4: SELinux and firewall
With SELinux enforcing, Nginx needs permission to read Zammad's public files and to connect to the application:
sudo chcon -Rv --type=httpd_sys_content_t /opt/zammad/public/
sudo setsebool httpd_can_network_connect on -P
sudo semanage fcontext -a -t httpd_sys_content_t /opt/zammad/public/
sudo restorecon -Rv /opt/zammad/public/
sudo chmod -R a+r /opt/zammad/public/
Open the web ports:
sudo firewall-cmd --zone=public --add-service=http --permanent
sudo firewall-cmd --zone=public --add-service=https --permanent
sudo firewall-cmd --reload
Step 5: Connect Zammad to Elasticsearch
Tell Zammad where Elasticsearch is and which credentials to use. Replace <password> with the elastic password from step 2:
sudo zammad run rails r "Setting.set('es_url', 'https://localhost:9200')"
sudo zammad run rails r "Setting.set('es_user', 'elastic')"
sudo zammad run rails r "Setting.set('es_password', '<password>')"
Elasticsearch uses a self-signed certificate authority. On a new installation that has not been through the setup wizard yet, import its certificate into Zammad from the command line:
sudo cat /etc/elasticsearch/certs/http_ca.crt | sudo zammad run rails r 'SSLCertificate.create!(certificate: STDIN.read)'
Build the search index. On a new system this finishes quickly; on a large existing one it can take hours.
sudo zammad run rake zammad:searchindex:rebuild
Step 6: Configure Nginx and HTTPS
The package places a plain-HTTP virtual host named zammad.conf in the Nginx configuration directory, which is /etc/nginx/conf.d/ on RHEL-compatible systems. Zammad itself listens only on local ports (3000 for the application and 6042 for WebSockets) and must not be exposed directly.
Edit /etc/nginx/conf.d/zammad.conf, replace the server_name value with zammad.example.com, and reload Nginx:
sudo nginx -t
sudo systemctl reload nginx
Obtain a certificate with Certbot from EPEL. certonly fetches the certificate without rewriting the virtual host, because Zammad ships its own TLS configuration:
sudo dnf install certbot python3-certbot-nginx
sudo certbot certonly --nginx -d zammad.example.com
Replace the plain-HTTP virtual host with Zammad's TLS sample and create the Diffie-Hellman parameter file it refers to (this takes several minutes):
sudo cp /opt/zammad/contrib/nginx/zammad_ssl.conf /etc/nginx/conf.d/zammad.conf
sudo openssl dhparam -out /etc/ssl/dhparam.pem 4096
Edit /etc/nginx/conf.d/zammad.conf again: set server_name in both the port 80 and the port 443 block, and point the certificate directives to the files Certbot created:
ssl_certificate /etc/letsencrypt/live/zammad.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zammad.example.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/zammad.example.com/chain.pem;
ssl_dhparam /etc/ssl/dhparam.pem;
sudo nginx -t
sudo systemctl reload nginx
Step 7: Run the setup wizard
Open https://zammad.example.com. The Getting Started wizard creates the first administrator (the password needs at least 10 characters with two uppercase letters, two lowercase letters and a digit), asks for your organisation name and logo, confirms the system URL, and lets you choose how notifications are sent and optionally connect a first mailbox. You are logged in when it finishes.
If you see the default Nginx page instead, another virtual host such as default.conf is taking precedence; disable it and reload Nginx. CSRF token errors behind a further proxy usually mean the X-Forwarded-Proto header is not set to https.
Updating Zammad
Stop Zammad, take a backup, then update the system in two passes so that a database server update cannot interrupt Zammad's own migration:
sudo systemctl stop zammad
sudo dnf upgrade --exclude zammad
sudo dnf upgrade
Check the release notes for extra steps, and rebuild the search index only when they ask for it. Elasticsearch is not touched by these commands because its repository is disabled; upgrade it deliberately and stay within the range Zammad supports.
Frequently asked questions
Can I still run Zammad on MySQL or MariaDB?
Zammad's current software requirements list PostgreSQL 15 or newer as the supported database and do not mention MySQL or MariaDB. An old installation on MySQL has to be migrated to PostgreSQL before it can follow current releases.
Does Zammad work without Elasticsearch?
It starts and handles tickets, since Elasticsearch is not a hard dependency, but search is limited and slow and some reporting features depend on it. On a small server you can cap the Elasticsearch heap size instead of leaving it out, which the documentation describes as a workaround rather than a recommendation.
What changes on Debian or Ubuntu?
Install curl apt-transport-https gnupg, download the key to /usr/share/keyrings/zammad.gpg and the matching .list file for your release to /etc/apt/sources.list.d/zammad.list, then run sudo apt update && sudo apt install zammad. The exact URLs for each release are in the Zammad package installation guide. The firewall is managed with ufw there.
Is there a container deployment?
Yes. For distributions without packages, the documentation points to Docker Compose and Kubernetes deployments. Those need Memcached in addition to the services used here.