{"id":2952,"date":"2018-03-01T19:52:15","date_gmt":"2018-03-01T16:52:15","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/how-to-install-zulip-chat-server-on-debian\/"},"modified":"2018-03-01T19:52:15","modified_gmt":"2018-03-01T16:52:15","slug":"how-to-install-zulip-chat-server-on-debian-9","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-zulip-chat-server-on-debian-9\/","title":{"rendered":"How to Install Zulip Chat Server on Debian 9"},"content":{"rendered":"<div><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-zulip-chat-server-on-debian-9.gif\" class=\"ff-og-image-inserted\" alt=\"\" title=\"\"><\/div>\n<p>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&#8217;s of features such as private messaging, group chats, drag-and-drop file uploads, Emoji and Emoji Reactions, Tweet preview and many more.<\/p>\n<p>In this tutorial, we will learn how to install the Zulip chat server software on Debian 9.<\/p>\n<h2 id=\"requirements\">Requirements<\/h2>\n<ul>\n<li>A server running Debian 9 server.<\/li>\n<li>Non root user with sudo privileges.<\/li>\n<\/ul>\n<h2 id=\"getting-started\">Getting Started<\/h2>\n<p>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:<\/p>\n<p class=\"command\">sudo apt-get update -y &amp;&amp; sudo apt-get upgrade -y<br \/>sudo apt-get install python-dev python-pip openssl nano wget -y<\/p>\n<p>Once all the packages are installed, you can proceed to install SSL certificate.<\/p>\n<h2 id=\"install-ssl-certificate\">Install SSL Certificate<\/h2>\n<p>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.<\/p>\n<p>First, generate RSA key of 2048 bits using the following command:<\/p>\n<p class=\"command\">openssl genrsa -des3 -passout pass:x -out server.pass.key 2048<\/p>\n<p>Next, write RSA private key into zulip.key file using the following command:<\/p>\n<p class=\"command\">openssl rsa -passin pass:x -in server.pass.key -out zulip.key<\/p>\n<p>Next, generate signing request by running the following command:<\/p>\n<p class=\"command\">openssl req -new -key zulip.key -out server.csr<\/p>\n<p>Above command will ask you some information to generate the CSR. Provide all the information as shown below:<\/p>\n<pre>You are about to be asked to enter information that will be incorporated&#13;\ninto your certificate request.&#13;\nWhat you are about to enter is what is called a Distinguished Name or a DN.&#13;\nThere are quite a few fields but you can leave some blank&#13;\nFor some fields there will be a default value,&#13;\nIf you enter '.', the field will be left blank.&#13;\n-----&#13;\nCountry Name (2 letter code) [AU]:IN&#13;\nState or Province Name (full name) [Some-State]:Gujarat&#13;\nLocality Name (eg, city) []:Ahmedabad&#13;\nOrganization Name (eg, company) [Internet Widgits Pty Ltd]:ENJ&#13;\nOrganizational Unit Name (eg, section) []:IT&#13;\nCommon Name (e.g. server FQDN or YOUR name) []:Hitesh&#13;\nEmail Address []:<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"ff97968b959a8b97899ebf98929e9693d19c9092\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#13;\n&#13;\nPlease enter the following 'extra' attributes&#13;\nto be sent with your certificate request&#13;\nA challenge password []:&#13;\nAn optional company name []:&#13;\n<\/pre>\n<p>Next, generate the certificate files by running the following command:<\/p>\n<p class=\"command\">openssl x509 -req -days 365 -in server.csr -signkey zulip.key -out zulip.combined-chain.crt<\/p>\n<p>Next, copy the generated certificate and key using the following command:<\/p>\n<p class=\"command\">sudo cp zulip.key \/etc\/ssl\/private\/zulip.key<br \/>sudo cp zulip.combined-chain.crt \/etc\/ssl\/certs\/zulip.combined-chain.crt<\/p>\n<h2 id=\"install-zulip-server\">Install Zulip Server<\/h2>\n<p>First, you will need to download the latest version of the Zulip from their official website. You can download it with the following command:<\/p>\n<p class=\"command\">wget https:\/\/www.zulip.org\/dist\/releases\/zulip-server-latest.tar.gz<\/p>\n<p>After downloading, extract the downloaded file using the following command:<\/p>\n<p class=\"command\">tar -xvzf zulip-server-latest.tar.gz<\/p>\n<p>Next, rename extracted directory to zulip:<\/p>\n<p class=\"command\">mv zulip-server-1.7.1 zulip<\/p>\n<p>Next, change the directory to the zulip and install zulip by running the following command:<\/p>\n<p class=\"command\">cd zulip<br \/>sudo .\/scripts\/setup\/install<\/p>\n<p>Once the installation is completed, you will need to make some changes in settings.py file:<\/p>\n<p class=\"command\">sudo nano \/etc\/zulip\/settings.py<\/p>\n<p>Change the file as shown below:<\/p>\n<pre>EXTERNAL_HOST localhost&#13;\nZULIP_ADMINISTRATOR <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"4322272e2a2d033a2c3631272c2e222a2d6d202c2e\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#13;\nADMIN_DOMAIN yourdomain.com&#13;\nDEFAULT_FROM_EMAIL <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"a2c3c6cfcbcce2dbcdd7d0c6cdcfc3cbcc8cc1cdcf\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#13;\nNOREPLY_EMAIL_ADDRESS <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"9dfcf9f0f4f3dde4f2e8eff9f2f0fcf4f3b3fef2f0\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#13;\n<\/pre>\n<p>Save the file when you are finished. Then, initialize the PostgreSQL database using the following command:<\/p>\n<p class=\"command\">su zulip -c \/home\/zulip\/deployments\/current\/scripts\/setup\/initialize-database<\/p>\n<p>Once everything is setup correctly you will get the message that you have successfully configured your Zulip database.<\/p>\n<p>Finally, restart the Zulip server using the following command:<\/p>\n<p class=\"command\">su zulip -c \/home\/zulip\/deployments\/current\/scripts\/restart-server<\/p>\n<p>Now, open your web browser and type the URL https:\/\/yourdomain.com and register your new account.<\/p>\n<p>Congratulations! you have successfully installed Zulip chat server on Debian 9 server.<\/p>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-2952","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/2952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=2952"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/2952\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=2952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=2952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=2952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}