Zulip Maintenance
Some rough notes on running Zulip:
- it requires to run on its own VPS, eg it does not like if you setup other web services (with Nginx) on the same machine
- it needs something slightly more than a basic small VPS, as it runs Python and needs enough CPU and disk space to run decently
- in my experience (maybe due to having left-overs of other web services setup on the same machine, see first point), after each upgrade the HTTPS certificate would break
Given this, the installation instruction are quite clear https://zulip.readthedocs.io/en/stable/production/install.html.
Upgrading
Refer to the official docs. We're not running Zulip inside Docker or patching Zulip, so the default instructions can be followed as-is.
Steps:
- SSH-login to the VPS
- download the latest version of Zulip:
curl -fLO https://download.zulip.com/server/zulip-server-latest.tar.gz
- run this command:
sudo /home/zulip/deployments/current/scripts/upgrade-zulip zulip-server-latest.tar.gz
- wait for the upgrade to take place and note if any errors is being reported during the process; during this time Zulip will be offline for a few minutes only (hopefully)
- as I'm not sure if the HTTPS problem still happens after a Zulip upgrade, but I remove any left-over of Nginx from the system except Zulip's own files, I'll upgrade this entry after the next upgrade!
Please check this Troubleshooting section in case of problems (how to look up logs, debug, etc).
Startup
In the case the VPS is being shut down and booted up again, Zulip might have some problems. At last, we figured Zulip's Nginx was clashing with a leftover instance of Apache — both instructed to restart on startup time and both trying to connect to port 80 (Nginx lost).
To debug this, first check what's Zulip status:
supervisorctl status
Then try to restart Django / and or "everything":
supervisorctl restart zulip-django
supervisorctl restart all
In case nothing is still working, check Nginx status:
systemctl status nginx
If you get something like below, it could be Apache2 is still lingering around:
dev.hackersanddesigners.nl nginx[3214]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
dev.hackersanddesigners.nl nginx[3214]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Check what's running on port 80 and stop it:
netstat -plant | grep 80
systemctl stop apache2
Start back Nginx and Zulip should be running fine afterwards:
systemctl start nginx