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
.
To actually run your new homeserver, pick a working directory for Synapse to run (e.g. ~/.synapse).
$ cd ~/.synapse
$ source ./bin/activate
$ synctl start
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!
add this:
raspbian has no setuptools out of the box :(