Package Installation¶
This section describes the basic package installation of Zammad. If these manual steps aren’t what you are looking for, consider a hosted Zammad setup or deploy Zammad via Docker.
Prerequisites¶
Before performing the following steps, make sure to meet Zammad’s software requirements.
1. Install Required Tools¶
In addition to already mentioned software dependencies, some operating systems may require additional packages if not already installed.
$ sudo apt install curl apt-transport-https gnupg
SLES 15 requires additional repositories to be activated. To do so, run the following commands.
$ sudo SUSEConnect --product sle-module-desktop-applications/$(. /etc/os-release; echo $VERSION_ID)/$(uname -i)
$ sudo SUSEConnect --product PackageHub/$(. /etc/os-release; echo $VERSION_ID)/$(uname -i)
$ sudo yum install wget epel-release
1. Install Elasticsearch¶
Elasticsearch is not a hard dependency of Zammad, but strongly recommended! It needs to be installed before Zammad. Please take a look at the instructions first.
3. Ensure Correct Locale¶
To make Zammad work correctly, your system has to use the correct locales.
List your current locale settings.
$ locale | grep "LANG="
If above does not return <lang_code>.utf8
you can correct this issue as follows.
$ sudo apt install locales
$ sudo locale-gen en_US.UTF-8
$ echo "LANG=en_US.UTF-8" > sudo /etc/default/locale
List your current locale settings.
$ localectl status | grep LANG
If above does not return <lang_code>.utf8
you can correct this issue as follows.
$ sudo localectl set-locale LANG=en_US.UTF-8
Hint
By default OpenSUSE uses POSIX
as LANG
value for the root
user. Learn more about this within the OpenSUSE documentation.
This does not affect other users and thus can be ignored.
List your current locale settings.
$ locale | grep "LANG="
If above does not return <lang_code>.utf8
you can correct this issue as follows.
$ sudo localectl set-locale LANG=en_US.UTF-8
Add Repository and Install Zammad¶
Hint
Packager.io may not be accessible from IPv6-only environments, so make sure to consider this when performing the steps below.
Add Repository¶
- Install Repository Key
$ curl -fsSL https://dl.packager.io/srv/zammad/zammad/key | \ gpg --dearmor | sudo tee /etc/apt/keyrings/pkgr-zammad.gpg> /dev/null
- Ubuntu 20.04
$ echo "deb [signed-by=/etc/apt/keyrings/pkgr-zammad.gpg] https://dl.packager.io/srv/deb/zammad/zammad/stable/ubuntu 20.04 main"| \ sudo tee /etc/apt/sources.list.d/zammad.list > /dev/null
- Ubuntu 22.04
$ echo "deb [signed-by=/etc/apt/keyrings/pkgr-zammad.gpg] https://dl.packager.io/srv/deb/zammad/zammad/stable/ubuntu 22.04 main"| \ sudo tee /etc/apt/sources.list.d/zammad.list > /dev/null
- Ubuntu 24.04
$ echo "deb [signed-by=/etc/apt/keyrings/pkgr-zammad.gpg] https://dl.packager.io/srv/deb/zammad/zammad/stable/ubuntu 24.04 main"| \ sudo tee /etc/apt/sources.list.d/zammad.list > /dev/null
- Install Repository Key
$ curl -fsSL https://dl.packager.io/srv/zammad/zammad/key | \ gpg --dearmor | sudo tee /etc/apt/keyrings/pkgr-zammad.gpg> /dev/null
- Debian 11
$ echo "deb [signed-by=/etc/apt/keyrings/pkgr-zammad.gpg] https://dl.packager.io/srv/deb/zammad/zammad/stable/debian 11 main"| \ sudo tee /etc/apt/sources.list.d/zammad.list > /dev/null
- Debian 12
$ echo "deb [signed-by=/etc/apt/keyrings/pkgr-zammad.gpg] https://dl.packager.io/srv/deb/zammad/zammad/stable/debian 12 main"| \ sudo tee /etc/apt/sources.list.d/zammad.list > /dev/null
- Install Repository Key
$ sudo rpm --import https://dl.packager.io/srv/zammad/zammad/key
- openSUSE 15.x / SLES 15
$ sudo wget -O /etc/zypp/repos.d/zammad.repo \ https://dl.packager.io/srv/zammad/zammad/stable/installer/sles/15.repo
- Install Repository Key
$ sudo rpm --import https://dl.packager.io/srv/zammad/zammad/key
- CentOS 8 / RHEL 8
$ sudo wget -O /etc/yum.repos.d/zammad.repo \ https://dl.packager.io/srv/zammad/zammad/stable/installer/el/8.repo
- CentOS 9 / RHEL 9
$ sudo wget -O /etc/yum.repos.d/zammad.repo \ https://dl.packager.io/srv/zammad/zammad/stable/installer/el/9.repo
Firewall & SELinux¶
Some parts of these steps may not apply to you, feel free to skip them!
SELinux¶
Note
The commands below only work on Ubuntu, Debian and CentOS. If you use a different distribution, please have a look at their documentation.
$ # Allow nginx or apache to access public files of Zammad and communicate
$ 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/
Firewall¶
Ensure to open ports 80
and 443
(TCP & UDP) beside of the ports you
need. Below you can find a few examples for different distributions.
If you are using a different distribution, please have a look at their
documentation.
Please note that the examples below only cover the distribution’s default firewall. It may not cover your case.
$ # Open Port 80 and 443 on your Firewall
$ ufw allow 80
$ ufw allow 443
$ ufw reload
Warning
We’re covering nftables
in this part - iptables is discouraged
starting from Debian 10 (Buster).
Our example uses the input
chain, yours may be a different one!
Add the following lines to /etc/nftables.conf
or your specific rule
file. Ensure to add these lines to your input-chain.
# Open Port 80 and 443 for Zammad
tcp dport { http, https } accept
udp dport { http, https } accept
The result should look like the following. Keep in mind that your environment could require different / more rules.
#!/usr/local/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0; policy drop;
ct state established,related accept
tcp dport ssh log accept
tcp dport { http, https } accept
udp dport { http, https } accept
}
chain forward {
type filter hook forward priority 0; policy accept;
}
chain output {
type filter hook output priority 0; policy accept;
}
}
To load your new rules, simply run systemctl reload nftables
.
$ # Open Port 80 and 443 on your Firewall
$ firewall-cmd --zone=public --add-service=http --permanent
$ firewall-cmd --zone=public --add-service=https --permanent
$ firewall-cmd --reload
Manage Services of Zammad¶
In general Zammad uses three services - these can be (re)started & stopped
with the parent zammad
.
$ # Zammad service to start all services at once
$ systemctl (status|start|stop|restart) zammad
$ # Zammads internal puma server (relevant for displaying the web app)
$ systemctl (status|start|stop|restart) zammad-web
$ # Zammads background worker - relevant for all delayed- and background jobs
$ systemctl (status|start|stop|restart) zammad-worker
$ # Zammads websocket server for session related information
$ systemctl (status|start|stop|restart) zammad-websocket
Next Steps¶
With this Zammad technically is ready to go. However, you’ll need to follow the following further steps to access Zammads Web-UI and getting started with it.
You may also find Zammads Console commands useful
If you expect usage with 5 agents or more you may also want to consider the following pages.