Skip to content

Instantly share code, notes, and snippets.

@bitmvr
Last active January 31, 2021 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitmvr/0e79bd4d0d7f7943b85ef9d07699d7c5 to your computer and use it in GitHub Desktop.
Save bitmvr/0e79bd4d0d7f7943b85ef9d07699d7c5 to your computer and use it in GitHub Desktop.
Installing Matrix-Synapse on Raspbian Buster

Install Synapse on Raspbian GNU/Linux 10 (buster)

A step-by-step guide for installing Synapse on Raspbian Buster.

Pre-requisites

Install Software

  1. Execute: sudo apt-get install build-essential
  2. Execute: sudo apt-get install python3-dev
  3. Execute: sudo apt-get install libffi-dev
  4. Execute: sudo apt-get install python3-pip
  5. Execute: sudo apt-get install python3-setuptools
  6. Execute: sudo apt-get install sqlite3
  7. Execute: sudo apt-get install libssl-dev
  8. Execute: sudo apt-get install virtualenv
  9. Execute: sudo apt-get install libjpeg-dev
  10. Execute: sudo apt-get install libxslt1-dev

Validate Software

  1. Execute: dpkg -s build-essential
  2. Execute: dpkg -s python3-dev
  3. Execute: dpkg -s libffi-dev
  4. Execute: dpkg -s python3-pip
  5. Execute: dpkg -s python3-setuptools
  6. Execute: dpkg -s sqlite3
  7. Execute: dpkg -s libssl-dev
  8. Execute: dpkg -s virtualenv
  9. Execute: dpkg -s libjpeg-dev
  10. Execute: dpkg -s libxslt1-dev

Prepare Virtual Environment

Matrix-Synapse is installed within a Python Virtual Environment. Learn more about Python Virtual Environments.

  1. Execute: mkdir -p "${HOME}/synapse"
  2. Execute: virtualenv -p python3 "${HOME}/synapse/env"

Activate the Virtual Environment

To interact with the virtual environment that was created above, you must source activate from within $HOME/synapse/env/bin/.

  1. Execute: source "${HOME}/synapse/env/bin/activate"

To validate that you have sourced the environment correctly, move your attention to the PS1 Prompt. env should be prefixed to your prompt and resemble the example below.

(env) pi@raspberrypi:

Install Matrix-Synapse

Note: The following command assumes you have successfully sourced the virtual environment.

  1. Execute: pip install matrix-synapse

Create Configuration File

Prior to starting Synapse, a configuration file is needed. When generating the configuration file using the command below, update the value for --server-name to reflect your desired domain name.

Note: The following command assumes you have successfully sourced the virtual environment with your current shell session.

  1. Execute: cd ~/synapse
  2. Execute: python -m synapse.app.homeserver --server-name my.domain.name --config-path homeserver.yaml --generate-config --report-stats=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment