CINXE.COM
Install with Docker — 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 with Docker — 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/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="Docker Environment Variables" href="docker-compose/environment.html" /> <link rel="prev" title="Install with Package Manager" href="package.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/docker-compose.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 current"><a class="current reference internal" href="#">Install with Docker</a><ul> <li class="toctree-l2"><a class="reference internal" href="#prerequisites">Prerequisites</a></li> <li class="toctree-l2"><a class="reference internal" href="#deployment-with-portainer">Deployment with Portainer</a></li> <li class="toctree-l2"><a class="reference internal" href="#deployment-with-docker-compose">Deployment with Docker-Compose</a></li> <li class="toctree-l2"><a class="reference internal" href="#customizing-the-zammad-stack">Customizing the Zammad Stack</a><ul> <li class="toctree-l3"><a class="reference internal" href="docker-compose/environment.html">Docker Environment Variables</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#how-to-run-commands-in-the-stack">How to Run Commands in the Stack</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="kubernetes.html">Install on Kubernetes</a></li> <li class="toctree-l1"><a class="reference internal" href="source.html">Install from Source</a></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 with Docker</li> <li class="wy-breadcrumbs-aside"> <a href="../_sources/install/docker-compose.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-with-docker"> <h1>Install with Docker<a class="headerlink" href="#install-with-docker" title="Permalink to this headline">露</a></h1> <p>Zammad can be deployed using Docker-Compose. You can even use graphical docker front ends like <a class="reference external" href="https://www.portainer.io/">Portainer</a>.</p> <div class="admonition hint"> <p class="admonition-title">Hint</p> <p>We do not provide support in terms of Docker (-Compose) or Portainer specific problems. If you choose to run Zammad via Docker, support is only provided for the Zammad application.</p> <p>In case you鈥檙e not too familiar with Docker and the way it works, you may want to stick with <a class="reference internal" href="package.html"><span class="doc">the package installation</span></a> instead.</p> </div> <div class="section" id="prerequisites"> <h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">露</a></h2> <ul> <li><p>This documentation expects you already have a working <a class="reference external" href="https://docs.docker.com/compose/">Docker Compose</a> environment.</p></li> <li><p>Make sure to have at least 4 GB of RAM to run the containers.</p></li> <li><p>You鈥檙e required to adjust your host鈥檚 settings to run Elasticsearch properly:</p> <blockquote> <div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sysctl<span class="w"> </span>-w<span class="w"> </span>vm.max_map_count<span class="o">=</span><span class="m">262144</span> </pre></div> </div> </div></blockquote> </li> </ul> </div> <div class="section" id="deployment-with-portainer"> <h2>Deployment with Portainer<a class="headerlink" href="#deployment-with-portainer" title="Permalink to this headline">露</a></h2> <p>The easiest way to get Zammad running is via a graphical docker UI. We recommend <a class="reference external" href="https://www.portainer.io/">Portainer</a>. For installation instructions, check out <a class="reference external" href="https://docs.portainer.io/">Portainer鈥檚 documentation</a>.</p> <dl> <dt>Step 1: <strong>Add Stack</strong></dt><dd><p>In the Portainer GUI (e.g. <code class="docutils literal notranslate"><span class="pre">https://yourdomain.tld:9443</span></code>), choose your target environment, select <strong>Stacks</strong> and choose <strong>Add stack</strong> as you can see in the screenshot below.</p> </dd> <dt>Step 2: <strong>Build From Repository</strong></dt><dd><p>Switch to <strong>Repository</strong> build method and provide the information below:</p> <ul class="simple"> <li><p><strong>Name</strong>: enter a desired name of the stack</p></li> <li><p><strong>Repository URL</strong>: <code class="docutils literal notranslate"><span class="pre">https://github.com/zammad/zammad-docker-compose</span></code></p></li> <li><p><strong>Repository reference</strong>: <code class="docutils literal notranslate"><span class="pre">refs/heads/master</span></code></p></li> <li><p><strong>Compose path</strong>: <code class="docutils literal notranslate"><span class="pre">docker-compose.yml</span></code> (default)</p></li> </ul> <p>Optional: if you need to provide <a class="reference internal" href="docker-compose/environment.html"><span class="doc">environment variables</span></a>, you can enter them in the <strong>Environment variable</strong> section or even upload a <code class="docutils literal notranslate"><span class="pre">.env</span></code> file. See the <a class="reference external" href="https://github.com/zammad/zammad-docker-compose/blob/master/.env.dist">example env template</a>.</p> <p>Zammad runs on port <code class="docutils literal notranslate"><span class="pre">8080</span></code> by default. If you want to use another port, you can set it via the variable <code class="docutils literal notranslate"><span class="pre">NGINX_EXPOSE_PORT</span></code>.</p> </dd> <dt>Step 3: <strong>Deploy the Stack</strong></dt><dd><p>After the stack is ready, you can access Zammad via the configured docker host and port, e.g. <code class="docutils literal notranslate"><span class="pre">http://localhost:8080/</span></code>.</p> </dd> </dl> <div class="figure align-default" id="id2"> <img alt="Screenshot showing portainer UI with stacks section and highlighted "Add stack" button" src="../_images/portainer-stacks.png" /> <p class="caption"><span class="caption-text">In the <strong>Stacks</strong> section in Portainer select <strong>Add stack</strong>.</span><a class="headerlink" href="#id2" title="Permalink to this image">露</a></p> </div> <div class="figure align-default" id="id3"> <img alt="Screenshot showing stack creation with necessary information" src="../_images/portainer-stack-creation.png" /> <p class="caption"><span class="caption-text">Stack creation with provided information in <strong>Repository</strong> screen</span><a class="headerlink" href="#id3" title="Permalink to this image">露</a></p> </div> </div> <div class="section" id="deployment-with-docker-compose"> <h2>Deployment with Docker-Compose<a class="headerlink" href="#deployment-with-docker-compose" title="Permalink to this headline">露</a></h2> <dl> <dt>Step 1: <strong>Clone the GitHub Repo</strong></dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/zammad/zammad-docker-compose.git </pre></div> </div> <p>Make sure to run <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">pull</span></code> frequently to fetch updates. Alternatively, you can download the files from <a class="reference external" href="https://github.com/zammad/zammad-docker-compose/releases">the releases page</a>.</p> </dd> <dt>Step 2: <strong>Adjust Environment as Needed</strong></dt><dd><p>In some cases our default environment is not what a docker-compose user is looking for. See <a class="reference internal" href="docker-compose/environment.html"><span class="doc">Docker Environment Variables</span></a> for details on which settings can be configured.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>If you want to use a <code class="docutils literal notranslate"><span class="pre">.env</span></code> file, you can use the provided <code class="docutils literal notranslate"><span class="pre">.env.dist</span></code> file and copy it to <code class="docutils literal notranslate"><span class="pre">.env</span></code>. That way it will be picked up by Docker-Compose automatically and not overwritten during updates.</p> </div> <p>Zammad runs on port <code class="docutils literal notranslate"><span class="pre">8080</span></code> by default. If you want to use another port, you can set it via the variable <code class="docutils literal notranslate"><span class="pre">NGINX_EXPOSE_PORT</span></code>.</p> </dd> <dt>Step 3: Start the stack</dt><dd><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>zammad-docker-compose $<span class="w"> </span>docker<span class="w"> </span>compose<span class="w"> </span>up<span class="w"> </span>-d </pre></div> </div> <p>After the stack is ready, you can access Zammad via the configured docker host and port, e.g. <code class="docutils literal notranslate"><span class="pre">http://localhost:8080/</span></code>.</p> </dd> </dl> </div> <div class="section" id="customizing-the-zammad-stack"> <h2>Customizing the Zammad Stack<a class="headerlink" href="#customizing-the-zammad-stack" title="Permalink to this headline">露</a></h2> <p>Sometimes it鈥檚 necessary to apply local changes to the Zammad docker stack, e.g. to include additional services. If you plan to do so, we recommend that you do not change the <code class="docutils literal notranslate"><span class="pre">docker-compose.yml</span></code> file, but instead create a local <code class="docutils literal notranslate"><span class="pre">docker-compose.override.yml</span></code> that includes all your modifications. Docker-Compose will <a class="reference external" href="https://docs.docker.com/compose/multiple-compose-files/merge/">automatically load this file and merge its changes into your stack</a>.</p> <div class="toctree-wrapper compound"> </div> </div> <div class="section" id="how-to-run-commands-in-the-stack"> <h2>How to Run Commands in the Stack<a class="headerlink" href="#how-to-run-commands-in-the-stack" title="Permalink to this headline">露</a></h2> <p>The docker entrypoint script sets up environment variables required by Zammad to function properly. That is why calling <code class="docutils literal notranslate"><span class="pre">rails</span></code> or <code class="docutils literal notranslate"><span class="pre">rake</span></code> on the console should be done via one of the following methods:</p> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Directly execute a specific command:</span> $<span class="w"> </span>docker<span class="w"> </span>compose<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span>zammad-railsserver<span class="w"> </span>rails<span class="w"> </span>r<span class="w"> </span><span class="s1">'...your rails command here...'</span> <span class="c1"># Run the interactive rails console to manually enter Rails commands:</span> $<span class="w"> </span>docker<span class="w"> </span>compose<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span>zammad-railsserver<span class="w"> </span>rails<span class="w"> </span>c <span class="c1"># Via 'docker exec':</span> $<span class="w"> </span>docker<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>zammad-docker-compose-zammad-railsserver-1<span class="w"> </span>/docker-entrypoint.sh<span class="w"> </span>rails<span class="w"> </span>r<span class="w"> </span><span class="s1">'...your rails command here...'</span> </pre></div> </div> <p>If you need to retrieve information from the rails server, you can place for example <code class="docutils literal notranslate"><span class="pre">pp</span></code> (pretty print) in front of your rails command. This leads to an output in your terminal.</p> </div> </div> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="package.html" class="btn btn-neutral float-left" title="Install with Package Manager" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="docker-compose/environment.html" class="btn btn-neutral float-right" title="Docker Environment Variables" 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>