How to Install Zulip on Debian 11
In this guide you’ll learn how to get a fresh Zulip instance up and running on Debian 11 in under an hour. No fancy scripts, just straight‑forward package installs, a PostgreSQL setup, and a quick systemd tweak.
Prerequisites
- A non‑root user with sudo privileges
- A working internet connection for the apt repository
- A clean Debian 11 installation (or a VM where you can afford to break things)
Zulip relies on Python, PostgreSQL and a handful of system libraries. Installing everything in one go keeps the server sane from the start.
Add the Zulip Repository
sudo apt install gnupg curl curl -s https://zulip.org/apt/zulip.key | sudo gpg --dearmor > /usr/share/keyrings/zulip-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/zulip-archive-keyring.gpg] http://zulip.org/apt/debian $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/zulip.list sudo apt update
The key ensures the packages haven’t been tampered with. The repo line tells apt where to pull Zulip from.
Install Dependencies
sudo apt install zulip-server python3-pip python3-venv postgresql libpq-dev nginx
- zulip-server pulls the actual Zulip code.
- python3-pip and python3-venv let us keep Python packages isolated.
- postgresql is the database that powers all messages.
- libpq-dev supplies the C headers Zulip’s extensions need.
- nginx will act as a reverse proxy; you can swap it for Apache if you prefer.
Configure PostgreSQL
sudo -u postgres psql -c "CREATE USER zulip WITH PASSWORD 'changeme';" sudo -u postgres psql -c "ALTER ROLE zulip SET client_encoding TO 'utf8';" sudo -u postgres psql -c "CREATE DATABASE zulip WITH OWNER zulip ENCODING 'UTF-8';"
Create a dedicated user and database to keep Zulip’s data tidy. If you’re on a shared host, pick a stronger password than the placeholder.
Run the Zulip Setup Script
sudo zulip-server --setup
This wizard will:
1. Detect your PostgreSQL credentials.
2. Create necessary tables.
3. Generate systemd service files (zulip.service, zulip-worker.service).
4. Install a default Nginx configuration.
I’ve seen this step fail on fresh installs when libssl-dev is missing, throwing a “OpenSSL not found” error. If that happens, just install it:
sudo apt install libssl-dev
and rerun the setup.
Start & Verify
sudo systemctl enable zulip.service zulip-worker.service sudo systemctl start zulip.service zulip-worker.service
Check that everything’s alive:
systemctl status zulip.service zulip-worker.service
Visit http://localhost in a browser. You should see the Zulip welcome screen, and the login page will prompt you to set an admin password.
Optional: Secure with HTTPS
If you’re going public, grab a Let’s Encrypt cert:
sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d your.domain.tld
Let’s Encrypt handles the renewal automatically; just keep an eye on /etc/letsencrypt/live/your.domain.tld/fullchain.pem and the corresponding key file.
You’ve now got a fully functional Zulip server running on Debian 11. It’s ready for your team, friends, or that secret group chat you’re planning.