Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

traditional.yaml 44KB

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