chatserver / homeserver.yaml
宋国顺
Deploy to HF
14e1745
# 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: "guoshun2003-chatserver.hf.space"
# 允许 Synapse Admin 等外部网页工具连接
enable_cors: true
# 开启注册,家人注册完后建议改为 false
enable_registration: true
# 【关键】添加这一行:允许无验证(无邮箱/手机号)直接注册
enable_registration_without_verification: true
# 【可选】顺手把日志里的另一个警告也消掉
suppress_key_server_warning: true
pid_file: /data/homeserver.pid
listeners:
- port: 7860 # 必须是 7860
tls: false
type: http
x_forwarded: true # 必须开启
bind_addresses: ['0.0.0.0']
resources:
- names: [client, federation]
compress: false
database:
name: psycopg2
allow_unsafe_locale: true
args:
user: "${NEON_USER}" # 变成了变量
password: "${NEON_PASSWORD}" # 变成了变量
database: "neondb"
host: "${NEON_HOST}" # 变成了变量
port: 5432
cp_min: 5
cp_max: 10
# log_config: "/data/guoshun2003-chatserver.hf.space.log.config"
media_store_path: /data/media_store
media_storage_providers:
- module: s3_storage_provider.S3StorageProviderBackend
store_local: True
store_remote: True
store_synchronous: True
config:
bucket: "${S3_BUCKET}" # 变成了变量
region_name: "us-east-1"
endpoint_url: "https://s3.filebase.com"
access_key: "${AWS_ACCESS_KEY_ID}" # 变成了变量
secret_key: "${AWS_SECRET_ACCESS_KEY}" # 变成了变量
registration_shared_secret: "QzIvPq1Ra8Of~X.eS8H&KYdEXtXbsC0kob,Dr3^R#NcRq06Dok"
report_stats: false
macaroon_secret_key: "fIR@lA;C@.;D=gDis1*6LtrfSk69CL8ZG3#w0bDu1-4Xht9BgA"
form_secret: ":Fz4eLsjFF;ADydptUu.p:3l3L:3P:#u8lR2M5LKgBBN=D~OhH"
signing_key_path: "/data/guoshun2003-chatserver.hf.space.signing.key"
trusted_key_servers:
- server_name: "matrix.org"
# vim:ft=yaml