Matrix: Difference between revisions
m (→Installation: use Template:Expansion, link to talk) |
(Switch to python3) |
||
Line 7: | Line 7: | ||
The reference server implementation '''Synapse''' is available in the community repository as {{Pkg|matrix-synapse}}. The community package creates a ''synapse'' user. | The reference server implementation '''Synapse''' is available in the community repository as {{Pkg|matrix-synapse}}. The community package creates a ''synapse'' user. | ||
== Configuration == | == Configuration == | ||
Line 15: | Line 13: | ||
{{bc|<nowiki> | {{bc|<nowiki> | ||
$ cd /var/lib/synapse | $ cd /var/lib/synapse | ||
$ sudo -u synapse | $ sudo -u synapse python -m synapse.app.homeserver \ | ||
--server-name my.domain.name \ | --server-name my.domain.name \ | ||
--config-path /etc/synapse/homeserver.yaml \ | --config-path /etc/synapse/homeserver.yaml \ | ||
Line 35: | Line 33: | ||
== Spider Webcrawler == | == Spider Webcrawler == | ||
To enable the webcrawler, for server generated link previews, the additional packages {{Pkg| | To enable the webcrawler, for server generated link previews, the additional packages {{Pkg|python-lxml}} and {{Pkg|python-netaddr}} have to be installed. | ||
After that the config option {{ic|url_preview_enabled: True}} can be set in your {{ic|homeserver.yaml}}. | After that the config option {{ic|url_preview_enabled: True}} can be set in your {{ic|homeserver.yaml}}. | ||
To prevent the synapse server from issuing arbitrary GET requests to internal hosts the {{ic|url_preview_ip_range_blacklist:}} has to be set. | To prevent the synapse server from issuing arbitrary GET requests to internal hosts the {{ic|url_preview_ip_range_blacklist:}} has to be set. |
Revision as of 00:18, 12 January 2019
Matrix is an ambitious new ecosystem for open federated instant messaging and VoIP. It consists of servers, clients and bridge software to connect to existing messaging solutions like IRC.
Installation
The reference server implementation Synapse is available in the community repository as matrix-synapse. The community package creates a synapse user.
Configuration
After installation, a configuration file needs to be generated. It should be readable by the synapse user:
$ cd /var/lib/synapse $ sudo -u synapse python -m synapse.app.homeserver \ --server-name my.domain.name \ --config-path /etc/synapse/homeserver.yaml \ --generate-config \ --report-stats=yes
Note that this will generate corresponding SSL keys and self-signed certificates for the specified server name. You have to regenerate those if you change the server name.
Service
A systemd service named synapse.service will be installed by the matrix-synapse package. It will start the synapse server as user synapse and use the configuration file /etc/synapse/homeserver.yaml
.
User management
You need at least one user on your fresh synapse server. You may create one as your normal non-root user with the command
$ register_new_matrix_user -c /etc/synapse/homeserver.yaml https://localhost:8448
or using one of the matrix clients
Spider Webcrawler
To enable the webcrawler, for server generated link previews, the additional packages python-lxml and python-netaddr have to be installed.
After that the config option url_preview_enabled: True
can be set in your homeserver.yaml
.
To prevent the synapse server from issuing arbitrary GET requests to internal hosts the url_preview_ip_range_blacklist:
has to be set.
There are some examples that can be uncommented.
Add your local IP ranges to that list to prevent the synapse server from trying to crawl them.
After changing the homeserver.yaml
the service has to be restarted.