---
title: "Deploy Zulip | (Just Updated) Slack Alternative Team Chat, Owner Login Pre-Created, No Link Step"
description: "Zulip team chat server with topic threads, Slack alternative, login set"
category: "Other"
url: https://railway.com/deploy/zulip-or-just-updated-slack-alternative-
---

# Deploy Zulip | (Just Updated) Slack Alternative Team Chat, Owner Login Pre-Created, No Link Step

Zulip team chat server with topic threads, Slack alternative, login set

**[Deploy Zulip | (Just Updated) Slack Alternative Team Chat, Owner Login Pre-Created, No Link Step on Railway](https://railway.com/template/zulip-or-just-updated-slack-alternative-)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/zulip-or-just-updated-slack-alternative-/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Other

## Template content

### redis

- **Image:** redis:8.2.1-alpine@sha256:987c376c727652f99625c7d205a1cba3cb2c53b92b0b62aade2bd48ee1593232
- **Start command:** `/bin/sh -c 'chown -R redis:redis /data && exec docker-entrypoint.sh redis-server --requirepass "$REDIS_PASSWORD" --appendonly yes --dir /data'`

### database

- **Image:** zulip/zulip-postgresql:14@sha256:e71ba8616fa42cdc1b248f51263d9290c29681cb8c1992eb9b498af0bb656b29
- **Start command:** `/bin/sh -c 'export POSTGRES_USER=zulip POSTGRES_DB=zulip; exec docker-entrypoint.sh postgres'`

### zulip

- **Image:** ghcr.io/bon5co/zulip-railway:13.3-0@sha256:a21ff4d3583c0e3dd4b196c040182f6e81ac97ffb1ee4646caeac4cb711e8575
- **Health check:** /health
- **Public domain:** Yes

### rabbitmq

- **Image:** rabbitmq:4.2@sha256:62a0b82a6575e86bb66e1bc72b36d63bc543add98c9281ed2183437b2ad69759
- **Start command:** `/bin/sh -c 'set -e; export RABBITMQ_DEFAULT_USER=zulip; M=$(cat /sys/fs/cgroup/memory.max 2>/dev/null || echo max); case "$M" in ""|max) L=2GB;; *) L=$((M*6/10));; esac; printf '\''vm_memory_high_watermark.absolute = %s\n'\'' "$L" > /etc/rabbitmq/conf.d/90-railway.conf; grep -q " rabbitmq$" /etc/hosts || echo "127.0.0.1 rabbitmq" >> /etc/hosts; echo NODENAME=rabbit@rabbitmq > /etc/rabbitmq/rabbitmq-env.conf; exec docker-entrypoint.sh rabbitmq-server'`

### memcached

- **Image:** memcached:alpine@sha256:084fb554292d1447bc2c68b80c2331b98834514f56c866bc21a61be3c2ee376d
- **Start command:** `/bin/sh -c 'echo "mech_list: plain" > /home/memcache/memcached.conf; echo "zulip@localhost:$MEMCACHED_PASSWORD" > /home/memcache/memcached-sasl-db; export SASL_CONF_PATH=/home/memcache/memcached.conf MEMCACHED_SASL_PWDB=/home/memcache/memcached-sasl-db; exec docker-entrypoint.sh memcached -S -l 0.0.0.0,::'`

## Documentation

# Deploy and Host Zulip on Railway

**Built for an LLM agent to deploy and use.** The deploy form has no fields to fill: the first organization and its owner login are created at first boot, the secrets and the database, cache and queue credentials are generated, and nobody else can register. Zulip is an open-source team chat server where every conversation is a topic inside a channel, with a full REST API, bots, integrations and mobile apps, a self-hosted alternative to Slack.

## About Hosting Zulip

This template runs five services: **zulip**, the official `zulip/zulip-server` image (docker-zulip release 13.3-0) pinned by digest through a thin wrapper, with a volume at `/data` for uploads and configuration; **database**, `zulip/zulip-postgresql:14` with a volume at `/var/lib/postgresql`; **memcached**, with a SASL account; **rabbitmq**, with a volume at `/var/lib/rabbitmq`; and **redis**, with a volume at `/data`. One public domain serves Zulip on port 8080, with an HTTP healthcheck at `/health` that turns green only after the database migrations ran and the first organization exists.

**What the wrapper fixes.** A stock Zulip container has no account: someone has to run `manage.py generate_realm_creation_link` inside it and open the link before anybody can sign in, and its settings and secrets are not variables a template can fill. The wrapper maps the template's variables onto Zulip's settings, lets Zulip's own entrypoint run the migrations, creates the first organization and its owner with `manage.py create_realm` from `ADMIN_EMAIL` and `ADMIN_PASSWORD`, and only then opens the public port, a small forwarder to Zulip's nginx that also rewrites Railway's probe host. The organization is invite-only: a stranger who asks to sign up is told to request an invitation, and the registration endpoint refuses them. Redeploys keep the organization, the messages and the uploads.

**Using it.** Open your domain and log in with the owner e-mail and password from the `zulip` service variables. An agent calls `POST /api/v1/fetch_api_key` with the same login to get an API key and sends it with HTTP basic auth on every `/api/v1` call. E-mail (invitations by mail, password reset, notifications) and mobile push are not configured; set Zulip's `SETTING_EMAIL_HOST` family of variables on the `zulip` service if you need them, or invite people with an invite link from the organization settings.

### Agent contract

- Public URL: `https://RAILWAY_PUBLIC_DOMAIN` (the generated domain of the `zulip` service)
- Private URL: `http://zulip.railway.internal:8080`
- Credentials: the variables `ADMIN_EMAIL` and `ADMIN_PASSWORD` on the `zulip` service (plain text); the API key is fetched after login
- Auth: `POST /api/v1/fetch_api_key` with `username` and `password` returns `api_key`; send it as HTTP basic auth (`ADMIN_EMAIL:api_key`) on every `/api/v1` call, which answers 401 without it
- Health: `GET /api/v1/server_settings` returns 200 without credentials (Zulip's own `/health` is refused to anything but localhost; Railway's probe carries no client address and gets 200)

```bash
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, ADMIN_EMAIL, ADMIN_PASSWORD (variables of the zulip service); also curl, jq.
R="https://$RAILWAY_PUBLIC_DOMAIN"; JAR=$(mktemp)
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/api/v1/server_settings")" = 200 ]; do n=$((n+1)); [ "$n" -le 120 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/api/v1/server_settings"
# a stranger cannot register: the sign-up page asks for an invitation and the registration endpoint refuses a request that carries no invite key
curl -s -c "$JAR" -b "$JAR" -o /dev/null "$R/register/"
CSRF=$(awk '$6 ~ /csrftoken$/{print $7}' "$JAR")
echo "invite required: $(curl -s -c "$JAR" -b "$JAR" -H "Referer: $R/register/" --data-urlencode "csrfmiddlewaretoken=$CSRF" --data-urlencode "email=stranger@example.com" "$R/register/" | grep -c 'You need an invitation')"
curl -s -o /dev/null -w "public signup: %{http_code}\n" -b "$JAR" -H "Referer: $R/register/" --data-urlencode "csrfmiddlewaretoken=$CSRF" --data-urlencode "full_name=Stranger" --data-urlencode "password=Str4ngerPass99" "$R/accounts/register/"
# the generated owner login: fetch_api_key answers with the key that authenticates every /api/v1 call (HTTP basic: e-mail and key)
KEY=$(curl -s --data-urlencode "username=$ADMIN_EMAIL" --data-urlencode "password=$ADMIN_PASSWORD" "$R/api/v1/fetch_api_key" | jq -r '.api_key')
case "$KEY" in ""|null) echo "login: failed";; *) echo "login: ok";; esac
ME=$(curl -s -u "$ADMIN_EMAIL:$KEY" "$R/api/v1/users/me")
echo "role: $(echo "$ME" | jq -r 'if .is_owner then "owner" else "other" end')"
UID_=$(echo "$ME" | jq -r '.user_id')
# write-auth: POST /api/v1/messages needs the key; without it, or with a wrong one, the answer is 401
curl -s -o /dev/null -w "write with key: %{http_code}\n" -u "$ADMIN_EMAIL:$KEY" --data-urlencode "type=direct" --data-urlencode "to=[$UID_]" --data-urlencode "content=hello from an agent" "$R/api/v1/messages"
curl -s -o /dev/null -w "write without key: %{http_code}\n" --data-urlencode "type=direct" --data-urlencode "to=[$UID_]" --data-urlencode "content=hello from an agent" "$R/api/v1/messages"
curl -s -o /dev/null -w "write wrong key: %{http_code}\n" -u "$ADMIN_EMAIL:wrongkey" --data-urlencode "type=direct" --data-urlencode "to=[$UID_]" --data-urlencode "content=hello from an agent" "$R/api/v1/messages"
```

Expected output against a fresh deploy:

```text
health: 200
invite required: 1
public signup: 404
login: ok
role: owner
write with key: 200
write without key: 401
write wrong key: 401
```

The refusals are the contract: a request without a key is refused (`write without key: 401`), a wrong key is refused (`write wrong key: 401`), and a stranger cannot register (`public signup: 404`, and the sign-up page answers that an invitation is needed).

## Why Deploy Zulip on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Zulip on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

- **Agent-ready** - no deployer fields, a contract block, and one script that proves the app is healthy, strangers cannot register, the generated owner login works and the API refuses writes without a key.
- **Owner included** - the first organization and its owner exist at first boot, so there is no creation link to generate inside the container.
- **Data survives redeploys** - messages in PostgreSQL on a volume, uploads and configuration on a volume, RabbitMQ and Redis on volumes.
- **Pinned** - Zulip, PostgreSQL, memcached, RabbitMQ and Redis are pinned by digest, and the wrapper by tag and digest.

## Common Use Cases

- **Team chat** - threaded conversations organized by channel and topic, instead of a Slack subscription.
- **Open-source community chat** - a public-facing organization for contributors, with topic threads that stay readable.
- **Coordination for AI agents** - give an agent a generated login and an API key to post updates and read replies in a topic.

## Dependencies for Zulip Hosting

- The zulip service, a PostgreSQL service, a memcached service, a RabbitMQ service and a Redis service, each with its volume where it stores data, created by the template.

### Deployment Dependencies

- [Zulip repository](https://github.com/zulip/zulip)
- [Zulip Docker repository](https://github.com/zulip/docker-zulip)
- [Wrapper image source](https://github.com/bon5co/zulip-railway)


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/zulip-or-just-updated-slack-alternative-
