CINXE.COM
Install from Source — Zammad System Documentation documentation
<!DOCTYPE html> <html class="writer-html5" lang="en" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Install from Source — Zammad System Documentation documentation</title> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="../_static/tabs.css" type="text/css" /> <link rel="stylesheet" href="https://media.readthedocs.org/css/sphinx_rtd_theme.css" type="text/css" /> <link rel="stylesheet" href="https://media.readthedocs.org/css/readthedocs-doc-embed.css" type="text/css" /> <link rel="stylesheet" href="../_static/theme/theme_overrides.css" type="text/css" /> <link rel="shortcut icon" href="../_static/favicon.ico"/> <!--[if lt IE 9]> <script src="../_static/js/html5shiv.min.js"></script> <![endif]--> <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> <script src="../_static/jquery.js"></script> <script src="../_static/underscore.js"></script> <script src="../_static/doctools.js"></script> <script src="../_static/js/versionwarning.js"></script> <script src="../_static/tabs.js"></script> <script src="../_static/theme/zammad_overrides.js"></script> <script src="../_static/js/theme.js"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="Set Up Elasticsearch" href="elasticsearch.html" /> <link rel="prev" title="Install on Kubernetes" href="kubernetes.html" /> <script async type="text/javascript" src="/_/static/javascript/readthedocs-addons.js"></script><meta name="readthedocs-project-slug" content="zammad" /><meta name="readthedocs-version-slug" content="latest" /><meta name="readthedocs-resolver-filename" content="/install/source.html" /><meta name="readthedocs-http-status" content="200" /></head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="../index.html" class="icon icon-home"> Zammad System Documentation <img src="../_static/zammad_logo_70x61@2x.png" class="logo" alt="Logo"/> </a> <div class="version"> latest </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption" role="heading"><span class="caption-text">About</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../about/zammad.html">Zammad</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Prerequisites</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../prerequisites/software.html">Software</a></li> <li class="toctree-l1"><a class="reference internal" href="../prerequisites/hardware.html">Hardware</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Installation & Update</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="package.html">Install with Package Manager</a></li> <li class="toctree-l1"><a class="reference internal" href="docker-compose.html">Install with Docker</a></li> <li class="toctree-l1"><a class="reference internal" href="kubernetes.html">Install on Kubernetes</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Install from Source</a><ul> <li class="toctree-l2"><a class="reference internal" href="#prerequisites">Prerequisites</a><ul> <li class="toctree-l3"><a class="reference internal" href="#software-dependencies">Software Dependencies</a></li> <li class="toctree-l3"><a class="reference internal" href="#add-user">Add User</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#installation">Installation</a><ul> <li class="toctree-l3"><a class="reference internal" href="#step-1-get-the-source">Step 1: Get the Source</a></li> <li class="toctree-l3"><a class="reference internal" href="#step-2-install-dependencies">Step 2: Install Dependencies</a></li> <li class="toctree-l3"><a class="reference internal" href="#step-3-configure-database-settings">Step 3: Configure Database Settings</a></li> <li class="toctree-l3"><a class="reference internal" href="#step-4-initialize-your-database">Step 4: Initialize Your Database</a></li> <li class="toctree-l3"><a class="reference internal" href="#step-5-pre-compile-all-zammad-assets">Step 5: Pre-compile All Zammad Assets</a></li> <li class="toctree-l3"><a class="reference internal" href="#step-6-start-zammad-or-install-as-service">Step 6: Start Zammad or Install As Service</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#manage-services-of-zammad">Manage Services of Zammad</a></li> <li class="toctree-l2"><a class="reference internal" href="#firewall-selinux">Firewall & SELinux</a><ul> <li class="toctree-l3"><a class="reference internal" href="#selinux">SELinux</a></li> <li class="toctree-l3"><a class="reference internal" href="#firewall">Firewall</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#next-steps">Next Steps</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="elasticsearch.html">Set Up Elasticsearch</a></li> <li class="toctree-l1"><a class="reference internal" href="update.html">Updating Zammad</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Getting started</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../getting-started/configure-webserver.html">Configure the Webserver</a></li> <li class="toctree-l1"><a class="reference internal" href="../getting-started/first-steps.html">First Steps</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Migration</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../migration/index.html">Migrating to Zammad</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Administration via ...</span></p> <ul> <li class="toctree-l1"><a class="reference external" href="https://admin-docs.zammad.org/">Web-UI (admin documentation)</a></li> <li class="toctree-l1"><a class="reference internal" href="../admin/console.html">Console</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Contributing / Development</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../contributing/start.html">Start</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">REST API</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../api/intro.html">Introduction</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/calendar.html">Calendar</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/checklist.html">Checklist Endpoints</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/generic-cti/index.html">Generic CTI</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/group.html">Group</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/notification.html">Online Notification</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/object.html">Object</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/organization.html">Organization</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/role.html">Roles</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/sla.html">Service-Level Agreements (SLA)</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/ticket.html">Ticket Endpoints</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/user.html">User</a></li> <li class="toctree-l1"><a class="reference internal" href="../api/user-access-token.html">User Access Token</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Appendix</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="../appendix/backup-and-restore/index.html">Backup and Restore</a></li> <li class="toctree-l1"><a class="reference internal" href="../appendix/configure-env-vars.html">Configuration via Environment Variables</a></li> <li class="toctree-l1"><a class="reference internal" href="../appendix/configure-database-server.html">Configure Database Server</a></li> <li class="toctree-l1"><a class="reference internal" href="../appendix/migrate-to-postgresql.html">Migrate to PostgreSQL Server</a></li> <li class="toctree-l1"><a class="reference internal" href="../appendix/privacy.html">Privacy & Data Retention</a></li> <li class="toctree-l1"><a class="reference internal" href="../appendix/single-sign-on.html">Single Sign-On for Kerberos</a></li> <li class="toctree-l1"><a class="reference internal" href="../appendix/reporting-tools-thirdparty.html">Reporting Tools (Third party)</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="../index.html">Zammad System Documentation</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li> <li class="breadcrumb-item active">Install from Source</li> <li class="wy-breadcrumbs-aside"> <a href="../_sources/install/source.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="install-from-source"> <h1>Install from Source<a class="headerlink" href="#install-from-source" title="Permalink to this headline">¶</a></h1> <p>The source installation is the most difficult installation type of Zammad. If you’re not too experienced with Linux and all that, you may want to use another installation type:</p> <blockquote> <div><ul class="simple"> <li><p><a class="reference internal" href="package.html"><span class="doc">Install with Package Manager</span></a></p></li> <li><p><a class="reference internal" href="docker-compose.html"><span class="doc">Install with Docker</span></a></p></li> </ul> </div></blockquote> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Please note that we only use <code class="docutils literal notranslate"><span class="pre">sudo</span></code> after direct user changes. In all other situations you can expect <code class="docutils literal notranslate"><span class="pre">root</span></code> being in charge.</p> </div> <div class="admonition hint"> <p class="admonition-title">Hint</p> <p><strong>🔎 Looking for MacOS hints?</strong> You can find the developer documentation <a class="reference external" href="https://github.com/zammad/zammad/blob/develop/doc/developer_manual/development_environment/how-to-set-up-a-development-environment.md">here</a>.</p> </div> <div class="section" id="prerequisites"> <h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2> <div class="section" id="software-dependencies"> <h3>Software Dependencies<a class="headerlink" href="#software-dependencies" title="Permalink to this headline">¶</a></h3> <p>Please ensure that you already provided mentioned <a class="reference internal" href="../prerequisites/software.html"><span class="doc">Software requirements</span></a>.</p> </div> <div class="section" id="add-user"> <h3>Add User<a class="headerlink" href="#add-user" title="Permalink to this headline">¶</a></h3> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>useradd<span class="w"> </span>zammad<span class="w"> </span>-m<span class="w"> </span>-d<span class="w"> </span>/opt/zammad<span class="w"> </span>-s<span class="w"> </span>/bin/bash $<span class="w"> </span>groupadd<span class="w"> </span>zammad </pre></div> </div> </div> </div> <div class="section" id="installation"> <h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2> <div class="section" id="step-1-get-the-source"> <h3>Step 1: Get the Source<a class="headerlink" href="#step-1-get-the-source" title="Permalink to this headline">¶</a></h3> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Not all distributions ship <code class="docutils literal notranslate"><span class="pre">wget</span></code> and <code class="docutils literal notranslate"><span class="pre">tar</span></code> by default, you may need to install it manually.</p> </div> <p>Get the latest stable release of Zammad <a class="reference external" href="https://ftp.zammad.com/zammad-latest.tar.gz">here</a>. This file will be updated whenever new bug-fixes are applied, so you can update from this URL regularly.</p> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>/opt $<span class="w"> </span>wget<span class="w"> </span>https://ftp.zammad.com/zammad-latest.tar.gz $<span class="w"> </span>tar<span class="w"> </span>-xzf<span class="w"> </span>zammad-latest.tar.gz<span class="w"> </span>--strip-components<span class="w"> </span><span class="m">1</span><span class="w"> </span>-C<span class="w"> </span>zammad $<span class="w"> </span>chown<span class="w"> </span>-R<span class="w"> </span>zammad:zammad<span class="w"> </span>zammad/ $<span class="w"> </span>rm<span class="w"> </span>-f<span class="w"> </span>zammad-latest.tar.gz </pre></div> </div> </div> <div class="section" id="step-2-install-dependencies"> <span id="source-dependency-installation"></span><h3>Step 2: Install Dependencies<a class="headerlink" href="#step-2-install-dependencies" title="Permalink to this headline">¶</a></h3> <p>Zammad requires specific ruby versions. Adapt the commands below if you install older versions. A list of required versions can be found on the <a class="reference internal" href="../prerequisites/software.html"><span class="doc">Software requirements</span></a> page.</p> <p>Please also make sure to have <code class="docutils literal notranslate"><span class="pre">pnpm</span></code> installed, which is required for asset compilation. See <a class="reference external" href="https://pnpm.io/">pnpm.io</a> for more information.</p> <div class="sphinx-tabs docutils container"> <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-0-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-0-0-0" name="0-0" role="tab" tabindex="0">Ubuntu / Debian</button><button aria-controls="panel-0-0-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-0-0-1" name="0-1" role="tab" tabindex="-1">CentOS</button><button aria-controls="panel-0-0-2" aria-selected="false" class="sphinx-tabs-tab" id="tab-0-0-2" name="0-2" role="tab" tabindex="-1">OpenSUSE / SLES</button></div><div aria-labelledby="tab-0-0-0" class="sphinx-tabs-panel" id="panel-0-0-0" name="0-0" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>apt<span class="w"> </span>update $<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>postgresql<span class="w"> </span>postgresql-contrib $<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>postgresql $<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>postgresql </pre></div> </div> </div><div aria-labelledby="tab-0-0-1" class="sphinx-tabs-panel" hidden="true" id="panel-0-0-1" name="0-1" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>yum<span class="w"> </span>install<span class="w"> </span>postgresql-server<span class="w"> </span>postgresql-contrib $<span class="w"> </span>postgresql-setup<span class="w"> </span>initdb $<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>postgresql $<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>postgresql </pre></div> </div> </div><div aria-labelledby="tab-0-0-2" class="sphinx-tabs-panel" hidden="true" id="panel-0-0-2" name="0-2" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>zypper<span class="w"> </span>refresh $<span class="w"> </span>zypper<span class="w"> </span>install<span class="w"> </span>postgresql<span class="w"> </span>postgresql-server<span class="w"> </span>postgresql-contrib <span class="c1"># openSuSE 15 also requires:</span> $<span class="w"> </span>zypper<span class="w"> </span>install<span class="w"> </span>postgresql-server-devel $<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>postgresql $<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>postgresql </pre></div> </div> </div></div> <div class="sphinx-tabs docutils container"> <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-1-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-1-1-0" name="1-0" role="tab" tabindex="0">Ubuntu</button><button aria-controls="panel-1-1-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-1-1-1" name="1-1" role="tab" tabindex="-1">Debian</button><button aria-controls="panel-1-1-2" aria-selected="false" class="sphinx-tabs-tab" id="tab-1-1-2" name="1-2" role="tab" tabindex="-1">CentOS</button><button aria-controls="panel-1-1-3" aria-selected="false" class="sphinx-tabs-tab" id="tab-1-1-3" name="1-3" role="tab" tabindex="-1">OpenSUSE</button><button aria-controls="panel-1-1-4" aria-selected="false" class="sphinx-tabs-tab" id="tab-1-1-4" name="1-4" role="tab" tabindex="-1">other</button></div><div aria-labelledby="tab-1-1-0" class="sphinx-tabs-panel" id="panel-1-1-0" name="1-0" role="tabpanel" tabindex="0"><dl> <dt>Install Node.js</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># see https://github.com/nodesource/distributions#debian-and-ubuntu-based-distributions</span> <span class="c1"># for detailed installation instructions.</span> $<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span>ca-certificates<span class="w"> </span>curl<span class="w"> </span>gnupg $<span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/apt/keyrings $<span class="w"> </span>curl<span class="w"> </span>-fsSL<span class="w"> </span>https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key<span class="w"> </span><span class="p">|</span><span class="w"> </span>sudo<span class="w"> </span>gpg<span class="w"> </span>--dearmor<span class="w"> </span>-o<span class="w"> </span>/etc/apt/keyrings/nodesource.gpg $<span class="w"> </span><span class="nv">NODE_MAJOR</span><span class="o">=</span><span class="m">20</span> <span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_</span><span class="nv">$NODE_MAJOR</span><span class="s2">.x nodistro main"</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>sudo<span class="w"> </span>tee<span class="w"> </span>/etc/apt/sources.list.d/nodesource.list $<span class="w"> </span>apt<span class="w"> </span>update $<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>nodejs<span class="w"> </span>-y </pre></div> </div> </dd> <dt>Install RVM</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>curl<span class="w"> </span>git<span class="w"> </span>patch<span class="w"> </span>build-essential<span class="w"> </span>bison<span class="w"> </span>zlib1g-dev<span class="w"> </span>libssl-dev<span class="w"> </span>libxml2-dev<span class="w"> </span>libxml2-dev<span class="w"> </span>autotools-dev<span class="se">\</span> <span class="w"> </span>libxslt1-dev<span class="w"> </span>libyaml-0-2<span class="w"> </span>autoconf<span class="w"> </span>automake<span class="w"> </span>libreadline-dev<span class="w"> </span>libyaml-dev<span class="w"> </span>libtool<span class="w"> </span>libgmp-dev<span class="w"> </span>libgdbm-dev<span class="w"> </span>libncurses5-dev<span class="se">\</span> <span class="w"> </span>pkg-config<span class="w"> </span>libffi-dev<span class="w"> </span>libimlib2-dev<span class="w"> </span>gawk<span class="w"> </span>software-properties-common $<span class="w"> </span>apt-add-repository<span class="w"> </span>-y<span class="w"> </span>ppa:rael-gc/rvm $<span class="w"> </span>apt<span class="w"> </span>update $<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>rvm </pre></div> </div> </dd> <dt>Set relevant Environment variables</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Set rails environment specific things</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"export RAILS_ENV=production"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"export RAILS_SERVE_STATIC_FILES=true"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"rvm --default use 3.2.3"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc <span class="c1"># Debian, CentOS & OpenSuSE</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"source /usr/local/rvm/scripts/rvm"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc <span class="c1"># Ubuntu</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"source /usr/share/rvm/scripts/rvm"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc </pre></div> </div> </dd> <dt>Install Ruby Environment</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Add zammad user to RVM group</span> $<span class="w"> </span>usermod<span class="w"> </span>-a<span class="w"> </span>-G<span class="w"> </span>rvm<span class="w"> </span>zammad <span class="c1"># Install Ruby 3.2.3</span> $<span class="w"> </span>su<span class="w"> </span>-<span class="w"> </span>zammad $<span class="w"> </span>rvm<span class="w"> </span>install<span class="w"> </span>ruby-3.2.3 <span class="c1"># Install bundler, rake and rails</span> $<span class="w"> </span>rvm<span class="w"> </span>use<span class="w"> </span>ruby-3.2.3 $<span class="w"> </span>gem<span class="w"> </span>install<span class="w"> </span>bundler<span class="w"> </span>rake<span class="w"> </span>rails </pre></div> </div> </dd> </dl> </div><div aria-labelledby="tab-1-1-1" class="sphinx-tabs-panel" hidden="true" id="panel-1-1-1" name="1-1" role="tabpanel" tabindex="0"><dl> <dt>Install Node.js</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># see https://github.com/nodesource/distributions#debian-and-ubuntu-based-distributions</span> <span class="c1"># for detailed installation instructions.</span> $<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span>ca-certificates<span class="w"> </span>curl<span class="w"> </span>gnupg $<span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/apt/keyrings $<span class="w"> </span>curl<span class="w"> </span>-fsSL<span class="w"> </span>https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key<span class="w"> </span><span class="p">|</span><span class="w"> </span>sudo<span class="w"> </span>gpg<span class="w"> </span>--dearmor<span class="w"> </span>-o<span class="w"> </span>/etc/apt/keyrings/nodesource.gpg $<span class="w"> </span><span class="nv">NODE_MAJOR</span><span class="o">=</span><span class="m">20</span> <span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_</span><span class="nv">$NODE_MAJOR</span><span class="s2">.x nodistro main"</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>sudo<span class="w"> </span>tee<span class="w"> </span>/etc/apt/sources.list.d/nodesource.list $<span class="w"> </span>apt<span class="w"> </span>update $<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>nodejs<span class="w"> </span>-y </pre></div> </div> </dd> <dt>Install RVM</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>curl<span class="w"> </span>git<span class="w"> </span>patch<span class="w"> </span>build-essential<span class="w"> </span>bison<span class="w"> </span>zlib1g-dev<span class="w"> </span>libssl-dev<span class="w"> </span>libxml2-dev<span class="w"> </span>libxml2-dev<span class="w"> </span>autotools-dev<span class="se">\</span> <span class="w"> </span>libxslt1-dev<span class="w"> </span>libyaml-0-2<span class="w"> </span>autoconf<span class="w"> </span>automake<span class="w"> </span>libreadline-dev<span class="w"> </span>libyaml-dev<span class="w"> </span>libtool<span class="w"> </span>libgmp-dev<span class="w"> </span>libgdbm-dev<span class="w"> </span>libncurses5-dev<span class="se">\</span> <span class="w"> </span>pkg-config<span class="w"> </span>libffi-dev<span class="w"> </span>libimlib2-dev<span class="w"> </span>gawk $<span class="w"> </span>gpg<span class="w"> </span>--keyserver<span class="w"> </span>keyserver.ubuntu.com<span class="w"> </span>--recv-keys<span class="se">\</span> <span class="w"> </span>409B6B1796C275462A1703113804BB82D39DC0E3<span class="w"> </span>7D2BAF1CF37B13E2069D6956105BD0E739499BDB $<span class="w"> </span>curl<span class="w"> </span>-L<span class="w"> </span>https://get.rvm.io<span class="w"> </span><span class="p">|</span><span class="w"> </span>bash<span class="w"> </span>-s<span class="w"> </span>stable </pre></div> </div> </dd> <dt>Set relevant Environment variables</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Set rails environment specific things</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"export RAILS_ENV=production"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"export RAILS_SERVE_STATIC_FILES=true"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"rvm --default use 3.2.3"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc <span class="c1"># Debian, CentOS & OpenSuSE</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"source /usr/local/rvm/scripts/rvm"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc <span class="c1"># Ubuntu</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"source /usr/share/rvm/scripts/rvm"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc </pre></div> </div> </dd> <dt>Install Ruby Environment</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Add zammad user to RVM group</span> $<span class="w"> </span>usermod<span class="w"> </span>-a<span class="w"> </span>-G<span class="w"> </span>rvm<span class="w"> </span>zammad <span class="c1"># Install Ruby 3.2.3</span> $<span class="w"> </span>su<span class="w"> </span>-<span class="w"> </span>zammad $<span class="w"> </span>rvm<span class="w"> </span>install<span class="w"> </span>ruby-3.2.3 <span class="c1"># Install bundler, rake and rails</span> $<span class="w"> </span>rvm<span class="w"> </span>use<span class="w"> </span>ruby-3.2.3 $<span class="w"> </span>gem<span class="w"> </span>install<span class="w"> </span>bundler<span class="w"> </span>rake<span class="w"> </span>rails </pre></div> </div> </dd> </dl> </div><div aria-labelledby="tab-1-1-2" class="sphinx-tabs-panel" hidden="true" id="panel-1-1-2" name="1-2" role="tabpanel" tabindex="0"><dl> <dt>Install Node.js</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>curl<span class="w"> </span>-fsSL<span class="w"> </span>https://rpm.nodesource.com/setup_lts.x<span class="w"> </span><span class="p">|</span><span class="w"> </span>bash<span class="w"> </span>- </pre></div> </div> </dd> <dt>Install RVM</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>yum<span class="w"> </span>install<span class="w"> </span>epel-release $<span class="w"> </span>yum<span class="w"> </span>install<span class="w"> </span>patch<span class="w"> </span>autoconf<span class="w"> </span>automake<span class="w"> </span>bison<span class="w"> </span>bzip2<span class="w"> </span>gcc-c++<span class="w"> </span>libffi-devel<span class="w"> </span>libtool<span class="w"> </span>make<span class="w"> </span>patch<span class="w"> </span>readline-devel<span class="w"> </span>ruby<span class="se">\</span> <span class="w"> </span>zlib-devel<span class="w"> </span>glibc-headers<span class="w"> </span>glibc-devel<span class="w"> </span>openssl-devel<span class="w"> </span>git<span class="w"> </span>imlib2<span class="w"> </span>imlib2-devel $<span class="w"> </span>gpg<span class="w"> </span>--keyserver<span class="w"> </span>keyserver.ubuntu.com<span class="w"> </span>--recv-keys<span class="se">\</span> <span class="w"> </span>409B6B1796C275462A1703113804BB82D39DC0E3<span class="w"> </span>7D2BAF1CF37B13E2069D6956105BD0E739499BDB $<span class="w"> </span>curl<span class="w"> </span>-L<span class="w"> </span>https://get.rvm.io<span class="w"> </span><span class="p">|</span><span class="w"> </span>bash<span class="w"> </span>-s<span class="w"> </span>stable </pre></div> </div> </dd> <dt>Set relevant Environment variables</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Set rails environment specific things</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"export RAILS_ENV=production"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"export RAILS_SERVE_STATIC_FILES=true"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"rvm --default use 3.2.3"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc <span class="c1"># Debian, CentOS & OpenSuSE</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"source /usr/local/rvm/scripts/rvm"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc <span class="c1"># Ubuntu</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"source /usr/share/rvm/scripts/rvm"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc </pre></div> </div> </dd> <dt>Install Ruby Environment</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Add zammad user to RVM group</span> $<span class="w"> </span>usermod<span class="w"> </span>-a<span class="w"> </span>-G<span class="w"> </span>rvm<span class="w"> </span>zammad <span class="c1"># Install Ruby 3.2.3</span> $<span class="w"> </span>su<span class="w"> </span>-<span class="w"> </span>zammad $<span class="w"> </span>rvm<span class="w"> </span>install<span class="w"> </span>ruby-3.2.3 <span class="c1"># Install bundler, rake and rails</span> $<span class="w"> </span>rvm<span class="w"> </span>use<span class="w"> </span>ruby-3.2.3 $<span class="w"> </span>gem<span class="w"> </span>install<span class="w"> </span>bundler<span class="w"> </span>rake<span class="w"> </span>rails </pre></div> </div> </dd> </dl> </div><div aria-labelledby="tab-1-1-3" class="sphinx-tabs-panel" hidden="true" id="panel-1-1-3" name="1-3" role="tabpanel" tabindex="0"><dl> <dt>Install Node.js</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>zypper<span class="w"> </span>install<span class="w"> </span>nodejs16 </pre></div> </div> </dd> <dt>Install RVM</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>zypper<span class="w"> </span>install<span class="w"> </span>patch<span class="w"> </span>autoconf<span class="w"> </span>automake<span class="w"> </span>bison<span class="w"> </span>bzip2<span class="w"> </span>gcc-c++<span class="w"> </span>libffi-devel<span class="w"> </span>libtool<span class="w"> </span>make<span class="w"> </span>patch<span class="w"> </span>readline-devel<span class="se">\</span> <span class="w"> </span>zlib-devel<span class="w"> </span>glibc-devel<span class="w"> </span>openssl-devel<span class="w"> </span>git<span class="w"> </span>imlib2<span class="w"> </span>imlib2-devel<span class="w"> </span>gdbm-devel<span class="w"> </span>libyaml-devel $<span class="w"> </span>gpg<span class="w"> </span>--keyserver<span class="w"> </span>keyserver.ubuntu.com<span class="w"> </span>--recv-keys<span class="se">\</span> <span class="w"> </span>409B6B1796C275462A1703113804BB82D39DC0E3<span class="w"> </span>7D2BAF1CF37B13E2069D6956105BD0E739499BDB $<span class="w"> </span>curl<span class="w"> </span>-L<span class="w"> </span>https://get.rvm.io<span class="w"> </span><span class="p">|</span><span class="w"> </span>bash<span class="w"> </span>-s<span class="w"> </span>stable </pre></div> </div> </dd> <dt>Set relevant Environment variables</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Set rails environment specific things</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"export RAILS_ENV=production"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"export RAILS_SERVE_STATIC_FILES=true"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"rvm --default use 3.2.3"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc <span class="c1"># Debian, CentOS & OpenSuSE</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"source /usr/local/rvm/scripts/rvm"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc <span class="c1"># Ubuntu</span> $<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"source /usr/share/rvm/scripts/rvm"</span><span class="w"> </span>>><span class="w"> </span>/opt/zammad/.bashrc </pre></div> </div> </dd> <dt>Install Ruby Environment</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Add zammad user to RVM group</span> $<span class="w"> </span>usermod<span class="w"> </span>-a<span class="w"> </span>-G<span class="w"> </span>rvm<span class="w"> </span>zammad <span class="c1"># Install Ruby 3.2.3</span> $<span class="w"> </span>su<span class="w"> </span>-<span class="w"> </span>zammad $<span class="w"> </span>rvm<span class="w"> </span>install<span class="w"> </span>ruby-3.2.3 <span class="c1"># Install bundler, rake and rails</span> $<span class="w"> </span>rvm<span class="w"> </span>use<span class="w"> </span>ruby-3.2.3 $<span class="w"> </span>gem<span class="w"> </span>install<span class="w"> </span>bundler<span class="w"> </span>rake<span class="w"> </span>rails </pre></div> </div> </dd> </dl> </div><div aria-labelledby="tab-1-1-4" class="sphinx-tabs-panel" hidden="true" id="panel-1-1-4" name="1-4" role="tabpanel" tabindex="0"><p>Other systems than above mentioned are out of scope of this documentation. Please check the <a class="reference external" href="https://rvm.io/rvm/install">rvm documentation</a> on how to install rvm on your system.</p> <p>Please also ensure to install <code class="docutils literal notranslate"><span class="pre">nodejs</span></code>.</p> <p>After that install the specific required ruby version.</p> </div></div> <div class="line-block"> <div class="line">After installing bundler, rake and rails we’ll need to install all required gems.</div> <div class="line">The command depends on the database server you are using.</div> </div> <dl> <dt>Install PostgreSQL Dependencies</dt><dd><div class="sphinx-tabs docutils container"> <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-2-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-2-2-0" name="2-0" role="tab" tabindex="0">Ubuntu / Debian</button><button aria-controls="panel-2-2-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-2-2-1" name="2-1" role="tab" tabindex="-1">CentOS</button><button aria-controls="panel-2-2-2" aria-selected="false" class="sphinx-tabs-tab" id="tab-2-2-2" name="2-2" role="tab" tabindex="-1">OpenSuSE</button></div><div aria-labelledby="tab-2-2-0" class="sphinx-tabs-panel" id="panel-2-2-0" name="2-0" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>libpq-dev </pre></div> </div> </div><div aria-labelledby="tab-2-2-1" class="sphinx-tabs-panel" hidden="true" id="panel-2-2-1" name="2-1" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>yum<span class="w"> </span>install<span class="w"> </span>postgresql-libs<span class="w"> </span>postgresql-devel </pre></div> </div> </div><div aria-labelledby="tab-2-2-2" class="sphinx-tabs-panel" hidden="true" id="panel-2-2-2" name="2-2" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>zypper<span class="w"> </span>install<span class="w"> </span>postgresql-devel </pre></div> </div> </div></div> </dd> <dt>Install Gems for Zammad</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>su<span class="w"> </span>-<span class="w"> </span>zammad $<span class="w"> </span>bundle<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>without<span class="w"> </span><span class="s2">"test development mysql"</span> $<span class="w"> </span>bundle<span class="w"> </span>install </pre></div> </div> </dd> </dl> </div> <div class="section" id="step-3-configure-database-settings"> <h3>Step 3: Configure Database Settings<a class="headerlink" href="#step-3-configure-database-settings" title="Permalink to this headline">¶</a></h3> <div class="admonition tip"> <p class="admonition-title">Tip</p> <p><strong>🤓 For easiest usage …</strong></p> <p>If you provide your Zammad user with database creation permission, you can run <code class="docutils literal notranslate"><span class="pre">db:create</span></code> in the following section. If you don’t want that, you’ll have to create the database manually.</p> </div> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>cp<span class="w"> </span>config/database/database.yml<span class="w"> </span>config/database.yml $<span class="w"> </span>vi<span class="w"> </span>config/database.yml </pre></div> </div> <p>Here’s a sample configuration to give you an idea on how your configuration file could look like. Please also have a look at <a class="reference internal" href="../appendix/configure-database-server.html"><span class="doc">Configure Database Server</span></a> for deeper details.</p> <blockquote> <div><div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">production</span><span class="p">:</span> <span class="w"> </span><span class="nt">adapter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">postgresql</span> <span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">zammad</span> <span class="w"> </span><span class="nt">pool</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">50</span> <span class="w"> </span><span class="nt">encoding</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">utf8</span> <span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">zammad</span> <span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">changeme</span><span class="w"> </span><span class="c1"># You can remove this line if you enable socket based authentication!</span> </pre></div> </div> </div></blockquote> <div class="admonition hint"> <p class="admonition-title">Hint</p> <p>If you want to use an existing database server that’s not on the same machine, you can also use <code class="docutils literal notranslate"><span class="pre">host</span></code> and <code class="docutils literal notranslate"><span class="pre">port</span></code> to set that up.</p> </div> <p>For security reasons, ensure that your database configuration is readable for the Zammad user only.</p> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>chmod<span class="w"> </span><span class="m">600</span><span class="w"> </span>/opt/zammad/config/database.yml $<span class="w"> </span>chown<span class="w"> </span>zammad:zammad<span class="w"> </span>/opt/zammad/config/database.yml </pre></div> </div> </div> <div class="section" id="step-4-initialize-your-database"> <h3>Step 4: Initialize Your Database<a class="headerlink" href="#step-4-initialize-your-database" title="Permalink to this headline">¶</a></h3> <div class="admonition warning"> <p class="admonition-title">Warning</p> <p>Ensure to do this as <code class="docutils literal notranslate"><span class="pre">zammad</span></code> user in your Zammad directory!</p> </div> <div class="admonition tip"> <p class="admonition-title">Tip</p> <p><strong>🤓 Avoid a restart …</strong></p> <p>You can set the base URL of your Zammad installation by setting the <a class="reference internal" href="../appendix/configure-env-vars.html#http-type"><span class="std std-ref">ZAMMAD_HTTP_TYPE</span></a> and <a class="reference internal" href="../appendix/configure-env-vars.html#fqdn"><span class="std std-ref">ZAMMAD_FQDN</span></a> environment variables before initializing the database (see below).</p> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Example for a base URL of https://zammad.example.com</span> $<span class="w"> </span>su<span class="w"> </span>-<span class="w"> </span>zammad $<span class="w"> </span><span class="nb">export</span><span class="w"> </span><span class="nv">ZAMMAD_HTTP_TYPE</span><span class="o">=</span>https $<span class="w"> </span><span class="nb">export</span><span class="w"> </span><span class="nv">ZAMMAD_FQDN</span><span class="o">=</span>zammad.example.com </pre></div> </div> </div> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>su<span class="w"> </span>-<span class="w"> </span>zammad $<span class="w"> </span>rake<span class="w"> </span>db:create<span class="w"> </span><span class="c1"># SKIP IF you already created zammads database (see tip of step 3)</span> $<span class="w"> </span>rake<span class="w"> </span>db:migrate $<span class="w"> </span>rake<span class="w"> </span>db:seed <span class="c1"># Synchronize translations</span> $<span class="w"> </span>rails<span class="w"> </span>r<span class="w"> </span><span class="s2">"Locale.sync"</span> $<span class="w"> </span>rails<span class="w"> </span>r<span class="w"> </span><span class="s2">"Translation.sync"</span> </pre></div> </div> </div> <div class="section" id="step-5-pre-compile-all-zammad-assets"> <h3>Step 5: Pre-compile All Zammad Assets<a class="headerlink" href="#step-5-pre-compile-all-zammad-assets" title="Permalink to this headline">¶</a></h3> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>rake<span class="w"> </span>assets:precompile </pre></div> </div> </div> <div class="section" id="step-6-start-zammad-or-install-as-service"> <span id="source-install-systemd-reference"></span><h3>Step 6: Start Zammad or Install As Service<a class="headerlink" href="#step-6-start-zammad-or-install-as-service" title="Permalink to this headline">¶</a></h3> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Run the following commands as <code class="docutils literal notranslate"><span class="pre">root</span></code>.</p> </div> <p>You can start all services by hand or use systemd to start / stop Zammad.</p> <div class="sphinx-tabs docutils container"> <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-3-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-3-3-0" name="3-0" role="tab" tabindex="0">systemd (recommended)</button><button aria-controls="panel-3-3-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-3-3-1" name="3-1" role="tab" tabindex="-1">the manual way</button></div><div aria-labelledby="tab-3-3-0" class="sphinx-tabs-panel" id="panel-3-3-0" name="3-0" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>/opt/zammad/script/systemd $<span class="w"> </span>./install-zammad-systemd-services.sh </pre></div> </div> </div><div aria-labelledby="tab-3-3-1" class="sphinx-tabs-panel" hidden="true" id="panel-3-3-1" name="3-1" role="tabpanel" tabindex="0"><div class="admonition warning"> <p class="admonition-title">Warning</p> <p>This method is not suitable for production use - you should avoid it.</p> </div> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>rails<span class="w"> </span>s<span class="w"> </span>-p<span class="w"> </span><span class="m">3000</span><span class="w"> </span><span class="c1"># application web server</span> $<span class="w"> </span>script/websocket-server.rb<span class="w"> </span>start<span class="w"> </span><span class="c1"># non blocking websocket server</span> $<span class="w"> </span>script/background-worker.rb<span class="w"> </span>start<span class="w"> </span><span class="c1"># generate overviews on demand, just send changed data to browser</span> </pre></div> </div> <div class="admonition danger"> <p class="admonition-title">Danger</p> <p>⚠️ Zammads background worker <em>cannot</em> run in daemon mode!</p> </div> </div></div> </div> </div> <div class="section" id="manage-services-of-zammad"> <h2>Manage Services of Zammad<a class="headerlink" href="#manage-services-of-zammad" title="Permalink to this headline">¶</a></h2> <p>In general Zammad uses three services - these can be (re)started & stopped with the parent <code class="docutils literal notranslate"><span class="pre">zammad</span></code>.</p> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="c1"># Zammad service to start all services at once</span> $<span class="w"> </span>systemctl<span class="w"> </span><span class="o">(</span>status<span class="p">|</span>start<span class="p">|</span>stop<span class="p">|</span>restart<span class="o">)</span><span class="w"> </span>zammad $<span class="w"> </span><span class="c1"># Zammads internal puma server (relevant for displaying the web app)</span> $<span class="w"> </span>systemctl<span class="w"> </span><span class="o">(</span>status<span class="p">|</span>start<span class="p">|</span>stop<span class="p">|</span>restart<span class="o">)</span><span class="w"> </span>zammad-web $<span class="w"> </span><span class="c1"># Zammads background worker - relevant for all delayed- and background jobs</span> $<span class="w"> </span>systemctl<span class="w"> </span><span class="o">(</span>status<span class="p">|</span>start<span class="p">|</span>stop<span class="p">|</span>restart<span class="o">)</span><span class="w"> </span>zammad-worker $<span class="w"> </span><span class="c1"># Zammads websocket server for session related information</span> $<span class="w"> </span>systemctl<span class="w"> </span><span class="o">(</span>status<span class="p">|</span>start<span class="p">|</span>stop<span class="p">|</span>restart<span class="o">)</span><span class="w"> </span>zammad-websocket </pre></div> </div> </div> <div class="section" id="firewall-selinux"> <h2>Firewall & SELinux<a class="headerlink" href="#firewall-selinux" title="Permalink to this headline">¶</a></h2> <p>Some parts of these steps may not apply to you, feel free to skip them!</p> <div class="section" id="selinux"> <h3>SELinux<a class="headerlink" href="#selinux" title="Permalink to this headline">¶</a></h3> <div class="admonition note"> <p class="admonition-title">Note</p> <p>The commands below only work on Ubuntu, Debian and CentOS. If you use a different distribution, please have a look at their documentation.</p> </div> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="c1"># Allow nginx or apache to access public files of Zammad and communicate</span> $<span class="w"> </span>sudo<span class="w"> </span>chcon<span class="w"> </span>-Rv<span class="w"> </span>--type<span class="o">=</span>httpd_sys_content_t<span class="w"> </span>/opt/zammad/public/ $<span class="w"> </span>sudo<span class="w"> </span>setsebool<span class="w"> </span>httpd_can_network_connect<span class="w"> </span>on<span class="w"> </span>-P $<span class="w"> </span>sudo<span class="w"> </span>semanage<span class="w"> </span>fcontext<span class="w"> </span>-a<span class="w"> </span>-t<span class="w"> </span>httpd_sys_content_t<span class="w"> </span>/opt/zammad/public/ $<span class="w"> </span>sudo<span class="w"> </span>restorecon<span class="w"> </span>-Rv<span class="w"> </span>/opt/zammad/public/ $<span class="w"> </span>sudo<span class="w"> </span>chmod<span class="w"> </span>-R<span class="w"> </span>a+r<span class="w"> </span>/opt/zammad/public/ </pre></div> </div> </div> <div class="section" id="firewall"> <h3>Firewall<a class="headerlink" href="#firewall" title="Permalink to this headline">¶</a></h3> <p>Ensure to open ports <code class="docutils literal notranslate"><span class="pre">80</span></code> and <code class="docutils literal notranslate"><span class="pre">443</span></code> (TCP & UDP) beside of the ports you need. Below you can find a few examples for different distributions. If you are using a different distribution, please have a look at their documentation.</p> <p>Please note that the examples below only cover the distribution’s default firewall. It may not cover your case.</p> <div class="sphinx-tabs docutils container"> <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-4-0" aria-selected="true" class="sphinx-tabs-tab" id="tab-4-4-0" name="4-0" role="tab" tabindex="0">Ubuntu</button><button aria-controls="panel-4-4-1" aria-selected="false" class="sphinx-tabs-tab" id="tab-4-4-1" name="4-1" role="tab" tabindex="-1">Debian</button><button aria-controls="panel-4-4-2" aria-selected="false" class="sphinx-tabs-tab" id="tab-4-4-2" name="4-2" role="tab" tabindex="-1">CentOS, RHEL, openSUSE, SLES</button></div><div aria-labelledby="tab-4-4-0" class="sphinx-tabs-panel" id="panel-4-4-0" name="4-0" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="c1"># Open Port 80 and 443 on your Firewall</span> $<span class="w"> </span>sudo<span class="w"> </span>ufw<span class="w"> </span>allow<span class="w"> </span><span class="m">80</span> $<span class="w"> </span>sudo<span class="w"> </span>ufw<span class="w"> </span>allow<span class="w"> </span><span class="m">443</span> $<span class="w"> </span>sudo<span class="w"> </span>ufw<span class="w"> </span>reload </pre></div> </div> </div><div aria-labelledby="tab-4-4-1" class="sphinx-tabs-panel" hidden="true" id="panel-4-4-1" name="4-1" role="tabpanel" tabindex="0"><div class="admonition warning"> <p class="admonition-title">Warning</p> <p>We’re covering <code class="docutils literal notranslate"><span class="pre">nftables</span></code> in this part - iptables is discouraged starting from Debian 10 (Buster). Our example uses the <code class="docutils literal notranslate"><span class="pre">input</span></code> chain, yours may be a different one!</p> </div> <p>Add the following lines to <code class="docutils literal notranslate"><span class="pre">/etc/nftables.conf</span></code> or your specific rule file. Ensure to add these lines to your input-chain.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Open Port 80 and 443 for Zammad</span> <span class="n">sudo</span> <span class="n">tcp</span> <span class="n">dport</span> <span class="p">{</span> <span class="n">http</span><span class="p">,</span> <span class="n">https</span> <span class="p">}</span> <span class="n">accept</span> <span class="n">sudo</span> <span class="n">udp</span> <span class="n">dport</span> <span class="p">{</span> <span class="n">http</span><span class="p">,</span> <span class="n">https</span> <span class="p">}</span> <span class="n">accept</span> </pre></div> </div> <p>The result should look like the following. Keep in mind that your environment could require different / more rules.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/local/sbin/nft -f</span> <span class="n">flush</span> <span class="n">ruleset</span> <span class="n">table</span> <span class="n">inet</span> <span class="nb">filter</span> <span class="p">{</span> <span class="n">chain</span> <span class="nb">input</span> <span class="p">{</span> <span class="nb">type</span> <span class="nb">filter</span> <span class="n">hook</span> <span class="nb">input</span> <span class="n">priority</span> <span class="mi">0</span><span class="p">;</span> <span class="n">policy</span> <span class="n">drop</span><span class="p">;</span> <span class="n">ct</span> <span class="n">state</span> <span class="n">established</span><span class="p">,</span><span class="n">related</span> <span class="n">accept</span> <span class="n">tcp</span> <span class="n">dport</span> <span class="n">ssh</span> <span class="n">log</span> <span class="n">accept</span> <span class="n">tcp</span> <span class="n">dport</span> <span class="p">{</span> <span class="n">http</span><span class="p">,</span> <span class="n">https</span> <span class="p">}</span> <span class="n">accept</span> <span class="n">udp</span> <span class="n">dport</span> <span class="p">{</span> <span class="n">http</span><span class="p">,</span> <span class="n">https</span> <span class="p">}</span> <span class="n">accept</span> <span class="p">}</span> <span class="n">chain</span> <span class="n">forward</span> <span class="p">{</span> <span class="nb">type</span> <span class="nb">filter</span> <span class="n">hook</span> <span class="n">forward</span> <span class="n">priority</span> <span class="mi">0</span><span class="p">;</span> <span class="n">policy</span> <span class="n">accept</span><span class="p">;</span> <span class="p">}</span> <span class="n">chain</span> <span class="n">output</span> <span class="p">{</span> <span class="nb">type</span> <span class="nb">filter</span> <span class="n">hook</span> <span class="n">output</span> <span class="n">priority</span> <span class="mi">0</span><span class="p">;</span> <span class="n">policy</span> <span class="n">accept</span><span class="p">;</span> <span class="p">}</span> <span class="p">}</span> </pre></div> </div> <p>To load your new rules, simply run <code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">systemctl</span> <span class="pre">reload</span> <span class="pre">nftables</span></code>.</p> </div><div aria-labelledby="tab-4-4-2" class="sphinx-tabs-panel" hidden="true" id="panel-4-4-2" name="4-2" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="c1"># Open Port 80 and 443 on your Firewall</span> $<span class="w"> </span>sudo<span class="w"> </span>firewall-cmd<span class="w"> </span>--zone<span class="o">=</span>public<span class="w"> </span>--add-service<span class="o">=</span>http<span class="w"> </span>--permanent $<span class="w"> </span>sudo<span class="w"> </span>firewall-cmd<span class="w"> </span>--zone<span class="o">=</span>public<span class="w"> </span>--add-service<span class="o">=</span>https<span class="w"> </span>--permanent $<span class="w"> </span>sudo<span class="w"> </span>firewall-cmd<span class="w"> </span>--reload </pre></div> </div> </div></div> </div> </div> <div class="section" id="next-steps"> <h2>Next Steps<a class="headerlink" href="#next-steps" title="Permalink to this headline">¶</a></h2> <p>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.</p> <blockquote> <div><ol class="arabic simple"> <li><p><a class="reference internal" href="elasticsearch.html#configure-zammad-with-elasticsearch"><span class="std std-ref">Connect Zammad with Elasticsearch</span></a></p></li> <li><p><a class="reference internal" href="../getting-started/configure-webserver.html"><span class="doc">Configure the Webserver</span></a></p></li> <li><p><a class="reference internal" href="../getting-started/first-steps.html"><span class="doc">First Steps</span></a></p></li> <li><p>You may also find Zammads <a class="reference internal" href="../admin/console.html"><span class="doc">Console</span></a> commands useful</p></li> </ol> </div></blockquote> <p>If you expect usage with 5 agents or more you may also want to consider the following pages.</p> <blockquote> <div><ul class="simple"> <li><p><a class="reference internal" href="../appendix/configure-env-vars.html#performance-tuning"><span class="std std-ref">Performance Tuning</span></a></p></li> <li><p><a class="reference internal" href="../appendix/configure-database-server.html"><span class="doc">Configure Database Server</span></a></p></li> </ul> </div></blockquote> </div> </div> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="kubernetes.html" class="btn btn-neutral float-left" title="Install on Kubernetes" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="elasticsearch.html" class="btn btn-neutral float-right" title="Set Up Elasticsearch" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr/> <div role="contentinfo"> <p>© Copyright 2024, Zammad.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>