03 May 2020

Schnellinstallation Matrix Synapse Server unter Fedora

Installation

sudo dnf install matrix-synapse

Config erstellen

sudo python -m synapse.app.homeserver --server-name host.domain.name --config-path /etc/synapse/homeserver.yaml --generate-config --report-stats=no

und anschließend /etc/synapse/homeserver.yaml anpassen

User manuell hinzufügen:

register_new_matrix_user -c /etc/synapse/homeserver.yaml http://localhost:8008

Firewalld

firewall-cmd --permanent --zone=public --add-port=80/tcp

nginx reverse Proxy

server {
    server_name             host.domain.name;

    listen 443 ssl http2; #default_server;
    listen [::]:443 ssl http2; #default_server;
    server_name host.domain.name;

    [...}]

    ssl_certificate         fullchain.pem;
    ssl_certificate_key     privkey.pem;

            location /_matrix {
            proxy_pass http://192.168.XXX.XXX:8008;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_redirect          off;
        }

        location /_synapse {
            proxy_pass http://192.168.XXX.XXX:8008;
            proxy_set_header X-Forwarded-For $remote_addr;
        }
}
server {
    listen 8448 ssl http2; #default_server;
    listen [::]:8448 ssl http2; #default_server;
    server_name host.domain.name;

    ssl_certificate         fullchain.pem;
    ssl_certificate_key     privkey.pem;

    location /_matrix {
        proxy_pass http://192.168.X.X:8008;
        proxy_set_header X-Forwarded-For $remote_addr;
    }
}