How to Install Zammad on Ubuntu Server Latest

Zammad is an open-source helpdesk and customer support system that allows you to manage customer tickets, chats, and emails. In this tutorial, we will guide you through the steps of installing Zammad on Ubuntu Server.

Prerequisites

Before starting the installation, make sure that you have:

Step 1: Update your System

It's always a good idea to update your system before installing any new software. You can update your system by running the following commands:

sudo apt update
sudo apt upgrade

Step 2: Install Required Dependencies

Zammad requires some dependencies to be installed before the installation. Use the following command to install the required dependencies:

sudo apt install build-essential curl git-core gnupg2 libssl-dev postgresql-client nginx redis-server elasticsearch nodejs -y

Step 3: Install Zammad

You can install Zammad by following these steps:

Step 3.1: Install Zammad GPG key

First, import the Zammad GPG key:

wget -qO- https://dl.packager.io/srv/zammad/zammad/key | sudo apt-key add -

Step 3.2: Add the Zammad repository

Add the Zammad repository to your system with the following command:

sudo curl -sS https://dl.packager.io/srv/zammad/zammad/stable/installer/ubuntu/$(lsb_release -r -s)/repo.list | sudo tee /etc/apt/sources.list.d/zammad.list

Step 3.3: Install Zammad

Update your system repository and install the Zammad package:

sudo apt update
sudo apt install zammad

Step 4: Configure Zammad

After the installation, you need to configure Zammad by setting the database, Elasticsearch, and Nginx.

Step 4.1: Configure Database

Zammad supports PostgreSQL as a database. In this tutorial, we will use PostgreSQL as a database.

Step 4.1.1: Install PostgreSQL

Install PostgreSQL by running the following command:

sudo apt install postgresql-12 postgresql-client-12

Step 4.1.2: Create a PostgreSQL user and database for Zammad

Create a PostgreSQL user and database for Zammad by running the following commands:

sudo -u postgres createuser --pwprompt zammad
sudo -u postgres createdb -O zammad zammad_production

Step 4.2: Configure Elasticsearch

Zammad requires Elasticsearch to function correctly. In this tutorial, we will install Elasticsearch version 7.

Step 4.2.1: Install Elasticsearch

Install Elasticsearch by running the following command:

sudo apt install openjdk-8-jre-headless -y
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.2-amd64.deb
sudo dpkg -i elasticsearch-7.10.2-amd64.deb

Step 4.2.2: Configure Elasticsearch

Update the Elasticsearch configuration file /etc/elasticsearch/elasticsearch.yml by adding the following line:

network.host: localhost

Then, start and enable the Elasticsearch service with the following commands:

sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch

Step 4.3: Configure Nginx

Zammad requires Nginx to act as a reverse proxy. In this tutorial, we will install Nginx version 1.18.0.

Step 4.3.1: Install Nginx

Install Nginx by running the following command:

sudo apt install nginx -y

Step 4.3.2: Configure Nginx

Create an Nginx configuration file for Zammad /etc/nginx/sites-available/zammad.conf by adding the following code:

upstream zammad {
        server 127.0.0.1:3000;
        keepalive 64;
}

server {
        listen 80;
        listen [::]:80;
        server_name yourdomain.com;

        location / {
                proxy_pass http://zammad;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
        }
}

Then enable the configuration file by creating a symbolic link:

sudo ln -s /etc/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/

Finally, test and reload the Nginx configuration:

sudo nginx -t
sudo systemctl reload nginx

Step 5: Accessing Zammad

After completing the configuration, you can access Zammad by opening your web browser and typing the domain name or IP address of your server. The default login credentials are:

Conclusion

In this tutorial, we have successfully installed and configured Zammad on Ubuntu Server latest version. By following the steps mentioned above, you can set up a helpdesk system to manage customer support tickets, chats, and emails.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!