Skip to content

Instantly share code, notes, and snippets.

@LiamPerson
Last active June 16, 2025 09:46
Show Gist options
  • Save LiamPerson/73e1cf34c257db106c4f1755e0b0d440 to your computer and use it in GitHub Desktop.
Save LiamPerson/73e1cf34c257db106c4f1755e0b0d440 to your computer and use it in GitHub Desktop.
How to install Synapse (Matrix Server) on the Raspberry Pi

How to install Synapse (the Matrix server) on a Raspberry Pi

  1. Install RustC: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

  2. Install apt dependencies:

sudo apt install build-essential python3-dev libffi-dev \
  python3-pip python3-setuptools sqlite3 \
  libssl-dev virtualenv libjpeg-dev libxslt1-dev libicu-dev
  1. Go to where you want to install the application. For me this is just making a folder where I am currently:
mkdir synapse
cd synapse
  1. Create a python venv: python -m venv .
  2. Enter the virtual environment (venv): source bin/activate
  3. Upgrade pip and setuptools:
pip install --upgrade pip
pip install --upgrade setuptools
  1. Install synapse: pip install matrix-synapse

  2. Generate the homeserver.yaml file using the generator command (make sure to change <server name> to the domain you are hosting on):

python3 -m synapse.app.homeserver -c homeserver.yaml --generate-config --server-name=<server name> --report-stats=no
  1. That's it. Now run it using synctl start

If you need to restart the server, just run synctl restart while your python virtual environment (venv) is active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment