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

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