{"id":18645,"date":"2023-09-04T22:29:32","date_gmt":"2023-09-04T19:29:32","guid":{"rendered":"https:\/\/kifarunix.com\/?p=18645"},"modified":"2024-03-10T11:29:00","modified_gmt":"2024-03-10T08:29:00","slug":"install-zammad-ticketing-system-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-zammad-ticketing-system-on-ubuntu-22-04\/","title":{"rendered":"Install Zammad Ticketing System on Ubuntu 22.04"},"content":{"rendered":"\n<p>Welcome to our tutorial on how to install Zammad ticketing system on Ubuntu 22.04. According to <a aria-label=\"Zammad documentation page (opens in a new tab)\" class=\"rank-math-link\" href=\"https:\/\/docs.zammad.org\/en\/latest\/about\/zammad.html\" target=\"_blank\" rel=\"noreferrer noopener\">Zammad documentation page<\/a>, <em>&#8220;Zammad is a web based open source helpdesk\/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and emails&#8221;<\/em>.<\/p>\n\n\n\n<p>Read about Zammad Ticketing system features on its features page, link provided below.<\/p>\n\n\n\n<p><a aria-label=\"Zammad Ticketing system features (opens in a new tab)\" class=\"rank-math-link\" href=\"https:\/\/zammad.com\/en\/product\/helpdesk\" target=\"_blank\" rel=\"noreferrer noopener\">Zammad Ticketing system features<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-zammad-ticketing-system-on-ubuntu-22-04\">Installing Zammad Ticketing System on Ubuntu 22.04<\/a><ul><li><a href=\"#prerequisites\">Prerequisites<\/a><\/li><li><a href=\"#install-zammad-ticketing-system\">Install Zammad Ticketing System<\/a><ul><li><a href=\"#configure-locales-in-debian\">Configure Locales in Debian<\/a><\/li><li><a href=\"#install-elasticsearch-on-debian\">Install Elasticsearch on Debian<\/a><\/li><li><a href=\"#installing-zammad-ticketing-system-from-zammad-apt-repo\">Installing Zammad Ticketing System from Zammad APT Repo<\/a><\/li><\/ul><\/li><li><a href=\"#managing-zammad-services\">Managing Zammad Services<\/a><ul><li><a href=\"#zammad\">Zammad<\/a><\/li><li><a href=\"#only-web-application-server\">Only web application server<\/a><\/li><li><a href=\"#only-worker-process\">Only worker process<\/a><\/li><li><a href=\"#only-websocket-server\">Only websocket server<\/a><\/li><\/ul><\/li><li><a href=\"#configure-elasticsearch-for-zammad\">Configure Elasticsearch for Zammad<\/a><ul><li><a href=\"#running-elasticsearch\">Running Elasticsearch<\/a><\/li><li><a href=\"#define-elasticsearch-server-address-on-zammad\">Define Elasticsearch Server Address on Zammad<\/a><\/li><li><a href=\"#define-elasticsearch-authentication-credentials\">Define Elasticsearch Authentication Credentials<\/a><\/li><li><a href=\"#other-elasticsearch-settings\">Other Elasticsearch Settings<\/a><\/li><li><a href=\"#tune-elasticsearch\">Tune Elasticsearch<\/a><\/li><\/ul><\/li><li><a href=\"#configure-web-server-for-zammad\">Configure Web Server for Zammad<\/a><ul><li><a href=\"#setup-zammad-nginx-site-configuration-for-http-not-recommended\">Setup Zammad Nginx Site Configuration for HTTP (NOT RECOMMENDED!)<\/a><\/li><li><a href=\"#setup-zammad-nginx-site-configuration-for-https-recommended\">Setup Zammad Nginx Site Configuration for HTTPS (RECOMMENDED!)<\/a><\/li><li><a href=\"#install-postfix-for-zammad-email-notifications\">Install Postfix for Zammad Email Notifications<\/a><\/li><\/ul><\/li><li><a href=\"#accessing-zammad-web-interface\">Accessing Zammad Web Interface<\/a><\/li><li><a href=\"#reference\">Reference<\/a><\/li><li><a href=\"#other-tutorials\">Other Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-zammad-ticketing-system-on-ubuntu-22-04\">Installing Zammad Ticketing System on Ubuntu 22.04<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h3>\n\n\n\n<p>There are a number of requirements that your system must meet (as of this writing) before you can install Zammad Ticketing system.<\/p>\n\n\n\n<p>Refer to these links for Software and Hardware Requirements;<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.zammad.org\/en\/latest\/prerequisites\/software.html\" target=\"_blank\" rel=\"noreferrer noopener\">Software  Requirements;<\/a><\/p>\n\n\n\n<p id=\"hardware-requirements\"><a href=\"https:\/\/docs.zammad.org\/en\/latest\/prerequisites\/hardware.html\" target=\"_blank\" rel=\"noreferrer noopener\">Hardware Requirements<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-zammad-ticketing-system\">Install Zammad Ticketing System<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"configure-locales-in-debian\">Configure Locales in Debian<\/h4>\n\n\n\n<p>In this tutorial, we will be installing Zammad with PostgreSQL which is the recommended database and is supported by default.<\/p>\n\n\n\n<p>As such, if you are using PostgreSQL database backend, you need to enable UTF-8 locale.<\/p>\n\n\n\n<p>To check if UTF-8 local is enabled, run the <strong><code>locale<\/code><\/strong> command from terminal as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">locale<\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\nLANG=en_US.UTF-8\nLANGUAGE=\nLC_CTYPE=\"en_US.UTF-8\"\nLC_NUMERIC=\"en_US.UTF-8\"\nLC_TIME=\"en_US.UTF-8\"\nLC_COLLATE=\"en_US.UTF-8\"\nLC_MONETARY=\"en_US.UTF-8\"\nLC_MESSAGES=\"en_US.UTF-8\"\nLC_PAPER=\"en_US.UTF-8\"\nLC_NAME=\"en_US.UTF-8\"\nLC_ADDRESS=\"en_US.UTF-8\"\nLC_TELEPHONE=\"en_US.UTF-8\"\nLC_MEASUREMENT=\"en_US.UTF-8\"\nLC_IDENTIFICATION=\"en_US.UTF-8\"\nLC_ALL=\n<\/code><\/pre>\n\n\n\n<p>If you do not see such a line from the above output; <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>LANG=en_US.UTF-8<\/strong><\/code><\/pre>\n\n\n\n<p>The you need to generate and update the locales.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>locale-gen en_US.UTF-8<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>update-locale LANG=en_US.UTF-8<\/code><\/pre>\n\n\n\n<p>This will update the <code><strong>\/etc\/default\/locale<\/strong><\/code> file with the set LANG environment variable.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-elasticsearch-on-debian\">Install Elasticsearch on Debian<\/h4>\n\n\n\n<p><a href=\"https:\/\/docs.zammad.org\/en\/latest\/prerequisites\/software.html#id8\" target=\"_blank\" rel=\"noreferrer noopener\">Zammad v5.2+ is compatible with Elasticsearch v7.8+<\/a>. Hence, we install the current Elasticsearch, v8.9.1, which is the latest version as of this writing, on Debian.<\/p>\n\n\n\n<p>Install the Elasticsearch repository signing key;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo su -<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install sudo gnupg2 apt-transport-https curl vim -y<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -qO - https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch \\\n--no-check-certificate \\\n| gpg --dearmor &gt; \/etc\/apt\/trusted.gpg.d\/elastic.gpg<\/code><\/pre>\n\n\n\n<p>Install Elasticsearch repo;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"deb https:\/\/artifacts.elastic.co\/packages\/8.x\/apt stable main\" \\\n| tee -a \/etc\/apt\/sources.list.d\/elastic-8.x.list<\/code><\/pre>\n\n\n\n<p>Install Elasticsearch on Debian;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install elasticsearch -y<\/code><\/pre>\n\n\n\n<p>Elasticsearch v8 enabled authentication and HTTPS connection by default. You will see an output similar to the one below during the installation;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Unpacking elasticsearch (8.9.1) ...\nSetting up elasticsearch (8.9.1) ...\n--------------------------- Security autoconfiguration information ------------------------------\n\nAuthentication and authorization are enabled.\nTLS for the transport and HTTP layers is enabled and configured.\n\nThe generated password for the elastic built-in superuser is : *s_woa-wYubWz8A91oWA\n\nIf this node should join an existing cluster, you can reconfigure this with\n'\/usr\/share\/elasticsearch\/bin\/elasticsearch-reconfigure-node --enrollment-token <token-here>'\nafter creating an enrollment token on your existing cluster.\n\nYou can complete the following actions at any time:\n\nReset the password of the elastic built-in superuser with \n'\/usr\/share\/elasticsearch\/bin\/elasticsearch-reset-password -u elastic'.\n\nGenerate an enrollment token for Kibana instances with \n '\/usr\/share\/elasticsearch\/bin\/elasticsearch-create-enrollment-token -s kibana'.\n\nGenerate an enrollment token for Elasticsearch nodes with \n'\/usr\/share\/elasticsearch\/bin\/elasticsearch-create-enrollment-token -s node'.\n\n-------------------------------------------------------------------------------------------------\n### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd\n sudo systemctl daemon-reload\n sudo systemctl enable elasticsearch.service\n### You can start elasticsearch service by executing\n sudo systemctl start elasticsearch.service\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"installing-zammad-ticketing-system-from-zammad-apt-repo\">Installing Zammad Ticketing System from Zammad APT Repo<\/h4>\n\n\n\n<p>Install Zammad repo lists on Debian<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -qO- https:\/\/dl.packager.io\/srv\/zammad\/zammad\/key \\\n| gpg --dearmor &gt; \/etc\/apt\/trusted.gpg.d\/zammad.gpg<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"deb https:\/\/dl.packager.io\/srv\/deb\/zammad\/zammad\/stable\/ubuntu 22.04 main\" &gt; \/etc\/apt\/sources.list.d\/zammad.list<\/code><\/pre>\n\n\n\n<p>Update package cache;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<p>Next, install Zammad ticketing system and all the other required packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install zammad -y<\/code><\/pre>\n\n\n\n<p>As the installation completes, you will see such an output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code> (Re)building Elasticsearch searchindex...\n# Enforcing 0600 on database.yml ...\nSetting default Logging to file, set via \"zammad config:set RAILS_LOG_TO_STDOUT=true\" if you want to log to STDOUT!\n# Starting Zammad\n# Creating webserver bootstart\nSynchronizing state of nginx.service with SysV service script with \/lib\/systemd\/systemd-sysv-install.\nExecuting: \/lib\/systemd\/systemd-sysv-install enable nginx\n# Restarting webserver nginx\n####################################################################################\n\nAdd your fully qualified domain name or public IP to servername directive of\nnginx, if this installation is done on a remote server. You have to change:\n\/etc\/nginx\/sites-available\/zammad.conf and restart nginx process.\nOtherwise just open http:\/\/localhost\/ in your browser to start using Zammad.\n\n####################################################################################\nProcessing triggers for ufw (0.36.1-4build1) ...\nProcessing triggers for man-db (2.10.2-1) ...\nProcessing triggers for libc-bin (2.35-0ubuntu3.1) ...\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"managing-zammad-services\">Managing Zammad Services<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"zammad\">Zammad<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status zammad\nsystemctl stop zammad\nsystemctl start zammad\nsystemctl restart zammad\nsystemctl enable zammad<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"only-web-application-server\">Only web application server<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status zammad-web\nsystemctl stop zammad-web\nsystemctl start zammad-web\nsystemctl restart zammad-web<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"only-worker-process\">Only worker process<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status zammad-worker\nsystemctl stop zammad-worker\nsystemctl start zammad-worker\nsystemctl restart zammad-worker<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"only-websocket-server\">Only websocket server<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status zammad-websocket\nsystemctl stop zammad-websocket\nsystemctl start zammad-websocket\nsystemctl restart zammad-websocket<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-elasticsearch-for-zammad\">Configure Elasticsearch for Zammad<\/h3>\n\n\n\n<p>Next, configure Elasticsearch search engine for Zammad.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"running-elasticsearch\">Running Elasticsearch<\/h4>\n\n\n\n<p>We have already installed Elasticsearch 8.9.1. Thus, you can start and enable it to run on system boot by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl enable --now elasticsearch<\/pre>\n\n\n\n<p>Elasticsearch is now running with the default settings. Note that by default, Elasticsearch 8.x enables HTTPS and Authentication.<\/p>\n\n\n\n<p>Initial credentials are printed to standard output during installation. Check Elasticsearch installation above.<\/p>\n\n\n\n<p>You can verify by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -XGET \"https:\/\/localhost:9200\" \\\n--cacert \/etc\/elasticsearch\/certs\/http_ca.crt \\\n-u elastic<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\nEnter host password for user 'elastic':\n{\n  \"name\" : \"debian\",\n  \"cluster_name\" : \"elasticsearch\",\n  \"cluster_uuid\" : \"f4ri8w0DTuWRBvITLjl8Rg\",\n  \"version\" : {\n    \"number\" : \"8.9.1\",\n    \"build_flavor\" : \"default\",\n    \"build_type\" : \"deb\",\n    \"build_hash\" : \"a813d015ef1826148d9d389bd1c0d781c6e349f0\",\n    \"build_date\" : \"2023-08-10T05:02:32.517455352Z\",\n    \"build_snapshot\" : false,\n    \"lucene_version\" : \"9.7.0\",\n    \"minimum_wire_compatibility_version\" : \"7.17.0\",\n    \"minimum_index_compatibility_version\" : \"7.0.0\"\n  },\n  \"tagline\" : \"You Know, for Search\"\n}\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"define-elasticsearch-server-address-on-zammad\">Define Elasticsearch Server Address on Zammad<\/h4>\n\n\n\n<p>To define Elasticsearch server address for Zammad, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zammad run rails r \"Setting.set('es_url', 'https:\/\/localhost:9200')\"<\/code><\/pre>\n\n\n\n<p>Note that we set <strong>HTTPS<\/strong> on the address.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"define-elasticsearch-authentication-credentials\">Define Elasticsearch Authentication Credentials<\/h4>\n\n\n\n<p>As already mentioned, ES 8.x enables authentication by default. Note that we are using the default credentials for the super-admin Elasticsearch user<\/p>\n\n\n\n<p>Thus, define the ES connection credentials accordingly.<\/p>\n\n\n\n<p>Disable credentials saving on history;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>set +o history<\/code><\/pre>\n\n\n\n<p><strong>NOTE<\/strong>: Be wary about using the <strong>elastic<\/strong> super user here. You can create a user that Zammad can use to manage it&#8217;s indices! Refer to other online documentation for the same.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zammad run rails r \"Setting.set('es_user', 'elastic')\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>zammad run rails r \"Setting.set('es_password', '*s_woa-wYubWz8A91oWA')\"<\/code><\/pre>\n\n\n\n<p>Enable history;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>set -o history<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"other-elasticsearch-settings\">Other Elasticsearch Settings<\/h4>\n\n\n\n<p>Run the command below to rebuild index, adjust the index namespacing as well as the file attachment indexing rules.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zammad run rake zammad:searchindex:rebuild<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Dropping indexes... done.\nDeleting pipeline... done.\nCreating indexes... done.\nCreating pipeline... done.\nReloading data... \n  - Chat::Session... \n    done in 0 seconds.                    \n  - Cti::Log... \n    done in 0 seconds.                    \n  - Group... \n    done in 4 seconds.                    \n  - KnowledgeBase::Answer::Translation... \n    done in 0 seconds.                    \n  - KnowledgeBase::Category::Translation... \n    done in 0 seconds.                    \n  - KnowledgeBase::Translation... \n    done in 0 seconds.                    \n  - Organization... \n    done in 17 seconds.                    \n  - StatsStore... \n    done in 0 seconds.                    \n  - Ticket::Priority... \n    done in 9 seconds.                    \n  - Ticket::State... \n    done in 22 seconds.                    \n  - Ticket... \n    done in 9 seconds.                    \n  - User... \n    done in 7 seconds.\n<\/code><\/pre>\n\n\n\n<p>Disable Elasticsearch indexing of some of the attachment extensions to reduce resource consumption;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zammad run rails r \"Setting.set('es_attachment_ignore', &#91; '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ] )\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>zammad run rails r \"Setting.set('es_attachment_max_size_in_mb', 50)\"<\/code><\/pre>\n\n\n\n<p>[Optional] If you are connection mutiple Zammad instances into Elasticsearch, consider defining index namespacing to able to create indices based on Zammad host hostname.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zammad run rails r \"Setting.set('es_index', Socket.gethostname.downcase + '_zammad')\"<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"tune-elasticsearch\">Tune Elasticsearch<\/h4>\n\n\n\n<p>Increase the virtual memory map count;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo vm.max_map_count=262144 &gt;&gt; \/etc\/sysctl.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sysctl -p<\/code><\/pre>\n\n\n\n<p>Increase the maximum size of an HTTP request body (default is 100MB).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"http.max_content_length: 400mb\" &gt;&gt; \/etc\/elasticsearch\/elasticsearch.yml<\/code><\/pre>\n\n\n\n<p>Update Elasticsearch JVM heap size settings. You need to update this value depending on the size of the RAM your system is assigned.<\/p>\n\n\n\n<p>We will set this to 1GB in our demo server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo '-Xms1g\n-Xmx1g' &gt; \/etc\/elasticsearch\/jvm.options.d\/jvm-custom-heap.options<\/code><\/pre>\n\n\n\n<p>Restart Elasticsearch<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl stop elasticsearch<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start elasticsearch<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-web-server-for-zammad\">Configure Web Server for Zammad<\/h3>\n\n\n\n<p>By default, Zammad uses Nginx web server. If you want to use Apache instead, see the guide below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-zammad-ticketing-system-on-debian-12\/#configure-web-server-for-zammad\" target=\"_blank\" rel=\"noreferrer noopener\">How to use Apache Web Server with Zammad<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"setup-zammad-nginx-site-configuration-for-http-not-recommended\">Setup Zammad Nginx Site Configuration for HTTP (NOT RECOMMENDED!)<\/h4>\n\n\n\n<p>Running Zammad onNginx via HTTP is not recommended security wise. You can only use this for your local environment testing.<\/p>\n\n\n\n<p>If you want to go this route, update the default Zammad Nginx configuration for HTTP, <strong><code>\/etc\/nginx\/sites-enabled\/zammad.conf<\/code><\/strong>, and modify it to suite your needs.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/nginx\/sites-enabled\/zammad.conf<\/code><\/pre>\n\n\n\n<p>Sample Zammad Nginx site configuration file;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>#\n# this is the nginx config for zammad\n#\n\nupstream zammad-railsserver {\n    server 127.0.0.1:3000;\n}\n\nupstream zammad-websocket {\n    server 127.0.0.1:6042;\n}\n\nserver {\n    listen 80;\n    listen [::]:80;\n\n    # replace 'localhost' with your fqdn if you want to use zammad from remote\n    server_name localhost;\n\n    # security - prevent information disclosure about server version\n    server_tokens off;\n\n    root \/opt\/zammad\/public;\n\n    access_log \/var\/log\/nginx\/zammad.access.log;\n    error_log  \/var\/log\/nginx\/zammad.error.log;\n\n    client_max_body_size 50M;\n\n    location ~ ^\/(assets\/|robots.txt|humans.txt|favicon.ico|apple-touch-icon.png) {\n        expires max;\n    }\n\n    # legacy web socket server\n    location \/ws {\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"Upgrade\";\n        proxy_set_header CLIENT_IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        proxy_read_timeout 86400;\n        proxy_pass http:\/\/zammad-websocket;\n    }\n\n    # action cable\n    location \/cable {\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"Upgrade\";\n        proxy_set_header CLIENT_IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        proxy_read_timeout 86400;\n        proxy_pass http:\/\/zammad-railsserver;\n    }\n\n    location \/ {\n        proxy_set_header Host $http_host;\n        proxy_set_header CLIENT_IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n\n        # Change this line in an SSO setup\n        proxy_set_header X-Forwarded-User \"\";\n\n        proxy_read_timeout 300;\n        proxy_pass http:\/\/zammad-railsserver;\n\n        gzip on;\n        gzip_types text\/plain text\/xml text\/css image\/svg+xml application\/javascript application\/x-javascript application\/json application\/xml;\n        gzip_proxied any;\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>To use HTTPS, see below configuration.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"setup-zammad-nginx-site-configuration-for-https-recommended\">Setup Zammad Nginx Site Configuration for HTTPS (RECOMMENDED!)<\/h4>\n\n\n\n<p>It is recommended to setup Zammad with HTTPS for secured connection.<\/p>\n\n\n\n<p>This is the method that we will use in this guide. Our SSL certificates are Let&#8217;s Encrypt SSL certificates. If you have your commercial CA signed certificates, you can use it.<\/p>\n\n\n\n<p>Thus,  copy the default Zammad Nginx configuration for HTTPS, <code>\/opt\/zammad\/contrib\/nginx\/zammad_ssl.conf<\/code>, and modify it to suite your needs.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/opt\/zammad\/contrib\/nginx\/zammad_ssl.conf \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n\n\n\n<p>This is our modified configuration file;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/etc\/nginx\/sites-enabled\/zammad_ssl.conf<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>upstream zammad-railsserver {\n  server 127.0.0.1:3000;\n}\n\nupstream zammad-websocket {\n  server 127.0.0.1:6042;\n}\n\nserver {\n  listen 80;\n  listen [::]:80;\n\n  server_name kifarunix.com;\n\n  # security - prevent information disclosure about server version\n  server_tokens off;\n\n  access_log \/var\/log\/nginx\/zammad.access.log;\n  error_log \/var\/log\/nginx\/zammad.error.log;\n\n  location \/.well-known\/ {\n    root \/var\/www\/html;\n  }\n\n  return 301 https:\/\/$server_name$request_uri;\n\n}\n\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n\n  server_name kifarunix.com;\n\n  # security - prevent information disclosure about server version\n  server_tokens off;\n\n  ssl_certificate \/etc\/letsencrypt\/live\/kifarunix.com\/fullchain.pem;\n  ssl_certificate_key \/etc\/letsencrypt\/live\/kifarunix.com\/privkey.pem;\n\n  ssl_protocols TLSv1.2;\n\n  ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';\n\n  ssl_dhparam \/etc\/nginx\/dhparam.pem;\n\n  ssl_prefer_server_ciphers on;\n\n  ssl_session_cache shared:SSL:10m;\n  ssl_session_timeout 180m;\n\n  ssl_stapling on;\n  ssl_stapling_verify on;\n\n  resolver 8.8.8.8 8.8.4.4;\n\n  add_header Strict-Transport-Security \"max-age=31536000\" always;\n\n  location = \/robots.txt  {\n    access_log off; log_not_found off;\n  }\n\n  location = \/favicon.ico {\n    access_log off; log_not_found off;\n  }\n\n  root \/opt\/zammad\/public;\n\n  access_log \/var\/log\/nginx\/zammad.access.log;\n  error_log  \/var\/log\/nginx\/zammad.error.log;\n\n  client_max_body_size 50M;\n\n  location ~ ^\/(assets\/|robots.txt|humans.txt|favicon.ico|apple-touch-icon.png) {\n    expires max;\n  }\n\n  # legacy web socket server\n  location \/ws {\n    proxy_http_version 1.1;\n    proxy_set_header Upgrade $http_upgrade;\n    proxy_set_header Connection \"Upgrade\";\n    proxy_set_header CLIENT_IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header X-Forwarded-Proto $scheme;\n    proxy_read_timeout 86400;\n    proxy_pass http:\/\/zammad-websocket;\n  }\n\n  # action cable\n  location \/cable {\n    proxy_http_version 1.1;\n    proxy_set_header Upgrade $http_upgrade;\n    proxy_set_header Connection \"Upgrade\";\n    proxy_set_header CLIENT_IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header X-Forwarded-Proto $scheme;\n    proxy_read_timeout 86400;\n    proxy_pass http:\/\/zammad-railsserver;\n  }\n\n  location \/ {\n    proxy_set_header Host $http_host;\n    proxy_set_header CLIENT_IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header X-Forwarded-Proto\t$scheme;\n\n    # change this line in an SSO setup\n    proxy_set_header X-Forwarded-User \"\";\n\n    proxy_read_timeout 180;\n    proxy_pass http:\/\/zammad-railsserver;\n\n    gzip on;\n    gzip_types text\/plain text\/xml text\/css image\/svg+xml application\/javascript application\/x-javascript application\/json application\/xml;\n    gzip_proxied any;\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>Disable the default HTTP and Zammad sites;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>unlink \/etc\/nginx\/sites-enabled\/default<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>unlink \/etc\/nginx\/sites-enabled\/zammad.conf<\/code><\/pre>\n\n\n\n<p>Also, generate Deffie-Hellman certificate to ensure a secured key exchange. The&nbsp;<a href=\"https:\/\/security.stackexchange.com\/questions\/95178\/diffie-hellman-parameters-still-calculating-after-24-hours\" target=\"_blank\" rel=\"noreferrer noopener\">-dsaparam<\/a>&nbsp;option in the command below is added to speed up the generation.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openssl dhparam -dsaparam -out \/etc\/nginx\/dhparam.pem 4096<\/code><\/pre>\n\n\n\n<p>Check Nginx configuration syntax<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx -t<\/code><\/pre>\n\n\n\n<p>If it is okay;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/code><\/pre>\n\n\n\n<p>The restart;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart nginx<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-postfix-for-zammad-email-notifications\">Install Postfix for Zammad Email Notifications<\/h4>\n\n\n\n<p>To have Zammad deliver email notifications, you can install postfix and choose <strong>Internet Site<\/strong> option if prompted.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install postfix -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"accessing-zammad-web-interface\">Accessing Zammad Web Interface<\/h3>\n\n\n\n<p>You can now access your Zammad from the browser.<\/p>\n\n\n\n<p>First of all, open the web server ports if you have firewall running;<\/p>\n\n\n\n<p>Using UFW;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow \"Nginx Full\"<\/code><\/pre>\n\n\n\n<p>You can now access Zammad Web interface by navigating to the URL, <code><strong>http:\/\/&lt;server-fqdn&gt;<\/strong><\/code> or <code><strong>https:\/\/&lt;server-fqdn&gt;<\/strong><\/code>.<\/p>\n\n\n\n<p>You will be welcomed by Zammad setup page;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1464\" height=\"803\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/setup-zammad.png\" alt=\"Install Zammad Ticketing System on Ubuntu 22.04\" class=\"wp-image-18594\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/setup-zammad.png?v=1693677673 1464w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/setup-zammad-768x421.png?v=1693677673 768w\" sizes=\"(max-width: 1464px) 100vw, 1464px\" \/><\/figure>\n\n\n\n<p>Click on <strong>Setup new system<\/strong> to proceed.<\/p>\n\n\n\n<p>Setup Zammad Administrator account.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1474\" height=\"716\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/setup-zammad-account.png\" alt=\"\" class=\"wp-image-18595\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/setup-zammad-account.png?v=1693677727 1474w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/setup-zammad-account-768x373.png?v=1693677727 768w\" sizes=\"(max-width: 1474px) 100vw, 1474px\" \/><\/figure><\/div>\n\n\n<p>Next, set you organization name, logo and the zammad url;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1469\" height=\"710\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/organization.png\" alt=\"\" class=\"wp-image-18596\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/organization.png?v=1693677757 1469w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/organization-768x371.png?v=1693677757 768w\" sizes=\"(max-width: 1469px) 100vw, 1469px\" \/><\/figure><\/div>\n\n\n<p>Configure Email notification settings. We use Gmail relay in our case.<\/p>\n\n\n\n<p>If you are using Gmail relay, then check this guide on how to setup app passwords in the guide <a href=\"https:\/\/kifarunix.com\/configure-postfix-to-use-gmail-app-passwords\/#configure-postfix-to-use-gmail-app-passwords\">Configure Postfix to Use Gmail App Passwords<\/a><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1472\" height=\"721\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/email-notifications-relay.png\" alt=\"\" class=\"wp-image-18597\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/email-notifications-relay.png?v=1693677775 1472w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/email-notifications-relay-768x376.png?v=1693677775 768w\" sizes=\"(max-width: 1472px) 100vw, 1472px\" \/><\/figure><\/div>\n\n\n<p>Click <strong>Continue<\/strong> to setup your email notifications.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1472\" height=\"712\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-email-relay-server-settings.png\" alt=\"\" class=\"wp-image-18599\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-email-relay-server-settings.png?v=1693677940 1472w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-email-relay-server-settings-768x371.png?v=1693677940 768w\" sizes=\"(max-width: 1472px) 100vw, 1472px\" \/><\/figure><\/div>\n\n\n<p>Password required is the <a href=\"https:\/\/kifarunix.com\/configure-postfix-to-use-gmail-app-passwords\/#3-create-app-passwords\" target=\"_blank\" rel=\"noreferrer noopener\">app password<\/a>.<\/p>\n\n\n\n<p>You can setup the Zammad communications channels. Click <strong>Email<\/strong> to setup email communication channel.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1471\" height=\"709\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/communication-channels.png\" alt=\"\" class=\"wp-image-18600\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/communication-channels.png?v=1693677965 1471w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/communication-channels-768x370.png?v=1693677965 768w\" sizes=\"(max-width: 1471px) 100vw, 1471px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1473\" height=\"709\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-support-email-account.png\" alt=\"\" class=\"wp-image-18601\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-support-email-account.png?v=1693677983 1473w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-support-email-account-768x370.png?v=1693677983 768w\" sizes=\"(max-width: 1473px) 100vw, 1473px\" \/><\/figure><\/div>\n\n\n<p>A verification Email will be sent to your inbox as a confirmation of the function of the communications channel.<\/p>\n\n\n\n<p>Once you have set your Zammad communications channel, you can choose to invite colleagues;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1474\" height=\"699\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/invite-colleagues-zammad.png\" alt=\"\" class=\"wp-image-18602\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/invite-colleagues-zammad.png?v=1693677999 1474w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/invite-colleagues-zammad-768x364.png?v=1693677999 768w\" sizes=\"(max-width: 1474px) 100vw, 1474px\" \/><\/figure>\n\n\n\n<p>Click <strong>Continue<\/strong> to go to the dashboard, stats.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1473\" height=\"752\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-dashboard.png\" alt=\"\" class=\"wp-image-18604\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-dashboard.png?v=1693682478 1473w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-dashboard-768x392.png?v=1693682478 768w\" sizes=\"(max-width: 1473px) 100vw, 1473px\" \/><\/figure><\/div>\n\n\n<p>Dashboard, First Steps<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1471\" height=\"716\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-first-steps.png\" alt=\"\" class=\"wp-image-18605\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-first-steps.png?v=1693682592 1471w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-first-steps-768x374.png?v=1693682592 768w\" sizes=\"(max-width: 1471px) 100vw, 1471px\" \/><\/figure>\n\n\n\n<p>OverView<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1467\" height=\"711\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-overview.png\" alt=\"\" class=\"wp-image-18606\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-overview.png?v=1693682663 1467w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/zammad-overview-768x372.png?v=1693682663 768w\" sizes=\"(max-width: 1467px) 100vw, 1467px\" \/><\/figure>\n\n\n\n<p>And that is all on installing Zammad Ticketing System on Ubuntu 22.04.<\/p>\n\n\n\n<p>You can continue with the setup in order to fully use the Zammad ticketing system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"reference\">Reference<\/h3>\n\n\n\n<p><a aria-label=\"Zammad Documentation (opens in a new tab)\" href=\"https:\/\/docs.zammad.org\/en\/latest\/about\/zammad.html\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Zammad Documentation<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"other-tutorials\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-zammad-ticketing-system-on-ubuntu\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Install Zammad Ticketing System on Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-request-tracker-rt-with-mariadb-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Install Request Tracker (RT) with MariaDB on CentOS 8<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/configure-request-tracker-rt-to-send-mails-using-msmtp-via-office-365-relay\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Configure Request Tracker (RT) to send Mails using MSMTP via Office 365 Relay<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to our tutorial on how to install Zammad ticketing system on Ubuntu 22.04. According to Zammad documentation page, &#8220;Zammad is a web based open<\/p>\n","protected":false},"author":10,"featured_media":11444,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,1322],"tags":[7231,7228,7230,7229],"class_list":["post-18645","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-ticketing-systems","tag-install-zammad-helpdesk-tool-on-ubuntu-22-04","tag-install-zammad-on-ubuntu-22-04","tag-setup-zammad-on-ubuntu-22-04","tag-ubuntu-22-04-zammad-installation","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/18645"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=18645"}],"version-history":[{"count":4,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/18645\/revisions"}],"predecessor-version":[{"id":20853,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/18645\/revisions\/20853"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/11444"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=18645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=18645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=18645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}