Deploying a Zulip App
Introduction
Zulip is a powerful team chat platform with threaded conversations. This guide shows how to containerize Zulip with a Dockerfile, connect it to external PostgreSQL, Redis, and RabbitMQ services, persist data, and deploy it to Klutch.sh over HTTP.
Prerequisites
- GitHub repository containing your Dockerfile.
- Managed PostgreSQL, Redis, and RabbitMQ instances (or separate deployments).
- Klutch.sh project ready in klutch.sh/app.
Project structure
.└── DockerfileSample Dockerfile
FROM zulip/zulip:latest
# Default Zulip portENV ZULIP_PORT=9991EXPOSE 9991Required environment variables
ZULIP_PORT=9991SETTINGS_EXTERNAL_HOST– public host (e.g.,example-app.klutch.sh)SETTINGS_ZULIP_ADMINISTRATOR– admin emailDB_HOST,DB_USER,DB_PASS,DB_NAME– PostgreSQL connectionREDIS_HOST– Redis hostRABBITMQ_HOST,RABBITMQ_USER,RABBITMQ_PASSWORDSECRETS_secret_key– strong secret key for Zulip
Optional environment variables
SETTINGS_ALLOWED_HOSTS– comma-separated hostsSETTINGS_LOG_LEVEL=infoSETTINGS_EMAIL_HOST,SETTINGS_EMAIL_HOST_USER,SETTINGS_EMAIL_HOST_PASSWORDfor SMTPSETTINGS_MEMCACHED_HOST=127.0.0.1if you run memcached separately
Persistence
Zulip stores uploads, avatars, and configs on disk:
- Mount path:
/data - Size: based on expected file uploads and retention
Networking
- Protocol: HTTP
- Internal port:
9991 - Users reach
https://example-app.klutch.shwhile Klutch.sh routes to port9991inside the container.
Health check (recommended)
curl -I http://localhost:9991/healthDeployment 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
9991. - Add environment variables for the external services (PostgreSQL, Redis, RabbitMQ),
SETTINGS_EXTERNAL_HOST, admin email, andSECRETS_secret_key. Mark secrets as sensitive. - Attach a persistent volume at
/datasized for uploads and configuration. - Deploy. After the app starts, finish the Zulip setup via the web UI and create your organization and admin user.
Verification
-
UI: open
https://example-app.klutch.shand confirm the Zulip setup/login page loads. -
Health:
Terminal window curl -I https://example-app.klutch.sh/health
Next steps
- Configure email for invitations and notifications.
- Set up backups for PostgreSQL and the
/datavolume. - Tune Redis and RabbitMQ endpoints and credentials according to your throughput needs.