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 43KB

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