Skip to content

Instantly share code, notes, and snippets.

@berkedel
Last active March 4, 2020 23:08
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 berkedel/b1301135a39e68573476 to your computer and use it in GitHub Desktop.
Save berkedel/b1301135a39e68573476 to your computer and use it in GitHub Desktop.
Install Synapse On Raspbian Wheezy

Install Synapse On Raspbian Wheezy

Before processing on installing Synapse, make sure you have already installed all dependecies of Synapse. By default, we only need to install python development and libffi. Open your terminal and execute the command below.

$ sudo apt-get install python2.7-dev libjpeg8-dev libffi-dev

We use virtualenv. If you did not installed yet, install first.

$ git https://github.com/pypa/virtualenv.git
$ cd virtualenv
$ sudo python setup.py install

Then we install the synapse homeserver. It takes time until finished.

$ virtualenv -p python2.7 ~/.synapse
$ source ~/.synapse/bin/activate
$ pip install --upgrade setuptools
$ pip install https://github.com/matrix-org/synapse/tarball/master

We need to set up your homeserver. It will created your homeserver configuration.

$ cd ~/.synapse
$ python -m synapse.app.homeserver \
    --server-name YOUR_DOMAIN \
    --config-path homeserver.yaml \
    --generate-config \
    --report-stats=[yes|no]

By default, registration of new users is disabled. You can either enable registration in the config (e.g. homeserver.yaml) by specifying enable_registration: true.

Running Synapse

To actually run your new homeserver, pick a working directory for Synapse to run (e.g. ~/.synapse).

$ cd ~/.synapse
$ source ./bin/activate
$ synctl start

Registering New User From Console

You can use the following command.

$ source ~/.synapse/bin/activate
$ synctl start # if not already running
$ register_new_matrix_user -c homeserver.yaml https://localhost:8448
New user localpart: berkedel
Password:
Confirm password:
Success!
Copy link

ghost commented Jun 17, 2019

add this:

apt-get install python-setuptools

raspbian has no setuptools out of the box :(

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