You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.yaml 46KB

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