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

774 строки
39 KiB

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