Install from package

Note

Please ensure to meet Zammads Software requirements before hand.
This page expects administrative permissions, this is why sudo is not used.

Prerequisites

Additional software dependencies

In addition to already mentioned Package dependencies, some operating systems may require additional packages if not already installed.

$ apt install wget apt-transport-https gnupg

Setup Elasticsearch

Elasticsearch is a dependency of Zammad and needs to be provided before installing Zammad. Please take a look at the following page: Set up Elasticsearch.

Ensure correct locale

For Zammad to function 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.

$ apt install locales
$ locale-gen en_US.UTF-8
$ echo "LANG=en_US.UTF-8" > /etc/default/locale

Add Repository and install Zammad

Hint

If you want to use MySQL instead of PostgreSQL, it’s usually enough to have the MySQL server installed on your system already. Some installation managers can’t differentiate and still install Zammad with PostgreSQL. In that case, you’ll have to adapt manually (out of scope of this documentation).

Add Repository
Install Repository Key
$ wget -qO- https://dl.packager.io/srv/zammad/zammad/key | apt-key add -
Ubuntu 16.04
$ wget -O /etc/apt/sources.list.d/zammad.list \
https://dl.packager.io/srv/zammad/zammad/stable/installer/ubuntu/16.04.repo
Ubuntu 18.04
$ wget -O /etc/apt/sources.list.d/zammad.list \
https://dl.packager.io/srv/zammad/zammad/stable/installer/ubuntu/18.04.repo
Ubuntu 20.04
$ wget -O /etc/apt/sources.list.d/zammad.list \
https://dl.packager.io/srv/zammad/zammad/stable/installer/ubuntu/20.04.repo
Install Zammad
$ apt update
$ apt install zammad

Firewall & SELinux

Some parts of these steps may not apply to you, feel free to skip them!

SELinux

$ # Allow nginx or apache to access public files of Zammad and communicate
$ chcon -Rv --type=httpd_sys_content_t /opt/zammad/public/
$ setsebool httpd_can_network_connect on -P
$ semanage fcontext -a -t httpd_sys_content_t /opt/zammad/public/
$ restorecon -Rv /opt/zammad/public/
$ chmod -R a+r /opt/zammad/public/

Firewall

Note

Below only covers the distributions default firewall. It may not cover your case.

$ # Open Port 80 and 443 on your Firewall
$ ufw allow 80
$ ufw allow 443
$ ufw 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 railsserver
$ systemctl (status|start|stop|restart) zammad-web

$ # Zammads scheduler - 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.

If you expect usage with 5 agents or more you may also want to consider the following pages.