UbuntuUbuntu Based

How To Install Zammad on Ubuntu 24.04 LTS

Install Zammad on Ubuntu 24.04

Implementing an efficient helpdesk system is crucial for organizations seeking to streamline customer support operations. Zammad stands out as an exceptional open-source ticketing solution that offers robust ticket tracking, task automation, and comprehensive customer support management. This guide provides detailed instructions for installing Zammad on Ubuntu 24.04 LTS, the latest long-term support release from Canonical, ensuring you can leverage this powerful platform for your support needs.

Understanding Zammad

Zammad is a web-based, open-source helpdesk and customer support system designed to streamline communication between organizations and their customers. It offers a centralized platform for managing customer inquiries across multiple channels, including email, social media, and web forms.

Key Features and Capabilities

Zammad provides several essential features that make it an excellent choice for organizations of all sizes:

  • Multi-channel ticket management
  • Automated workflow capabilities
  • Knowledge base integration
  • Customizable dashboards
  • Comprehensive reporting tools
  • RESTful API for integrations
  • Role-based access control

When compared to other ticketing systems like OTRS, Zendesk, or Freshdesk, Zammad offers a compelling balance of features, flexibility, and cost-effectiveness. Its open-source nature allows for extensive customization while maintaining enterprise-grade functionality.

Prerequisites

Before proceeding with the installation, ensure your system meets the following requirements:

System Requirements

  • Ubuntu 24.04 LTS (Noble Numbat)
  • Minimum 2GB RAM (4GB recommended for production use)
  • At least 10GB of free disk space
  • Dual-core processor or better
  • Internet connection for package downloads

Access Requirements

  • Root or sudo privileges on your Ubuntu server
  • SSH access for remote installation
  • Basic knowledge of Linux command line operations

Network Configuration

  • Static IP address configured on your server
  • Properly configured DNS settings
  • Open ports for web access (80/443) and SSH (22)

It’s strongly recommended to perform a system backup before proceeding with any major installation, especially if you’re setting up Zammad on an existing production server.

Preparing Your Ubuntu 24.04 System

Proper preparation of your Ubuntu system is crucial for a smooth Zammad installation. Follow these steps to ensure your server is ready:

Update System Packages

Begin by updating the existing packages on your Ubuntu system:

sudo apt update
sudo apt upgrade -y

This ensures all packages are current and reduces potential compatibility issues.

Set Correct Locale

Zammad requires proper locale settings. Verify your current locale configuration:

locale | grep "LANG="

It should return something like en_US.UTF-8. If the output is empty, set it using the following commands:

sudo apt install locales
sudo locale-gen en_US.UTF-8
echo "LANG=en_US.UTF-8" | sudo tee /etc/default/locale

This configuration ensures Zammad operates correctly with language-specific characters and formats.

Install Essential Utilities

Several utilities are needed for the installation process:

sudo apt install wget apt-transport-https gnupg2 -y

These tools will help with repository management and secure downloads during installation.

Installing Required Dependencies

Zammad requires several dependencies to function properly on Ubuntu 24.04 LTS. Let’s install them one by one:

Install Java

Zammad uses Java for certain functionalities, particularly when integrated with Elasticsearch:

sudo apt install openjdk-11-jdk -y

Verify the installation with:

java -version

You should see output confirming the Java version installed on your system.

Install Apache Web Server

Apache serves as the web server for hosting Zammad:

sudo apt install apache2 -y

Enable Apache to start at boot:

sudo systemctl enable apache2
sudo systemctl start apache2

Install Libssl and Other Dependencies

Libssl is required for secure connections:

echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
sudo apt update
sudo apt install libssl1.1 -y

This configuration adds the necessary repository and installs the libssl package required by Zammad.

Adding the Zammad Repository

Since Zammad isn’t available in Ubuntu’s default repositories, you need to add the official Zammad repository to your system.

Import the GPG Key

First, download and add the GPG signing key to authenticate packages:

curl -fsSL https://dl.packager.io/srv/zammad/zammad/key | \
  gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/pkgr-zammad.gpg > /dev/null

This adds the necessary authentication key to verify packages from the Zammad repository.

Add the Repository

Next, add the repository specifically for Ubuntu 24.04:

echo "deb [signed-by=/etc/apt/trusted.gpg.d/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

Alternatively, you can use the wget method provided in the official documentation:

sudo wget -O /etc/apt/sources.list.d/zammad.list \
  https://dl.packager.io/srv/zammad/zammad/stable/installer/ubuntu/24.04.repo

Either method will properly configure your system to access the Zammad package repository.

Installing Zammad Package

With the repository properly configured, you can now proceed to install Zammad:

Update Package Lists

First, update your package lists to include the newly added repository:

sudo apt update

Install Zammad

Now, install the Zammad package:

sudo apt install zammad -y

The installation process may take several minutes, depending on your server’s performance and internet connection speed. During installation, various components will be set up, including the web server configuration and database.

Verify Installation

After the installation completes, verify that Zammad services are running:

sudo systemctl status zammad

This should show that the Zammad services are active and running properly.

Firewall Configuration

Proper firewall configuration is essential for security while ensuring Zammad remains accessible:

Configure UFW (Uncomplicated Firewall)

If you’re using UFW, allow the necessary ports:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 22/tcp
sudo ufw enable

These commands open HTTP (port 80), HTTPS (port 443), and SSH (port 22) traffic, which are essential for accessing Zammad and managing your server remotely.

Verify Firewall Rules

Check that the rules have been properly applied:

sudo ufw status

The output should list the allowed ports and their status.

Setting Up Elasticsearch (Optional)

While Elasticsearch is optional, it significantly improves Zammad’s search capabilities and performance for larger installations:

Benefits of Elasticsearch with Zammad

  • Faster search operations
  • Advanced full-text search capabilities
  • Improved handling of large datasets
  • Better overall system performance

Install Elasticsearch

First, add the Elasticsearch repository:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
sudo apt update
sudo apt install elasticsearch -y

Configure Elasticsearch

Modify the Elasticsearch configuration file:

sudo nano /etc/elasticsearch/elasticsearch.yml

Ensure the following settings are present:

cluster.name: zammad
http.port: 9200
network.host: localhost

Save the file and exit the editor.

Start and Enable Elasticsearch

sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch

Integrate with Zammad

Configure Zammad to use Elasticsearch:

zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
zammad run rails r "Setting.set('es_index', 'zammad')"
zammad run rails r "Setting.set('es_user', '')"
zammad run rails r "Setting.set('es_password', '')"
sudo systemctl restart zammad

This configures Zammad to use your local Elasticsearch instance.

Initial Zammad Configuration

After installing Zammad, you need to complete the initial setup through the web interface:

Access the Web Interface

Open your web browser and navigate to your server’s IP address or domain name:

http://your-server-ip

You should see the Zammad logo and a button to begin setup.

Install Zammad on Ubuntu 24.04

Complete the Setup Wizard

  1. Click on “Setup new System” to start the configuration process
  2. Create an administrator account by providing a username, password, and email address
  3. Enter your organization details, including name and logo (optional)
  4. Configure your email settings for sending and receiving tickets
  5. Complete the setup process by reviewing and confirming your settings

The setup wizard guides you through these initial configuration steps to get your Zammad instance ready for use.

Starting and Managing Zammad Services

Understanding how to manage Zammad services is essential for maintaining your helpdesk system:

Zammad Service Components

Zammad consists of several service components:

  • zammad-web: The web interface
  • zammad-worker: Background job processing
  • zammad-websocket: Real-time notifications
  • zammad-scheduler: Scheduled tasks

Service Management Commands

Start all Zammad services:

sudo systemctl start zammad

Enable services to start at boot:

sudo systemctl enable zammad

Restart services (useful after configuration changes):

sudo systemctl restart zammad

Check service status:

sudo systemctl status zammad

Individual Service Control

You can also manage individual components:

sudo systemctl restart zammad-web
sudo systemctl status zammad-worker

This granular control helps when troubleshooting specific issues.

Security Best Practices

Implementing security best practices is crucial for protecting your Zammad installation:

Implement HTTPS

Secure your Zammad instance with HTTPS using Let’s Encrypt:

sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d zammad.yourdomain.com

This sets up a free SSL certificate and configures Apache to use it.

Important: When using Let’s Encrypt with Zammad, you may encounter CSRF token verification issues. To fix this:

  1. Rename the auto-generated SSL configuration file:
    sudo mv /etc/apache2/sites-enabled/zammad-le-ssl.conf /etc/apache2/sites-enabled/zammad-le-ssl.conf.disabled
  2. Edit your Apache configuration to include:
    RequestHeader set X_FORWARDED_PROTO 'https'
  3. Restart Apache:
    sudo systemctl restart apache2

This prevents the common CSRF token verification failure after implementing SSL.

Regular Updates

Keep your Zammad installation secure by regularly updating:

sudo apt update
sudo apt upgrade

User Security

  • Enforce strong password policies
  • Implement two-factor authentication for admin accounts
  • Regularly review user permissions and access controls
  • Remove unused accounts promptly

Troubleshooting Common Installation Issues

Even with careful installation, issues may arise. Here are solutions to common problems:

CSRF Token Verification Failed

If you encounter “CSRF token verification failed” errors after setting up SSL:

  1. Check your Apache configuration file
  2. Ensure the X_FORWARDED_PROTO header is properly set to ‘https’
  3. Verify that there are no conflicting SSL configuration files

Service Startup Failures

If Zammad services fail to start:

  1. Check system logs:
    sudo journalctl -u zammad
  2. Verify database connections:
    sudo -u zammad psql -d zammad_production
  3. Ensure all dependencies are properly installed

Repository Issues

If you encounter problems with the Zammad repository:

  1. Verify the GPG key installation:
    sudo apt-key list | grep Zammad
  2. Check repository configuration:
    cat /etc/apt/sources.list.d/zammad.list
  3. Update your package lists again:
    sudo apt update

Ubuntu 24.04 Specific Issues

Some users have reported issues after upgrading to Ubuntu 24.04. If Zammad doesn’t start after an upgrade:

  1. Check for compatibility issues with dependencies
  2. Verify that all services are properly enabled
  3. Consider reinstalling Zammad if the upgrade caused significant issues

Advanced Configuration Options

After basic installation, you may want to customize your Zammad instance:

Custom Branding

Personalize your Zammad instance with your organization’s branding through the admin interface:

  1. Access the admin panel
  2. Navigate to Settings > Branding
  3. Upload your logo and customize colors
  4. Configure email templates with your branding

API Configuration

Zammad offers a powerful API for integrations:

  1. Generate API tokens through the admin interface
  2. Use the API documentation to integrate with your existing systems
  3. Implement custom workflows using API calls

Authentication Methods

Configure additional authentication methods:

sudo zammad run rails r "Setting.set('auth_ldap', true)"

This enables LDAP authentication, which can be further configured through the admin interface.

Congratulations! You have successfully installed Zammad. Thanks for using this tutorial for installing the Zammad ticketing system on the Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official Zammad website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button