Matrix Docker Ansible eploy
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 

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