How to Install Zulip on Debian Latest
Zulip is a powerful open-source team chat application that is suitable for distributed teams. It combines the immediacy of real-time chats with the productivity of threaded conversations. Zulip supports integrations with popular tools and services like GitHub, Slack, and Trello. This tutorial will guide you on how to install Zulip on Debian Linux.
Prerequisites
Before we begin, ensure that your Debian Linux system is up to date with the latest security patches and software updates:
sudo apt update && sudo apt upgrade -y
Installing Zulip Dependencies
Zulip requires several dependencies to work correctly. To install the dependencies, run the following command:
sudo apt install git python3-dev python3-pip python3-setuptools python3-venv build-essential libssl-dev libffi-dev
Installing PostgreSQL
Zulip requires PostgreSQL database to run, install PostgreSQL:
sudo apt install postgresql postgresql-contrib
Creating a PostgreSQL User and Database
Create a new PostgreSQL user and database for Zulip:
sudo su - postgres
createuser -P zulip
createdb -O zulip zulip
Enter a strong password for the zulip user when prompted.
Creating a Zulip User and Directory
Create a new Zulip system user and a folder where the Zulip files will be stored:
sudo useradd -m zulip
sudo mkdir -p /home/zulip/deployments
Installing Zulip from GitHub
Clone the Zulip repository from GitHub to the /home/zulip/deployments folder:
sudo su - zulip
git clone https://github.com/zulip/zulip.git
cd zulip
Setting up the Zulip Virtual Environment
Create a new Python virtual environment using venv:
python3 -m venv /home/zulip/deployments/venv
Activate the virtual environment:
source /home/zulip/deployments/venv/bin/activate
Installing Zulip Dependencies
Install the Zulip dependencies using pip:
pip install -r requirements.txt
Configuring Zulip
Configure the Zulip installation by running the default config script:
./scripts/zulip-configure
The script will prompt you for the following values:
- Site domain. Enter the fully qualified domain name for your Zulip site, e.g., chat.example.com
- Email domain. Enter the domain name of the email addresses the Zulip will use; for example, if your users' email addresses are [email protected], enter example.com.
- Database type. Select 1 and press Enter to use PostgreSQL. Zulip also supports MySQL and SQLite databases.
- Database host. Press Enter to accept the default value.
- Database port. Press Enter to accept the default value.
- Database name. Enter zulip, the database name you created earlier for Zulip.
- Database user. Enter zulip, the PostgreSQL user you created earlier for Zulip.
- Database password. Enter the PostgreSQL password you created earlier for the Zulip user.
- Memcached servers. Press Enter to accept the default value.
- Email configuration method: Select 1 and press Enter to use SMTP email. Enter the SMTP server information when prompted.
- Email username. Enter your email username when prompted.
- Email password. Enter your email password when prompted.
- External URL path prefix. Press Enter to accept the default value.
Running Zulip
Activate the Zulip virtual environment by typing:
source /home/zulip/deployments/venv/bin/activate
Start the Zulip server using the following command:
./scripts/run-dev.py
The Zulip server should start and listen on port 9991.
You can then access the Zulip web interface by visiting http://yourserver_ip:9991 on your web browser.
Conclusion
You have successfully installed Zulip on your Debian Linux system. You can now explore the Zulip features and start using it to communicate with your team members.