Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

839 строки
41 KiB

  1. matrix_synapse_docker_image: "matrixdotorg/synapse:v0.99.3.2"
  2. matrix_synapse_base_path: "{{ matrix_base_data_path }}/synapse"
  3. matrix_synapse_config_dir_path: "{{ matrix_synapse_base_path }}/config"
  4. matrix_synapse_run_path: "{{ matrix_synapse_base_path }}/run"
  5. matrix_synapse_storage_path: "{{ matrix_synapse_base_path }}/storage"
  6. matrix_synapse_media_store_path: "{{ matrix_synapse_storage_path }}/media-store"
  7. matrix_synapse_ext_path: "{{ matrix_synapse_base_path }}/ext"
  8. # Controls whether the Synapse container exposes the Client/Server API port (tcp/8008).
  9. matrix_synapse_container_expose_client_api_port: false
  10. # Controls whether the Synapse container exposes the Server/Server (Federation) API port (tcp/8048).
  11. # This is for the plain HTTP API. If you need Synapse to handle TLS encryption,
  12. # that would be on another port (tcp/8448) controlled by `matrix_synapse_tls_federation_listener_enabled`.
  13. matrix_synapse_container_expose_federation_api_port: false
  14. # Controls whether the Appservice IRC container exposes the Client/Server API port (tcp/9999).
  15. matrix_appservice_irc_container_expose_client_server_api_port: false
  16. # Controls whether the Appservice Discord container exposes the Client/Server API port (tcp/9005).
  17. matrix_appservice_discord_container_expose_client_server_api_port: false
  18. # Controls whether the matrix-synapse container exposes the metrics port (tcp/9100).
  19. matrix_synapse_container_expose_metrics_port: false
  20. # A list of extra arguments to pass to the container
  21. matrix_synapse_container_extra_arguments: []
  22. # List of systemd services that matrix-synapse.service depends on
  23. matrix_synapse_systemd_required_services_list: ['docker.service']
  24. # List of systemd services that matrix-synapse.service wants
  25. matrix_synapse_systemd_wanted_services_list: []
  26. matrix_synapse_in_container_python_packages_path: "/usr/local/lib/python3.6/site-packages"
  27. # Specifies which template files to use when configuring Synapse.
  28. # If you'd like to have your own different configuration, feel free to copy and paste
  29. # the original files into your inventory (e.g. in `inventory/host_vars/<host>/`)
  30. # and then change the specific host's `vars.yaml` file like this:
  31. # matrix_synapse_template_synapse_homeserver: "{{ playbook_dir }}/inventory/host_vars/<host>/homeserver.yaml.j2"
  32. matrix_synapse_template_synapse_homeserver: "{{ role_path }}/templates/synapse/homeserver.yaml.j2"
  33. matrix_synapse_template_synapse_log: "{{ role_path }}/templates/synapse/synapse.log.config.j2"
  34. matrix_synapse_macaroon_secret_key: ""
  35. matrix_synapse_registration_shared_secret: "{{ matrix_synapse_macaroon_secret_key }}"
  36. matrix_synapse_form_secret: "{{ matrix_synapse_macaroon_secret_key }}"
  37. # The list of identity servers to use for Synapse.
  38. # We assume this role runs standalone without a local Identity server, so we point Synapse to public ones.
  39. # This most likely gets overwritten later, so that a local Identity server is used.
  40. matrix_synapse_trusted_third_party_id_servers: "{{ matrix_synapse_id_servers_public }}"
  41. matrix_synapse_max_upload_size_mb: 10
  42. matrix_synapse_max_log_file_size_mb: 100
  43. matrix_synapse_max_log_files_count: 10
  44. # The tmpfs at /tmp needs to be large enough to handle multiple concurrent file uploads.
  45. matrix_synapse_tmp_directory_size_mb: "{{ matrix_synapse_max_upload_size_mb * 50 }}"
  46. # Log levels
  47. # Possible options are defined here https://docs.python.org/3/library/logging.html#logging-levels
  48. # warning: setting log level to DEBUG will make synapse log sensitive information such
  49. # as access tokens
  50. matrix_synapse_log_level: "INFO"
  51. matrix_synapse_storage_sql_log_level: "INFO"
  52. matrix_synapse_root_log_level: "INFO"
  53. # Rate limits
  54. matrix_synapse_rc_messages_per_second: 0.2
  55. matrix_synapse_rc_message_burst_count: 10.0
  56. matrix_synapse_rc_registration:
  57. per_second: 0.17
  58. burst_count: 3
  59. matrix_synapse_rc_login:
  60. address:
  61. per_second: 0.17
  62. burst_count: 3
  63. account:
  64. per_second: 0.17
  65. burst_count: 3
  66. failed_attempts:
  67. per_second: 0.17
  68. burst_count: 3
  69. matrix_synapse_federation_rc_window_size: 1000
  70. matrix_synapse_federation_rc_sleep_limit: 10
  71. matrix_synapse_federation_rc_sleep_delay: 500
  72. matrix_synapse_federation_rc_reject_limit: 50
  73. matrix_synapse_federation_rc_concurrent: 3
  74. matrix_synapse_federation_rr_transactions_per_room_per_second: 50
  75. # Controls whether the TLS federation listener is enabled (tcp/8448).
  76. # Only makes sense if federation is enabled (`matrix_synapse_federation_enabled`).
  77. # Note that federation may potentially be enabled as non-TLS on tcp/8048 as well.
  78. # If you're serving Synapse behind an HTTPS-capable reverse-proxy,
  79. # you can disable the TLS listener (`matrix_synapse_tls_federation_listener_enabled: false`).
  80. matrix_synapse_tls_federation_listener_enabled: true
  81. matrix_synapse_tls_certificate_path: "/data/{{ matrix_server_fqn_matrix }}.tls.crt"
  82. matrix_synapse_tls_private_key_path: "/data/{{ matrix_server_fqn_matrix }}.tls.key"
  83. # Enable this to allow Synapse to report utilization statistics about your server to matrix.org
  84. # (things like number of users, number of messages sent, uptime, load, etc.)
  85. matrix_synapse_report_stats: false
  86. # Controls whether the Matrix server will track presence status (online, offline, unavailable) for users.
  87. # If users participate in large rooms with many other servers,
  88. # disabling this will decrease server load significantly.
  89. matrix_synapse_use_presence: true
  90. # Controls whether people with access to the homeserver can register by themselves.
  91. matrix_synapse_enable_registration: false
  92. # A list of 3PID types which users must supply when registering (possible values: email, msisdn).
  93. matrix_synapse_registrations_require_3pid: []
  94. # Users who register on this homeserver will automatically be joined to these rooms.
  95. # Rooms are to be specified using addresses (e.g. `#address:example.com`)
  96. matrix_synapse_auto_join_rooms: []
  97. # Controls whether auto-join rooms (`matrix_synapse_auto_join_rooms`) are to be created
  98. # automatically if they don't already exist.
  99. matrix_synapse_autocreate_auto_join_rooms: true
  100. # Controls password-peppering for Synapse. Not to be changed after initial setup.
  101. matrix_synapse_password_config_pepper: ""
  102. # Controls the number of events that Synapse caches in memory.
  103. matrix_synapse_event_cache_size: "100K"
  104. # Controls cache sizes for Synapse via the SYNAPSE_CACHE_FACTOR environment variable.
  105. # Raise this to increase cache sizes or lower it to potentially lower memory use.
  106. # To learn more, see:
  107. # - https://github.com/matrix-org/synapse#help-synapse-eats-all-my-ram
  108. # - https://github.com/matrix-org/synapse/issues/3939
  109. matrix_synapse_cache_factor: 0.5
  110. # Controls whether Synapse will federate at all.
  111. # Disable this to completely isolate your server from the rest of the Matrix network.
  112. # Also see: `matrix_synapse_tls_federation_listener_enabled` if you wish to keep federation enabled,
  113. # but want to stop the TLS listener (port 8448).
  114. matrix_synapse_federation_enabled: true
  115. # A list of domain names that are allowed to federate with the given Synapse server.
  116. # An empty list value (`[]`) will also effectively stop federation, but if that's the desired
  117. # result, it's better to accomplish it by changing `matrix_synapse_federation_enabled`.
  118. matrix_synapse_federation_domain_whitelist: ~
  119. # A list of additional "volumes" to mount in the container.
  120. # This list gets populated dynamically based on Synapse extensions that have been enabled.
  121. # Contains definition objects like this: `{"src": "/outside", "dst": "/inside", "options": "rw|ro|slave|.."}
  122. matrix_synapse_container_additional_volumes: []
  123. # A list of additional loggers to register in synapse.log.config.
  124. # This list gets populated dynamically based on Synapse extensions that have been enabled.
  125. # Contains definition objects like this: `{"name": "..", "level": "DEBUG"}
  126. matrix_synapse_additional_loggers: []
  127. # A list of service config files
  128. # This list gets populated dynamically based on Synapse extensions that have been enabled.
  129. # Contains fs paths
  130. matrix_synapse_app_service_config_files: []
  131. # This is set dynamically during execution depending on whether
  132. # any password providers have been enabled or not.
  133. matrix_synapse_password_providers_enabled: false
  134. # Whether clients can request to include message content in push notifications
  135. # sent through third party servers. Setting this to false requires mobile clients
  136. # to load message content directly from the homeserver.
  137. matrix_synapse_push_include_content: true
  138. # If url previews should be generated. This will cause a request from Synapse to
  139. # URLs shared by users.
  140. matrix_synapse_url_preview_enabled: true
  141. # Enable exposure of metrics to Prometheus
  142. # See https://github.com/matrix-org/synapse/blob/master/docs/metrics-howto.rst
  143. matrix_synapse_metrics_enabled: false
  144. matrix_synapse_metrics_port: 9100
  145. # Postgres database information
  146. matrix_synapse_database_host: ""
  147. matrix_synapse_database_user: ""
  148. matrix_synapse_database_password: ""
  149. matrix_synapse_database_database: ""
  150. matrix_synapse_turn_uris: []
  151. matrix_synapse_turn_shared_secret: ""
  152. matrix_synapse_email_enabled: false
  153. matrix_synapse_email_smtp_host: ""
  154. matrix_synapse_email_smtp_port: 587
  155. matrix_synapse_email_smtp_require_transport_security: false
  156. matrix_synapse_email_notif_from: "Matrix <matrix@{{ matrix_domain }}>"
  157. matrix_synapse_email_riot_base_url: "https://{{ matrix_server_fqn_riot }}"
  158. # Enable this to activate the REST auth password provider module.
  159. # See: https://github.com/kamax-io/matrix-synapse-rest-auth
  160. matrix_synapse_ext_password_provider_rest_auth_enabled: false
  161. matrix_synapse_ext_password_provider_rest_auth_download_url: "https://raw.githubusercontent.com/kamax-io/matrix-synapse-rest-auth/v0.1.2/rest_auth_provider.py"
  162. matrix_synapse_ext_password_provider_rest_auth_endpoint: ""
  163. matrix_synapse_ext_password_provider_rest_auth_registration_enforce_lowercase: false
  164. matrix_synapse_ext_password_provider_rest_auth_registration_profile_name_autofill: true
  165. matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill: false
  166. # Enable this to activate the Shared Secret Auth password provider module.
  167. # See: https://github.com/devture/matrix-synapse-shared-secret-auth
  168. matrix_synapse_ext_password_provider_shared_secret_auth_enabled: false
  169. 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"
  170. matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: ""
  171. # Enable this to activate LDAP password provider
  172. matrix_synapse_ext_password_provider_ldap_enabled: false
  173. matrix_synapse_ext_password_provider_ldap_uri: "ldap://ldap.mydomain.tld:389"
  174. matrix_synapse_ext_password_provider_ldap_start_tls: true
  175. matrix_synapse_ext_password_provider_ldap_base: ""
  176. matrix_synapse_ext_password_provider_ldap_attributes_uid: "uid"
  177. matrix_synapse_ext_password_provider_ldap_attributes_mail: "mail"
  178. matrix_synapse_ext_password_provider_ldap_attributes_name: "cn"
  179. matrix_synapse_ext_password_provider_ldap_bind_dn: ""
  180. matrix_synapse_ext_password_provider_ldap_bind_password: ""
  181. matrix_synapse_ext_password_provider_ldap_filter: ""
  182. matrix_s3_media_store_enabled: false
  183. matrix_s3_media_store_custom_endpoint_enabled: false
  184. matrix_s3_goofys_docker_image: "ewoutp/goofys:latest"
  185. matrix_s3_media_store_custom_endpoint: "your-custom-endpoint"
  186. matrix_s3_media_store_bucket_name: "your-bucket-name"
  187. matrix_s3_media_store_aws_access_key: "your-aws-access-key"
  188. matrix_s3_media_store_aws_secret_key: "your-aws-secret-key"
  189. matrix_s3_media_store_region: "eu-central-1"
  190. # Controls whether the self-check feature should validate SSL certificates.
  191. matrix_synapse_self_check_validate_certificates: true
  192. # Matrix mautrix is a Matrix <-> Telegram bridge
  193. # Enable telegram bridge
  194. matrix_mautrix_telegram_enabled: false
  195. matrix_mautrix_telegram_docker_image: "tulir/mautrix-telegram:v0.5.1"
  196. matrix_mautrix_telegram_base_path: "{{ matrix_base_data_path }}/mautrix-telegram"
  197. # Get your own API keys at https://my.telegram.org/apps
  198. matrix_mautrix_telegram_api_id: YOUR_TELEGRAM_APP_ID
  199. matrix_mautrix_telegram_api_hash: YOUR_TELEGRAM_API_HASH
  200. # Mautrix telegram public endpoint to log in to telegram
  201. # Use an uuid so it's not easily discoverable
  202. matrix_mautrix_telegram_public_endpoint: "/{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegram') | to_uuid }}"
  203. # Set this to a port number to expose on the host when not using the nginx proxy
  204. matrix_mautrix_telegram_container_exposed_port_number: ~
  205. # Matrix mautrix is a Matrix <-> Whatsapp bridge
  206. # Enable whatsapp bridge
  207. matrix_mautrix_whatsapp_enabled: false
  208. matrix_mautrix_whatsapp_docker_image: "tulir/mautrix-whatsapp:latest"
  209. matrix_mautrix_whatsapp_base_path: "{{ matrix_base_data_path }}/mautrix-whatsapp"
  210. # Matrix mautrix is a Matrix <-> Facebook bridge
  211. # Enable facebook bridge
  212. matrix_mautrix_facebook_enabled: false
  213. matrix_mautrix_facebook_docker_image: "tulir/mautrix-facebook:latest"
  214. matrix_mautrix_facebook_base_path: "{{ matrix_base_data_path }}/mautrix-facebook"
  215. # Get your own API keys at https://developers.facebook.com/docs/apis-and-sdks/
  216. matrix_mautrix_facebook_api_id: YOUR_FACEBOOK_APP_ID
  217. matrix_mautrix_facebook_api_hash: YOUR_FACEBOOK_API_HASH
  218. # Matrix Appservice IRC is a Matrix <-> IRC bridge
  219. # Enable IRC bridge
  220. matrix_appservice_irc_enabled: false
  221. matrix_appservice_irc_docker_image: "tedomum/matrix-appservice-irc:latest"
  222. matrix_appservice_irc_base_path: "{{ matrix_base_data_path }}/appservice-irc"
  223. matrix_appservice_irc_configuration_yaml: |
  224. #jinja2: lstrip_blocks: True
  225. homeserver:
  226. url: "https://{{ matrix_server_fqn_matrix }}"
  227. domain: "{{ matrix_domain }}"
  228. enablePresence: true
  229. matrix_appservice_irc_configuration_extension_yaml: |
  230. # Your custom YAML configuration for Appservice IRC servers goes here.
  231. # This configuration extends the default starting configuration (`matrix_appservice_irc_configuration_yaml`).
  232. #
  233. # You can override individual variables from the default configuration, or introduce new ones.
  234. #
  235. # If you need something more special, you can take full control by
  236. # completely redefining `matrix_appservice_irc_configuration_yaml`.
  237. #
  238. # Example configuration extension follows:
  239. #
  240. # ircService:
  241. # databaseUri: "nedb:///data" # does not typically need modification
  242. # passwordEncryptionKeyPath: "/data/passkey.pem" # does not typically need modification
  243. # matrixHandler:
  244. # eventCacheSize: 4096
  245. # servers:
  246. # # The address of the server to connect to.
  247. # irc.example.com:
  248. # # A human-readable short name. This is used to label IRC status rooms
  249. # # where matrix users control their connections.
  250. # # E.g. 'ExampleNet IRC Bridge status'.
  251. # # It is also used in the Third Party Lookup API as the instance `desc`
  252. # # property, where each server is an instance.
  253. # name: "ExampleNet"
  254. #
  255. # additionalAddresses: [ "irc2.example.com" ]
  256. # #
  257. # # [DEPRECATED] Use `name`, above, instead.
  258. # # A human-readable description string
  259. # # description: "Example.com IRC network"
  260. #
  261. # # An ID for uniquely identifying this server amongst other servers being bridged.
  262. # # networkId: "example"
  263. #
  264. # # URL to an icon used as the network icon whenever this network appear in
  265. # # a network list. (Like in the riot room directory, for instance.)
  266. # # icon: https://example.com/images/hash.png
  267. #
  268. # # The port to connect to. Optional.
  269. # port: 6697
  270. # # Whether to use SSL or not. Default: false.
  271. # ssl: true
  272. # # Whether or not IRC server is using a self-signed cert or not providing CA Chain
  273. # sslselfsign: false
  274. # # Should the connection attempt to identify via SASL (if a server or user password is given)
  275. # # If false, this will use PASS instead. If SASL fails, we do not fallback to PASS.
  276. # sasl: false
  277. # # Whether to allow expired certs when connecting to the IRC server.
  278. # # Usually this should be off. Default: false.
  279. # allowExpiredCerts: false
  280. # # A specific CA to trust instead of the default CAs. Optional.
  281. # #ca: |
  282. # # -----BEGIN CERTIFICATE-----
  283. # # ...
  284. # # -----END CERTIFICATE-----
  285. #
  286. # #
  287. # # The connection password to send for all clients as a PASS (or SASL, if enabled above) command. Optional.
  288. # # password: 'pa$$w0rd'
  289. # #
  290. # # Whether or not to send connection/error notices to real Matrix users. Default: true.
  291. # sendConnectionMessages: true
  292. #
  293. # quitDebounce:
  294. # # Whether parts due to net-splits are debounced for delayMs, to allow
  295. # # time for the netsplit to resolve itself. A netsplit is detected as being
  296. # # a QUIT rate higher than quitsPerSecond. Default: false.
  297. # enabled: false
  298. # # The maximum number of quits per second acceptable above which a netsplit is
  299. # # considered ongoing. Default: 5.
  300. # quitsPerSecond: 5
  301. # # The time window in which to wait before bridging a QUIT to Matrix that occurred during
  302. # # a netsplit. Debouncing is jittered randomly between delayMinMs and delayMaxMs so that the HS
  303. # # is not sent many requests to leave rooms all at once if a netsplit occurs and many
  304. # # people to not rejoin.
  305. # # If the user with the same IRC nick as the one who sent the quit rejoins a channel
  306. # # they are considered back online and the quit is not bridged, so long as the rejoin
  307. # # occurs before the randomly-jittered timeout is not reached.
  308. # # Default: 3600000, = 1h
  309. # delayMinMs: 3600000 # 1h
  310. # # Default: 7200000, = 2h
  311. # delayMaxMs: 7200000 # 2h
  312. #
  313. # # A map for conversion of IRC user modes to Matrix power levels. This enables bridging
  314. # # of IRC ops to Matrix power levels only, it does not enable the reverse. If a user has
  315. # # been given multiple modes, the one that maps to the highest power level will be used.
  316. # modePowerMap:
  317. # o: 50
  318. #
  319. # botConfig:
  320. # # Enable the presence of the bot in IRC channels. The bot serves as the entity
  321. # # which maps from IRC -> Matrix. You can disable the bot entirely which
  322. # # means IRC -> Matrix chat will be shared by active "M-Nick" connections
  323. # # in the room. If there are no users in the room (or if there are users
  324. # # but their connections are not on IRC) then nothing will be bridged to
  325. # # Matrix. If you're concerned about the bot being treated as a "logger"
  326. # # entity, then you may want to disable the bot. If you want IRC->Matrix
  327. # # but don't want to have TCP connections to IRC unless a Matrix user speaks
  328. # # (because your client connection limit is low), then you may want to keep
  329. # # the bot enabled. Default: true.
  330. # # NB: If the bot is disabled, you SHOULD have matrix-to-IRC syncing turned
  331. # # on, else there will be no users and no bot in a channel (meaning no
  332. # # messages to Matrix!) until a Matrix user speaks which makes a client
  333. # # join the target IRC channel.
  334. # # NBB: The bridge bot IRC client will still join the target IRC network so
  335. # # it can service bridge-specific queries from the IRC-side e.g. so
  336. # # real IRC clients have a way to change their Matrix display name.
  337. # # See https://github.com/matrix-org/matrix-appservice-irc/issues/55
  338. # enabled: true
  339. # # The nickname to give the AS bot.
  340. # nick: "MatrixBot"
  341. # # The password to give to NickServ or IRC Server for this nick. Optional.
  342. # # password: "helloworld"
  343. # #
  344. # # Join channels even if there are no Matrix users on the other side of
  345. # # the bridge. Set to false to prevent the bot from joining channels which have no
  346. # # real matrix users in them, even if there is a mapping for the channel.
  347. # # Default: true
  348. # joinChannelsIfNoUsers: true
  349. #
  350. # # Configuration for PMs / private 1:1 communications between users.
  351. # privateMessages:
  352. # # Enable the ability for PMs to be sent to/from IRC/Matrix.
  353. # # Default: true.
  354. # enabled: true
  355. # # Prevent Matrix users from sending PMs to the following IRC nicks.
  356. # # Optional. Default: [].
  357. # # exclude: ["Alice", "Bob"] # NOT YET IMPLEMENTED
  358. #
  359. # # Should created Matrix PM rooms be federated? If false, only users on the
  360. # # HS attached to this AS will be able to interact with this room.
  361. # # Optional. Default: true.
  362. # federate: true
  363. #
  364. # # Configuration for mappings not explicitly listed in the 'mappings'
  365. # # section.
  366. # dynamicChannels:
  367. # # Enable the ability for Matrix users to join *any* channel on this IRC
  368. # # network.
  369. # # Default: false.
  370. # enabled: true
  371. # # Should the AS create a room alias for the new Matrix room? The form of
  372. # # the alias can be modified via 'aliasTemplate'. Default: true.
  373. # createAlias: true
  374. # # Should the AS publish the new Matrix room to the public room list so
  375. # # anyone can see it? Default: true.
  376. # published: true
  377. # # What should the join_rule be for the new Matrix room? If 'public',
  378. # # anyone can join the room. If 'invite', only users with an invite can
  379. # # join the room. Note that if an IRC channel has +k or +i set on it,
  380. # # join_rules will be set to 'invite' until these modes are removed.
  381. # # Default: "public".
  382. # joinRule: public
  383. # # This will set the m.room.related_groups state event in newly created rooms
  384. # # with the given groupId. This means flares will show up on IRC users in those rooms.
  385. # # This should be set to the same thing as namespaces.users.group_id in irc_registration.
  386. # # This does not alter existing rooms.
  387. # # Leaving this option empty will not set the event.
  388. # groupId: +myircnetwork:localhost
  389. # # Should created Matrix rooms be federated? If false, only users on the
  390. # # HS attached to this AS will be able to interact with this room.
  391. # # Default: true.
  392. # federate: true
  393. # # The room alias template to apply when creating new aliases. This only
  394. # # applies if createAlias is 'true'. The following variables are exposed:
  395. # # $SERVER => The IRC server address (e.g. "irc.example.com")
  396. # # $CHANNEL => The IRC channel (e.g. "#python")
  397. # # This MUST have $CHANNEL somewhere in it.
  398. # # Default: '#irc_$SERVER_$CHANNEL'
  399. # aliasTemplate: "#irc_$CHANNEL"
  400. # # A list of user IDs which the AS bot will send invites to in response
  401. # # to a !join. Only applies if joinRule is 'invite'. Default: []
  402. # # whitelist:
  403. # # - "@foo:example.com"
  404. # # - "@bar:example.com"
  405. # #
  406. # # Prevent the given list of channels from being mapped under any
  407. # # circumstances.
  408. # # exclude: ["#foo", "#bar"]
  409. #
  410. # # Configuration for controlling how Matrix and IRC membership lists are
  411. # # synced.
  412. # membershipLists:
  413. # # Enable the syncing of membership lists between IRC and Matrix. This
  414. # # can have a significant effect on performance on startup as the lists are
  415. # # synced. This must be enabled for anything else in this section to take
  416. # # effect. Default: false.
  417. # enabled: false
  418. #
  419. # # Syncing membership lists at startup can result in hundreds of members to
  420. # # process all at once. This timer drip feeds membership entries at the
  421. # # specified rate. Default: 10000. (10s)
  422. # floodDelayMs: 10000
  423. #
  424. # global:
  425. # ircToMatrix:
  426. # # Get a snapshot of all real IRC users on a channel (via NAMES) and
  427. # # join their virtual matrix clients to the room.
  428. # initial: false
  429. # # Make virtual matrix clients join and leave rooms as their real IRC
  430. # # counterparts join/part channels. Default: false.
  431. # incremental: false
  432. #
  433. # matrixToIrc:
  434. # # Get a snapshot of all real Matrix users in the room and join all of
  435. # # them to the mapped IRC channel on startup. Default: false.
  436. # initial: false
  437. # # Make virtual IRC clients join and leave channels as their real Matrix
  438. # # counterparts join/leave rooms. Make sure your 'maxClients' value is
  439. # # high enough! Default: false.
  440. # incremental: false
  441. #
  442. # # Apply specific rules to Matrix rooms. Only matrix-to-IRC takes effect.
  443. # rooms:
  444. # - room: "!fuasirouddJoxtwfge:localhost"
  445. # matrixToIrc:
  446. # initial: false
  447. # incremental: false
  448. #
  449. # # Apply specific rules to IRC channels. Only IRC-to-matrix takes effect.
  450. # channels:
  451. # - channel: "#foo"
  452. # ircToMatrix:
  453. # initial: false
  454. # incremental: false
  455. #
  456. # mappings:
  457. # # 1:many mappings from IRC channels to room IDs on this IRC server.
  458. # # The matrix room must already exist. Your matrix client should expose
  459. # # the room ID in a "settings" page for the room.
  460. # "#thepub": ["!kieouiJuedJoxtVdaG:localhost"]
  461. #
  462. # # Configuration for virtual matrix users. The following variables are
  463. # # exposed:
  464. # # $NICK => The IRC nick
  465. # # $SERVER => The IRC server address (e.g. "irc.example.com")
  466. # matrixClients:
  467. # # The user ID template to use when creating virtual matrix users. This
  468. # # MUST have $NICK somewhere in it.
  469. # # Optional. Default: "@$SERVER_$NICK".
  470. # # Example: "@irc.example.com_Alice:example.com"
  471. # userTemplate: "@irc_$NICK"
  472. # # The display name to use for created matrix clients. This should have
  473. # # $NICK somewhere in it if it is specified. Can also use $SERVER to
  474. # # insert the IRC domain.
  475. # # Optional. Default: "$NICK (IRC)". Example: "Alice (IRC)"
  476. # displayName: "$NICK (IRC)"
  477. # # Number of tries a client can attempt to join a room before the request
  478. # # is discarded. You can also use -1 to never retry or 0 to never give up.
  479. # # Optional. Default: -1
  480. # joinAttempts: -1
  481. #
  482. # # Configuration for virtual IRC users. The following variables are exposed:
  483. # # $LOCALPART => The user ID localpart ("alice" in @alice:localhost)
  484. # # $USERID => The user ID
  485. # # $DISPLAY => The display name of this user, with excluded characters
  486. # # (e.g. space) removed. If the user has no display name, this
  487. # # falls back to $LOCALPART.
  488. # ircClients:
  489. # # The template to apply to every IRC client nick. This MUST have either
  490. # # $DISPLAY or $USERID or $LOCALPART somewhere in it.
  491. # # Optional. Default: "M-$DISPLAY". Example: "M-Alice".
  492. # nickTemplate: "$DISPLAY[m]"
  493. # # True to allow virtual IRC clients to change their nick on this server
  494. # # by issuing !nick <server> <nick> commands to the IRC AS bot.
  495. # # This is completely freeform: it will NOT follow the nickTemplate.
  496. # allowNickChanges: true
  497. # # The max number of IRC clients that will connect. If the limit is
  498. # # reached, the client that spoke the longest time ago will be
  499. # # disconnected and replaced.
  500. # # Optional. Default: 30.
  501. # maxClients: 30
  502. # # IPv6 configuration.
  503. # ipv6:
  504. # # Optional. Set to true to force IPv6 for outgoing connections.
  505. # only: false
  506. # # Optional. The IPv6 prefix to use for generating unique addresses for each
  507. # # connected user. If not specified, all users will connect from the same
  508. # # (default) address. This may require additional OS-specific work to allow
  509. # # for the node process to bind to multiple different source addresses
  510. # # e.g IP_FREEBIND on Linux, which requires an LD_PRELOAD with the library
  511. # # https://github.com/matrix-org/freebindfree as Node does not expose setsockopt.
  512. # # prefix: "2001:0db8:85a3::" # modify appropriately
  513. # #
  514. # # The maximum amount of time in seconds that the client can exist
  515. # # without sending another message before being disconnected. Use 0 to
  516. # # not apply an idle timeout. This value is ignored if this IRC server is
  517. # # mirroring matrix membership lists to IRC. Default: 172800 (48 hours)
  518. # idleTimeout: 10800
  519. # # The number of millseconds to wait between consecutive reconnections if a
  520. # # client gets disconnected. Setting to 0 will cause the scheduling to be
  521. # # disabled, i.e. it will be scheduled immediately (with jitter.
  522. # # Otherwise, the scheduling interval will be used such that one client
  523. # # reconnect for this server will be handled every reconnectIntervalMs ms using
  524. # # a FIFO queue.
  525. # # Default: 5000 (5 seconds)
  526. # reconnectIntervalMs: 5000
  527. # # The number of concurrent reconnects if a user has been disconnected unexpectedly
  528. # # (e.g. a netsplit). You should set this to a reasonably high number so that
  529. # # bridges are not waiting an eternity to reconnect all its clients if
  530. # # we see a massive number of disconnect. This is unrelated to the reconnectIntervalMs
  531. # # setting above which is for connecting on restart of the bridge. Set to 0 to
  532. # # immediately try to reconnect all users.
  533. # # Default: 50
  534. # concurrentReconnectLimit: 50
  535. # # The number of lines to allow being sent by the IRC client that has received
  536. # # a large block of text to send from matrix. If the number of lines that would
  537. # # be sent is > lineLimit, the text will instead be uploaded to matrix and the
  538. # # resulting URI is treated as a file. As such, a link will be sent to the IRC
  539. # # side instead of potentially spamming IRC and getting the IRC client kicked.
  540. # # Default: 3.
  541. # lineLimit: 3
  542. # # A list of user modes to set on every IRC client. For example, "RiG" would set
  543. # # +R, +i and +G on every IRC connection when they have successfully connected.
  544. # # User modes vary wildly depending on the IRC network you're connecting to,
  545. # # so check before setting this value. Some modes may not work as intended
  546. # # through the bridge e.g. caller ID as there is no way to /ACCEPT.
  547. # # Default: "" (no user modes)
  548. # # userModes: "R"
  549. #
  550. # # Configuration for an ident server. If you are running a public bridge it is
  551. # # advised you setup an ident server so IRC mods can ban specific matrix users
  552. # # rather than the application service itself.
  553. # ident:
  554. # # True to listen for Ident requests and respond with the
  555. # # matrix user's user_id (converted to ASCII, respecting RFC 1413).
  556. # # Default: false.
  557. # enabled: false
  558. # # The port to listen on for incoming ident requests.
  559. # # Ports below 1024 require root to listen on, and you may not want this to
  560. # # run as root. Instead, you can get something like an Apache to yank up
  561. # # incoming requests to 113 to a high numbered port. Set the port to listen
  562. # # on instead of 113 here.
  563. # # Default: 113.
  564. # port: 1113
  565. # # The address to listen on for incoming ident requests.
  566. # # Default: 0.0.0.0
  567. # address: "::"
  568. #
  569. # # Configuration for logging. Optional. Default: console debug level logging
  570. # # only.
  571. # logging:
  572. # # Level to log on console/logfile. One of error|warn|info|debug
  573. # level: "debug"
  574. # # The file location to log to. This is relative to the project directory.
  575. # logfile: "debug.log"
  576. # # The file location to log errors to. This is relative to the project
  577. # # directory.
  578. # errfile: "errors.log"
  579. # # Whether to log to the console or not.
  580. # toConsole: true
  581. # # The max number of files to keep. Files will be overwritten eventually due
  582. # # to rotations.
  583. # maxFiles: 5
  584. #
  585. # # Optional. Enable Prometheus metrics. If this is enabled, you MUST install `prom-client`:
  586. # # $ npm install prom-client@6.3.0
  587. # # Metrics will then be available via GET /metrics on the bridge listening port (-p).
  588. # metrics:
  589. # # Whether to actually enable the metric endpoint. Default: false
  590. # enabled: true
  591. # # When collecting remote user active times, which "buckets" should be used. Defaults are given below.
  592. # # The bucket name is formed of a duration and a period. (h=hours,d=days,w=weeks).
  593. # remoteUserAgeBuckets:
  594. # - "1h"
  595. # - "1d"
  596. # - "1w"
  597. #
  598. # # Configuration options for the debug HTTP API. To access this API, you must
  599. # # append ?access_token=$APPSERVICE_TOKEN (from the registration file) to the requests.
  600. # #
  601. # # The debug API exposes the following endpoints:
  602. # #
  603. # # GET /irc/$domain/user/$user_id => Return internal state for the IRC client for this user ID.
  604. # #
  605. # # POST /irc/$domain/user/$user_id => Issue a raw IRC command down this connection.
  606. # # Format: new line delimited commands as per IRC protocol.
  607. # #
  608. # debugApi:
  609. # # True to enable the HTTP API endpoint. Default: false.
  610. # enabled: false
  611. # # The port to host the HTTP API.
  612. # port: 11100
  613. #
  614. # # Configuration for the provisioning API.
  615. # #
  616. # # GET /_matrix/provision/link
  617. # # GET /_matrix/provision/unlink
  618. # # GET /_matrix/provision/listlinks
  619. # #
  620. # provisioning:
  621. # # True to enable the provisioning HTTP endpoint. Default: false.
  622. # enabled: false
  623. # # The number of seconds to wait before giving up on getting a response from
  624. # # an IRC channel operator. If the channel operator does not respond within the
  625. # # allotted time period, the provisioning request will fail.
  626. # # Default: 300 seconds (5 mins)
  627. # requestTimeoutSeconds: 300
  628. #
  629. # # WARNING: The bridge needs to send plaintext passwords to the IRC server, it cannot
  630. # # send a password hash. As a result, passwords (NOT hashes) are stored encrypted in
  631. # # the database.
  632. # #
  633. matrix_appservice_irc_configuration_extension: "{{ matrix_appservice_irc_configuration_extension_yaml|from_yaml if matrix_appservice_irc_configuration_extension_yaml|from_yaml else {} }}"
  634. matrix_appservice_irc_configuration: "{{ matrix_appservice_irc_configuration_yaml|from_yaml|combine(matrix_appservice_irc_configuration_extension, recursive=True) }}"
  635. # Matrix Appservice Discord is a Matrix <-> Discord bridge
  636. # Enable Discord bridge
  637. matrix_appservice_discord_enabled: false
  638. matrix_appservice_discord_docker_image: "halfshot/matrix-appservice-discord:latest"
  639. matrix_appservice_discord_base_path: "{{ matrix_base_data_path }}/appservice-discord"
  640. matrix_appservice_discord_client_id: "YOUR DISCORD APP CLIENT ID"
  641. matrix_appservice_discord_bot_token: "YOUR DISCORD APP BOT TOKEN"
  642. matrix_appservice_discord_configuration_yaml: |
  643. bridge:
  644. domain: "{{ matrix_domain }}"
  645. homeserverUrl: "{{ matrix_homeserver_url }}"
  646. auth:
  647. clientID: "{{matrix_appservice_discord_client_id}}"
  648. botToken: "{{matrix_appservice_discord_bot_token}}"
  649. database:
  650. filename: "/data/discord.db"
  651. userStorePath: "/data/user-store.db"
  652. roomStorePath: "/data/room-store.db"
  653. matrix_appservice_discord_configuration_extension_yaml: |
  654. # This is a sample of the config file showing all avaliable options.
  655. # Where possible we have documented what they do, and all values are the
  656. # default values.
  657. #
  658. #bridge:
  659. # # Domain part of the bridge, e.g. matrix.org
  660. # domain: "localhost"
  661. # # This should be your publically facing URL because Discord may use it to
  662. # # fetch media from the media store.
  663. # homeserverUrl: "http://localhost:8008"
  664. # # Interval at which to process users in the 'presence queue'. If you have
  665. # # 5 users, one user will be processed every 500 milliseconds according to the
  666. # # value below. This has a minimum value of 250.
  667. # # WARNING: This has a high chance of spamming the homeserver with presence
  668. # # updates since it will send one each time somebody changes state or is online.
  669. # presenceInterval: 500
  670. # # Disable setting presence for 'ghost users' which means Discord users on Matrix
  671. # # will not be shown as away or online.
  672. # disablePresence: false
  673. # # Disable sending typing notifications when somebody on Discord types.
  674. # disableTypingNotifications: false
  675. # # Disable deleting messages on Discord if a message is redacted on Matrix.
  676. # disableDeletionForwarding: false
  677. # # Enable users to bridge rooms using !discord commands. See
  678. # # https://t2bot.io/discord for instructions.
  679. # enableSelfServiceBridging: false
  680. # # Disable sending of read receipts for Matrix events which have been
  681. # # successfully bridged to Discord.
  682. # disableReadReceipts: false
  683. # Authentication configuration for the discord bot.
  684. #auth:
  685. # clientID: "12345"
  686. # botToken: "foobar"
  687. #logging:
  688. # # What level should the logger output to the console at.
  689. # console: "warn" #silly, verbose, info, http, warn, error, silent
  690. # lineDateFormat: "MMM-D HH:mm:ss.SSS" # This is in moment.js format
  691. # files:
  692. # - file: "debug.log"
  693. # disable:
  694. # - "PresenceHandler" # Will not capture presence logging
  695. # - file: "warn.log" # Will capture warnings
  696. # level: "warn"
  697. # - file: "botlogs.log" # Will capture logs from DiscordBot
  698. # level: "info"
  699. # enable:
  700. # - "DiscordBot"
  701. #database:
  702. # userStorePath: "user-store.db"
  703. # roomStorePath: "room-store.db"
  704. # # You may either use SQLite or Postgresql for the bridge database, which contains
  705. # # important mappings for events and user puppeting configurations.
  706. # # Use the filename option for SQLite, or connString for Postgresql.
  707. # # If you are migrating, see https://github.com/Half-Shot/matrix-appservice-discord/blob/master/docs/howto.md#migrate-to-postgres-from-sqlite
  708. # # WARNING: You will almost certainly be fine with sqlite unless your bridge
  709. # # is in heavy demand and you suffer from IO slowness.
  710. # filename: "discord.db"
  711. # # connString: "postgresql://user:password@localhost/database_name"
  712. #room:
  713. # # Set the default visibility of alias rooms, defaults to "public".
  714. # # One of: "public", "private"
  715. # defaultVisibility: "public"
  716. #channel:
  717. # # Pattern of the name given to bridged rooms.
  718. # # Can use :guild for the guild name and :name for the channel name.
  719. # namePattern: "[Discord] :guild :name"
  720. # # Changes made to rooms when a channel is deleted.
  721. # deleteOptions:
  722. # # Prefix the room name with a string.
  723. # #namePrefix: "[Deleted]"
  724. # # Prefix the room topic with a string.
  725. # #topicPrefix: "This room has been deleted"
  726. # # Disable people from talking in the room by raising the event PL to 50
  727. # disableMessaging: false
  728. # # Remove the discord alias from the room.
  729. # unsetRoomAlias: true
  730. # # Remove the room from the directory.
  731. # unlistFromDirectory: true
  732. # # Set the room to be unavaliable for joining without an invite.
  733. # setInviteOnly: true
  734. # # Make all the discord users leave the room.
  735. # ghostsLeave: true
  736. #limits:
  737. # # Delay in milliseconds between discord users joining a room.
  738. # roomGhostJoinDelay: 6000
  739. # # Delay in milliseconds before sending messages to discord to avoid echos.
  740. # # (Copies of a sent message may arrive from discord before we've
  741. # # fininished handling it, causing us to echo it back to the room)
  742. # discordSendDelay: 750
  743. matrix_appservice_discord_configuration_extension: "{{ matrix_appservice_irc_configuration_extension_yaml|from_yaml if matrix_appservice_irc_configuration_extension_yaml|from_yaml else {} }}"
  744. matrix_appservice_discord_configuration: "{{ matrix_appservice_discord_configuration_yaml|from_yaml|combine(matrix_appservice_discord_configuration_extension, recursive=True) }}"
  745. # Controls whether searching the public room list is enabled.
  746. matrix_enable_room_list_search: true
  747. # Controls who's allowed to create aliases on this server.
  748. matrix_alias_creation_rules:
  749. - user_id: "*"
  750. alias: "*"
  751. room_id: "*"
  752. action: allow
  753. # Controls who can publish and which rooms can be published in the public room list.
  754. matrix_room_list_publication_rules:
  755. - user_id: "*"
  756. alias: "*"
  757. room_id: "*"
  758. action: allow