Welcome to our tutorial on how to install Zammad ticketing system on Debian 10. According to Zammad documentation page, “Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and emails”.
Read about Zammad Ticketing system features on its features page, link provided below.
Zammad Ticketing system features
Install Zammad Ticketing System on Debian 10
Prerequisites
There are a number of requirements that your system must meet (as of this writing) before you can install Zammad Ticketing system on Debian 10.
Software Requirements
- Ruby 2.6.6 for Zammad v3.4.1+: Zammad is written in Ruby and Java and hence Ruby is required.
- Relational Database Management systems (RDBMS) for storing content. The supported RDMS systems;
- MySQL 5.6+
- MariaDB 10.0+
- PostgreSQL 9.1+ (recommended and is supported by default).
- Reverse Proxy to deliver the static content of your application:
- Nginx 1.3+
- Apache 2.2+
- Elasticsearch (optional but highly recommended) to make search faster and to support advanced features like reports or searching by email attachment contents. Zammad v3.4+ is compatible with Elasticsearch 5.5–7.7.
Hardware Requirements
Please refer to Zammad hardware requirements page.
Install Zammad Ticketing System on Debian 10
Configure Locales in Debian
In this tutorial, we will be installing Zammad with PostgreSQL which is supported by default.
As such, if you are using PostgreSQL database backend, you need to enable UTF-8 locale.
To check if UTF-8 local is enabled, run the locale
command from terminal as shown below.
locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
If you do not see such a line from the above output;
LANG=en_US.UTF-8
The you need to generate and update the locales.
locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8
This will update the /etc/default/locale
file with the set LANG environment variable.
Install Elasticsearch on Debian
Zammad v3.4+ is compatible with Elasticsearch 5.5–7.7. Hence, let us install Elasticsearch 7.7 on Debian.
Install the Elasticsearch repository signing key;
apt install gnupg2 -y
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch --no-check-certificate | sudo apt-key add -
Install Elasticsearch repo;
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
Install Elasticsearch 7.7 on Debian;
apt update
apt install elasticsearch=7.7.1
Install Zammad Ticketing System on Debian 10
Install Zammad repo lists on Debian
wget -qO- https://dl.packager.io/srv/zammad/zammad/key | sudo apt-key add -
wget -O /etc/apt/sources.list.d/zammad.list https://dl.packager.io/srv/zammad/zammad/stable/installer/debian/10.repo
Update package cache;
apt update
Next, install Zammad ticketing system on Debian 10 and all the other required packages.
The command below installs Zammad 3.6.0, which is the current stable release as of this writing?
apt install zammad
As the installation completes, you will see such an output;
...
# Starting Zammad
# Creating webserver bootstart
Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nginx
# Restarting webserver nginx
####################################################################################
Add your fully qualified domain name or public IP to servername directive of
nginx, if this installation is done on a remote server. You have to change:
/etc/nginx/sites-available/zammad.conf and restart nginx process.
Otherwise just open http://localhost/ in your browser to start using Zammad.
####################################################################################
...
Managing Zammad Services
Zammad
systemctl status zammad systemctl stop zammad systemctl start zammad systemctl restart zammad systemctl enable zammad
Only web application server
systemctl status zammad-web systemctl stop zammad-web systemctl start zammad-web systemctl restart zammad-web
Only worker process
systemctl status zammad-worker systemctl stop zammad-worker systemctl start zammad-worker systemctl restart zammad-worker
Only websocket server
systemctl status zammad-websocket systemctl stop zammad-websocket systemctl start zammad-websocket systemctl restart zammad-websocket
Configure Elasticsearch for Zammad
Next, configure Elasticsearch search engine for Zammad.
Running Elasticsearch
We have already installed Elasticsearch 7.7.1. Thus, you can start and enable it to run on system boot by running the command below;
systemctl enable --now elasticsearch
Elasticsearch is now running with the default settings.
You can verify by running the command below;
curl localhost:9200
{
"name" : "debian",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "jNyydGm3TjSaaRp1EcvCxg",
"version" : {
"number" : "7.7.1",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "ad56dce891c901a492bb1ee393f12dfff473a423",
"build_date" : "2020-05-28T16:30:01.040088Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Install Elasticsearch Ingest Plugin
The ingest plugin extends Elasticsearch by providing additional ingest node capabilities.
To install the plugin, run the command below;
/usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
-> Installing ingest-attachment
-> Downloading ingest-attachment from elastic
[=================================================] 100%
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessClassInPackage.sun.java2d.cmm.kcms
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.security.SecurityPermission createAccessControlContext
* java.security.SecurityPermission insertProvider
* java.security.SecurityPermission putProviderProperty.BC
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
Continue with installation? [y/N]y
-> Installed ingest-attachment
Tune Elasticsearch
Increase the virtual memory map count;
echo vm.max_map_count=262144 >> /etc/sysctl.conf
sysctl -p
Increase the maximum size of an HTTP request body (default is 100MB).
echo "http.max_content_length: 400mb" >> /etc/elasticsearch/elasticsearch.yml
Restart Elasticsearch
systemctl restart elasticsearch
Configure Zammad to use Elasticsearch
Run the command below to define Zammad Elasticsearch URL, rebuild index, adjust the index namespacing as well as the file attachment indexing rules.
zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
zammad run rake searchindex:rebuild
zammad run rails r "Setting.set('es_attachment_ignore', [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ] )"
zammad run rails r "Setting.set('es_attachment_max_size_in_mb', 50)"
Install Postfix for Zammad Email Notifications
To have Zammad deliver email notifications, you can install postfix;
apt install postfix
Accessing Zammad Interface
To access Zammad web interface, you need to update some few Nginx web server configurations.
Actually, the only change we can make is to make the site available and accessible from outside by changing the value of the server_name to your resolvable fully qualified domain name;
vim /etc/nginx/sites-available/zammad.conf
server {
listen 80;
# replace 'localhost' with your fqdn if you want to use zammad from remote
#server_name localhost;
server_name helpdesk.kifarunix-demo.com;
...
Save the file and exit.
Check Nginx syntax and restart it if all is well;
nginx -t
systemctl restart nginx
You can now access Zammad Web interface by navigating to the URL, http://<server-domain>
.
You will be welcomed by Zammad setup page;
Click on Setup new system to proceed.
Setup Zammad Administrator account.
Next, set you organization name, logo and the zammad url;
Configure Email notification settings. We use Gmail relay in our case.
Also, allow less secure app access prior to clicking Continue.
You can setup the Zammad comms channels. Click Email to setup email communication channel.

Once you have set your Zammad comms channel, you can choose to invite colleagues.
Once you are done with setup, you should land on the dashboard.
And that is all on how to install Zammad Ticketing System on Debian 10.
You can continue with the setup in order to fully use the Zammad ticketing system.
Reference
Other Tutorials
Install Zammad Ticketing System on Ubuntu 20.04
Install Request Tracker (RT) with MariaDB on CentOS 8
Configure Request Tracker (RT) to send Mails using MSMTP via Office 365 Relay