選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

traditional.yaml 45KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040
  1. # This is the "traditional" or "mainstream" config file for Ergo.
  2. # It tries to replicate the behavior of other ircds, at the cost of not
  3. # taking full advantage of Ergo's features. This config is suitable for use
  4. # in IRCv3 conformance testing.
  5. # network configuration
  6. network:
  7. # name of the network
  8. name: ErgoTest
  9. # server configuration
  10. server:
  11. # server name
  12. name: ergo.test
  13. # addresses to listen on
  14. listeners:
  15. # This version of the config provides a public plaintext listener on
  16. # port 6667 for testing and compatibility with legacy applications.
  17. # We recommend disabling this listener in a production setting
  18. # and replacing it with loopback-only listeners (see default.yaml):
  19. ":6667":
  20. # The standard SSL/TLS port for IRC is 6697. This will listen on all interfaces:
  21. ":6697":
  22. # this is a standard TLS configuration with a single certificate;
  23. # see the manual for instructions on how to configure SNI
  24. tls:
  25. cert: fullchain.pem
  26. key: privkey.pem
  27. # 'proxy' should typically be false. It's for cloud load balancers that
  28. # always send a PROXY protocol header ahead of the connection. See the
  29. # manual ("Reverse proxies") for more details.
  30. proxy: false
  31. # optionally set the minimum TLS version (defaults to 1.0):
  32. # min-tls-version: 1.2
  33. # Example of a Unix domain socket for proxying:
  34. # "/tmp/ergo_sock":
  35. # Example of a Tor listener: any connection that comes in on this listener will
  36. # be considered a Tor connection. It is strongly recommended that this listener
  37. # *not* be on a public interface --- it should be on 127.0.0.0/8 or unix domain:
  38. # "/hidden_service_sockets/ergo_tor_sock":
  39. # tor: true
  40. # Example of a WebSocket listener:
  41. # ":8097":
  42. # websocket: true
  43. # tls:
  44. # cert: fullchain.pem
  45. # key: privkey.pem
  46. # sets the permissions for Unix listen sockets. on a typical Linux system,
  47. # the default is 0775 or 0755, which prevents other users/groups from connecting
  48. # to the socket. With 0777, it behaves like a normal TCP socket
  49. # where anyone can connect.
  50. unix-bind-mode: 0777
  51. # configure the behavior of Tor listeners (ignored if you didn't enable any):
  52. tor-listeners:
  53. # if this is true, connections from Tor must authenticate with SASL
  54. require-sasl: false
  55. # what hostname should be displayed for Tor connections?
  56. vhost: "tor-network.onion"
  57. # allow at most this many connections at once (0 for no limit):
  58. max-connections: 64
  59. # connection throttling (limit how many connection attempts are allowed at once):
  60. throttle-duration: 10m
  61. # set to 0 to disable throttling:
  62. max-connections-per-duration: 64
  63. # strict transport security, to get clients to automagically use TLS
  64. sts:
  65. # whether to advertise STS
  66. #
  67. # to stop advertising STS, leave this enabled and set 'duration' below to "0". this will
  68. # advertise to connecting users that the STS policy they have saved is no longer valid
  69. enabled: false
  70. # how long clients should be forced to use TLS for.
  71. # setting this to a too-long time will mean bad things if you later remove your TLS.
  72. # the default duration below is 1 month, 2 days and 5 minutes.
  73. duration: 1mo2d5m
  74. # tls port - you should be listening on this port above
  75. port: 6697
  76. # should clients include this STS policy when they ship their inbuilt preload lists?
  77. preload: false
  78. websockets:
  79. # Restrict the origin of WebSocket connections by matching the "Origin" HTTP
  80. # header. This setting causes ergo to reject websocket connections unless
  81. # they originate from a page on one of the whitelisted websites in this list.
  82. # This prevents malicious websites from making their visitors connect to your
  83. # ergo instance without their knowledge. An empty list means there are no
  84. # restrictions.
  85. allowed-origins:
  86. # - "https://ergo.chat"
  87. # - "https://*.ergo.chat"
  88. # casemapping controls what kinds of strings are permitted as identifiers (nicknames,
  89. # channel names, account names, etc.), and how they are normalized for case.
  90. # the recommended default is 'ascii' (traditional ASCII-only identifiers).
  91. # the other options are 'precis', which allows UTF8 identifiers that are "sane"
  92. # (according to UFC 8265), with additional mitigations for homoglyph attacks,
  93. # 'permissive', which allows identifiers containing unusual characters like
  94. # emoji, at the cost of increased vulnerability to homoglyph attacks and potential
  95. # client compatibility problems, and the legacy mappings 'rfc1459' and
  96. # 'rfc1459-strict'. we recommend leaving this value at its default;
  97. # however, note that changing it once the network is already up and running is
  98. # problematic.
  99. casemapping: "ascii"
  100. # enforce-utf8 controls whether the server will preemptively discard non-UTF8
  101. # messages (since they cannot be relayed to websocket clients), or will allow
  102. # them and relay them to non-websocket clients (as in traditional IRC).
  103. enforce-utf8: true
  104. # whether to look up user hostnames with reverse DNS. there are 3 possibilities:
  105. # 1. [enabled here] lookup-hostnames enabled, IP cloaking disabled; users will see each other's hostnames
  106. # 2. lookup-hostnames disabled, IP cloaking disabled; users will see each other's numeric IPs
  107. # 3. IP cloaking enabled; users will see cloaked hostnames
  108. lookup-hostnames: true
  109. # whether to confirm hostname lookups using "forward-confirmed reverse DNS", i.e., for
  110. # any hostname returned from reverse DNS, resolve it back to an IP address and reject it
  111. # unless it matches the connecting IP
  112. forward-confirm-hostnames: true
  113. # use ident protocol to get usernames
  114. check-ident: true
  115. # ignore the supplied user/ident string from the USER command, always setting user/ident
  116. # to the following literal value; this can potentially reduce confusion and simplify bans.
  117. # the value must begin with a '~' character. comment out / omit to disable:
  118. #coerce-ident: '~u'
  119. # 'password' allows you to require a global, shared password (the IRC `PASS` command)
  120. # to connect to the server. for operator passwords, see the `opers` section of the
  121. # config. for a more secure way to create a private server, see the `require-sasl`
  122. # section. you must hash the password with `ergo genpasswd`, then enter the hash here:
  123. #password: "$2a$04$0123456789abcdef0123456789abcdef0123456789abcdef01234"
  124. # motd filename
  125. # if you change the motd, you should move it to ircd.motd
  126. motd: ergo.motd
  127. # motd formatting codes
  128. # if this is true, the motd is escaped using formatting codes like $c, $b, and $i
  129. motd-formatting: true
  130. # relaying using the RELAYMSG command
  131. relaymsg:
  132. # is relaymsg enabled at all?
  133. enabled: true
  134. # which character(s) are reserved for relayed nicks?
  135. separators: "/"
  136. # can channel operators use RELAYMSG in their channels?
  137. # our implementation of RELAYMSG makes it safe for chanops to use without the
  138. # possibility of real users being silently spoofed
  139. available-to-chanops: true
  140. # IPs/CIDRs the PROXY command can be used from
  141. # This should be restricted to localhost (127.0.0.1/8, ::1/128, and unix sockets).
  142. # Unless you have a good reason. you should also add these addresses to the
  143. # connection limits and throttling exemption lists.
  144. proxy-allowed-from:
  145. - localhost
  146. # - "192.168.1.1"
  147. # - "192.168.10.1/24"
  148. # controls the use of the WEBIRC command (by IRC<->web interfaces, bouncers and similar)
  149. webirc:
  150. # one webirc block -- should correspond to one set of gateways
  151. -
  152. # SHA-256 fingerprint of the TLS certificate the gateway must use to connect
  153. # (comment this out to use passwords only)
  154. certfp: "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789"
  155. # password the gateway uses to connect, made with `ergo genpasswd`
  156. password: "$2a$04$abcdef0123456789abcdef0123456789abcdef0123456789abcde"
  157. # IPs/CIDRs that can use this webirc command
  158. # you should also add these addresses to the connection limits and throttling exemption lists
  159. hosts:
  160. - localhost
  161. # - "192.168.1.1"
  162. # - "192.168.10.1/24"
  163. # whether to accept the hostname parameter on the WEBIRC line as the IRC hostname
  164. accept-hostname: true
  165. # maximum length of clients' sendQ in bytes
  166. # this should be big enough to hold bursts of channel/direct messages
  167. max-sendq: 96k
  168. # compatibility with legacy clients
  169. compatibility:
  170. # many clients require that the final parameter of certain messages be an
  171. # RFC1459 trailing parameter, i.e., prefixed with :, whether or not this is
  172. # actually required. this forces Ergo to send those parameters
  173. # as trailings. this is recommended unless you're testing clients for conformance;
  174. # defaults to true when unset for that reason.
  175. force-trailing: true
  176. # some clients (ZNC 1.6.x and lower, Pidgin 2.12 and lower) do not
  177. # respond correctly to SASL messages with the server name as a prefix:
  178. # https://github.com/znc/znc/issues/1212
  179. # this works around that bug, allowing them to use SASL.
  180. send-unprefixed-sasl: true
  181. # traditionally, IRC servers will truncate and send messages that are
  182. # too long to be relayed intact. this behavior can be disabled by setting
  183. # allow-truncation to false, in which case Ergo will reject the message
  184. # and return an error to the client. (note that this option defaults to true
  185. # when unset.)
  186. allow-truncation: true
  187. # IP-based DoS protection
  188. ip-limits:
  189. # whether to limit the total number of concurrent connections per IP/CIDR
  190. count: true
  191. # maximum concurrent connections per IP/CIDR
  192. max-concurrent-connections: 16
  193. # whether to restrict the rate of new connections per IP/CIDR
  194. throttle: true
  195. # how long to keep track of connections for
  196. window: 10m
  197. # maximum number of new connections per IP/CIDR within the given duration
  198. max-connections-per-window: 32
  199. # how wide the CIDR should be for IPv4 (a /32 is a fully specified IPv4 address)
  200. cidr-len-ipv4: 32
  201. # how wide the CIDR should be for IPv6 (a /64 is the typical prefix assigned
  202. # by an ISP to an individual customer for their LAN)
  203. cidr-len-ipv6: 64
  204. # IPs/networks which are exempted from connection limits
  205. exempted:
  206. - "localhost"
  207. # - "192.168.1.1"
  208. # - "2001:0db8::/32"
  209. # custom connection limits for certain IPs/networks.
  210. custom-limits:
  211. #"irccloud":
  212. # nets:
  213. # - "192.184.9.108" # highgate.irccloud.com
  214. # - "192.184.9.110" # ealing.irccloud.com
  215. # - "192.184.9.112" # charlton.irccloud.com
  216. # - "192.184.10.118" # brockwell.irccloud.com
  217. # - "192.184.10.9" # tooting.irccloud.com
  218. # - "192.184.8.73" # hathersage.irccloud.com
  219. # - "192.184.8.103" # stonehaven.irccloud.com
  220. # - "5.254.36.57" # tinside.irccloud.com
  221. # - "5.254.36.56/29" # additional ipv4 net
  222. # - "2001:67c:2f08::/48"
  223. # - "2a03:5180:f::/64"
  224. # max-concurrent-connections: 2048
  225. # max-connections-per-window: 2048
  226. # pluggable IP ban mechanism, via subprocess invocation
  227. # this can be used to check new connections against a DNSBL, for example
  228. # see the manual for details on how to write an IP ban checking script
  229. ip-check-script:
  230. enabled: false
  231. command: "/usr/local/bin/check-ip-ban"
  232. # constant list of args to pass to the command; the actual query
  233. # and result are transmitted over stdin/stdout:
  234. args: []
  235. # timeout for process execution, after which we send a SIGTERM:
  236. timeout: 9s
  237. # how long after the SIGTERM before we follow up with a SIGKILL:
  238. kill-timeout: 1s
  239. # how many scripts are allowed to run at once? 0 for no limit:
  240. max-concurrency: 64
  241. # if true, only check anonymous connections (not logged into an account)
  242. # at the very end of the handshake:
  243. exempt-sasl: false
  244. # IP cloaking hides users' IP addresses from other users and from channel admins
  245. # (but not from server admins), while still allowing channel admins to ban
  246. # offending IP addresses or networks. In place of hostnames derived from reverse
  247. # DNS, users see fake domain names like pwbs2ui4377257x8.irc. These names are
  248. # generated deterministically from the underlying IP address, but if the underlying
  249. # IP is not already known, it is infeasible to recover it from the cloaked name.
  250. ip-cloaking:
  251. # whether to enable IP cloaking
  252. enabled: false
  253. # whether to use these cloak settings (specifically, `netname` and `num-bits`)
  254. # to produce unique hostnames for always-on clients. you can enable this even if
  255. # you disabled IP cloaking for normal clients above. if this is disabled,
  256. # always-on clients will all have an identical hostname (the server name).
  257. enabled-for-always-on: true
  258. # fake TLD at the end of the hostname, e.g., pwbs2ui4377257x8.irc
  259. # you may want to use your network name here
  260. netname: "irc"
  261. # the cloaked hostname is derived only from the CIDR (most significant bits
  262. # of the IP address), up to a configurable number of bits. this is the
  263. # granularity at which bans will take effect for IPv4. Note that changing
  264. # this value will invalidate any stored bans.
  265. cidr-len-ipv4: 32
  266. # analogous granularity for IPv6
  267. cidr-len-ipv6: 64
  268. # number of bits of hash output to include in the cloaked hostname.
  269. # more bits means less likelihood of distinct IPs colliding,
  270. # at the cost of a longer cloaked hostname. if this value is set to 0,
  271. # all users will receive simply `netname` as their cloaked hostname.
  272. num-bits: 64
  273. # secure-nets identifies IPs and CIDRs which are secure at layer 3,
  274. # for example, because they are on a trusted internal LAN or a VPN.
  275. # plaintext connections from these IPs and CIDRs will be considered
  276. # secure (clients will receive the +Z mode and be allowed to resume
  277. # or reattach to secure connections). note that loopback IPs are always
  278. # considered secure:
  279. secure-nets:
  280. # - "10.0.0.0/8"
  281. # Ergo will write files to disk under certain circumstances, e.g.,
  282. # CPU profiling or data export. by default, these files will be written
  283. # to the working directory. set this to customize:
  284. #output-path: "/home/ergo/out"
  285. # the hostname used by "services", e.g., NickServ, defaults to "localhost",
  286. # e.g., `NickServ!NickServ@localhost`. uncomment this to override:
  287. #override-services-hostname: "example.network"
  288. # in a "closed-loop" system where you control the server and all the clients,
  289. # you may want to increase the maximum (non-tag) length of an IRC line from
  290. # the default value of 512. DO NOT change this on a public server:
  291. #max-line-len: 512
  292. # send all 0's as the LUSERS (user counts) output to non-operators; potentially useful
  293. # if you don't want to publicize how popular the server is
  294. suppress-lusers: false
  295. # account options
  296. accounts:
  297. # is account authentication enabled, i.e., can users log into existing accounts?
  298. authentication-enabled: true
  299. # account registration
  300. registration:
  301. # can users register new accounts for themselves? if this is false, operators with
  302. # the `accreg` capability can still create accounts with `/NICKSERV SAREGISTER`
  303. enabled: true
  304. # can users use the REGISTER command to register before fully connecting?
  305. allow-before-connect: true
  306. # global throttle on new account creation
  307. throttling:
  308. enabled: true
  309. # window
  310. duration: 10m
  311. # number of attempts allowed within the window
  312. max-attempts: 30
  313. # this is the bcrypt cost we'll use for account passwords
  314. # (note that 4 is the lowest value allowed by the bcrypt library)
  315. bcrypt-cost: 4
  316. # length of time a user has to verify their account before it can be re-registered
  317. verify-timeout: "32h"
  318. # options for email verification of account registrations
  319. email-verification:
  320. enabled: false
  321. sender: "admin@my.network"
  322. require-tls: true
  323. helo-domain: "my.network" # defaults to server name if unset
  324. # set to `tcp4` to force sending over IPv4, `tcp6` to force IPv6:
  325. # protocol: "tcp4"
  326. # set to force a specific source/local IPv4 or IPv6 address:
  327. # local-address: "1.2.3.4"
  328. # options to enable DKIM signing of outgoing emails (recommended, but
  329. # requires creating a DNS entry for the public key):
  330. # dkim:
  331. # domain: "my.network"
  332. # selector: "20200229"
  333. # key-file: "dkim.pem"
  334. # to use an MTA/smarthost instead of sending email directly:
  335. # mta:
  336. # server: localhost
  337. # port: 25
  338. # username: "admin"
  339. # password: "hunter2"
  340. # implicit-tls: false # TLS from the first byte, typically on port 465
  341. # addresses that are not accepted for registration:
  342. address-blacklist:
  343. # - "*@mailinator.com"
  344. address-blacklist-syntax: "glob" # change to "regex" for regular expressions
  345. # file of newline-delimited address blacklist entries (no enclosing quotes)
  346. # in the above syntax (i.e. either globs or regexes). supersedes
  347. # address-blacklist if set:
  348. # address-blacklist-file: "/path/to/address-blacklist-file"
  349. timeout: 60s
  350. # email-based password reset:
  351. password-reset:
  352. enabled: false
  353. # time before we allow resending the email
  354. cooldown: 1h
  355. # time for which a password reset code is valid
  356. timeout: 1d
  357. # throttle account login attempts (to prevent either password guessing, or DoS
  358. # attacks on the server aimed at forcing repeated expensive bcrypt computations)
  359. login-throttling:
  360. enabled: true
  361. # window
  362. duration: 1m
  363. # number of attempts allowed within the window
  364. max-attempts: 3
  365. # some clients (notably Pidgin and Hexchat) offer only a single password field,
  366. # which makes it impossible to specify a separate server password (for the PASS
  367. # command) and SASL password. if this option is set to true, a client that
  368. # successfully authenticates with SASL will not be required to send
  369. # PASS as well, so it can be configured to authenticate with SASL only.
  370. skip-server-password: false
  371. # enable login to accounts via the PASS command, e.g., PASS account:password
  372. # this is useful for compatibility with old clients that don't support SASL
  373. login-via-pass-command: false
  374. # advertise the SCRAM-SHA-256 authentication method. set to false in case of
  375. # compatibility issues with certain clients:
  376. advertise-scram: true
  377. # require-sasl controls whether clients are required to have accounts
  378. # (and sign into them using SASL) to connect to the server
  379. require-sasl:
  380. # if this is enabled, all clients must authenticate with SASL while connecting.
  381. # WARNING: for a private server, you MUST set accounts.registration.enabled
  382. # to false as well, in order to prevent non-administrators from registering
  383. # accounts.
  384. enabled: false
  385. # IPs/CIDRs which are exempted from the account requirement
  386. exempted:
  387. - "localhost"
  388. # - '10.10.0.0/16'
  389. # nick-reservation controls how, and whether, nicknames are linked to accounts
  390. nick-reservation:
  391. # is there any enforcement of reserved nicknames?
  392. enabled: true
  393. # how many nicknames, in addition to the account name, can be reserved?
  394. # (note that additional nicks are unusable under force-nick-equals-account
  395. # or if the client is always-on)
  396. additional-nick-limit: 2
  397. # method describes how nickname reservation is handled
  398. # strict: users must already be logged in to their account (via
  399. # SASL, PASS account:password, or /NickServ IDENTIFY)
  400. # in order to use their reserved nickname(s)
  401. # optional: no enforcement by default, but allow users to opt in to
  402. # the enforcement level of their choice
  403. method: optional
  404. # allow users to set their own nickname enforcement status, e.g.,
  405. # to opt out of strict enforcement
  406. allow-custom-enforcement: true
  407. # format for guest nicknames:
  408. # 1. these nicknames cannot be registered or reserved
  409. # 2. if a client is automatically renamed by the server,
  410. # this is the template that will be used (e.g., Guest-nccj6rgmt97cg)
  411. # 3. if enforce-guest-format (see below) is enabled, clients without
  412. # a registered account will have this template applied to their
  413. # nicknames (e.g., 'katie' will become 'Guest-katie')
  414. guest-nickname-format: "Guest-*"
  415. # when enabled, forces users not logged into an account to use
  416. # a nickname matching the guest template. a caveat: this may prevent
  417. # users from choosing nicknames in scripts different from the guest
  418. # nickname format.
  419. force-guest-format: false
  420. # when enabled, forces users logged into an account to use the
  421. # account name as their nickname. when combined with strict nickname
  422. # enforcement, this lets users treat nicknames and account names
  423. # as equivalent for the purpose of ban/invite/exception lists.
  424. force-nick-equals-account: false
  425. # parallel setting to force-nick-equals-account: if true, this forbids
  426. # anonymous users (i.e., users not logged into an account) to change their
  427. # nickname after the initial connection is complete
  428. forbid-anonymous-nick-changes: false
  429. # multiclient controls whether Ergo allows multiple connections to
  430. # attach to the same client/nickname identity; this is part of the
  431. # functionality traditionally provided by a bouncer like ZNC
  432. multiclient:
  433. # when disabled, each connection must use a separate nickname (as is the
  434. # typical behavior of IRC servers). when enabled, a new connection that
  435. # has authenticated with SASL can associate itself with an existing
  436. # client
  437. enabled: true
  438. # if this is disabled, clients have to opt in to bouncer functionality
  439. # using nickserv or the cap system. if it's enabled, they can opt out
  440. # via nickserv
  441. allowed-by-default: false
  442. # whether to allow clients that remain on the server even
  443. # when they have no active connections. The possible values are:
  444. # "disabled", "opt-in", "opt-out", or "mandatory".
  445. always-on: "disabled"
  446. # whether to mark always-on clients away when they have no active connections:
  447. auto-away: "opt-in"
  448. # QUIT always-on clients from the server if they go this long without connecting
  449. # (use 0 or omit for no expiration):
  450. #always-on-expiration: 90d
  451. # vhosts controls the assignment of vhosts (strings displayed in place of the user's
  452. # hostname/IP) by the HostServ service
  453. vhosts:
  454. # are vhosts enabled at all?
  455. enabled: true
  456. # maximum length of a vhost
  457. max-length: 64
  458. # regexp for testing the validity of a vhost
  459. # (make sure any changes you make here are RFC-compliant)
  460. valid-regexp: '^[0-9A-Za-z.\-_/]+$'
  461. # modes that are set by default when a user connects
  462. # if unset, no user modes will be set by default
  463. # +i is invisible (a user's channels are hidden from whois replies)
  464. # see /QUOTE HELP umodes for more user modes
  465. # default-user-modes: +i
  466. # pluggable authentication mechanism, via subprocess invocation
  467. # see the manual for details on how to write an authentication plugin script
  468. auth-script:
  469. enabled: false
  470. command: "/usr/local/bin/authenticate-irc-user"
  471. # constant list of args to pass to the command; the actual authentication
  472. # data is transmitted over stdin/stdout:
  473. args: []
  474. # should we automatically create users if the plugin returns success?
  475. autocreate: true
  476. # timeout for process execution, after which we send a SIGTERM:
  477. timeout: 9s
  478. # how long after the SIGTERM before we follow up with a SIGKILL:
  479. kill-timeout: 1s
  480. # how many scripts are allowed to run at once? 0 for no limit:
  481. max-concurrency: 64
  482. # support for login via OAuth2 bearer tokens
  483. oauth2:
  484. enabled: false
  485. # should we automatically create users on presentation of a valid token?
  486. autocreate: true
  487. # enable this to use auth-script for validation:
  488. auth-script: false
  489. introspection-url: "https://example.com/api/oidc/introspection"
  490. introspection-timeout: 10s
  491. # omit for auth method `none`; required for auth method `client_secret_basic`:
  492. client-id: "ergo"
  493. client-secret: "4TA0I7mJ3fUUcW05KJiODg"
  494. # support for login via JWT bearer tokens
  495. jwt-auth:
  496. enabled: false
  497. # should we automatically create users on presentation of a valid token?
  498. autocreate: true
  499. # any of these token definitions can be accepted, allowing for key rotation
  500. tokens:
  501. -
  502. algorithm: "hmac" # either 'hmac', 'rsa', or 'eddsa' (ed25519)
  503. # hmac takes a symmetric key, rsa and eddsa take PEM-encoded public keys;
  504. # either way, the key can be specified either as a YAML string:
  505. key: "nANiZ1De4v6WnltCHN2H7Q"
  506. # or as a path to the file containing the key:
  507. #key-file: "jwt_pubkey.pem"
  508. # list of JWT claim names to search for the user's account name (make sure the format
  509. # is what you expect, especially if using "sub"):
  510. account-claims: ["preferred_username"]
  511. # if a claim is formatted as an email address, require it to have the following domain,
  512. # and then strip off the domain and use the local-part as the account name:
  513. #strip-domain: "example.com"
  514. # channel options
  515. channels:
  516. # modes that are set when new channels are created
  517. # +n is no-external-messages and +t is op-only-topic
  518. # see /QUOTE HELP cmodes for more channel modes
  519. default-modes: +nt
  520. # how many channels can a client be in at once?
  521. max-channels-per-client: 100
  522. # if this is true, new channels can only be created by operators with the
  523. # `chanreg` operator capability
  524. operator-only-creation: false
  525. # channel registration - requires an account
  526. registration:
  527. # can users register new channels?
  528. enabled: true
  529. # restrict new channel registrations to operators only?
  530. # (operators can then transfer channels to regular users using /CS TRANSFER)
  531. operator-only: false
  532. # how many channels can each account register?
  533. max-channels-per-account: 15
  534. # as a crude countermeasure against spambots, anonymous connections younger
  535. # than this value will get an empty response to /LIST (a time period of 0 disables)
  536. list-delay: 0s
  537. # INVITE to an invite-only channel expires after this amount of time
  538. # (0 or omit for no expiration):
  539. invite-expiration: 24h
  540. # channels that new clients will automatically join. this should be used with
  541. # caution, since traditional IRC users will likely view it as an antifeature.
  542. # it may be useful in small community networks that have a single "primary" channel:
  543. #auto-join:
  544. # - "#lounge"
  545. # operator classes:
  546. # an operator has a single "class" (defining a privilege level), which can include
  547. # multiple "capabilities" (defining privileged actions they can take). all
  548. # currently available operator capabilities are associated with either the
  549. # 'chat-moderator' class (less privileged) or the 'server-admin' class (full
  550. # privileges) below: you can mix and match to create new classes.
  551. oper-classes:
  552. # chat moderator: can ban/unban users from the server, join channels,
  553. # fix mode issues and sort out vhosts.
  554. "chat-moderator":
  555. # title shown in WHOIS
  556. title: Chat Moderator
  557. # capability names
  558. capabilities:
  559. - "kill" # disconnect user sessions
  560. - "ban" # ban IPs, CIDRs, NUH masks, and suspend accounts (UBAN / DLINE / KLINE)
  561. - "nofakelag" # exempted from "fakelag" restrictions on rate of message sending
  562. - "relaymsg" # use RELAYMSG in any channel (see the `relaymsg` config block)
  563. - "vhosts" # add and remove vhosts from users
  564. - "sajoin" # join arbitrary channels, including private channels
  565. - "samode" # modify arbitrary channel and user modes
  566. - "snomasks" # subscribe to arbitrary server notice masks
  567. - "roleplay" # use the (deprecated) roleplay commands in any channel
  568. # server admin: has full control of the ircd, including nickname and
  569. # channel registrations
  570. "server-admin":
  571. # title shown in WHOIS
  572. title: Server Admin
  573. # oper class this extends from
  574. extends: "chat-moderator"
  575. # capability names
  576. capabilities:
  577. - "rehash" # rehash the server, i.e. reload the config at runtime
  578. - "accreg" # modify arbitrary account registrations
  579. - "chanreg" # modify arbitrary channel registrations
  580. - "history" # modify or delete history messages
  581. - "defcon" # use the DEFCON command (restrict server capabilities)
  582. - "massmessage" # message all users on the server
  583. # ircd operators
  584. opers:
  585. # default operator named 'admin'; log in with /OPER admin <password>
  586. admin:
  587. # which capabilities this oper has access to
  588. class: "server-admin"
  589. # traditionally, operator status is visible to unprivileged users in
  590. # WHO and WHOIS responses. this can be disabled with 'hidden'.
  591. hidden: false
  592. # custom whois line (if `hidden` is enabled, visible only to other operators)
  593. whois-line: is the server administrator
  594. # custom hostname (ignored if `hidden` is enabled)
  595. vhost: "staff"
  596. # modes are modes to auto-set upon opering-up. uncomment this to automatically
  597. # enable snomasks ("server notification masks" that alert you to server events;
  598. # see `/quote help snomasks` while opered-up for more information):
  599. #modes: +is acdjknoqtuxv
  600. # operators can be authenticated either by password (with the /OPER command),
  601. # or by certificate fingerprint, or both. if a password hash is set, then a
  602. # password is required to oper up (e.g., /OPER dan mypassword). to generate
  603. # the hash, use `ergo genpasswd`.
  604. password: "$2a$04$0123456789abcdef0123456789abcdef0123456789abcdef01234"
  605. # if a SHA-256 certificate fingerprint is configured here, then it will be
  606. # required to /OPER. if you comment out the password hash above, then you can
  607. # /OPER without a password.
  608. #certfp: "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789"
  609. # if 'auto' is set (and no password hash is set), operator permissions will be
  610. # granted automatically as soon as you connect with the right fingerprint.
  611. #auto: true
  612. # example of a moderator named 'alice'
  613. # (log in with /OPER alice <password>):
  614. #alice:
  615. # class: "chat-moderator"
  616. # whois-line: "can help with moderation issues!"
  617. # password: "$2a$04$0123456789abcdef0123456789abcdef0123456789abcdef01234"
  618. # logging, takes inspiration from Insp
  619. logging:
  620. -
  621. # how to log these messages
  622. #
  623. # file log to a file
  624. # stdout log to stdout
  625. # stderr log to stderr
  626. # (you can specify multiple methods, e.g., to log to both stderr and a file)
  627. method: stderr
  628. # filename to log to, if file method is selected
  629. # filename: ircd.log
  630. # type(s) of logs to keep here. you can use - to exclude those types
  631. #
  632. # exclusions take precedent over inclusions, so if you exclude a type it will NEVER
  633. # be logged, even if you explicitly include it
  634. #
  635. # useful types include:
  636. # * everything (usually used with exclusing some types below)
  637. # server server startup, rehash, and shutdown events
  638. # accounts account registration and authentication
  639. # channels channel creation and operations
  640. # opers oper actions, authentication, etc
  641. # services actions related to NickServ, ChanServ, etc.
  642. # internal unexpected runtime behavior, including potential bugs
  643. # userinput raw lines sent by users
  644. # useroutput raw lines sent to users
  645. type: "* -userinput -useroutput"
  646. # one of: debug info warn error
  647. level: info
  648. #-
  649. # # example of a file log that avoids logging IP addresses
  650. # method: file
  651. # filename: ircd.log
  652. # type: "* -userinput -useroutput -connect-ip"
  653. # level: debug
  654. # debug options
  655. debug:
  656. # when enabled, Ergo will attempt to recover from certain kinds of
  657. # client-triggered runtime errors that would normally crash the server.
  658. # this makes the server more resilient to DoS, but could result in incorrect
  659. # behavior. deployments that would prefer to "start from scratch", e.g., by
  660. # letting the process crash and auto-restarting it with systemd, can set
  661. # this to false.
  662. recover-from-errors: true
  663. # optionally expose a pprof http endpoint: https://golang.org/pkg/net/http/pprof/
  664. # it is strongly recommended that you don't expose this on a public interface;
  665. # if you need to access it remotely, you can use an SSH tunnel.
  666. # set to `null`, "", leave blank, or omit to disable
  667. # pprof-listener: "localhost:6060"
  668. # lock file preventing multiple instances of Ergo from accidentally being
  669. # started at once. comment out or set to the empty string ("") to disable.
  670. # this path is relative to the working directory; if your datastore.path
  671. # is absolute, you should use an absolute path here as well.
  672. lock-file: "ircd.lock"
  673. # datastore configuration
  674. datastore:
  675. # path to the datastore
  676. path: ircd.db
  677. # if the database schema requires an upgrade, `autoupgrade` will attempt to
  678. # perform it automatically on startup. the database will be backed
  679. # up, and if the upgrade fails, the original database will be restored.
  680. autoupgrade: true
  681. # connection information for MySQL (currently only used for persistent history):
  682. mysql:
  683. enabled: false
  684. host: "localhost"
  685. port: 3306
  686. # if socket-path is set, it will be used instead of host:port
  687. #socket-path: "/var/run/mysqld/mysqld.sock"
  688. user: "ergo"
  689. password: "hunter2"
  690. history-database: "ergo_history"
  691. timeout: 3s
  692. max-conns: 4
  693. # this may be necessary to prevent middleware from closing your connections:
  694. #conn-max-lifetime: 180s
  695. # languages config
  696. languages:
  697. # whether to load languages
  698. enabled: true
  699. # default language to use for new clients
  700. # 'en' is the default English language in the code
  701. default: en
  702. # which directory contains our language files
  703. path: languages
  704. # limits - these need to be the same across the network
  705. limits:
  706. # nicklen is the max nick length allowed
  707. nicklen: 32
  708. # identlen is the max ident length allowed
  709. identlen: 20
  710. # realnamelen is the maximum realname length allowed
  711. realnamelen: 150
  712. # channellen is the max channel length allowed
  713. channellen: 64
  714. # awaylen is the maximum length of an away message
  715. awaylen: 390
  716. # kicklen is the maximum length of a kick message
  717. kicklen: 390
  718. # topiclen is the maximum length of a channel topic
  719. topiclen: 390
  720. # maximum number of monitor entries a client can have
  721. monitor-entries: 100
  722. # whowas entries to store
  723. whowas-entries: 100
  724. # maximum length of channel lists (beI modes)
  725. chan-list-modes: 60
  726. # maximum number of messages to accept during registration (prevents
  727. # DoS / resource exhaustion attacks):
  728. registration-messages: 1024
  729. # message length limits for the new multiline cap
  730. multiline:
  731. max-bytes: 4096 # 0 means disabled
  732. max-lines: 100 # 0 means no limit
  733. # fakelag: prevents clients from spamming commands too rapidly
  734. fakelag:
  735. # whether to enforce fakelag
  736. enabled: true
  737. # time unit for counting command rates
  738. window: 1s
  739. # clients can send this many commands without fakelag being imposed
  740. burst-limit: 5
  741. # once clients have exceeded their burst allowance, they can send only
  742. # this many commands per `window`:
  743. messages-per-window: 2
  744. # client status resets to the default state if they go this long without
  745. # sending any commands:
  746. cooldown: 2s
  747. # exempt a certain number of command invocations per session from fakelag;
  748. # this is to speed up "resynchronization" of client state during reattach
  749. command-budgets:
  750. "CHATHISTORY": 16
  751. "MARKREAD": 16
  752. "MONITOR": 1
  753. "WHO": 4
  754. # the roleplay commands are semi-standardized extensions to IRC that allow
  755. # sending and receiving messages from pseudo-nicknames. this can be used either
  756. # for actual roleplaying, or for bridging IRC with other protocols.
  757. roleplay:
  758. # are roleplay commands enabled at all? (channels and clients still have to
  759. # opt in individually with the +E mode)
  760. enabled: false
  761. # require the "roleplay" oper capability to send roleplay messages?
  762. require-oper: false
  763. # require channel operator permissions to send roleplay messages?
  764. require-chanops: false
  765. # add the real nickname, in parentheses, to the end of every roleplay message?
  766. add-suffix: true
  767. # external services can integrate with the ircd using JSON Web Tokens (https://jwt.io).
  768. # in effect, the server can sign a token attesting that the client is present on
  769. # the server, is a member of a particular channel, etc.
  770. extjwt:
  771. # # default service config (for `EXTJWT #channel`).
  772. # # expiration time for the token:
  773. # expiration: 45s
  774. # # you can configure tokens to be signed either with HMAC and a symmetric secret:
  775. # secret: "65PHvk0K1_sM-raTsCEhatVkER_QD8a0zVV8gG2EWcI"
  776. # # or with an RSA private key:
  777. # #rsa-private-key-file: "extjwt.pem"
  778. # # named services (for `EXTJWT #channel service_name`):
  779. # services:
  780. # "jitsi":
  781. # expiration: 30s
  782. # secret: "qmamLKDuOzIzlO8XqsGGewei_At11lewh6jtKfSTbkg"
  783. # history message storage: this is used by CHATHISTORY, HISTORY, znc.in/playback,
  784. # various autoreplay features, and the resume extension
  785. history:
  786. # should we store messages for later playback?
  787. # by default, messages are stored in RAM only; they do not persist
  788. # across server restarts. however, you may want to understand how message
  789. # history interacts with the GDPR and/or any data privacy laws that apply
  790. # in your country and the countries of your users.
  791. enabled: true
  792. # how many channel-specific events (messages, joins, parts) should be tracked per channel?
  793. channel-length: 2048
  794. # how many direct messages and notices should be tracked per user?
  795. client-length: 256
  796. # how long should we try to preserve messages?
  797. # if `autoresize-window` is 0, the in-memory message buffers are preallocated to
  798. # their maximum length. if it is nonzero, the buffers are initially small and
  799. # are dynamically expanded up to the maximum length. if the buffer is full
  800. # and the oldest message is older than `autoresize-window`, then it will overwrite
  801. # the oldest message rather than resize; otherwise, it will expand if possible.
  802. autoresize-window: 3d
  803. # number of messages to automatically play back on channel join (0 to disable):
  804. autoreplay-on-join: 0
  805. # maximum number of CHATHISTORY messages that can be
  806. # requested at once (0 disables support for CHATHISTORY)
  807. chathistory-maxmessages: 1000
  808. # maximum number of messages that can be replayed at once during znc emulation
  809. # (znc.in/playback, or automatic replay on initial reattach to a persistent client):
  810. znc-maxmessages: 2048
  811. # options to delete old messages, or prevent them from being retrieved
  812. restrictions:
  813. # if this is set, messages older than this cannot be retrieved by anyone
  814. # (and will eventually be deleted from persistent storage, if that's enabled)
  815. expire-time: 1w
  816. # this restricts access to channel history (it can be overridden by channel
  817. # owners). options are: 'none' (no restrictions), 'registration-time'
  818. # (logged-in users cannot retrieve messages older than their account
  819. # registration date, and anonymous users cannot retrieve messages older than
  820. # their sign-on time, modulo the grace-period described below), and
  821. # 'join-time' (users cannot retrieve messages older than the time they
  822. # joined the channel, so only always-on clients can view history).
  823. query-cutoff: 'none'
  824. # if query-cutoff is set to 'registration-time', this allows retrieval
  825. # of messages that are up to 'grace-period' older than the above cutoff.
  826. # if you use 'registration-time', this is recommended to allow logged-out
  827. # users to query history after disconnections.
  828. grace-period: 1h
  829. # options to store history messages in a persistent database (currently only MySQL).
  830. # in order to enable any of this functionality, you must configure a MySQL server
  831. # in the `datastore.mysql` section. enabling persistence overrides the history
  832. # size limits above (`channel-length`, `client-length`, etc.); persistent
  833. # history has no limits other than those imposed by expire-time.
  834. persistent:
  835. enabled: false
  836. # store unregistered channel messages in the persistent database?
  837. unregistered-channels: false
  838. # for a registered channel, the channel owner can potentially customize
  839. # the history storage setting. as the server operator, your options are
  840. # 'disabled' (no persistent storage, regardless of per-channel setting),
  841. # 'opt-in', 'opt-out', and 'mandatory' (force persistent storage, ignoring
  842. # per-channel setting):
  843. registered-channels: "opt-out"
  844. # direct messages are only stored in the database for logged-in clients;
  845. # you can control how they are stored here (same options as above).
  846. # if you enable this, strict nickname reservation is strongly recommended
  847. # as well.
  848. direct-messages: "opt-out"
  849. # options to control how messages are stored and deleted:
  850. retention:
  851. # allow users to delete their own messages from history,
  852. # and channel operators to delete messages in their channel?
  853. allow-individual-delete: false
  854. # if persistent history is enabled, create additional index tables,
  855. # allowing deletion of JSON export of an account's messages. this
  856. # may be needed for compliance with data privacy regulations.
  857. enable-account-indexing: false
  858. # options to control storage of TAGMSG
  859. tagmsg-storage:
  860. # by default, should TAGMSG be stored?
  861. default: false
  862. # if `default` is false, store TAGMSG containing any of these tags:
  863. whitelist:
  864. - "+draft/react"
  865. - "+react"
  866. # if `default` is true, don't store TAGMSG containing any of these tags:
  867. #blacklist:
  868. # - "+draft/typing"
  869. # - "typing"
  870. # whether to allow customization of the config at runtime using environment variables,
  871. # e.g., ERGO__SERVER__MAX_SENDQ=128k. see the manual for more details.
  872. allow-environment-overrides: true