Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

464 řádky
20 KiB

  1. # The bare hostname which represents your identity.
  2. # This is something like "example.com".
  3. # Note: this playbook does not touch the server referenced here.
  4. hostname_identity: "{{ host_specific_hostname_identity|lower }}"
  5. # This is where your data lives and what we set up here.
  6. # This and the Riot hostname (see below) are expected to be on the same server.
  7. hostname_matrix: "matrix.{{ hostname_identity }}"
  8. # This is where you access the web UI from and what we set up here.
  9. # This and the Matrix hostname (see above) are expected to be on the same server.
  10. hostname_riot: "riot.{{ hostname_identity }}"
  11. matrix_user_username: "matrix"
  12. matrix_user_uid: 991
  13. matrix_user_gid: 991
  14. matrix_base_data_path: "/matrix"
  15. matrix_environment_variables_data_path: "{{ matrix_base_data_path }}/environment-variables"
  16. matrix_static_files_base_path: "{{ matrix_base_data_path }}/static-files"
  17. matrix_homeserver_url: "https://{{ hostname_matrix }}"
  18. matrix_identity_server_url: "https://{{ matrix_synapse_trusted_third_party_id_servers[0] }}"
  19. # The Docker network that all services would be put into
  20. matrix_docker_network: "matrix"
  21. matrix_synapse_docker_image: "matrixdotorg/synapse:v0.34.1.1-py3"
  22. matrix_synapse_base_path: "{{ matrix_base_data_path }}/synapse"
  23. matrix_synapse_config_dir_path: "{{ matrix_synapse_base_path }}/config"
  24. matrix_synapse_run_path: "{{ matrix_synapse_base_path }}/run"
  25. matrix_synapse_storage_path: "{{ matrix_synapse_base_path }}/storage"
  26. matrix_synapse_media_store_path: "{{ matrix_synapse_storage_path }}/media-store"
  27. matrix_synapse_ext_path: "{{ matrix_synapse_base_path }}/ext"
  28. matrix_synapse_in_container_python_packages_path: "/usr/local/lib/python3.6/site-packages"
  29. # Specifies which template files to use when configuring Synapse.
  30. # If you'd like to have your own different configuration, feel free to copy and paste
  31. # the original files into your inventory (e.g. in `inventory/host_vars/<host>/`)
  32. # and then change the specific host's `vars.yaml` file like this:
  33. # matrix_synapse_template_synapse_homeserver: "{{ playbook_dir }}/inventory/host_vars/<host>/homeserver.yaml.j2"
  34. matrix_synapse_template_synapse_homeserver: "{{ role_path }}/templates/synapse/homeserver.yaml.j2"
  35. matrix_synapse_template_synapse_log: "{{ role_path }}/templates/synapse/synapse.log.config.j2"
  36. matrix_synapse_macaroon_secret_key: ""
  37. matrix_synapse_registration_shared_secret: "{{ matrix_synapse_macaroon_secret_key }}"
  38. matrix_synapse_form_secret: "{{ matrix_synapse_macaroon_secret_key }}"
  39. # These are the identity servers that would be trusted by Synapse if mxisd is NOT enabled
  40. matrix_synapse_id_servers_public: ['vector.im', 'matrix.org']
  41. # These are the identity servers that would be trusted by Synapse if mxisd IS enabled
  42. matrix_synapse_id_servers_own: "['{{ hostname_matrix }}']"
  43. # The final list of identity servers to use for Synapse.
  44. # The first one would also be used as riot-web's default identity server.
  45. matrix_synapse_trusted_third_party_id_servers: "{{ matrix_synapse_id_servers_own if matrix_mxisd_enabled else matrix_synapse_id_servers_public }}"
  46. matrix_synapse_max_upload_size_mb: 10
  47. matrix_synapse_max_log_file_size_mb: 100
  48. matrix_synapse_max_log_files_count: 10
  49. # Log levels
  50. # Possible options are defined here https://docs.python.org/3/library/logging.html#logging-levels
  51. # warning: setting log level to DEBUG will make synapse log sensitive information such
  52. # as access tokens
  53. matrix_synapse_log_level: "INFO"
  54. matrix_synapse_storage_sql_log_level: "INFO"
  55. matrix_synapse_root_log_level: "INFO"
  56. # Rate limits
  57. matrix_synapse_rc_messages_per_second: 0.2
  58. matrix_synapse_rc_message_burst_count: 10.0
  59. # Enable this to allow Synapse to report utilization statistics about your server to matrix.org
  60. # (things like number of users, number of messages sent, uptime, load, etc.)
  61. matrix_synapse_report_stats: false
  62. # Controls whether the Matrix server will track presence status (online, offline, unavailable) for users.
  63. # If users participate in large rooms with many other servers,
  64. # disabling this will decrease server load significantly.
  65. matrix_synapse_use_presence: true
  66. # Controls whether people with access to the homeserver can register by themselves.
  67. matrix_synapse_enable_registration: false
  68. # Users who register on this homeserver will automatically be joined to these rooms.
  69. # Rooms are to be specified using addresses (e.g. `#address:example.com`)
  70. matrix_synapse_auto_join_rooms: []
  71. # Controls whether auto-join rooms (`matrix_synapse_auto_join_rooms`) are to be created
  72. # automatically if they don't already exist.
  73. matrix_synapse_autocreate_auto_join_rooms: true
  74. # Controls password-peppering for Matrix Synapse. Not to be changed after initial setup.
  75. matrix_synapse_password_config_pepper: ""
  76. # Controls the number of events that Matrix Synapse caches in memory.
  77. matrix_synapse_event_cache_size: "100K"
  78. # Controls cache sizes for Matrix Synapse via the SYNAPSE_CACHE_FACTOR environment variable.
  79. # Raise this to increase cache sizes or lower it to potentially lower memory use.
  80. # To learn more, see:
  81. # - https://github.com/matrix-org/synapse#help-synapse-eats-all-my-ram
  82. # - https://github.com/matrix-org/synapse/issues/3939
  83. matrix_synapse_cache_factor: 0.5
  84. # Controls whether Matrix Synapse will federate at all.
  85. # Disable this to completely isolate your server from the rest of the Matrix network.
  86. matrix_synapse_federation_enabled: true
  87. # A list of domain names that are allowed to federate with the given Matrix Synapse server.
  88. # An empty list value (`[]`) will also effectively stop federation, but if that's the desired
  89. # result, it's better to accomplish it by changing `matrix_synapse_federation_enabled`.
  90. matrix_synapse_federation_domain_whitelist: ~
  91. # A list of additional "volumes" to mount in the container.
  92. # This list gets populated dynamically based on Synapse extensions that have been enabled.
  93. # Contains definition objects like this: `{"src": "/outside", "dst": "/inside", "options": "rw|ro|slave|.."}
  94. matrix_synapse_container_additional_volumes: []
  95. # A list of additional loggers to register in synapse.log.config.
  96. # This list gets populated dynamically based on Synapse extensions that have been enabled.
  97. # Contains definition objects like this: `{"name": "..", "level": "DEBUG"}
  98. matrix_synapse_additional_loggers: []
  99. # A list of service config files
  100. # This list gets populated dynamically based on Synapse extensions that have been enabled.
  101. # Contains fs paths
  102. matrix_synapse_app_service_config_files: []
  103. # This is set dynamically during execution depending on whether
  104. # any password providers have been enabled or not.
  105. matrix_synapse_password_providers_enabled: false
  106. # Enable this to activate the REST auth password provider module.
  107. # See: https://github.com/kamax-io/matrix-synapse-rest-auth
  108. matrix_synapse_ext_password_provider_rest_auth_enabled: false
  109. matrix_synapse_ext_password_provider_rest_auth_download_url: "https://raw.githubusercontent.com/kamax-io/matrix-synapse-rest-auth/v0.1.1/rest_auth_provider.py"
  110. matrix_synapse_ext_password_provider_rest_auth_endpoint: ""
  111. matrix_synapse_ext_password_provider_rest_auth_registration_enforce_lowercase: false
  112. matrix_synapse_ext_password_provider_rest_auth_registration_profile_name_autofill: true
  113. matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill: false
  114. # Enable this to activate the Shared Secret Auth password provider module.
  115. # See: https://github.com/devture/matrix-synapse-shared-secret-auth
  116. matrix_synapse_ext_password_provider_shared_secret_auth_enabled: false
  117. matrix_synapse_ext_password_provider_shared_secret_auth_download_url: "https://raw.githubusercontent.com/devture/matrix-synapse-shared-secret-auth/1.0.1/shared_secret_authenticator.py"
  118. matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: ""
  119. # Enable this to activate LDAP password provider
  120. matrix_synapse_ext_password_provider_ldap_enabled: false
  121. matrix_synapse_ext_password_provider_ldap_uri: "ldap://ldap.mydomain.tld:389"
  122. matrix_synapse_ext_password_provider_ldap_start_tls: true
  123. matrix_synapse_ext_password_provider_ldap_base: ""
  124. matrix_synapse_ext_password_provider_ldap_attributes_uid: "uid"
  125. matrix_synapse_ext_password_provider_ldap_attributes_mail: "mail"
  126. matrix_synapse_ext_password_provider_ldap_attributes_name: "cn"
  127. matrix_synapse_ext_password_provider_ldap_bind_dn: ""
  128. matrix_synapse_ext_password_provider_ldap_bind_password: ""
  129. matrix_synapse_ext_password_provider_ldap_filter: ""
  130. # The defaults below cause a postgres server to be configured (running within a container).
  131. # Using an external server is possible by tweaking all of the parameters below.
  132. matrix_postgres_use_external: false
  133. matrix_postgres_connection_hostname: "matrix-postgres"
  134. matrix_postgres_connection_username: "synapse"
  135. matrix_postgres_connection_password: "synapse-password"
  136. matrix_postgres_db_name: "homeserver"
  137. matrix_postgres_data_path: "{{ matrix_base_data_path }}/postgres"
  138. matrix_postgres_docker_image_v9: "postgres:9.6.11-alpine"
  139. matrix_postgres_docker_image_v10: "postgres:10.6-alpine"
  140. matrix_postgres_docker_image_v11: "postgres:11.1-alpine"
  141. matrix_postgres_docker_image_latest: "{{ matrix_postgres_docker_image_v11 }}"
  142. matrix_coturn_docker_image: "instrumentisto/coturn:4.5.0.8"
  143. matrix_coturn_base_path: "{{ matrix_base_data_path }}/coturn"
  144. matrix_coturn_config_path: "{{ matrix_coturn_base_path }}/turnserver.conf"
  145. # A shared secret (between Synapse and Coturn) used for authentication.
  146. # You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`).
  147. matrix_coturn_turn_static_auth_secret: ""
  148. # UDP port-range to use for TURN
  149. matrix_coturn_turn_udp_min_port: 49152
  150. matrix_coturn_turn_udp_max_port: 49172
  151. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  152. matrix_s3_media_store_enabled: false
  153. matrix_s3_goofys_docker_image: "ewoutp/goofys:latest"
  154. matrix_s3_media_store_bucket_name: "your-bucket-name"
  155. matrix_s3_media_store_aws_access_key: "your-aws-access-key"
  156. matrix_s3_media_store_aws_secret_key: "your-aws-secret-key"
  157. matrix_s3_media_store_region: "eu-central-1"
  158. # By default, this playbook sets up a postfix mailer server (running in a container).
  159. # This is so that Matrix Synapse can send email reminders for unread messages.
  160. # Other services (like mxisd), however, also use that mailer to send emails through it.
  161. matrix_mailer_enabled: true
  162. matrix_mailer_docker_image: "panubo/postfix:latest"
  163. matrix_mailer_sender_address: "matrix@{{ hostname_identity }}"
  164. matrix_mailer_relay_use: false
  165. matrix_mailer_relay_host_name: "mail.example.com"
  166. matrix_mailer_relay_host_port: 587
  167. matrix_mailer_relay_auth: false
  168. matrix_mailer_relay_auth_username: ""
  169. matrix_mailer_relay_auth_password: ""
  170. # By default, this playbook installs the mxisd identity server on the same domain as Synapse (`hostname_matrix`).
  171. # If you wish to use the public identity servers (matrix.org, vector.im, riot.im) instead of your own,
  172. # you may wish to disable this.
  173. matrix_mxisd_enabled: true
  174. matrix_mxisd_docker_image: "kamax/mxisd:1.2.2"
  175. matrix_mxisd_base_path: "{{ matrix_base_data_path }}/mxisd"
  176. matrix_mxisd_config_path: "{{ matrix_mxisd_base_path }}/config"
  177. matrix_mxisd_data_path: "{{ matrix_mxisd_base_path }}/data"
  178. # Your identity server is private by default.
  179. # To ensure maximum discovery, you can make your identity server
  180. # also forward lookups to the central matrix.org Identity server
  181. # (at the cost of potentially leaking all your contacts information).
  182. # Enabling this is discouraged. Learn more here: https://github.com/kamax-io/mxisd/blob/master/docs/features/identity.md#lookups
  183. matrix_mxisd_matrixorg_forwarding_enabled: false
  184. # mxisd has serveral supported identity stores.
  185. # One of them (which we enable by default) is storing identities directly in Synapse's database.
  186. # Learn more here: https://github.com/kamax-matrix/mxisd/blob/master/docs/stores/synapse.md
  187. #
  188. # If you need to disable this in favor of some other store, you can toggle it to disabled here
  189. # and add your own mxisd configuration for the other store in `matrix_mxisd_configuration_extension_yaml`.
  190. matrix_mxisd_synapsesql_enabled: true
  191. matrix_mxisd_synapsesql_type: postgresql
  192. matrix_mxisd_synapsesql_connection: //{{ matrix_postgres_connection_hostname }}/{{ matrix_postgres_db_name }}?user={{ matrix_postgres_connection_username }}&password={{ matrix_postgres_connection_password }}
  193. # Default mxisd configuration template which covers the generic use case.
  194. # You can customize it by controlling the various variables inside it.
  195. #
  196. # For a more advanced customization, you can extend the default (see `matrix_mxisd_configuration_extension_yaml`)
  197. # or completely replace this variable with your own template.
  198. matrix_mxisd_configuration_yaml: |
  199. matrix:
  200. domain: {{ hostname_identity }}
  201. server:
  202. name: {{ hostname_matrix }}
  203. key:
  204. path: /var/mxisd/sign.key
  205. storage:
  206. provider:
  207. sqlite:
  208. database: /var/mxisd/mxisd.db
  209. {% if matrix_mxisd_matrixorg_forwarding_enabled %}
  210. forward:
  211. servers: ['matrix-org']
  212. {% endif %}
  213. threepid:
  214. medium:
  215. email:
  216. identity:
  217. from: {{ matrix_mailer_sender_address }}
  218. connectors:
  219. smtp:
  220. host: matrix-mailer
  221. port: 587
  222. tls: 0
  223. synapseSql:
  224. enabled: {{ matrix_mxisd_synapsesql_enabled }}
  225. type: {{ matrix_mxisd_synapsesql_type }}
  226. connection: {{ matrix_mxisd_synapsesql_connection }}
  227. matrix_mxisd_configuration_extension_yaml: |
  228. # Your custom YAML configuration for mxisd goes here.
  229. # This configuration extends the default starting configuration (`matrix_mxisd_configuration_yaml`).
  230. #
  231. # You can override individual variables from the default configuration, or introduce new ones.
  232. #
  233. # If you need something more special, you can take full control by
  234. # completely redefining `matrix_mxisd_configuration_yaml`.
  235. #
  236. # Example configuration extension follows:
  237. #
  238. # ldap:
  239. # enabled: true
  240. # connection:
  241. # host: ldapHostnameOrIp
  242. # tls: false
  243. # port: 389
  244. # baseDns: ['OU=Users,DC=example,DC=org']
  245. # bindDn: CN=My Mxisd User,OU=Users,DC=example,DC=org
  246. # bindPassword: TheUserPassword
  247. # Doing `|from_yaml` when the extension contains nothing yields an empty string ("").
  248. # We need to ensure it's a dictionary or `|combine` (when building `matrix_mxisd_configuration`) will fail later.
  249. matrix_mxisd_configuration_extension: "{{ matrix_mxisd_configuration_extension_yaml|from_yaml if matrix_mxisd_configuration_extension_yaml|from_yaml else {} }}"
  250. # Holds the final mxisd configuration (a combination of the default and its extension).
  251. # You most likely don't need to touch this variable. Instead, see `matrix_mxisd_configuration_yaml`.
  252. matrix_mxisd_configuration: "{{ matrix_mxisd_configuration_yaml|from_yaml|combine(matrix_mxisd_configuration_extension, recursive=True) }}"
  253. # Enable this to add support for matrix-corporal.
  254. # See: https://github.com/devture/matrix-corporal
  255. matrix_corporal_enabled: false
  256. matrix_corporal_docker_image: "devture/matrix-corporal:1.2.2"
  257. matrix_corporal_base_path: "{{ matrix_base_data_path }}/corporal"
  258. matrix_corporal_config_dir_path: "{{ matrix_corporal_base_path }}/config"
  259. matrix_corporal_cache_dir_path: "{{ matrix_corporal_base_path }}/cache"
  260. matrix_corporal_var_dir_path: "{{ matrix_corporal_base_path }}/var"
  261. matrix_corporal_matrix_timeout_milliseconds: 45000
  262. matrix_corporal_reconciliation_retry_interval_milliseconds: 30000
  263. matrix_corporal_reconciliation_user_id_local_part: "matrix-corporal"
  264. matrix_corporal_http_api_enabled: false
  265. matrix_corporal_http_api_auth_token: ""
  266. # Matrix Corporal policy provider configuration (goes directly into the configuration's `PolicyProvider` value)
  267. matrix_corporal_policy_provider_config: ""
  268. matrix_corporal_debug: false
  269. # By default, this playbook installs the Riot.IM web UI on the `hostname_riot` domain.
  270. # If you wish to connect to your Matrix server by other means,
  271. # you may wish to disable this.
  272. matrix_riot_web_enabled: true
  273. matrix_riot_web_docker_image: "bubuntux/riot-web:v0.17.8"
  274. matrix_riot_web_data_path: "{{ matrix_base_data_path }}/riot-web"
  275. # Riot config.json customizations
  276. matrix_riot_web_disable_custom_urls: true
  277. matrix_riot_web_disable_guests: true
  278. matrix_riot_web_integrations_ui_url: "https://scalar.vector.im/"
  279. matrix_riot_web_integrations_rest_url: "https://scalar.vector.im/api"
  280. matrix_riot_web_integrations_widgets_urls: "https://scalar.vector.im/api"
  281. matrix_riot_web_integrations_jitsi_widget_url: "https://scalar.vector.im/api/widgets/jitsi.html"
  282. # Riot public room directory server(s)
  283. matrix_riot_web_roomdir_servers: ['matrix.org']
  284. matrix_riot_web_welcome_user_id: "@riot-bot:matrix.org"
  285. # Riot home.html customizations
  286. # Default home.html template file
  287. matrix_riot_web_homepage_template: "{{ role_path }}/templates/riot-web/home.html.j2"
  288. # Show general discussion about Matrix and Riot row
  289. matrix_riot_web_homepage_template_general: true
  290. # Show Matrix technical discussions row
  291. matrix_riot_web_homepage_template_technical: true
  292. # Show building services on Matrix row
  293. matrix_riot_web_homepage_template_building: true
  294. # Show contributing code to Matrix and Riot row
  295. matrix_riot_web_homepage_template_contributing: true
  296. # Matrix mautrix is a Matrix <-> Telegram bridge
  297. # Enable telegram bridge
  298. matrix_mautrix_telegram_enabled: false
  299. matrix_mautrix_telegram_docker_image: "tulir/mautrix-telegram:v0.4.0"
  300. matrix_mautrix_telegram_base_path: "{{ matrix_base_data_path }}/mautrix-telegram"
  301. # Get your own API keys at https://my.telegram.org/apps
  302. matrix_mautrix_telegram_api_id: YOUR_TELEGRAM_APP_ID
  303. matrix_mautrix_telegram_api_hash: YOUR_TELEGRAM_API_HASH
  304. # Mautrix telegram public endpoint to log in to telegram
  305. # Use an uuid so it's not easily discoverable
  306. matrix_mautrix_telegram_public_endpoint: "/{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegram') | to_uuid }}"
  307. # Matrix mautrix is a Matrix <-> Whatsapp bridge
  308. # Enable whatsapp bridge
  309. matrix_mautrix_whatsapp_enabled: false
  310. matrix_mautrix_whatsapp_docker_image: "tulir/mautrix-whatsapp:latest"
  311. matrix_mautrix_whatsapp_base_path: "{{ matrix_base_data_path }}/mautrix-whatsapp"
  312. # By default, this playbook sets up its own nginx proxy server on port 80/443.
  313. # This is fine if you're dedicating the whole server to Matrix.
  314. # But in case that's not the case, you may wish to prevent that
  315. # and take care of proxying by yourself.
  316. matrix_nginx_proxy_enabled: true
  317. matrix_nginx_proxy_docker_image: "nginx:1.15.8-alpine"
  318. matrix_nginx_proxy_data_path: "{{ matrix_base_data_path }}/nginx-proxy"
  319. matrix_nginx_proxy_confd_path: "{{ matrix_nginx_proxy_data_path }}/conf.d"
  320. # The addresses where the Matrix Client API is.
  321. # Certain extensions (like matrix-corporal) may override this in order to capture all traffic.
  322. matrix_nginx_proxy_matrix_client_api_addr_with_proxy_container: "matrix-synapse:8008"
  323. matrix_nginx_proxy_matrix_client_api_addr_sans_proxy_container: "localhost:8008"
  324. # Specifies when to reload the matrix-nginx-proxy service so that
  325. # a new SSL certificate could go into effect.
  326. matrix_nginx_proxy_reload_cron_time_definition: "20 4 */5 * *"
  327. # Specifies which SSL protocols to use when serving Riot and Synapse
  328. # Note TLSv1.3 is not yet available in dockerized nginx
  329. # See: https://github.com/nginxinc/docker-nginx/issues/190
  330. matrix_nginx_proxy_ssl_protocols: "TLSv1.1 TLSv1.2"
  331. # By default, this playbook automatically retrieves and auto-renews
  332. # free SSL certificates from Let's Encrypt.
  333. #
  334. # The following retrieval methods are supported:
  335. # - "lets-encrypt" - the playbook obtains free SSL certificates from Let's Encrypt
  336. # - "self-signed" - the playbook generates and self-signs certificates
  337. # - "manually-managed" - lets you manage certificates by yourself (manually; see below)
  338. #
  339. # If you decide to manage certificates by yourself (`matrix_ssl_retrieval_method: manually-managed`),
  340. # you'd need to drop them into the directory specified by `matrix_ssl_config_dir_path`
  341. # obeying the following hierarchy:
  342. # - <matrix_ssl_config_dir_path>/live/<domain>/fullchain.pem
  343. # - <matrix_ssl_config_dir_path>/live/<domain>/privkey.pem
  344. # where <domain> refers to the domains that you need (usually `hostname_matrix` and `hostname_riot`).
  345. matrix_ssl_retrieval_method: "lets-encrypt"
  346. # Controls whether to obtain production or staging certificates from Let's Encrypt.
  347. matrix_ssl_lets_encrypt_staging: false
  348. matrix_ssl_lets_encrypt_certbot_docker_image: "certbot/certbot:v0.30.0"
  349. matrix_ssl_lets_encrypt_certbot_standalone_http_port: 2402
  350. matrix_ssl_lets_encrypt_support_email: "{{ host_specific_matrix_ssl_lets_encrypt_support_email }}"
  351. matrix_ssl_base_path: "{{ matrix_base_data_path }}/ssl"
  352. matrix_ssl_config_dir_path: "{{ matrix_ssl_base_path }}/config"
  353. matrix_ssl_log_dir_path: "{{ matrix_ssl_base_path }}/log"
  354. # Variables to Control which parts of the role run.
  355. run_setup: true
  356. run_import_postgres: true
  357. run_upgrade_postgres: true
  358. run_start: true
  359. run_register_user: true
  360. run_import_sqlite_db: true
  361. run_import_media_store: true
  362. run_self_check: true