Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| services:synapse [2024/06/04 14:35] – willy | services:synapse [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Matrix - Synapse | ||
| - | |||
| - | [[https:// | ||
| - | |||
| - | |||
| - | useradd -d / | ||
| - | mkdir / | ||
| - | chown synapse: | ||
| - | su - synapse | ||
| - | mkdir / | ||
| - | mkdir / | ||
| - | mkdir / | ||
| - | mkdir / | ||
| - | |||
| - | |||
| - | <file - docker-composer.yml> | ||
| - | |||
| - | </ | ||
| - | |||
| - | <code bash> | ||
| - | podman compose pull | ||
| - | </ | ||
| - | |||
| - | Edit your **/ | ||
| - | <file - docker-compose.yml> | ||
| - | version: ' | ||
| - | services: | ||
| - | synapse: | ||
| - | image: docker.io/ | ||
| - | restart: unless-stopped | ||
| - | environment: | ||
| - | - SYNAPSE_CONFIG_PATH=/ | ||
| - | volumes: | ||
| - | - / | ||
| - | depends_on: | ||
| - | - db | ||
| - | ports: | ||
| - | - 8008: | ||
| - | networks: | ||
| - | - synapse-net | ||
| - | |||
| - | db: | ||
| - | image: docker.io/ | ||
| - | environment: | ||
| - | - POSTGRES_USER=synapse | ||
| - | - POSTGRES_PASSWORD=< | ||
| - | - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C | ||
| - | volumes: | ||
| - | - / | ||
| - | networks: | ||
| - | - synapse-net | ||
| - | |||
| - | networks: | ||
| - | synapse-net: | ||
| - | </ | ||
| - | |||
| - | Generate initial configuration file: | ||
| - | <code bash> | ||
| - | podman compose run --rm -e SYNAPSE_SERVER_NAME=chat.mydomain.com -e SYNAPSE_REPORT_STATS=yes synapse generate | ||
| - | </ | ||
| - | |||
| - | Edit the config file: | ||
| - | <file - homeserver.yaml> | ||
| - | server_name: | ||
| - | pid_file: / | ||
| - | # NOTE: enable the following two lines ONLY to create users, then REMOVE them! | ||
| - | # | ||
| - | # | ||
| - | listeners: | ||
| - | - port: 8008 | ||
| - | tls: false | ||
| - | type: http | ||
| - | x_forwarded: | ||
| - | resources: | ||
| - | - names: [client, federation] | ||
| - | compress: false | ||
| - | database: | ||
| - | name: psycopg2 | ||
| - | args: | ||
| - | user: synapse | ||
| - | password: < my db password > | ||
| - | dbname: synapse | ||
| - | host: db | ||
| - | cp_min: 5 | ||
| - | cp_max: 10 | ||
| - | log_config: "/ | ||
| - | media_store_path: | ||
| - | registration_shared_secret: | ||
| - | report_stats: | ||
| - | macaroon_secret_key: | ||
| - | form_secret: | ||
| - | signing_key_path: | ||
| - | trusted_key_servers: | ||
| - | - server_name: | ||
| - | </ | ||
| - | |||
| - | To create users: | ||
| - | <code bash> | ||
| - | podman compose run --rm --entrypoint /bin/bash synapse | ||
| - | / | ||
| - | </ | ||
| - | |||
| - | <file - chat.conf> | ||
| - | server { | ||
| - | server_name chat.mydomain.com; | ||
| - | listen 8443 ssl; | ||
| - | listen 443 ssl; | ||
| - | |||
| - | access_log / | ||
| - | error_log / | ||
| - | |||
| - | location ~ ^(/ | ||
| - | # note: do not add a path (even a single /) after the port in `proxy_pass`, | ||
| - | # otherwise nginx will canonicalise the URI and cause signature verification | ||
| - | # errors. | ||
| - | proxy_pass http:// | ||
| - | proxy_set_header X-Forwarded-For $remote_addr; | ||
| - | proxy_set_header X-Forwarded-Proto $scheme; | ||
| - | proxy_set_header Host $host; | ||
| - | |||
| - | # Nginx by default only allows file uploads up to 1M in size | ||
| - | # Increase client_max_body_size to match max_upload_size defined in homeserver.yaml | ||
| - | client_max_body_size 500M; | ||
| - | |||
| - | # Synapse responses may be chunked, which is an HTTP/1.1 feature. | ||
| - | proxy_http_version 1.1; | ||
| - | } | ||
| - | include com.mydomain/ | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | |||
| - | Telegram bridge | ||
| - | crea app telegram | ||
| - | edit / | ||
| - | - persmissione | ||
| - | |||
| - | file config | ||
| - | |||