Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

413 Zeilen
20 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. # Homeserver details
  3. homeserver:
  4. # The address that this appservice can use to connect to the homeserver.
  5. address: {{ matrix_mautrix_telegram_homeserver_address }}
  6. # The domain of the homeserver (for MXIDs, etc).
  7. domain: {{ matrix_mautrix_telegram_homeserver_domain }}
  8. # Whether or not to verify the SSL certificate of the homeserver.
  9. # Only applies if address starts with https://
  10. verify_ssl: true
  11. # Application service host/registration related details
  12. # Changing these values requires regeneration of the registration.
  13. appservice:
  14. # The address that the homeserver can use to connect to this appservice.
  15. address: {{ matrix_mautrix_telegram_appservice_address|to_json }}
  16. # The hostname and port where this appservice should listen.
  17. hostname: 0.0.0.0
  18. port: 8080
  19. # The maximum body size of appservice API requests (from the homeserver) in mebibytes
  20. # Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
  21. max_body_size: 1
  22. # The full URI to the database. SQLite and Postgres are fully supported.
  23. # Other DBMSes supported by SQLAlchemy may or may not work.
  24. # Format examples:
  25. # SQLite: sqlite:///filename.db
  26. # Postgres: postgres://username:password@hostname/dbname
  27. database: {{ matrix_mautrix_telegram_appservice_database|to_json }}
  28. # Public part of web server for out-of-Matrix interaction with the bridge.
  29. # Used for things like login if the user wants to make sure the 2FA password isn't stored in
  30. # the HS database.
  31. public:
  32. # Whether or not the public-facing endpoints should be enabled.
  33. enabled: {{ matrix_mautrix_telegram_appservice_public_enabled|to_json }}
  34. # The prefix to use in the public-facing endpoints.
  35. prefix: {{ matrix_mautrix_telegram_public_endpoint|to_json }}
  36. # The base URL where the public-facing endpoints are available. The prefix is not added
  37. # implicitly.
  38. external: {{ matrix_mautrix_telegram_appservice_public_external|to_json }}
  39. # Provisioning API part of the web server for automated portal creation and fetching information.
  40. # Used by things like Dimension (https://dimension.t2bot.io/).
  41. provisioning:
  42. # Whether or not the provisioning API should be enabled.
  43. enabled: false
  44. # The prefix to use in the provisioning API endpoints.
  45. prefix: /_matrix/provision/v1
  46. # The shared secret to authorize users of the API.
  47. # Set to "generate" to generate and save a new token.
  48. shared_secret: generate
  49. # The unique ID of this appservice.
  50. id: telegram
  51. # Username of the appservice bot.
  52. bot_username: {{ matrix_mautrix_telegram_appservice_bot_username|to_json }}
  53. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  54. # to leave display name/avatar as-is.
  55. bot_displayname: Telegram bridge bot
  56. bot_avatar: mxc://maunium.net/tJCRmUyJDsgRNgqhOgoiHWbX
  57. # Authentication tokens for AS <-> HS communication.
  58. as_token: {{ matrix_mautrix_telegram_appservice_token|to_json }}
  59. hs_token: {{ matrix_mautrix_telegram_homeserver_token|to_json }}
  60. # Bridge config
  61. bridge:
  62. # Localpart template of MXIDs for Telegram users.
  63. # {userid} is replaced with the user ID of the Telegram user.
  64. # Default: telegram_{userid}
  65. username_template: {{ matrix_mautrix_telegram_username_template|to_json }}
  66. # Localpart template of room aliases for Telegram portal rooms.
  67. # {groupname} is replaced with the name part of the public channel/group invite link ( https://t.me/{} )
  68. # Default: telegram_{groupname}
  69. alias_template: {{ matrix_mautrix_telegram_alias_template|to_json }}
  70. # Displayname template for Telegram users.
  71. # {displayname} is replaced with the display name of the Telegram user.
  72. # Default: {displayname} (Telegram)
  73. displayname_template: {{ matrix_mautrix_telegram_displayname_template|to_json }}
  74. # Set the preferred order of user identifiers which to use in the Matrix puppet display name.
  75. # In the (hopefully unlikely) scenario that none of the given keys are found, the numeric user
  76. # ID is used.
  77. #
  78. # If the bridge is working properly, a phone number or an username should always be known, but
  79. # the other one can very well be empty.
  80. #
  81. # Valid keys:
  82. # "full name" (First and/or last name)
  83. # "full name reversed" (Last and/or first name)
  84. # "first name"
  85. # "last name"
  86. # "username"
  87. # "phone number"
  88. displayname_preference:
  89. - full name
  90. - username
  91. - phone number
  92. # Maximum length of displayname
  93. displayname_max_length: 100
  94. # Maximum number of members to sync per portal when starting up. Other members will be
  95. # synced when they send messages. The maximum is 10000, after which the Telegram server
  96. # will not send any more members.
  97. # Defaults to no local limit (-> limited to 10000 by server)
  98. max_initial_member_sync: 10
  99. # Whether or not to sync the member list in channels.
  100. # If no channel admins have logged into the bridge, the bridge won't be able to sync the member
  101. # list regardless of this setting.
  102. sync_channel_members: false
  103. # Whether or not to skip deleted members when syncing members.
  104. skip_deleted_members: true
  105. # Whether or not to automatically synchronize contacts and chats of Matrix users logged into
  106. # their Telegram account at startup.
  107. startup_sync: true
  108. # Number of most recently active dialogs to check when syncing chats.
  109. # Dialogs include groups and private chats, but only groups are synced.
  110. # Set to 0 to remove limit.
  111. sync_dialog_limit: 30
  112. # Whether or not to sync and create portals for direct chats at startup.
  113. sync_direct_chats: false
  114. # The maximum number of simultaneous Telegram deletions to handle.
  115. # A large number of simultaneous redactions could put strain on your homeserver.
  116. max_telegram_delete: 10
  117. # Whether or not to automatically sync the Matrix room state (mostly unpuppeted displaynames)
  118. # at startup and when creating a bridge.
  119. sync_matrix_state: true
  120. # Allow logging in within Matrix. If false, users can only log in using login-qr or the
  121. # out-of-Matrix login website (see appservice.public config section)
  122. allow_matrix_login: true
  123. # Whether or not to bridge plaintext highlights.
  124. # Only enable this if your displayname_template has some static part that the bridge can use to
  125. # reliably identify what is a plaintext highlight.
  126. plaintext_highlights: false
  127. # Whether or not to make portals of publicly joinable channels/supergroups publicly joinable on Matrix.
  128. public_portals: true
  129. # Whether or not to use /sync to get presence, read receipts and typing notifications when using
  130. # your own Matrix account as the Matrix puppet for your Telegram account.
  131. sync_with_custom_puppets: true
  132. # Shared secret for https://github.com/devture/matrix-synapse-shared-secret-auth
  133. #
  134. # If set, custom puppets will be enabled automatically for local users
  135. # instead of users having to find an access token and run `login-matrix`
  136. # manually.
  137. login_shared_secret: {{ matrix_mautrix_telegram_login_shared_secret|to_json }}
  138. # Set to false to disable link previews in messages sent to Telegram.
  139. telegram_link_preview: true
  140. # Use inline images instead of a separate message for the caption.
  141. # N.B. Inline images are not supported on all clients (e.g. Element iOS).
  142. inline_images: false
  143. # Maximum size of image in megabytes before sending to Telegram as a document.
  144. image_as_file_size: 10
  145. # Maximum size of Telegram documents in megabytes to bridge.
  146. max_document_size: 100
  147. # Enable experimental parallel file transfer, which makes uploads/downloads much faster by
  148. # streaming from/to Matrix and using many connections for Telegram.
  149. # Note that generating HQ thumbnails for videos is not possible with streamed transfers.
  150. parallel_file_transfer: false
  151. # Whether or not created rooms should have federation enabled.
  152. # If false, created portal rooms will never be federated.
  153. federate_rooms: {{ matrix_mautrix_telegram_federate_rooms|to_json }}
  154. # Settings for converting animated stickers.
  155. animated_sticker:
  156. # Format to which animated stickers should be converted.
  157. # disable - No conversion, send as-is (gzipped lottie)
  158. # png - converts to non-animated png (fastest),
  159. # gif - converts to animated gif, but loses transparency
  160. # webm - converts to webm video, requires ffmpeg executable with vp9 codec and webm container support
  161. target: gif
  162. # Arguments for converter. All converters take width and height.
  163. # GIF converter takes background as a hex color.
  164. args:
  165. width: 256
  166. height: 256
  167. background: "020202" # only for gif
  168. fps: 30 # only for webm
  169. # End-to-bridge encryption support options.
  170. #
  171. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  172. encryption:
  173. # Allow encryption, work in group chat rooms with e2ee enabled
  174. allow: {{ matrix_mautrix_telegram_bridge_encryption_allow|to_json }}
  175. # Default to encryption, force-enable encryption in all portals the bridge creates
  176. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  177. default: {{ matrix_mautrix_telegram_bridge_encryption_default|to_json }}
  178. # Database for the encryption data. If set to `default`, will use the appservice database.
  179. database: default
  180. # Options for automatic key sharing.
  181. key_sharing:
  182. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  183. # You must use a client that supports requesting keys from other users to use this feature.
  184. allow: {{ matrix_mautrix_telegram_bridge_encryption_key_sharing_allow|to_json }}
  185. # Require the requesting device to have a valid cross-signing signature?
  186. # This doesn't require that the bridge has verified the device, only that the user has verified it.
  187. # Not yet implemented.
  188. require_cross_signing: false
  189. # Require devices to be verified by the bridge?
  190. # Verification by the bridge is not yet implemented.
  191. require_verification: true
  192. # Whether or not to explicitly set the avatar and room name for private
  193. # chat portal rooms. This will be implicitly enabled if encryption.default is true.
  194. private_chat_portal_meta: false
  195. # Whether or not the bridge should send a read receipt from the bridge bot when a message has
  196. # been sent to Telegram.
  197. delivery_receipts: false
  198. # Whether or not delivery errors should be reported as messages in the Matrix room.
  199. delivery_error_reports: true
  200. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  201. # This field will automatically be changed back to false after it,
  202. # except if the config file is not writable.
  203. resend_bridge_info: false
  204. # Overrides for base power levels.
  205. initial_power_level_overrides:
  206. user: {}
  207. group: {}
  208. # Whether to bridge Telegram bot messages as m.notices or m.texts.
  209. bot_messages_as_notices: true
  210. bridge_notices:
  211. # Whether or not Matrix bot messages (type m.notice) should be bridged.
  212. default: false
  213. # List of user IDs for whom the previous flag is flipped.
  214. # e.g. if bridge_notices.default is false, notices from other users will not be bridged, but
  215. # notices from users listed here will be bridged.
  216. exceptions: []
  217. # The formats to use when sending messages to Telegram via the relay bot.
  218. #
  219. # Telegram doesn't have built-in emotes, so the m.emote format is also used for non-relaybot users.
  220. #
  221. # Available variables:
  222. # $sender_displayname - The display name of the sender (e.g. Example User)
  223. # $sender_username - The username (Matrix ID localpart) of the sender (e.g. exampleuser)
  224. # $sender_mxid - The Matrix ID of the sender (e.g. @exampleuser:example.com)
  225. # $message - The message content as HTML
  226. message_formats:
  227. m.text: "<b>$sender_displayname</b>: $message"
  228. m.notice: "<b>$sender_displayname</b>: $message"
  229. m.emote: "* <b>$sender_displayname</b> $message"
  230. m.file: "<b>$sender_displayname</b> sent a file: $message"
  231. m.image: "<b>$sender_displayname</b> sent an image: $message"
  232. m.audio: "<b>$sender_displayname</b> sent an audio file: $message"
  233. m.video: "<b>$sender_displayname</b> sent a video: $message"
  234. m.location: "<b>$sender_displayname</b> sent a location: $message"
  235. # Telegram doesn't have built-in emotes, this field specifies how m.emote's from authenticated
  236. # users are sent to telegram. All fields in message_formats are supported. Additionally, the
  237. # Telegram user info is available in the following variables:
  238. # $displayname - Telegram displayname
  239. # $username - Telegram username (may not exist)
  240. # $mention - Telegram @username or displayname mention (depending on which exists)
  241. emote_format: "* $mention $formatted_body"
  242. # The formats to use when sending state events to Telegram via the relay bot.
  243. #
  244. # Variables from `message_formats` that have the `sender_` prefix are available without the prefix.
  245. # In name_change events, `$prev_displayname` is the previous displayname.
  246. #
  247. # Set format to an empty string to disable the messages for that event.
  248. state_event_formats:
  249. join: "<b>$displayname</b> joined the room."
  250. leave: "<b>$displayname</b> left the room."
  251. name_change: "<b>$prev_displayname</b> changed their name to <b>$displayname</b>"
  252. # Filter rooms that can/can't be bridged. Can also be managed using the `filter` and
  253. # `filter-mode` management commands.
  254. #
  255. # Filters do not affect direct chats.
  256. # An empty blacklist will essentially disable the filter.
  257. filter:
  258. # Filter mode to use. Either "blacklist" or "whitelist".
  259. # If the mode is "blacklist", the listed chats will never be bridged.
  260. # If the mode is "whitelist", only the listed chats can be bridged.
  261. mode: {{ matrix_mautrix_telegram_filter_mode | to_json }}
  262. # The list of group/channel IDs to filter.
  263. list: []
  264. # The prefix for commands. Only required in non-management rooms.
  265. command_prefix: {{ matrix_mautrix_telegram_command_prefix | to_json }}
  266. # Permissions for using the bridge.
  267. # Permitted values:
  268. # relaybot - Only use the bridge via the relaybot, no access to commands.
  269. # user - Relaybot level + access to commands to create bridges.
  270. # puppeting - User level + logging in with a Telegram account.
  271. # full - Full access to use the bridge, i.e. previous levels + Matrix login.
  272. # admin - Full access to use the bridge and some extra administration commands.
  273. # Permitted keys:
  274. # * - All Matrix users
  275. # domain - All users on that homeserver
  276. # mxid - Specific user
  277. permissions: {{ matrix_mautrix_telegram_bridge_permissions | to_json }}
  278. # Options related to the message relay Telegram bot.
  279. relaybot:
  280. private_chat:
  281. # List of users to invite to the portal when someone starts a private chat with the bot.
  282. # If empty, private chats with the bot won't create a portal.
  283. invite: []
  284. # Whether or not to bridge state change messages in relaybot private chats.
  285. state_changes: true
  286. # When private_chat_invite is empty, this message is sent to users /starting the
  287. # relaybot. Telegram's "markdown" is supported.
  288. message: This is a Matrix bridge relaybot and does not support direct chats
  289. # List of users to invite to all group chat portals created by the bridge.
  290. group_chat_invite: []
  291. # Whether or not the relaybot should not bridge events in unbridged group chats.
  292. # If false, portals will be created when the relaybot receives messages, just like normal
  293. # users. This behavior is usually not desirable, as it interferes with manually bridging
  294. # the chat to another room.
  295. ignore_unbridged_group_chat: true
  296. # Whether or not to allow creating portals from Telegram.
  297. authless_portals: true
  298. # Whether or not to allow Telegram group admins to use the bot commands.
  299. whitelist_group_admins: true
  300. # Whether or not to ignore incoming events sent by the relay bot.
  301. ignore_own_incoming_events: true
  302. # List of usernames/user IDs who are also allowed to use the bot commands.
  303. whitelist: []
  304. # Telegram config
  305. telegram:
  306. # Get your own API keys at https://my.telegram.org/apps
  307. api_id: {{ matrix_mautrix_telegram_api_id|to_json }}
  308. api_hash: {{ matrix_mautrix_telegram_api_hash|to_json }}
  309. # (Optional) Create your own bot at https://t.me/BotFather
  310. bot_token: {{ matrix_mautrix_telegram_bot_token|to_json }}
  311. # Telethon connection options.
  312. connection:
  313. # The timeout in seconds to be used when connecting.
  314. timeout: 120
  315. # How many times the reconnection should retry, either on the initial connection or when
  316. # Telegram disconnects us. May be set to a negative or null value for infinite retries, but
  317. # this is not recommended, since the program can get stuck in an infinite loop.
  318. retries: 5
  319. # The delay in seconds to sleep between automatic reconnections.
  320. retry_delay: 1
  321. # The threshold below which the library should automatically sleep on flood wait errors
  322. # (inclusive). For instance, if a FloodWaitError for 17s occurs and flood_sleep_threshold
  323. # is 20s, the library will sleep automatically. If the error was for 21s, it would raise
  324. # the error instead. Values larger than a day (86400) will be changed to a day.
  325. flood_sleep_threshold: 60
  326. # How many times a request should be retried. Request are retried when Telegram is having
  327. # internal issues, when there is a FloodWaitError less than flood_sleep_threshold, or when
  328. # there's a migrate error. May take a negative or null value for infinite retries, but this
  329. # is not recommended, since some requests can always trigger a call fail (such as searching
  330. # for messages).
  331. request_retries: 5
  332. # Device info sent to Telegram.
  333. device_info:
  334. # "auto" = OS name+version.
  335. device_model: auto
  336. # "auto" = Telethon version.
  337. system_version: auto
  338. # "auto" = mautrix-telegram version.
  339. app_version: auto
  340. lang_code: en
  341. system_lang_code: en
  342. # Custom server to connect to.
  343. server:
  344. # Set to true to use these server settings. If false, will automatically
  345. # use production server assigned by Telegram. Set to false in production.
  346. enabled: false
  347. # The DC ID to connect to.
  348. dc: 2
  349. # The IP to connect to.
  350. ip: 149.154.167.40
  351. # The port to connect to. 443 may not work, 80 is better and both are equally secure.
  352. port: 80
  353. # Telethon proxy configuration.
  354. # You must install PySocks from pip for proxies to work.
  355. proxy:
  356. # Allowed types: disabled, socks4, socks5, http
  357. type: disabled
  358. # Proxy IP address and port.
  359. address: 127.0.0.1
  360. port: 1080
  361. # Whether or not to perform DNS resolving remotely.
  362. rdns: true
  363. # Proxy authentication (optional).
  364. username: ""
  365. password: ""
  366. # Python logging configuration.
  367. #
  368. # See section 16.7.2 of the Python documentation for more info:
  369. # https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
  370. logging:
  371. version: 1
  372. formatters:
  373. precise:
  374. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  375. handlers:
  376. console:
  377. class: logging.StreamHandler
  378. formatter: precise
  379. loggers:
  380. mau:
  381. level: {{ matrix_mautrix_telegram_logging_level|to_json }}
  382. telethon:
  383. level: {{ matrix_mautrix_telegram_logging_level|to_json }}
  384. aiohttp:
  385. level: {{ matrix_mautrix_telegram_logging_level|to_json }}
  386. root:
  387. level: {{ matrix_mautrix_telegram_logging_level|to_json }}
  388. handlers: [console]