Difference between revisions of "Matrix"
m (→Troubleshooting) |
(→See also: Good installation procedure including email) |
||
Line 49: | Line 49: | ||
*[https://github.com/matrix-org/synapse/tree/master/docker Official docker installation page] | *[https://github.com/matrix-org/synapse/tree/master/docker Official docker installation page] | ||
*[https://jonnev.se/matrix-homeserver-synapse-v0-99-1-1-with-traefik/ Docker installation with PostgreSQL] | *[https://jonnev.se/matrix-homeserver-synapse-v0-99-1-1-with-traefik/ Docker installation with PostgreSQL] | ||
+ | *[https://zerowidthjoiner.net/2020/03/20/setting-up-matrix-and-riot-with-docker Good installation procedure including email] | ||
*[[XMPP]] | *[[XMPP]] | ||
[[Category:Libre software]] | [[Category:Libre software]] |
Revision as of 07:42, 17 June 2020
Docker installation
First generate a default configuration file for your domain as follows, this will automatically pull the necessary containers as well.
docker run -it --rm --mount type=volume,src=synapse-data,dst=/data -e SYNAPSE_SERVER_NAME=organicdesign.co.nz -e SYNAPSE_REPORT_STATS=no matrixdotorg/synapse:latest generate
This will create a new volume with your persistent configuration file in it in /var/lib/docker/volumes/synapse-data/_data/homeserver.yaml
Next, run the container on a local-only.
docker run -d --name synapse --mount type=volume,src=synapse-data,dst=/data -p 127.0.0.1:8008:8008 matrixdotorg/synapse:latest
This is the default Matrix port for unsecured HTTP traffic, so that a reverse proxy needs to be set up from your web-server to handle the HTTPS side of things on exposing the default Matrix HTTPS port of 8448 to the public that connects to the the internal HTTP port on 8008. Also there needs to be a connection from port 443, see the official reverse proxy notes for details about the reverse proxy setup.
Set up a user:
docker exec -it <CONTAINER_ID> register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008
Troubleshooting
Check https://YOURDOMAIN/_matrix/client/versions in a browser, it should respond with something like the following:
{
"versions": ["r0.0.1", "r0.1.0", "r0.2.0", "r0.3.0", "r0.4.0", "r0.5.0"],
"unstable_features": {
"m.id_access_token": true,
"m.require_identity_server": false,
"m.separate_add_and_bind": true,
"org.matrix.label_based_filtering": true,
"org.matrix.e2e_cross_signing": true,
"org.matrix.msc2432": true
}
}
And it should have the following CORS headers:
access-control-allow-headers Origin, X-Requested-With, Content-Type, Accept, Authorization
access-control-allow-methods GET, POST, PUT, DELETE, OPTIONS
access-control-allow-origin *