How to Install Zulip Chat Server on Debian 9

Zulip is a free and open source group chat application software that can be used for sharing private and public messages. Zulip is written in Python and uses Django, PostgreSQL, and JavaScript. You can easily integrate Zulip with GitHub, Jira, Stripe, Zendesk, etc. Zulip client Apps also available for the iPhone, Android, and desktop. Zulip provides lot's of features such as private messaging, group chats, drag-and-drop file uploads, Emoji and Emoji Reactions, Tweet preview and many more.

In this tutorial, we will learn how to install the Zulip chat server software on Debian 9.


  • A server running Debian 9 server.
  • Non root user with sudo privileges.

Getting Started

First, you will need to update the system and install some packages on your system. You can install all of them using the following command:

sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install python-dev python-pip openssl nano wget -y

Once all the packages are installed, you can proceed to install SSL certificate.

Install SSL Certificate

Zulip server works on HTTPS connection, so you will need to generate self-signed SSL certificate or obtain commercial SSL certificate. Here, we will generate a private certificate.

First, generate RSA key of 2048 bits using the following command:

openssl genrsa -des3 -passout pass:x -out server.pass.key 2048

Next, write RSA private key into zulip.key file using the following command:

openssl rsa -passin pass:x -in server.pass.key -out zulip.key

Next, generate signing request by running the following command:

openssl req -new -key zulip.key -out server.csr

Above command will ask you some information to generate the CSR. Provide all the information as shown below:

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
Country Name (2 letter code) [AU]:IN
State or Province Name (full name) [Some-State]:Gujarat
Locality Name (eg, city) []:Ahmedabad
Organization Name (eg, company) [Internet Widgits Pty Ltd]:ENJ
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:Hitesh
Email Address []:[email protected]

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

Next, generate the certificate files by running the following command:

openssl x509 -req -days 365 -in server.csr -signkey zulip.key -out zulip.combined-chain.crt

Next, copy the generated certificate and key using the following command:

sudo cp zulip.key /etc/ssl/private/zulip.key
sudo cp zulip.combined-chain.crt /etc/ssl/certs/zulip.combined-chain.crt

Install Zulip Server

First, you will need to download the latest version of the Zulip from their official website. You can download it with the following command:


After downloading, extract the downloaded file using the following command:

tar -xvzf zulip-server-latest.tar.gz

Next, rename extracted directory to zulip:

mv zulip-server-1.7.1 zulip

Next, change the directory to the zulip and install zulip by running the following command:

cd zulip
sudo ./scripts/setup/install

Once the installation is completed, you will need to make some changes in file:

sudo nano /etc/zulip/

Change the file as shown below:

ZULIP_ADMINISTRATOR [email protected]
DEFAULT_FROM_EMAIL [email protected]
NOREPLY_EMAIL_ADDRESS [email protected]

Save the file when you are finished. Then, initialize the PostgreSQL database using the following command:

su zulip -c /home/zulip/deployments/current/scripts/setup/initialize-database

Once everything is setup correctly you will get the message that you have successfully configured your Zulip database.

Finally, restart the Zulip server using the following command:

su zulip -c /home/zulip/deployments/current/scripts/restart-server

Now, open your web browser and type the URL and register your new account.

Congratulations! you have successfully installed Zulip chat server on Debian 9 server.

Share this page:

Suggested articles

1 Comment(s)

Add comment


From: BranKo at: 2018-03-02 18:57:47

I think in section Getting Started is missing curl package

sudo apt-get install curl