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

816 строки
40 KiB

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