Skip to content

Commit 525601d

Browse files
committed
Update config.yaml template
1 parent d0a021e commit 525601d

File tree

1 file changed

+59
-43
lines changed

1 file changed

+59
-43
lines changed
Lines changed: 59 additions & 43 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,40 @@ 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 server.name 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
4737

48-
# Config for Matrix -> IRC bridging
49-
matrixHandler:
50-
# Cache this many matrix events in memory to be used for m.relates_to messages (usually replies).
51-
eventCacheSize: 4096
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
5241

42+
# Configuration specific to the IRC service
43+
ircService:
44+
# All server keys can be hot-reloaded, however existing IRC connections
45+
# will not have changes applied to them.
5346
servers: {{ matrix_appservice_irc_ircService_servers|to_json }}
5447

48+
# present relevant UI to the user. MSC2346
49+
bridgeInfoState:
50+
enabled: false
51+
initial: false
5552
# Configuration for an ident server. If you are running a public bridge it is
5653
# advised you setup an ident server so IRC mods can ban specific matrix users
5754
# rather than the application service itself.
55+
# This key CANNOT be hot-reloaded
5856
ident:
5957
# True to listen for Ident requests and respond with the
6058
# matrix user's user_id (converted to ASCII, respecting RFC 1413).
@@ -71,49 +69,62 @@ ircService:
7169
# Default: 0.0.0.0
7270
address: "::"
7371

72+
# Encoding fallback - which text encoding to try if text is not UTF-8. Default: not set.
73+
# List of supported encodings: https://www.npmjs.com/package/iconv#supported-encodings
74+
# encodingFallback: "ISO-8859-15"
75+
7476
# Configuration for logging. Optional. Default: console debug level logging
7577
# only.
7678
logging:
7779
# Level to log on console/logfile. One of error|warn|info|debug
7880
level: "debug"
7981
# The file location to log to. This is relative to the project directory.
80-
#logfile: "debug.log"
82+
logfile: "debug.log"
8183
# The file location to log errors to. This is relative to the project
8284
# directory.
83-
#errfile: "errors.log"
85+
errfile: "errors.log"
8486
# Whether to log to the console or not.
8587
toConsole: true
8688
# The max number of files to keep. Files will be overwritten eventually due
8789
# to rotations.
8890
maxFiles: 5
8991

90-
# Optional. Enable Prometheus metrics. If this is enabled, you MUST install `prom-client`:
91-
# $ npm install [email protected]
9292
# Metrics will then be available via GET /metrics on the bridge listening port (-p).
93+
# This key CANNOT be hot-reloaded
9394
metrics:
9495
# Whether to actually enable the metric endpoint. Default: false
9596
enabled: true
97+
# Which port to listen on (omit to listen on the bindPort)
98+
#port: 7001
99+
# Which hostname to listen on (omit to listen on 127.0.0.1), requires port to be set
100+
host: 127.0.0.1
101+
# When determining activeness of remote and matrix users, cut off at this number of hours.
102+
userActivityThresholdHours: 72 # 3 days
96103
# When collecting remote user active times, which "buckets" should be used. Defaults are given below.
97104
# The bucket name is formed of a duration and a period. (h=hours,d=days,w=weeks).
98105
remoteUserAgeBuckets:
99106
- "1h"
100107
- "1d"
101108
- "1w"
102-
103109
# Configuration for the provisioning API.
104-
#
105-
# GET /_matrix/provision/link
106-
# GET /_matrix/provision/unlink
107-
# GET /_matrix/provision/listlinks
108-
#
110+
# This key CANNOT be hot-reloaded
109111
provisioning:
110112
# True to enable the provisioning HTTP endpoint. Default: false.
111113
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
114+
# Whether to enable hosting the setup widget page. Default: false.
115+
widget: false
116+
117+
# Config for the media proxy, required to serve publically accessible URLs to authenticated Matrix media
118+
mediaProxy:
119+
# To generate a .jwk file:
120+
# $ node src/generate-signing-key.js > signingkey.jwk
121+
signingKeyPath: "signingkey.jwk"
122+
# How long should the generated URLs be valid for
123+
ttlSeconds: 3600
124+
# The port for the media proxy to listen on
125+
bindPort: 11111
126+
# The publically accessible URL to the media proxy
127+
publicUrl: "https://irc.bridge/media"
117128

118129
# Options here are generally only applicable to large-scale bridges and may have
119130
# consequences greater than other options in this configuration file.
@@ -122,13 +133,18 @@ advanced:
122133
# however for large bridges it is important to rate limit the bridge to avoid
123134
# accidentally overloading the homeserver. Defaults to 1000, which should be
124135
# enough for the vast majority of use cases.
136+
# This key CAN be hot-reloaded
125137
maxHttpSockets: 1000
138+
# Max size of an appservice transaction payload, in bytes. Defaults to 10Mb
139+
# This key CANNOT be hot-reloaded.
140+
maxTxnSize: 10000000
126141

127142
# Use an external database to store bridge state.
143+
# This key CANNOT be hot-reloaded.
128144
database:
129145
# database engine (must be 'postgres' or 'nedb'). Default: nedb
130146
engine: {{ matrix_appservice_irc_database_engine|to_json }}
131147
# Either a PostgreSQL connection string, or a path to the NeDB storage directory.
132148
# For postgres, it must start with postgres://
133149
# For NeDB, it must start with nedb://. The path is relative to the project directory.
134-
connectionString: {{ matrix_appservice_irc_database_connectionString|to_json }}
150+
connectionString: {{ matrix_appservice_irc_database_connectionString

0 commit comments

Comments
 (0)