How to upgrade Zulip to 13.3 with a backup you can restore
Zulip Server 13.3 and 12.5 came out on November 19, 2026. They fix a flaw (GHSA-f7qf-999g-f6h9) that let any user, including guests, make a server that stores uploads on local disk (the default) read, append to or delete files the zulip user can access, which could expose the server's secrets and run code on it. Patch now, but take a backup first: a major upgrade runs database migrations that you cannot simply undo. This guide is for a standard Zulip install on Ubuntu 22.04, 24.04 or 26.04, or Debian 12 or 13, run as root. Docker installs back up the /data volume instead; see Zulip's Docker docs.
Pick the version you are moving to
Check which version you run first:
grep ZULIP_VERSION /home/zulip/deployments/current/version.py| You run | Move to | What it involves |
|---|---|---|
| 13.0, 13.1 or 13.2 | 13.3 | A minor upgrade. Downtime is usually under 30 seconds, and you can roll back with one command. |
| 12.x | 12.5 now, 13.3 later | 12.5 has the same security fixes and is a minor upgrade. |
| 12.x | 13.3 | A major upgrade. Read the 13.0 upgrade notes below first. |
| Older than 12 | Your series' latest, then step up | Read the upgrade notes for every release in between. |
The 13.0 upgrade notes say the upgrade rebuilds four indexes on the zerver_message table. On servers with many messages this takes a while, and the database needs enough free disk for a second copy of those indexes, because the old ones are dropped only after the new ones are built. 13.3 and 12.5 also make OpenID Connect logins always use PKCE; if your identity provider rejects that, enable PKCE for Zulip's client at the provider.
df -h /
du -sh /var/lib/postgresqlWhat a Zulip backup contains
Zulip's own backup tool writes one .tar.gz with everything needed to rebuild the server elsewhere: the PostgreSQL database, the settings and secrets in /etc/zulip, and uploaded files stored on the server. Losing /etc/zulip hurts: without secret_key every user must log in again, and without avatar_salt uploaded avatars must be re-uploaded.
| In the backup | Not in the backup |
|---|---|
| Database | Logs in /var/log/zulip |
/etc/zulip settings and secrets | Uploads stored in S3 (back the bucket up separately) |
Uploads in LOCAL_UPLOADS_DIR | SSL certificates |
The backup holds your server's secrets and every message. Store it somewhere only you can read, and encrypt it if it leaves the server. See how to encrypt backups.
Take a snapshot and a full backup
Take a snapshot of the server at your provider first. For a major upgrade it is the fastest way back. Then make a Zulip backup into a folder only the zulip user and root can read:
mkdir -p /var/backups/zulip
chown zulip:zulip /var/backups/zulip
chmod 700 /var/backups/zulip
su zulip -c '/home/zulip/deployments/current/manage.py backup --output=/var/backups/zulip/zulip-backup-before-upgrade.tar.gz'
ls -lh /var/backups/zulip/
tar -Oaxf /var/backups/zulip/zulip-backup-before-upgrade.tar.gz zulip-backup/zulip-versionThe tool prints Backup tarball written to and the path when it finishes. The last command prints the Zulip version stored inside the archive, which proves the file is readable. The archive also has postgres-version and os-version files; you need the same OS and PostgreSQL version to restore it.
Copy the file off the server before you upgrade, for example to a bucket with rclone. A backup that only lives on the server you are about to change does not protect you from much.
Run the upgrade
As root, download the release and run the upgrade script from your current deployment. zulip-server-latest.tar.gz is the newest release, 13.3 at the time of writing. To stay on 12.x, download zulip-server-12.5.tar.gz from download.zulip.com/server instead and pass that file name.
cd /root
curl -fLO https://download.zulip.com/server/zulip-server-latest.tar.gz
/home/zulip/deployments/current/scripts/upgrade-zulip zulip-server-latest.tar.gzThe script runs apt-get upgrade, installs new dependencies, stops Zulip, runs puppet apply, runs database migrations and starts the new version. Everything it prints is also logged to /var/log/zulip/upgrade.log. The upgrade scripts can be run again safely, so if it fails on a network problem, fix that and rerun it.
On a server with the minimum RAM, the upgrade can run out of memory. Zulip's docs suggest stopping the server first with /home/zulip/deployments/current/scripts/stop-server to free RAM.
Check it worked
grep ZULIP_VERSION /home/zulip/deployments/current/version.py
tail -n 20 /var/log/zulip/upgrade.log
tail -n 50 /var/log/zulip/errors.logThen log in, send a message, and upload a file to confirm uploads still work. If you use OpenID Connect, log in with it too, because of the PKCE change.
Roll back if something is wrong
Each upgrade creates a new folder under /home/zulip/deployments/ and moves the current and last symlinks. After a minor upgrade, such as 13.2 to 13.3, you can go back to the previous code with:
/home/zulip/deployments/last/scripts/restart-serverZulip's docs say this is meant for minor releases. After a major upgrade, such as 12.x to 13.3, the database has been migrated, so restore the snapshot you took, or restore the backup onto a fresh server as shown below.
Rolling back to a version before 13.3 or 12.5 puts the file-access flaw back. Treat it as a short stopgap and fix the problem that made you roll back.
Schedule nightly backups
Run the same backup every night from root's crontab and keep a week of archives on the server. In crontab, % must be written as \%.
30 3 * * * su zulip -c '/home/zulip/deployments/current/manage.py backup --output=/var/backups/zulip/zulip-backup-$(date +\%F).tar.gz' && find /var/backups/zulip -name 'zulip-backup-*.tar.gz' -mtime +7 -deleteThen copy each night's file to storage at another provider, and keep more than a week there. The backup retention guide helps you pick how long.
Prove the backup restores
A backup you have never restored is a guess. Restore it onto a test server, not your live one:
- Create a small server with the same OS version as the one in the archive's
os-versionfile. - Install Zulip on it through Step 3 of Zulip's install guide, passing
--postgresql-versionwith the version in the archive'spostgres-versionfile. - Copy the backup to the test server and, as root, run the restore command below.
- If the test server uses a different hostname, update
EXTERNAL_HOSTin/etc/zulip/settings.pyand restart Zulip, or it answers with400 BAD REQUEST. - Log in, read some recent messages and open an uploaded file. Then delete the test server.
/home/zulip/deployments/current/scripts/setup/restore-backup /root/zulip-backup-<YYYY-MM-DD>.tar.gzDo this once now and again every few months. See how to test a backup restore for a simple routine.
Frequently asked questions
- Am I affected if my uploads are in S3?
- Not by GHSA-f7qf-999g-f6h9: the changelog says servers that store uploads in S3 were not affected. 13.3 and 12.5 fix other issues as well, so upgrade anyway.
- How long is Zulip down during the upgrade?
- Zulip's docs say the outage is usually under 30 seconds, unless an expensive database migration runs. The 13.0 index rebuild is one of those on servers with many messages, so schedule a major upgrade outside busy hours.
- Can I restore a Zulip backup onto a newer OS?
- Restore onto the same OS and PostgreSQL version the backup came from, then upgrade the OS or PostgreSQL afterwards, as Zulip's docs describe.
- I run Zulip in Docker. Does this apply?
- Upgrade to 13.3 the same day, but the backup unit for Docker is a snapshot of the
/datavolume with a recent database dump, as described in Zulip's Docker documentation, not a manage.py backup tarball.
How this was checked
Commands, limits and prices were checked against these official pages, on November 23, 2026: