Warning
This article is old, and some of the information may be outdated or no longer valid today.
If you have any questions or need to confirm any details, we recommend contacting our support team for up-to-date information and personalized assistance.
Zammad is a ticketing solution that is free, open source and full-featured, written in Ruby. It is a web-based system with many features for managing customer communication through various channels such as phone, Facebook, Twitter, chat, and email.
You can also easily handle customer inquiries and complaints. Zammad comes with an extensive set of features including full-text search, autosave, auditability, support for external authentication, support for multiple languages, and much more.
Prerequisites
- An Ubuntu 20.04 LTS server with a minimum of 2 vCore with 2 GB of memory per vCore and, for using Elasticsearch (recommended), a minimum of 6 GB of memory (official hardware requirements).
- Access to the server as root or a user with sudo privileges.
Installing Elasticsearch (optional but recommended dependency)
For search functionality, you will need to install Elasticsearch. By default, it is not available in the default Ubuntu 20.04 LTS repository. Therefore, you will need to add the Elasticsearch repository to your system.
First, install apt-transport-https and the remaining dependencies with the following command:
# apt update -y && apt install wget libimlib2 apt-transport-https gnupg -yNext, download and add the public key for the Elasticsearch repository:
# wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -Then add the Elasticsearch repository:
# echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-7.x.listNext, update the repositories and install Elasticsearch:
# apt update -y && apt install elasticsearch -yOnce installation is complete, start the elasticsearch service and enable it to start at system boot:
# systemctl start elasticsearch && systemctl enable elasticsearchAdditionally, you can check the status of Elasticsearch with the following command:
# systemctl status elasticsearchYou should see the following output (active):
● elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-08-04 10:46:17 CEST; 4s ago
Docs: https://www.elastic.co
Main PID: 3958 (java)
Tasks: 61 (limit: 1074)
Memory: 660.9M
CGroup: /system.slice/elasticsearch.service
├─3958 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headle>
└─4125 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
Aug 04 10:45:38 zammad systemd[1]: Starting Elasticsearch...
Aug 04 10:46:17 zammad systemd[1]: Started Elasticsearch.
Next, you also need to allow Elasticsearch to index attachments. You can do this with the following command:
# /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachmentYou will need to accept the installation prompt, and you should see the following output:
-> 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
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
-> Please restart Elasticsearch to activate any plugins installed
Once installed, restart Elasticsearch to load the new plugin:
# systemctl restart elasticsearchInstalling Zammad
By default, Zammad is not available in the Ubuntu 20.04 LTS repository either. Therefore, you will need to add the Zammad repository to your system.
First, add the key for the repository:
# wget -qO- https://dl.packager.io/srv/zammad/zammad/key | apt-key add -Then add the repository:
# wget -O /etc/apt/sources.list.d/zammad.list \
https://dl.packager.io/srv/zammad/zammad/stable/installer/ubuntu/20.04.repoOnce the repository has been added, update the repositories and install Zammad:
# apt update -y && apt install zammad -yOnce installation is complete, you can check the status of Zammad with the following command:
# systemctl status zammadYou should see the following output (active):
● zammad.service
Loaded: loaded (/etc/systemd/system/zammad.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-08-04 11:07:30 CEST; 39s ago
Main PID: 5371 (sleep)
Tasks: 1 (limit: 2281)
Memory: 176.0K
CGroup: /system.slice/zammad.service
└─5371 /bin/sleep infinity
Aug 04 11:07:30 zammad systemd[1]: Started zammad.service.
Connecting Zammad to Elasticsearch
Only if you have installed Elasticsearch (recommended) will you need to make Zammad work with it and rebuild the index. To do this, you can run the following commands:
# zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
# zammad run rake searchindex:rebuildYou can also add the additional Elasticsearch index namespace, ignore common binary file types, and set the maximum attachment size. Run the following commands to do this:
# zammad run rails r "Setting.set('es_index', Socket.gethostname + '_zammad')"
# 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)"Configuring Nginx for Zammad
By default, Zammad can only be accessed from localhost. Therefore, you will need to configure Nginx to access Zammad from a remote location. To do this, you can edit the Zammad virtual host file:
# nano /etc/nginx/sites-available/zammad.confYou will need to replace localhost on the server_name line with your server's FQDN or IP address:
server_name FQDN_or_your-server-ip;Save the changes, close the editor, and check the modification:
# nginx -tIf the configuration is correct, reload the Nginx service to apply the configuration changes:
# systemctl reload nginxIf you have used an FQDN you can quickly obtain a certificate from Let's Encrypt with Certbot. You can install the NGINX dependency for Certbot directly:
# apt install python3-certbot-nginxYou can then obtain the certificate for the record by running:
# certbot --nginx -d ejemplo.comYou will need to answer Certbot's questions; you can select the redirect option to redirect insecure traffic to secure traffic.
Accessing the Zammad Web Interface
Now open your web browser and enter the URL http: // FQDN or your-server-ip. You will be redirected to the following page:
Click the 'Configurar nuevo sistema' button; you should see the following page:
Enter the administrator name, email, and password, and click the 'Crear' button. You will be redirected to the following page:
Enter your organization name and system URL, upload the logo, and click the 'Siguiente'.
Choose an appropriate email delivery method and click the ‘Continuar’.
Now click the button 'Omitir' to finish installation. You should see the Zammad panel dashboard:
Congratulations! You have installed and configured the Zammad ticketing system on the Ubuntu 20.04 LTS server.
You can now easily deploy Zammad in a production environment.