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,40 @@ 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 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
47
37
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
52
41
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.
53
46
servers: {{ matrix_appservice_irc_ircService_servers|to_json }}
54
47
48
+ # present relevant UI to the user. MSC2346
49
+ bridgeInfoState:
50
+ enabled: false
51
+ initial: false
55
52
# Configuration for an ident server. If you are running a public bridge it is
56
53
# advised you setup an ident server so IRC mods can ban specific matrix users
57
54
# rather than the application service itself.
55
+ # This key CANNOT be hot-reloaded
58
56
ident:
59
57
# True to listen for Ident requests and respond with the
60
58
# matrix user's user_id (converted to ASCII, respecting RFC 1413).
@@ -71,49 +69,62 @@ ircService:
71
69
# Default: 0.0.0.0
72
70
address: "::"
73
71
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
+
74
76
# Configuration for logging. Optional. Default: console debug level logging
75
77
# only.
76
78
logging:
77
79
# Level to log on console/logfile. One of error|warn|info|debug
78
80
level: "debug"
79
81
# The file location to log to. This is relative to the project directory.
80
- # logfile: "debug.log"
82
+ logfile: "debug.log"
81
83
# The file location to log errors to. This is relative to the project
82
84
# directory.
83
- # errfile: "errors.log"
85
+ errfile: "errors.log"
84
86
# Whether to log to the console or not.
85
87
toConsole: true
86
88
# The max number of files to keep. Files will be overwritten eventually due
87
89
# to rotations.
88
90
maxFiles: 5
89
91
90
- # Optional. Enable Prometheus metrics. If this is enabled, you MUST install `prom-client`:
91
-
92
92
# Metrics will then be available via GET /metrics on the bridge listening port (-p).
93
+ # This key CANNOT be hot-reloaded
93
94
metrics:
94
95
# Whether to actually enable the metric endpoint. Default: false
95
96
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
96
103
# When collecting remote user active times, which "buckets" should be used. Defaults are given below.
97
104
# The bucket name is formed of a duration and a period. (h=hours,d=days,w=weeks).
98
105
remoteUserAgeBuckets:
99
106
- "1h"
100
107
- "1d"
101
108
- "1w"
102
-
103
109
# 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
109
111
provisioning:
110
112
# True to enable the provisioning HTTP endpoint. Default: false.
111
113
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"
117
128
118
129
# Options here are generally only applicable to large-scale bridges and may have
119
130
# consequences greater than other options in this configuration file.
@@ -122,13 +133,18 @@ advanced:
122
133
# however for large bridges it is important to rate limit the bridge to avoid
123
134
# accidentally overloading the homeserver. Defaults to 1000, which should be
124
135
# enough for the vast majority of use cases.
136
+ # This key CAN be hot-reloaded
125
137
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
126
141
127
142
# Use an external database to store bridge state.
143
+ # This key CANNOT be hot-reloaded.
128
144
database:
129
145
# database engine (must be 'postgres' or 'nedb'). Default: nedb
130
146
engine: {{ matrix_appservice_irc_database_engine|to_json }}
131
147
# Either a PostgreSQL connection string, or a path to the NeDB storage directory.
132
148
# For postgres, it must start with postgres://
133
149
# 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