Skip to content

Deploying a Zammad App

Introduction

Zammad is an open-source ticketing and customer support platform. This guide shows how to containerize Zammad with a Dockerfile, connect it to PostgreSQL, configure optional Elasticsearch, persist uploads, and deploy it to Klutch.sh over HTTP.

Prerequisites

  • GitHub repository containing your Dockerfile.
  • PostgreSQL database (managed or deployed separately).
  • Optional Elasticsearch instance for search.
  • Klutch.sh project ready in klutch.sh/app.

Project structure

.
└── Dockerfile

Sample Dockerfile

FROM zammad/zammad:latest
# Default Zammad port
ENV ZAMMAD_PORT=3000
EXPOSE 3000

Required environment variables

  • ZAMMAD_PORT=3000 – internal HTTP port.
  • ZAMMAD_RAILS_ENV=production
  • ZAMMAD_DB_ADAPTER=postgresql
  • ZAMMAD_DB_HOST
  • ZAMMAD_DB_USER
  • ZAMMAD_DB_PASSWORD
  • ZAMMAD_DB_NAME

Optional environment variables

  • ZAMMAD_ELASTICSEARCH_URL – e.g., http://<host>:9200
  • ZAMMAD_SESSION_STORE=cache
  • RAILS_LOG_TO_STDOUT=true
  • MEMCACHE_SERVERS if using memcache

Persistence

Persist uploads, attachments, and assets:

  • Mount path: /opt/zammad/storage
  • Size: based on expected ticket volume and attachments

Networking

  • Protocol: HTTP
  • Internal port: 3000
  • Users reach https://example-app.klutch.sh while Klutch.sh routes to port 3000 inside the container.
Terminal window
curl -I http://localhost:3000

Deployment on Klutch.sh

  1. Push your Dockerfile to GitHub.
  2. In klutch.sh/app, create a new app and select GitHub as the source.
  3. Klutch.sh automatically detects the Dockerfile in the repository root.
  4. Select HTTP traffic and set the internal port to 3000.
  5. Add environment variables for the database (ZAMMAD_DB_ADAPTER, ZAMMAD_DB_HOST, ZAMMAD_DB_USER, ZAMMAD_DB_PASSWORD, ZAMMAD_DB_NAME), optional search (ZAMMAD_ELASTICSEARCH_URL), and ZAMMAD_PORT. Mark secrets as sensitive.
  6. Attach a persistent volume at /opt/zammad/storage sized for ticket attachments.
  7. Deploy. After first boot, run through the Zammad web setup to create the admin user and connect email channels.

Verification

  • UI: open https://example-app.klutch.sh and confirm the Zammad welcome/setup page loads.

  • Quick check:

    Terminal window
    curl -I https://example-app.klutch.sh

Next steps

  • Configure email (inbound/outbound) from the admin panel.
  • Enable backups for PostgreSQL and the /opt/zammad/storage volume.
  • Add Elasticsearch for faster search and configure cache/memcache if needed.