1
1
#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.
2
8
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 }}"
12
11
13
12
# Drop Matrix messages which are older than this number of seconds, according to
14
13
# the event's origin_server_ts.
@@ -20,41 +19,45 @@ homeserver:
20
19
# clock times and hence produce different origin_server_ts values, which may be old
21
20
# enough to cause *all* events from the homeserver to be dropped.
22
21
# Default: 0 (don't ever drop)
22
+ # This key CAN be hot-reloaded.
23
23
# dropMatrixMessagesAfterSecs: 300 # 5 minutes
24
24
25
25
# The 'domain' part for user IDs on this home server. Usually (but not always)
26
26
# is the "domain name" part of the HS URL.
27
- domain: {{ matrix_appservice_irc_homeserver_domain }}
27
+ domain: " {{ matrix_appservice_irc_homeserver_domain }}"
28
28
29
29
# Should presence be enabled for Matrix clients on this bridge. If disabled on the
30
30
# homeserver then it should also be disabled here to avoid excess traffic.
31
31
# Default: true
32
32
enablePresence: {{ matrix_appservice_irc_homeserver_enablePresence|to_json }}
33
33
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
47
41
42
+ # Configuration specific to the IRC service
43
+ ircService:
48
44
# Config for Matrix -> IRC bridging
49
45
matrixHandler:
50
46
# Cache this many Matrix events in memory to be used for m.relates_to messages (usually replies).
51
47
eventCacheSize: 4096
52
48
49
+ # All server keys can be hot-reloaded, however existing IRC connections
50
+ # will not have changes applied to them.
53
51
servers: {{ matrix_appservice_irc_ircService_servers|to_json }}
54
52
53
+ # present relevant UI to the user. MSC2346
54
+ bridgeInfoState:
55
+ enabled: false
56
+ initial: false
55
57
# Configuration for an ident server. If you are running a public bridge it is
56
58
# advised you setup an ident server so IRC mods can ban specific Matrix users
57
59
# rather than the application service itself.
60
+ # This key CANNOT be hot-reloaded
58
61
ident:
59
62
# True to listen for Ident requests and respond with the
60
63
# Matrix user's user_id (converted to ASCII, respecting RFC 1413).
@@ -71,49 +74,62 @@ ircService:
71
74
# Default: 0.0.0.0
72
75
address: "::"
73
76
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
+
74
81
# Configuration for logging. Optional. Default: console debug level logging
75
82
# only.
76
83
logging:
77
84
# Level to log on console/logfile. One of error|warn|info|debug
78
85
level: "debug"
79
86
# The file location to log to. This is relative to the project directory.
80
- # logfile: "debug.log"
87
+ logfile: "debug.log"
81
88
# The file location to log errors to. This is relative to the project
82
89
# directory.
83
- # errfile: "errors.log"
90
+ errfile: "errors.log"
84
91
# Whether to log to the console or not.
85
92
toConsole: true
86
93
# The max number of files to keep. Files will be overwritten eventually due
87
94
# to rotations.
88
95
maxFiles: 5
89
96
90
- # Optional. Enable Prometheus metrics. If this is enabled, you MUST install `prom-client`:
91
-
92
97
# Metrics will then be available via GET /metrics on the bridge listening port (-p).
98
+ # This key CANNOT be hot-reloaded
93
99
metrics:
94
100
# Whether to actually enable the metric endpoint. Default: false
95
101
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
96
108
# When collecting remote user active times, which "buckets" should be used. Defaults are given below.
97
109
# The bucket name is formed of a duration and a period. (h=hours,d=days,w=weeks).
98
110
remoteUserAgeBuckets:
99
111
- "1h"
100
112
- "1d"
101
113
- "1w"
102
-
103
114
# 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
109
116
provisioning:
110
117
# True to enable the provisioning HTTP endpoint. Default: false.
111
118
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"
117
133
118
134
# Options here are generally only applicable to large-scale bridges and may have
119
135
# consequences greater than other options in this configuration file.
@@ -122,13 +138,18 @@ advanced:
122
138
# however for large bridges it is important to rate limit the bridge to avoid
123
139
# accidentally overloading the homeserver. Defaults to 1000, which should be
124
140
# enough for the vast majority of use cases.
141
+ # This key CAN be hot-reloaded
125
142
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
126
146
127
147
# Use an external database to store bridge state.
148
+ # This key CANNOT be hot-reloaded.
128
149
database:
129
150
# database engine (must be 'postgres' or 'nedb'). Default: nedb
130
151
engine: {{ matrix_appservice_irc_database_engine|to_json }}
131
152
# Either a PostgreSQL connection string, or a path to the NeDB storage directory.
132
153
# For postgres, it must start with postgres://
133
154
# 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