commit 9799e83808d278c5a9314a64b77c08547f2fb57f Author: raskt Date: Sat Aug 29 04:47:21 2026 +0200 Initial commit: Matrix deployment (Synapse, Element, Caddy, Postgres) Docker-Compose-Setup mit Synapse, Element Web, Synapse-Admin, Caddy als Reverse Proxy und Postgres. Secrets und Laufzeitdaten sind via .gitignore ausgeschlossen; Beispiel-Configs mit Platzhaltern liegen als *.example bei. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Y31cBx4B4b56LmzTA9wx76 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e873a3a --- /dev/null +++ b/.gitignore @@ -0,0 +1,54 @@ +# --------------------------------------------------------------- +# Secrets / Credentials -- NIEMALS committen +# --------------------------------------------------------------- +secrets/* +!secrets/*.example +*.key +*.pem +*.crt +*.p12 +*.signing.key +synapse/homeserver.yaml +synapse/*.signing.key +.env +.env.* +!.env.example + +# --------------------------------------------------------------- +# Laufzeit-Daten der Container (Volumes / Bind Mounts) +# --------------------------------------------------------------- +postgres/ +synapse/media_store/ +synapse/homeserver.pid +caddy/data/ +caddy/config/ + +# --------------------------------------------------------------- +# Logs +# --------------------------------------------------------------- +*.log +logs/ + +# --------------------------------------------------------------- +# Backups / Dumps / Archive +# --------------------------------------------------------------- +*.sql +*.dump +*.bak +*.tar +*.tar.gz +*.zip +backup/ +backups/ + +# --------------------------------------------------------------- +# OS / Editor +# --------------------------------------------------------------- +Thumbs.db +ehthumbs.db +desktop.ini +.DS_Store +*.swp +*~ +.idea/ +.vscode/ diff --git a/caddy/Caddyfile b/caddy/Caddyfile new file mode 100644 index 0000000..cbeae05 --- /dev/null +++ b/caddy/Caddyfile @@ -0,0 +1,26 @@ +matrix.greif.life-maps.com { + + handle /_matrix/* { + reverse_proxy synapse:8008 + } + handle /_synapse/* { + reverse_proxy synapse:8008 + } + handle /.well-known/matrix/* { + reverse_proxy synapse:8008 + } + + # Landing Page + handle { + root * /var/www/html + file_server + } +} + +element.greif.life-maps.com { + reverse_proxy element:80 +} + +element-admin.greif.life-maps.com { + reverse_proxy element-admin:80 +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e0c4708 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,54 @@ +services: + db: + image: postgres:15 + restart: unless-stopped + environment: + - POSTGRES_USER=matrix + - POSTGRES_DB=synapse + - POSTGRES_PASSWORD_FILE=/run/secrets/db_password + - POSTGRES_INITDB_ARGS=--lc-collate=C --lc-ctype=C --encoding=UTF-8 + secrets: + - db_password + volumes: + - ./postgres:/var/lib/postgresql/data + + synapse: + image: matrixdotorg/synapse:latest + restart: unless-stopped + environment: + - SYNAPSE_SERVER_NAME=matrix.greif.life-maps.com + - SYNAPSE_REPORT_STATS=no + volumes: + - ./synapse:/data + depends_on: + - db + + element: + image: vectorim/element-web:latest + restart: unless-stopped + volumes: + - ./element/config.json:/app/config.json:ro + + element-admin: + image: awesometechnologies/synapse-admin:latest + restart: unless-stopped + + caddy: + image: caddy:2-alpine + restart: unless-stopped + ports: + - "80:80" + - "443:443" + volumes: + - ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro + - ./caddy/data:/data + - ./caddy/config:/config + - ./matrix-landing:/var/www/html:ro + depends_on: + - synapse + - element + - element-admin + +secrets: + db_password: + file: ./secrets/db_password.txt diff --git a/element/config.json b/element/config.json new file mode 100644 index 0000000..4c9b99e --- /dev/null +++ b/element/config.json @@ -0,0 +1,12 @@ +{ + "default_server_config": { + "m.homeserver": { + "base_url": "https://matrix.greif.life-maps.com", + "server_name": "matrix.greif.life-maps.com" + } + }, + "show_labs_settings": true, + "jitsi": { + "preferredDomain": "meet.jit.si" + } +} diff --git a/matrix-landing/1.jpeg b/matrix-landing/1.jpeg new file mode 100644 index 0000000..48aaa77 Binary files /dev/null and b/matrix-landing/1.jpeg differ diff --git a/matrix-landing/2.png b/matrix-landing/2.png new file mode 100644 index 0000000..504347f Binary files /dev/null and b/matrix-landing/2.png differ diff --git a/matrix-landing/3.png b/matrix-landing/3.png new file mode 100644 index 0000000..5293e64 Binary files /dev/null and b/matrix-landing/3.png differ diff --git a/matrix-landing/4.png b/matrix-landing/4.png new file mode 100644 index 0000000..9c0ed20 Binary files /dev/null and b/matrix-landing/4.png differ diff --git a/matrix-landing/element-logo.svg b/matrix-landing/element-logo.svg new file mode 100644 index 0000000..8aab672 --- /dev/null +++ b/matrix-landing/element-logo.svg @@ -0,0 +1 @@ +Element \ No newline at end of file diff --git a/matrix-landing/index.html b/matrix-landing/index.html new file mode 100644 index 0000000..2a05686 --- /dev/null +++ b/matrix-landing/index.html @@ -0,0 +1,392 @@ + + + + + + Matrix Chat Server + + + + + + + +
+

GREIF MATRIX CHAT

+

Sicherer Messaging-Dienst für private Kommunikation

+
+ +
+ +
+

+ + + + + + Wichtig: Schlüsselsicherung einrichten +

+

Matrix unterstützt Ende-zu-Ende-Verschlüsselung, wodurch die Nachrichten auf den Endgeräten selbst verschlüsselt werden und der Server die Nachrichten nicht mitlesen kann. Daher wird der benötigte Schlüssel nicht auf den Server übertragen. Bei Verlust des Schlüssels kann also der Nachrichtenverlauf von uns NICHT mehr wiederhergestellt werden.

+

Damit Ihre Nachrichten nicht verloren gehen, sollten Sie den Schlüssel dafür sichern. Ich empfehle, den Schlüssel auch auf einem anderen Gerät zu speichern, damit dieser auch bei Verlust des Gerätes wiederhergestellt werden kann.

+
+ +
+

Downloads & Zugang

+
+
+
+ + Element + + +
+

Element Web

+

Direkt im Browser nutzen, ohne Installation.

+ Web-App öffnen +
+
+
+ + Element + + +
+

Element Desktop

+

Native Anwendung für Windows, Mac & Linux.

+ Download +
+
+
+ + Element + + +
+

Element Mobile

+

Die App für iOS und Android Geräte.

+ Mobile App +
+
+
+ + Jitsi + + +
+

Jitsi Meet

+

Videokonferenzen sicher und einfach.

+ Jitsi öffnen +
+
+
+ +
+

Schnellstart & Anleitung

+
+ +
+
1
+
+

Erster Start

+

Dieses Fenster sollte erscheinen, wenn Sie Element zum ersten Mal öffnen. Wählen Sie hier den Button "Anmelden".

+ Erster Start von Element +
+
+ +
+
2
+
+

Anmeldung

+

Klicken Sie im nächsten Screen zuerst auf den "Bearbeiten"-Button bei "Heim-Server". Standardmäßig ist hier ein öffentlicher Matrix-Server eingestellt, dieser wird im nächsten Schritt geändert.

+ Anmeldebildschirm Heim-Server bearbeiten +
+
+ +
+
3
+
+

Änderung des Home-Servers

+

Wählen Sie zur Änderung des Home-Servers die Option "Anderer Heim-Server", geben Sie matrix.greif.life-maps.com in das Textfeld ein und klicken Sie auf "Fortfahren".

+ Heim-Server Adresse eingeben +
+
+ +
+
4
+
+

Anmeldung abschließen

+

Jetzt sollte wieder die Anmeldeseite zu sehen sein. Geben Sie hier Ihre Zugangsdaten ein und klicken Sie auf Anmelden.

+ Zugangsdaten eingeben +
+
+ +
+
+ +
+ © 2026 Greif Matrix Team +
+
+ + diff --git a/matrix-landing/jitsi-logo.svg b/matrix-landing/jitsi-logo.svg new file mode 100644 index 0000000..7323623 --- /dev/null +++ b/matrix-landing/jitsi-logo.svg @@ -0,0 +1 @@ +Jitsi \ No newline at end of file diff --git a/secrets/db_password.txt.example b/secrets/db_password.txt.example new file mode 100644 index 0000000..3d85326 --- /dev/null +++ b/secrets/db_password.txt.example @@ -0,0 +1 @@ +CHANGE_ME_DB_PASSWORD diff --git a/synapse/homeserver.yaml.example b/synapse/homeserver.yaml.example new file mode 100644 index 0000000..b40a3e7 --- /dev/null +++ b/synapse/homeserver.yaml.example @@ -0,0 +1,49 @@ +# Configuration file for Synapse. +# +# This is a YAML file: see [1] for a quick introduction. Note in particular +# that *indentation is important*: all the elements of a list or dictionary +# should have the same indentation. +# +# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html +# +# For more information on how to configure Synapse, including a complete accounting of +# each option, go to docs/usage/configuration/config_documentation.md or +# https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html +server_name: "matrix.greif.life-maps.com" +pid_file: /data/homeserver.pid +listeners: + - port: 8008 + resources: + - compress: false + names: + - client + - federation + tls: false + type: http + x_forwarded: true +database: + name: psycopg2 + args: + user: matrix + password: CHANGE_ME_DB_PASSWORD + database: synapse + host: db + cp_min: 5 + cp_max: 10 +log_config: "/data/matrix.greif.life-maps.com.log.config" +media_store_path: /data/media_store +registration_shared_secret: "CHANGE_ME_REGISTRATION_SHARED_SECRET" +report_stats: false +macaroon_secret_key: "CHANGE_ME_MACAROON_SECRET_KEY" +form_secret: "CHANGE_ME_FORM_SECRET" +signing_key_path: "/data/matrix.greif.life-maps.com.signing.key" +trusted_key_servers: + - server_name: "matrix.org" + + +# vim:ft=yaml +enable_registration: false +federation_domain_whitelist: [] +allow_cors: true +max_upload_size: 2147483648 # 2 GB +max_request_size: 2147483648 # 2 GB diff --git a/synapse/matrix.greif.life-maps.com.log.config b/synapse/matrix.greif.life-maps.com.log.config new file mode 100644 index 0000000..832f0fa --- /dev/null +++ b/synapse/matrix.greif.life-maps.com.log.config @@ -0,0 +1,39 @@ +version: 1 + +formatters: + precise: + + format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' + + +handlers: + + + console: + class: logging.StreamHandler + formatter: precise + +loggers: + # This is just here so we can leave `loggers` in the config regardless of whether + # we configure other loggers below (avoid empty yaml dict error). + _placeholder: + level: "INFO" + + + + synapse.storage.SQL: + # beware: increasing this to DEBUG will make synapse log sensitive + # information such as access tokens. + level: INFO + + + + +root: + level: INFO + + + handlers: [console] + + +disable_existing_loggers: false \ No newline at end of file