Skip to content

Commit 4d03aa4

Browse files
committed
Update config.yaml template
1 parent f28635b commit 4d03aa4

File tree

1 file changed

+60
-39
lines changed

1 file changed

+60
-39
lines changed
Lines changed: 60 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#jinja2: lstrip_blocks: True
2+
#
3+
# Based on https://github.com/matrix-org/matrix-appservice-irc/blob/8daebec7779a2480180cbc4c293838de649aab36/config.sample.yaml
4+
#
5+
# Configuration specific to AS registration. Unless other marked, all fields
6+
# are *REQUIRED*.
7+
# Unless otherwise specified, these keys CANNOT be hot-reloaded.
28
homeserver:
3-
# The URL to the home server for client-server API calls, also used to form the
4-
# media URLs as displayed in bridged IRC channels:
5-
url: {{ matrix_appservice_irc_homeserver_url }}
6-
#
7-
# The URL of the homeserver hosting media files. This is only used to transform
8-
# mxc URIs to http URIs when bridging m.room.[file|image] events. Optional. By
9-
# default, this is the homeserver URL, specified above.
10-
#
11-
media_url: {{ matrix_appservice_irc_homeserver_media_url }}
9+
# The URL to the home server for client-server API calls
10+
url: "{{ matrix_appservice_irc_homeserver_url }}"
1211

1312
# Drop Matrix messages which are older than this number of seconds, according to
1413
# the event's origin_server_ts.
@@ -20,41 +19,45 @@ homeserver:
2019
# clock times and hence produce different origin_server_ts values, which may be old
2120
# enough to cause *all* events from the homeserver to be dropped.
2221
# Default: 0 (don't ever drop)
22+
# This key CAN be hot-reloaded.
2323
# dropMatrixMessagesAfterSecs: 300 # 5 minutes
2424

2525
# The 'domain' part for user IDs on this home server. Usually (but not always)
2626
# is the "domain name" part of the HS URL.
27-
domain: {{ matrix_appservice_irc_homeserver_domain }}
27+
domain: "{{ matrix_appservice_irc_homeserver_domain }}"
2828

2929
# Should presence be enabled for Matrix clients on this bridge. If disabled on the
3030
# homeserver then it should also be disabled here to avoid excess traffic.
3131
# Default: true
3232
enablePresence: {{ matrix_appservice_irc_homeserver_enablePresence|to_json }}
3333

34-
ircService:
35-
# WARNING: The bridge needs to send plaintext passwords to the IRC server, it cannot
36-
# send a password hash. As a result, passwords (NOT hashes) are stored encrypted in
37-
# the database.
38-
#
39-
# To generate a .pem file:
40-
# $ openssl genpkey -out passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:2048
41-
#
42-
# The path to the RSA PEM-formatted private key to use when encrypting IRC passwords
43-
# for storage in the database. Passwords are stored by using the admin room command
44-
# `!storepass example.com passw0rd. When a connection is made to IRC on behalf of
45-
# the Matrix user, this password will be sent as the server password (PASS command).
46-
passwordEncryptionKeyPath: "/data/passkey.pem" # does not typically need modification
34+
# Which port should the appservice bind to. Can be overriden by the one provided in the
35+
# command line! Optional.
36+
# bindPort: 8090
37+
38+
# Use this option to force the appservice to listen on another hostname for transactions.
39+
# This is NOT your synapse hostname. E.g. use 127.0.0.1 to only listen locally. Optional.
40+
# bindHostname: 0.0.0.0
4741

42+
# Configuration specific to the IRC service
43+
ircService:
4844
# Config for Matrix -> IRC bridging
4945
matrixHandler:
5046
# Cache this many Matrix events in memory to be used for m.relates_to messages (usually replies).
5147
eventCacheSize: 4096
5248

49+
# All server keys can be hot-reloaded, however existing IRC connections
50+
# will not have changes applied to them.
5351
servers: {{ matrix_appservice_irc_ircService_servers|to_json }}
5452

53+
# present relevant UI to the user. MSC2346
54+
bridgeInfoState:
55+
enabled: false
56+
initial: false
5557
# Configuration for an ident server. If you are running a public bridge it is
5658
# advised you setup an ident server so IRC mods can ban specific Matrix users
5759
# rather than the application service itself.
60+
# This key CANNOT be hot-reloaded
5861
ident:
5962
# True to listen for Ident requests and respond with the
6063
# Matrix user's user_id (converted to ASCII, respecting RFC 1413).
@@ -71,49 +74,62 @@ ircService:
7174
# Default: 0.0.0.0
7275
address: "::"
7376

77+
# Encoding fallback - which text encoding to try if text is not UTF-8. Default: not set.
78+
# List of supported encodings: https://www.npmjs.com/package/iconv#supported-encodings
79+
# encodingFallback: "ISO-8859-15"
80+
7481
# Configuration for logging. Optional. Default: console debug level logging
7582
# only.
7683
logging:
7784
# Level to log on console/logfile. One of error|warn|info|debug
7885
level: "debug"
7986
# The file location to log to. This is relative to the project directory.
80-
#logfile: "debug.log"
87+
logfile: "debug.log"
8188
# The file location to log errors to. This is relative to the project
8289
# directory.
83-
#errfile: "errors.log"
90+
errfile: "errors.log"
8491
# Whether to log to the console or not.
8592
toConsole: true
8693
# The max number of files to keep. Files will be overwritten eventually due
8794
# to rotations.
8895
maxFiles: 5
8996

90-
# Optional. Enable Prometheus metrics. If this is enabled, you MUST install `prom-client`:
91-
# $ npm install [email protected]
9297
# Metrics will then be available via GET /metrics on the bridge listening port (-p).
98+
# This key CANNOT be hot-reloaded
9399
metrics:
94100
# Whether to actually enable the metric endpoint. Default: false
95101
enabled: true
102+
# Which port to listen on (omit to listen on the bindPort)
103+
#port: 7001
104+
# Which hostname to listen on (omit to listen on 127.0.0.1), requires port to be set
105+
host: 127.0.0.1
106+
# When determining activeness of remote and matrix users, cut off at this number of hours.
107+
userActivityThresholdHours: 72 # 3 days
96108
# When collecting remote user active times, which "buckets" should be used. Defaults are given below.
97109
# The bucket name is formed of a duration and a period. (h=hours,d=days,w=weeks).
98110
remoteUserAgeBuckets:
99111
- "1h"
100112
- "1d"
101113
- "1w"
102-
103114
# Configuration for the provisioning API.
104-
#
105-
# GET /_matrix/provision/link
106-
# GET /_matrix/provision/unlink
107-
# GET /_matrix/provision/listlinks
108-
#
115+
# This key CANNOT be hot-reloaded
109116
provisioning:
110117
# True to enable the provisioning HTTP endpoint. Default: false.
111118
enabled: false
112-
# The number of seconds to wait before giving up on getting a response from
113-
# an IRC channel operator. If the channel operator does not respond within the
114-
# allotted time period, the provisioning request will fail.
115-
# Default: 300 seconds (5 mins)
116-
requestTimeoutSeconds: 300
119+
# Whether to enable hosting the setup widget page. Default: false.
120+
widget: false
121+
122+
# Config for the media proxy, required to serve publically accessible URLs to authenticated Matrix media
123+
mediaProxy:
124+
# To generate a .jwk file:
125+
# $ node src/generate-signing-key.js > signingkey.jwk
126+
signingKeyPath: "signingkey.jwk"
127+
# How long should the generated URLs be valid for
128+
ttlSeconds: 3600
129+
# The port for the media proxy to listen on
130+
bindPort: 11111
131+
# The publically accessible URL to the media proxy
132+
publicUrl: "https://irc.bridge/media"
117133

118134
# Options here are generally only applicable to large-scale bridges and may have
119135
# consequences greater than other options in this configuration file.
@@ -122,13 +138,18 @@ advanced:
122138
# however for large bridges it is important to rate limit the bridge to avoid
123139
# accidentally overloading the homeserver. Defaults to 1000, which should be
124140
# enough for the vast majority of use cases.
141+
# This key CAN be hot-reloaded
125142
maxHttpSockets: 1000
143+
# Max size of an appservice transaction payload, in bytes. Defaults to 10Mb
144+
# This key CANNOT be hot-reloaded.
145+
maxTxnSize: 10000000
126146

127147
# Use an external database to store bridge state.
148+
# This key CANNOT be hot-reloaded.
128149
database:
129150
# database engine (must be 'postgres' or 'nedb'). Default: nedb
130151
engine: {{ matrix_appservice_irc_database_engine|to_json }}
131152
# Either a PostgreSQL connection string, or a path to the NeDB storage directory.
132153
# For postgres, it must start with postgres://
133154
# For NeDB, it must start with nedb://. The path is relative to the project directory.
134-
connectionString: {{ matrix_appservice_irc_database_connectionString|to_json }}
155+
connectionString: {{ matrix_appservice_irc_database_connectionString

0 commit comments

Comments
 (0)