Matrix Chatserver auf Synology in Docker Container
- avhost/docker-matrix:latest herunterladen
- per ssh auf das NAS Verbinden
#Obsolte
sudo docker run -v /volume1/docker/Matrix:/data --rm -e SERVER_NAME=localhost -e REPORT_STATS=no avhost/docker-matrix:latest generate
kopieren / ggf symlink des Letsencrypt Zerifikates
auf der Synology zu finden unter:
cd /usr/syno/etc/certificate/_archive/
am besten die renew.json prüfen, welche die richtigen Zertifikate sind.
Die erzeugte homeserver.yaml folgendes anpassen:
server_name: "<dyndnsname>"
listeners:
# TLS-enabled listener: for when matrix traffic is sent directly to synapse.
#
# Disabled by default. To enable it, uncomment the following. (Note that you
# will also need to give Synapse a TLS key and certificate: see the TLS section
# below.)
#
- port: 8448
type: http
bind_addresses: ['0.0.0.0']
tls: true
x_forwarded: true
resources:
- names: [client, federation]
- port: 8008
tls: false
bind_addresses: ['0.0.0.0']
type: http
x_forwarded: true
resources:
- names: [client, federation]
compress: false
## TLS ##
# PEM-encoded X509 certificate for TLS.
# This certificate, as of Synapse 1.0, will need to be a valid and verifiable
# certificate, signed by a recognised Certificate Authority.
#
# See 'ACME support' below to enable auto-provisioning this certificate via
# Let's Encrypt.
#
tls_certificate_path: "/data/fullchain.pem"
# PEM-encoded private key for TLS
#
tls_private_key_path: "/data/privkey.pem"
docker run -d -p 8448:8448 -p 8008:8008 -p 3478:3478 --restart unless-stopped --name matrix --link postgres:postgres -v /volume1/docker/Matrix:/data avhost/docker-matrix:latest start
Portweiterleitung am Router nicht vergessen.
Port: 8448 -> 8448 https Port
Port: 8008 -> 8008 http Port
am besten Https Port 443 per Reverse Proxy auf Http port 8008
Benutzerdef. Header
X-Forwarded-For -> $remote_addr
Benutzer über die Docker Console anlegen.
register_new_matrix_user -c /data/homeserver.yaml https://<dyndnsname>