Zulip
Open-source team chat with unique topic-based threading
Alternative to: slack, microsoft teams, discord
Zulip is an open-source organized team chat app that combines the best of email and chat to make remote work productive and delightful. Its unique topic-based threading lets conversations run in parallel without getting lost, supporting both live and asynchronous discussions for teams of any size.
Zulip Docker Compose example
Self-host Zulip on your own server, homelab, or VPS starting from this Docker Compose example.
It runs Zulip in Docker containers using the official ghcr.io/zulip/zulip-server:latest, zulip/zulip-postgresql:14, memcached:alpine, rabbitmq:4.2, redis:alpine images, with persistent volumes and automatic restarts preconfigured.
Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.
services:
zulip:
image: ghcr.io/zulip/zulip-server:latest
restart: unless-stopped
environment:
# Hostname users type into their browser to reach Zulip (a domain name, not a URL or IP)
SETTING_EXTERNAL_HOST: "zulip.example.com"
# Email address of the server administrator, shown to users in error pages and emails
SETTING_ZULIP_ADMINISTRATOR: "zulip-admin@example.com"
# Trust X-Forwarded-For / X-Forwarded-Proto from the Docker gateway (a reverse proxy terminates TLS)
TRUST_GATEWAY_IP: "True"
# Comma-separated list of enabled authentication backends
ZULIP_AUTH_BACKENDS: "EmailAuthBackend"
# Hostname of the PostgreSQL service
SETTING_REMOTE_POSTGRES_HOST: "database"
# Host:port of the memcached service
SETTING_MEMCACHED_LOCATION: "memcached:11211"
# Hostname of the RabbitMQ service
SETTING_RABBITMQ_HOST: "rabbitmq"
# Hostname of the Redis service
SETTING_REDIS_HOST: "redis"
# PostgreSQL password (must match POSTGRES_PASSWORD of the database service)
SECRETS_postgres_password: "zulip"
# Memcached SASL password (must match MEMCACHED_PASSWORD of the memcached service)
SECRETS_memcached_password: "zulip"
# RabbitMQ password (must match RABBITMQ_DEFAULT_PASS of the rabbitmq service)
SECRETS_rabbitmq_password: "zulip"
# Redis password (must match REDIS_PASSWORD of the redis service)
SECRETS_redis_password: "zulip"
# Outgoing SMTP server hostname (empty disables outgoing email)
SETTING_EMAIL_HOST: ""
# Outgoing SMTP username
SETTING_EMAIL_HOST_USER: ""
# Outgoing SMTP port
SETTING_EMAIL_PORT: "587"
# Use STARTTLS for outgoing SMTP
SETTING_EMAIL_USE_TLS: "True"
# Outgoing SMTP password
SECRETS_email_password: ""
volumes:
- zulip:/data
ulimits:
nofile:
soft: 1000000
hard: 1048576
depends_on:
- database
- memcached
- rabbitmq
- redis
database:
image: zulip/zulip-postgresql:14
restart: unless-stopped
environment:
# Name of the Zulip database
POSTGRES_DB: "zulip"
# Database user Zulip connects as
POSTGRES_USER: "zulip"
# Database password (internal to the compose network)
POSTGRES_PASSWORD: "zulip"
volumes:
- postgresql:/var/lib/postgresql/data
memcached:
image: memcached:alpine
restart: unless-stopped
command:
- sh
- -euc
- |
echo 'mech_list: plain' > "$$SASL_CONF_PATH"
echo "zulip@$$HOSTNAME:$$MEMCACHED_PASSWORD" > "$$MEMCACHED_SASL_PWDB"
echo "zulip@localhost:$$MEMCACHED_PASSWORD" >> "$$MEMCACHED_SASL_PWDB"
exec memcached -S
environment:
# Path of the generated SASL configuration file
SASL_CONF_PATH: "/home/memcache/memcached.conf"
# Path of the generated SASL password database
MEMCACHED_SASL_PWDB: "/home/memcache/memcached-sasl-db"
# SASL password for the zulip user (internal to the compose network)
MEMCACHED_PASSWORD: "zulip"
rabbitmq:
image: rabbitmq:4.2
restart: unless-stopped
environment:
# RabbitMQ user Zulip connects as
RABBITMQ_DEFAULT_USER: "zulip"
# RabbitMQ password (internal to the compose network)
RABBITMQ_DEFAULT_PASS: "zulip"
volumes:
- rabbitmq:/var/lib/rabbitmq
redis:
image: redis:alpine
restart: unless-stopped
command:
- sh
- -euc
- exec docker-entrypoint.sh redis-server --requirepass "$$REDIS_PASSWORD"
environment:
# Redis password (internal to the compose network)
REDIS_PASSWORD: "zulip"
volumes:
- redis:/data
volumes:
zulip:
postgresql:
rabbitmq:
redis: Prefer a managed setup? WinterFlow installs, configures, and updates Zulip for you using this same Docker Compose configuration.