Matrix

1.

sudo -i

mkdir -p /root/data/docker_data/matrix

cd /root/data/docker_data/matrix
2.
sudo docker run -it --rm \
-v /root/data/docker_data/matrix/data:/data \
-e SYNAPSE_SERVER_NAME=改成反代后的域名 \
-e SYNAPSE_REPORT_STATS=yes \
matrixdotorg/synapse:latest generate
3.
cd /root/data/docker_data/matrix/data

vim homeserver.yaml
4.
# 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://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
server_name: "matrix.gugu.ovh"
pid_file: /data/homeserver.pid
listeners:
  - port: 8008
    tls: false
    type: http
    x_forwarded: true
    resources:
      - names: [client, federation]
        compress: false
database:
  name: sqlite3
  args:
    database: /data/homeserver.db
log_config: "/data/matrix.gugu.ovh.log.config"
media_store_path: /data/media_store
registration_shared_secret: "wwaftxJ&3W3Xkx1y4gYoeoY0p6ywmkx96JZB7rCYg2+_bd~M,t"
report_stats: true
macaroon_secret_key: "+i6*ZU+ZgxnIjX98@F3F#Oxw*Un*40=58ESt=+HW=SVA@N6ITy"
form_secret: "xMGG5P~DD-7Brm19jaYR9v0d.wG:abNxN9ikdWcgNE7Z3F;NmB"
signing_key_path: "/data/matrix.gugu.ovh.signing.key"
trusted_key_servers:
  - server_name: "matrix.org"

enable_registration: true
enable_registration_without_verification: true

# vim:ft=yaml
5.
cd /root/data/docker_data/matrix
vim docker-compose.yml
6.
version: "3.3"

services:
  synapse:
    image: "matrixdotorg/synapse:latest"
    container_name: "matrix_synapse"
    restart: unless-stopped
    ports:
      - 8008:8008
    volumes:
      - "./data:/data" # it will look at the current directory where you save the file and look for the data folder inside
    environment:
      VIRTUAL_HOST: "matrix.gugu.ovh"
      VIRTUAL_PORT: 8008
      LETSENCRYPT_HOST: "matrix.gugu.ovh"
      SYNAPSE_SERVER_NAME: "matrix.gugu.ovh"
      SYNAPSE_REPORT_STATS: "yes"
  element-web:
    ports:
      - '8009:80'
    #volumes:
    #    - '/etc/element-web/config.json:/app/config.json'
    image: vectorim/element-web
    restart: unless-stopped
------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容