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
.└── DockerfileSample Dockerfile
FROM zammad/zammad:latest
# Default Zammad portENV ZAMMAD_PORT=3000EXPOSE 3000Required environment variables
ZAMMAD_PORT=3000– internal HTTP port.ZAMMAD_RAILS_ENV=productionZAMMAD_DB_ADAPTER=postgresqlZAMMAD_DB_HOSTZAMMAD_DB_USERZAMMAD_DB_PASSWORDZAMMAD_DB_NAME
Optional environment variables
ZAMMAD_ELASTICSEARCH_URL– e.g.,http://<host>:9200ZAMMAD_SESSION_STORE=cacheRAILS_LOG_TO_STDOUT=trueMEMCACHE_SERVERSif 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.shwhile Klutch.sh routes to port3000inside the container.
Health check (recommended)
curl -I http://localhost:3000Deployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Select HTTP traffic and set the internal port to
3000. - 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), andZAMMAD_PORT. Mark secrets as sensitive. - Attach a persistent volume at
/opt/zammad/storagesized for ticket attachments. - 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.shand 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/storagevolume. - Add Elasticsearch for faster search and configure cache/memcache if needed.