MirrorNest
← すべてのガイド

Matrix Synapse

Synapse is the reference server implementation for the federated Matrix chat protocol, officially published as a Docker image for self-hosting a homeserver.

このガイドは上記リンク先にあるMatrix Synapse公式ドキュメントをもとに作成されています。ディストリビューションやプロジェクトのバージョンは時間とともに変わるため、本番サーバーでこれらのコマンドを実行する前に、必ず公式ドキュメントで正確なパッケージ名・バージョン名を確認してください。
  1. 1Generate the Synapse configuration

    Use the official image's 'generate' command to create config files in a persistent Docker volume. SYNAPSE_SERVER_NAME and SYNAPSE_REPORT_STATS are mandatory.

    docker run -it --rm \ --mount type=volume,src=synapse-data,dst=/data \ -e SYNAPSE_SERVER_NAME=my.matrix.host \ -e SYNAPSE_REPORT_STATS=yes \ matrixdotorg/synapse:latest generate
  2. 2Start the Synapse container

    docker run -d --name synapse \ --mount type=volume,src=synapse-data,dst=/data \ -p 8008:8008 \ matrixdotorg/synapse:latest
  3. 3Check the logs

    docker logs synapse
  4. 4Move to PostgreSQL for production

    The default SQLite backend is only meant for testing. Synapse's docs recommend connecting it to a separate PostgreSQL database for any real deployment, configured in the generated homeserver.yaml.

  5. 5Put it behind a reverse proxy

    For federation and client access over HTTPS, place Synapse behind a reverse proxy (nginx, Caddy, Traefik) terminating TLS and forwarding to port 8008, as described in Synapse's reverse-proxy documentation.