Upgrade Matrix Synapse homeserver

Description

Upgrade a Matrix Synapse homeserver using pip. For more information, see the official article on upgrading between Synapse versions.

Usage

./update-matrix-homeserver.sh

Snippet

update-matrix-homeserver.sh

# Initialize Python virtual environment
source ./env/bin/activate

# Upgrade using pip
# For PostgreSQL packages, use matrix-synapse[postgres]
pip install --upgrade matrix-synapse

# Restart server
synctl restart

# Check version
curl http://localhost:8008/_synapse/admin/v1/server_version

# Deactivate Python virtual environment
deactivate