Update config.yaml template

This commit is contained in:
Thom Wiggers 2024-09-09 13:57:30 +02:00
parent f28635b155
commit 4d03aa4dcd
No known key found for this signature in database
GPG Key ID: 001BB0A7CE26E363

View File

@ -1,14 +1,13 @@
#jinja2: lstrip_blocks: True #jinja2: lstrip_blocks: True
#
# Based on https://github.com/matrix-org/matrix-appservice-irc/blob/8daebec7779a2480180cbc4c293838de649aab36/config.sample.yaml
#
# Configuration specific to AS registration. Unless other marked, all fields
# are *REQUIRED*.
# Unless otherwise specified, these keys CANNOT be hot-reloaded.
homeserver: homeserver:
# The URL to the home server for client-server API calls, also used to form the # The URL to the home server for client-server API calls
# media URLs as displayed in bridged IRC channels: url: "{{ matrix_appservice_irc_homeserver_url }}"
url: {{ matrix_appservice_irc_homeserver_url }}
#
# The URL of the homeserver hosting media files. This is only used to transform
# mxc URIs to http URIs when bridging m.room.[file|image] events. Optional. By
# default, this is the homeserver URL, specified above.
#
media_url: {{ matrix_appservice_irc_homeserver_media_url }}
# Drop Matrix messages which are older than this number of seconds, according to # Drop Matrix messages which are older than this number of seconds, according to
# the event's origin_server_ts. # the event's origin_server_ts.
@ -20,41 +19,45 @@ homeserver:
# clock times and hence produce different origin_server_ts values, which may be old # clock times and hence produce different origin_server_ts values, which may be old
# enough to cause *all* events from the homeserver to be dropped. # enough to cause *all* events from the homeserver to be dropped.
# Default: 0 (don't ever drop) # Default: 0 (don't ever drop)
# This key CAN be hot-reloaded.
# dropMatrixMessagesAfterSecs: 300 # 5 minutes # dropMatrixMessagesAfterSecs: 300 # 5 minutes
# The 'domain' part for user IDs on this home server. Usually (but not always) # The 'domain' part for user IDs on this home server. Usually (but not always)
# is the "domain name" part of the HS URL. # is the "domain name" part of the HS URL.
domain: {{ matrix_appservice_irc_homeserver_domain }} domain: "{{ matrix_appservice_irc_homeserver_domain }}"
# Should presence be enabled for Matrix clients on this bridge. If disabled on the # Should presence be enabled for Matrix clients on this bridge. If disabled on the
# homeserver then it should also be disabled here to avoid excess traffic. # homeserver then it should also be disabled here to avoid excess traffic.
# Default: true # Default: true
enablePresence: {{ matrix_appservice_irc_homeserver_enablePresence|to_json }} enablePresence: {{ matrix_appservice_irc_homeserver_enablePresence|to_json }}
ircService: # Which port should the appservice bind to. Can be overriden by the one provided in the
# WARNING: The bridge needs to send plaintext passwords to the IRC server, it cannot # command line! Optional.
# send a password hash. As a result, passwords (NOT hashes) are stored encrypted in # bindPort: 8090
# the database.
#
# To generate a .pem file:
# $ openssl genpkey -out passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:2048
#
# The path to the RSA PEM-formatted private key to use when encrypting IRC passwords
# for storage in the database. Passwords are stored by using the admin room command
# `!storepass example.com passw0rd. When a connection is made to IRC on behalf of
# the Matrix user, this password will be sent as the server password (PASS command).
passwordEncryptionKeyPath: "/data/passkey.pem" # does not typically need modification
# Use this option to force the appservice to listen on another hostname for transactions.
# This is NOT your synapse hostname. E.g. use 127.0.0.1 to only listen locally. Optional.
# bindHostname: 0.0.0.0
# Configuration specific to the IRC service
ircService:
# Config for Matrix -> IRC bridging # Config for Matrix -> IRC bridging
matrixHandler: matrixHandler:
# Cache this many Matrix events in memory to be used for m.relates_to messages (usually replies). # Cache this many Matrix events in memory to be used for m.relates_to messages (usually replies).
eventCacheSize: 4096 eventCacheSize: 4096
# All server keys can be hot-reloaded, however existing IRC connections
# will not have changes applied to them.
servers: {{ matrix_appservice_irc_ircService_servers|to_json }} servers: {{ matrix_appservice_irc_ircService_servers|to_json }}
# present relevant UI to the user. MSC2346
bridgeInfoState:
enabled: false
initial: false
# Configuration for an ident server. If you are running a public bridge it is # Configuration for an ident server. If you are running a public bridge it is
# advised you setup an ident server so IRC mods can ban specific Matrix users # advised you setup an ident server so IRC mods can ban specific Matrix users
# rather than the application service itself. # rather than the application service itself.
# This key CANNOT be hot-reloaded
ident: ident:
# True to listen for Ident requests and respond with the # True to listen for Ident requests and respond with the
# Matrix user's user_id (converted to ASCII, respecting RFC 1413). # Matrix user's user_id (converted to ASCII, respecting RFC 1413).
@ -71,49 +74,62 @@ ircService:
# Default: 0.0.0.0 # Default: 0.0.0.0
address: "::" address: "::"
# Encoding fallback - which text encoding to try if text is not UTF-8. Default: not set.
# List of supported encodings: https://www.npmjs.com/package/iconv#supported-encodings
# encodingFallback: "ISO-8859-15"
# Configuration for logging. Optional. Default: console debug level logging # Configuration for logging. Optional. Default: console debug level logging
# only. # only.
logging: logging:
# Level to log on console/logfile. One of error|warn|info|debug # Level to log on console/logfile. One of error|warn|info|debug
level: "debug" level: "debug"
# The file location to log to. This is relative to the project directory. # The file location to log to. This is relative to the project directory.
#logfile: "debug.log" logfile: "debug.log"
# The file location to log errors to. This is relative to the project # The file location to log errors to. This is relative to the project
# directory. # directory.
#errfile: "errors.log" errfile: "errors.log"
# Whether to log to the console or not. # Whether to log to the console or not.
toConsole: true toConsole: true
# The max number of files to keep. Files will be overwritten eventually due # The max number of files to keep. Files will be overwritten eventually due
# to rotations. # to rotations.
maxFiles: 5 maxFiles: 5
# Optional. Enable Prometheus metrics. If this is enabled, you MUST install `prom-client`:
# $ npm install prom-client@6.3.0
# Metrics will then be available via GET /metrics on the bridge listening port (-p). # Metrics will then be available via GET /metrics on the bridge listening port (-p).
# This key CANNOT be hot-reloaded
metrics: metrics:
# Whether to actually enable the metric endpoint. Default: false # Whether to actually enable the metric endpoint. Default: false
enabled: true enabled: true
# Which port to listen on (omit to listen on the bindPort)
#port: 7001
# Which hostname to listen on (omit to listen on 127.0.0.1), requires port to be set
host: 127.0.0.1
# When determining activeness of remote and matrix users, cut off at this number of hours.
userActivityThresholdHours: 72 # 3 days
# When collecting remote user active times, which "buckets" should be used. Defaults are given below. # When collecting remote user active times, which "buckets" should be used. Defaults are given below.
# The bucket name is formed of a duration and a period. (h=hours,d=days,w=weeks). # The bucket name is formed of a duration and a period. (h=hours,d=days,w=weeks).
remoteUserAgeBuckets: remoteUserAgeBuckets:
- "1h" - "1h"
- "1d" - "1d"
- "1w" - "1w"
# Configuration for the provisioning API. # Configuration for the provisioning API.
# # This key CANNOT be hot-reloaded
# GET /_matrix/provision/link
# GET /_matrix/provision/unlink
# GET /_matrix/provision/listlinks
#
provisioning: provisioning:
# True to enable the provisioning HTTP endpoint. Default: false. # True to enable the provisioning HTTP endpoint. Default: false.
enabled: false enabled: false
# The number of seconds to wait before giving up on getting a response from # Whether to enable hosting the setup widget page. Default: false.
# an IRC channel operator. If the channel operator does not respond within the widget: false
# allotted time period, the provisioning request will fail.
# Default: 300 seconds (5 mins) # Config for the media proxy, required to serve publically accessible URLs to authenticated Matrix media
requestTimeoutSeconds: 300 mediaProxy:
# To generate a .jwk file:
# $ node src/generate-signing-key.js > signingkey.jwk
signingKeyPath: "signingkey.jwk"
# How long should the generated URLs be valid for
ttlSeconds: 3600
# The port for the media proxy to listen on
bindPort: 11111
# The publically accessible URL to the media proxy
publicUrl: "https://irc.bridge/media"
# Options here are generally only applicable to large-scale bridges and may have # Options here are generally only applicable to large-scale bridges and may have
# consequences greater than other options in this configuration file. # consequences greater than other options in this configuration file.
@ -122,13 +138,18 @@ advanced:
# however for large bridges it is important to rate limit the bridge to avoid # however for large bridges it is important to rate limit the bridge to avoid
# accidentally overloading the homeserver. Defaults to 1000, which should be # accidentally overloading the homeserver. Defaults to 1000, which should be
# enough for the vast majority of use cases. # enough for the vast majority of use cases.
# This key CAN be hot-reloaded
maxHttpSockets: 1000 maxHttpSockets: 1000
# Max size of an appservice transaction payload, in bytes. Defaults to 10Mb
# This key CANNOT be hot-reloaded.
maxTxnSize: 10000000
# Use an external database to store bridge state. # Use an external database to store bridge state.
# This key CANNOT be hot-reloaded.
database: database:
# database engine (must be 'postgres' or 'nedb'). Default: nedb # database engine (must be 'postgres' or 'nedb'). Default: nedb
engine: {{ matrix_appservice_irc_database_engine|to_json }} engine: {{ matrix_appservice_irc_database_engine|to_json }}
# Either a PostgreSQL connection string, or a path to the NeDB storage directory. # Either a PostgreSQL connection string, or a path to the NeDB storage directory.
# For postgres, it must start with postgres:// # For postgres, it must start with postgres://
# For NeDB, it must start with nedb://. The path is relative to the project directory. # For NeDB, it must start with nedb://. The path is relative to the project directory.
connectionString: {{ matrix_appservice_irc_database_connectionString|to_json }} connectionString: {{ matrix_appservice_irc_database_connectionString