How to Install Zulip Chat Server on Debian 9
In this tutorial, we will learn how to install the Zulip chat server software on Debian 9.
- A server running Debian 9 server.
- root access to the server.
First, login as root user to your server. Then you will need to update the system and install some packages on your system. You can install all of them using the following command:
apt-get update -y && apt-get upgrade -y
apt-get install python-dev python-pip openssl nano wget curl unzip -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:password -out server.pass.key 2048
Next, write RSA private key into zulip.key file using the following command:
openssl rsa -passin pass:password -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:
cp zulip.key /etc/ssl/private/zulip.key
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:
Next, rename extracted directory to zulip:
mv zulip-master zulip
Next, change the directory to the zulip and install zulip by running the following command:
./scripts/setup/install --hostname=example.com [email protected]
Replace the email address and hostname in the above command with your server hostname and email address.
Once the installation is completed, the installer will show you a single-use link to register your organization:
Open that link, which is unique for each installation, in a browser to register your Zulip organization. The page will show the text in your local language, so please don't worry that the screenshots below are not in English.
Enter your email address and click on the button to create your organization.
Enter further details of your organization like the name of the organization, email address, your full name and password and click the button to create the account.
You get forwarded to the Zulip dashboard.
Congratulations! you have successfully installed Zulip chat server on Debian 9 server.