Matrix chat是一个很不错的聊天软件,它支持了多种聊天协议和聊天机器人。并且支持通过matrix-appservice-wechaty来支持微信聊天。 现在我来梳理一下matrix-appservice-wechaty的部署方法。
需要准备的东西
- 域名(假设你的域名是example.com)
- 服务器,最好国内的
配置流程
配置域名解析
Type | Host | Priority | Weight | Port | Target |
---|---|---|---|---|---|
A | matrix | - | - | - | matrix-server-IP |
CNAME | element | - | - | - | matrix. |
CNAME | dimension (*) | - | - | - | matrix. |
CNAME | jitsi (*) | - | - | - | matrix. |
SRV | _matrix-identity._tcp | 10 | 0 | 443 | matrix. |
配置matrix chat
git clone https://github.com/spantaleev/matrix-docker-ansible-deploy.gitmkdir inventory/host_vars/example.com/
export MATRIX_REGISTRATION_ADMIN_SECRET=$(pwgen -s 64 1)
echo '
matrix_domain: example.com
matrix_ssl_lets_encrypt_support_email: ${email}
matrix_synapse_enable_registration: true
matrix_registration_admin_secret: "${MATRIX_REGISTRATION_ADMIN_SECRET}"
matrix_postgres_connection_password: 'synapse-password'
matrix_synapse_federation_enabled: true
matrix_ma1sd_enabled: true
' > inventory/host_vars/example.com/vars.yml
echo 'example.com ansible_host=example.