您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

default.yaml 46KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  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. # set to `tcp4` to force sending over IPv4, `tcp6` to force IPv6:
  349. # protocol: "tcp4"
  350. # set to force a specific source/local IPv4 or IPv6 address:
  351. # local-address: "1.2.3.4"
  352. # options to enable DKIM signing of outgoing emails (recommended, but
  353. # requires creating a DNS entry for the public key):
  354. # dkim:
  355. # domain: "my.network"
  356. # selector: "20200229"
  357. # key-file: "dkim.pem"
  358. # to use an MTA/smarthost instead of sending email directly:
  359. # mta:
  360. # server: localhost
  361. # port: 25
  362. # username: "admin"
  363. # password: "hunter2"
  364. # implicit-tls: false # TLS from the first byte, typically on port 465
  365. # addresses that are not accepted for registration:
  366. address-blacklist:
  367. # - "*@mailinator.com"
  368. address-blacklist-syntax: "glob" # change to "regex" for regular expressions
  369. # file of newline-delimited address blacklist entries (no enclosing quotes)
  370. # in the above syntax (i.e. either globs or regexes). supersedes
  371. # address-blacklist if set:
  372. # address-blacklist-file: "/path/to/address-blacklist-file"
  373. timeout: 60s
  374. # email-based password reset:
  375. password-reset:
  376. enabled: false
  377. # time before we allow resending the email
  378. cooldown: 1h
  379. # time for which a password reset code is valid
  380. timeout: 1d
  381. # throttle account login attempts (to prevent either password guessing, or DoS
  382. # attacks on the server aimed at forcing repeated expensive bcrypt computations)
  383. login-throttling:
  384. enabled: true
  385. # window
  386. duration: 1m
  387. # number of attempts allowed within the window
  388. max-attempts: 3
  389. # some clients (notably Pidgin and Hexchat) offer only a single password field,
  390. # which makes it impossible to specify a separate server password (for the PASS
  391. # command) and SASL password. if this option is set to true, a client that
  392. # successfully authenticates with SASL will not be required to send
  393. # PASS as well, so it can be configured to authenticate with SASL only.
  394. skip-server-password: false
  395. # enable login to accounts via the PASS command, e.g., PASS account:password
  396. # this is useful for compatibility with old clients that don't support SASL
  397. login-via-pass-command: true
  398. # advertise the SCRAM-SHA-256 authentication method. set to false in case of
  399. # compatibility issues with certain clients:
  400. advertise-scram: true
  401. # require-sasl controls whether clients are required to have accounts
  402. # (and sign into them using SASL) to connect to the server
  403. require-sasl:
  404. # if this is enabled, all clients must authenticate with SASL while connecting.
  405. # WARNING: for a private server, you MUST set accounts.registration.enabled
  406. # to false as well, in order to prevent non-administrators from registering
  407. # accounts.
  408. enabled: false
  409. # IPs/CIDRs which are exempted from the account requirement
  410. exempted:
  411. - "localhost"
  412. # - '10.10.0.0/16'
  413. # nick-reservation controls how, and whether, nicknames are linked to accounts
  414. nick-reservation:
  415. # is there any enforcement of reserved nicknames?
  416. enabled: true
  417. # how many nicknames, in addition to the account name, can be reserved?
  418. # (note that additional nicks are unusable under force-nick-equals-account
  419. # or if the client is always-on)
  420. additional-nick-limit: 0
  421. # method describes how nickname reservation is handled
  422. # strict: users must already be logged in to their account (via
  423. # SASL, PASS account:password, or /NickServ IDENTIFY)
  424. # in order to use their reserved nickname(s)
  425. # optional: no enforcement by default, but allow users to opt in to
  426. # the enforcement level of their choice
  427. method: strict
  428. # allow users to set their own nickname enforcement status, e.g.,
  429. # to opt out of strict enforcement
  430. allow-custom-enforcement: false
  431. # format for guest nicknames:
  432. # 1. these nicknames cannot be registered or reserved
  433. # 2. if a client is automatically renamed by the server,
  434. # this is the template that will be used (e.g., Guest-nccj6rgmt97cg)
  435. # 3. if enforce-guest-format (see below) is enabled, clients without
  436. # a registered account will have this template applied to their
  437. # nicknames (e.g., 'katie' will become 'Guest-katie')
  438. guest-nickname-format: "Guest-*"
  439. # when enabled, forces users not logged into an account to use
  440. # a nickname matching the guest template. a caveat: this may prevent
  441. # users from choosing nicknames in scripts different from the guest
  442. # nickname format.
  443. force-guest-format: false
  444. # when enabled, forces users logged into an account to use the
  445. # account name as their nickname. when combined with strict nickname
  446. # enforcement, this lets users treat nicknames and account names
  447. # as equivalent for the purpose of ban/invite/exception lists.
  448. force-nick-equals-account: true
  449. # parallel setting to force-nick-equals-account: if true, this forbids
  450. # anonymous users (i.e., users not logged into an account) to change their
  451. # nickname after the initial connection is complete
  452. forbid-anonymous-nick-changes: false
  453. # multiclient controls whether Ergo allows multiple connections to
  454. # attach to the same client/nickname identity; this is part of the
  455. # functionality traditionally provided by a bouncer like ZNC
  456. multiclient:
  457. # when disabled, each connection must use a separate nickname (as is the
  458. # typical behavior of IRC servers). when enabled, a new connection that
  459. # has authenticated with SASL can associate itself with an existing
  460. # client
  461. enabled: true
  462. # if this is disabled, clients have to opt in to bouncer functionality
  463. # using nickserv or the cap system. if it's enabled, they can opt out
  464. # via nickserv
  465. allowed-by-default: true
  466. # whether to allow clients that remain on the server even
  467. # when they have no active connections. The possible values are:
  468. # "disabled", "opt-in", "opt-out", or "mandatory".
  469. always-on: "opt-in"
  470. # whether to mark always-on clients away when they have no active connections:
  471. auto-away: "opt-in"
  472. # QUIT always-on clients from the server if they go this long without connecting
  473. # (use 0 or omit for no expiration):
  474. #always-on-expiration: 90d
  475. # vhosts controls the assignment of vhosts (strings displayed in place of the user's
  476. # hostname/IP) by the HostServ service
  477. vhosts:
  478. # are vhosts enabled at all?
  479. enabled: true
  480. # maximum length of a vhost
  481. max-length: 64
  482. # regexp for testing the validity of a vhost
  483. # (make sure any changes you make here are RFC-compliant)
  484. valid-regexp: '^[0-9A-Za-z.\-_/]+$'
  485. # modes that are set by default when a user connects
  486. # if unset, no user modes will be set by default
  487. # +i is invisible (a user's channels are hidden from whois replies)
  488. # see /QUOTE HELP umodes for more user modes
  489. default-user-modes: +i
  490. # pluggable authentication mechanism, via subprocess invocation
  491. # see the manual for details on how to write an authentication plugin script
  492. auth-script:
  493. enabled: false
  494. command: "/usr/local/bin/authenticate-irc-user"
  495. # constant list of args to pass to the command; the actual authentication
  496. # data is transmitted over stdin/stdout:
  497. args: []
  498. # should we automatically create users if the plugin returns success?
  499. autocreate: true
  500. # timeout for process execution, after which we send a SIGTERM:
  501. timeout: 9s
  502. # how long after the SIGTERM before we follow up with a SIGKILL:
  503. kill-timeout: 1s
  504. # how many scripts are allowed to run at once? 0 for no limit:
  505. max-concurrency: 64
  506. # support for login via OAuth2 bearer tokens
  507. oauth2:
  508. enabled: false
  509. # should we automatically create users on presentation of a valid token?
  510. autocreate: true
  511. # enable this to use auth-script for validation:
  512. auth-script: false
  513. introspection-url: "https://example.com/api/oidc/introspection"
  514. introspection-timeout: 10s
  515. # omit for auth method `none`; required for auth method `client_secret_basic`:
  516. client-id: "ergo"
  517. client-secret: "4TA0I7mJ3fUUcW05KJiODg"
  518. # support for login via JWT bearer tokens
  519. jwt-auth:
  520. enabled: false
  521. # should we automatically create users on presentation of a valid token?
  522. autocreate: true
  523. # any of these token definitions can be accepted, allowing for key rotation
  524. tokens:
  525. -
  526. algorithm: "hmac" # either 'hmac', 'rsa', or 'eddsa' (ed25519)
  527. # hmac takes a symmetric key, rsa and eddsa take PEM-encoded public keys;
  528. # either way, the key can be specified either as a YAML string:
  529. key: "nANiZ1De4v6WnltCHN2H7Q"
  530. # or as a path to the file containing the key:
  531. #key-file: "jwt_pubkey.pem"
  532. # list of JWT claim names to search for the user's account name (make sure the format
  533. # is what you expect, especially if using "sub"):
  534. account-claims: ["preferred_username"]
  535. # if a claim is formatted as an email address, require it to have the following domain,
  536. # and then strip off the domain and use the local-part as the account name:
  537. #strip-domain: "example.com"
  538. # channel options
  539. channels:
  540. # modes that are set when new channels are created
  541. # +n is no-external-messages, +t is op-only-topic,
  542. # +C is no CTCPs (besides ACTION)
  543. # see /QUOTE HELP cmodes for more channel modes
  544. default-modes: +ntC
  545. # how many channels can a client be in at once?
  546. max-channels-per-client: 100
  547. # if this is true, new channels can only be created by operators with the
  548. # `chanreg` operator capability
  549. operator-only-creation: false
  550. # channel registration - requires an account
  551. registration:
  552. # can users register new channels?
  553. enabled: true
  554. # restrict new channel registrations to operators only?
  555. # (operators can then transfer channels to regular users using /CS TRANSFER)
  556. operator-only: false
  557. # how many channels can each account register?
  558. max-channels-per-account: 15
  559. # as a crude countermeasure against spambots, anonymous connections younger
  560. # than this value will get an empty response to /LIST (a time period of 0 disables)
  561. list-delay: 0s
  562. # INVITE to an invite-only channel expires after this amount of time
  563. # (0 or omit for no expiration):
  564. invite-expiration: 24h
  565. # channels that new clients will automatically join. this should be used with
  566. # caution, since traditional IRC users will likely view it as an antifeature.
  567. # it may be useful in small community networks that have a single "primary" channel:
  568. #auto-join:
  569. # - "#lounge"
  570. # operator classes:
  571. # an operator has a single "class" (defining a privilege level), which can include
  572. # multiple "capabilities" (defining privileged actions they can take). all
  573. # currently available operator capabilities are associated with either the
  574. # 'chat-moderator' class (less privileged) or the 'server-admin' class (full
  575. # privileges) below: you can mix and match to create new classes.
  576. oper-classes:
  577. # chat moderator: can ban/unban users from the server, join channels,
  578. # fix mode issues and sort out vhosts.
  579. "chat-moderator":
  580. # title shown in WHOIS
  581. title: Chat Moderator
  582. # capability names
  583. capabilities:
  584. - "kill" # disconnect user sessions
  585. - "ban" # ban IPs, CIDRs, NUH masks, and suspend accounts (UBAN / DLINE / KLINE)
  586. - "nofakelag" # exempted from "fakelag" restrictions on rate of message sending
  587. - "relaymsg" # use RELAYMSG in any channel (see the `relaymsg` config block)
  588. - "vhosts" # add and remove vhosts from users
  589. - "sajoin" # join arbitrary channels, including private channels
  590. - "samode" # modify arbitrary channel and user modes
  591. - "snomasks" # subscribe to arbitrary server notice masks
  592. - "roleplay" # use the (deprecated) roleplay commands in any channel
  593. # server admin: has full control of the ircd, including nickname and
  594. # channel registrations
  595. "server-admin":
  596. # title shown in WHOIS
  597. title: Server Admin
  598. # oper class this extends from
  599. extends: "chat-moderator"
  600. # capability names
  601. capabilities:
  602. - "rehash" # rehash the server, i.e. reload the config at runtime
  603. - "accreg" # modify arbitrary account registrations
  604. - "chanreg" # modify arbitrary channel registrations
  605. - "history" # modify or delete history messages
  606. - "defcon" # use the DEFCON command (restrict server capabilities)
  607. - "massmessage" # message all users on the server
  608. # ircd operators
  609. opers:
  610. # default operator named 'admin'; log in with /OPER admin <password>
  611. admin:
  612. # which capabilities this oper has access to
  613. class: "server-admin"
  614. # traditionally, operator status is visible to unprivileged users in
  615. # WHO and WHOIS responses. this can be disabled with 'hidden'.
  616. hidden: true
  617. # custom whois line (if `hidden` is enabled, visible only to other operators)
  618. whois-line: is the server administrator
  619. # custom hostname (ignored if `hidden` is enabled)
  620. #vhost: "staff"
  621. # modes are modes to auto-set upon opering-up. uncomment this to automatically
  622. # enable snomasks ("server notification masks" that alert you to server events;
  623. # see `/quote help snomasks` while opered-up for more information):
  624. #modes: +is acdjknoqtuxv
  625. # operators can be authenticated either by password (with the /OPER command),
  626. # or by certificate fingerprint, or both. if a password hash is set, then a
  627. # password is required to oper up (e.g., /OPER dan mypassword). to generate
  628. # the hash, use `ergo genpasswd`.
  629. password: "$2a$04$0123456789abcdef0123456789abcdef0123456789abcdef01234"
  630. # if a SHA-256 certificate fingerprint is configured here, then it will be
  631. # required to /OPER. if you comment out the password hash above, then you can
  632. # /OPER without a password.
  633. #certfp: "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789"
  634. # if 'auto' is set (and no password hash is set), operator permissions will be
  635. # granted automatically as soon as you connect with the right fingerprint.
  636. #auto: true
  637. # example of a moderator named 'alice'
  638. # (log in with /OPER alice <password>):
  639. #alice:
  640. # class: "chat-moderator"
  641. # whois-line: "can help with moderation issues!"
  642. # password: "$2a$04$0123456789abcdef0123456789abcdef0123456789abcdef01234"
  643. # logging, takes inspiration from Insp
  644. logging:
  645. -
  646. # how to log these messages
  647. #
  648. # file log to a file
  649. # stdout log to stdout
  650. # stderr log to stderr
  651. # (you can specify multiple methods, e.g., to log to both stderr and a file)
  652. method: stderr
  653. # filename to log to, if file method is selected
  654. # filename: ircd.log
  655. # type(s) of logs to keep here. you can use - to exclude those types
  656. #
  657. # exclusions take precedent over inclusions, so if you exclude a type it will NEVER
  658. # be logged, even if you explicitly include it
  659. #
  660. # useful types include:
  661. # * everything (usually used with exclusing some types below)
  662. # server server startup, rehash, and shutdown events
  663. # accounts account registration and authentication
  664. # channels channel creation and operations
  665. # opers oper actions, authentication, etc
  666. # services actions related to NickServ, ChanServ, etc.
  667. # internal unexpected runtime behavior, including potential bugs
  668. # userinput raw lines sent by users
  669. # useroutput raw lines sent to users
  670. type: "* -userinput -useroutput"
  671. # one of: debug info warn error
  672. level: info
  673. #-
  674. # # example of a file log that avoids logging IP addresses
  675. # method: file
  676. # filename: ircd.log
  677. # type: "* -userinput -useroutput -connect-ip"
  678. # level: debug
  679. # debug options
  680. debug:
  681. # when enabled, Ergo will attempt to recover from certain kinds of
  682. # client-triggered runtime errors that would normally crash the server.
  683. # this makes the server more resilient to DoS, but could result in incorrect
  684. # behavior. deployments that would prefer to "start from scratch", e.g., by
  685. # letting the process crash and auto-restarting it with systemd, can set
  686. # this to false.
  687. recover-from-errors: true
  688. # optionally expose a pprof http endpoint: https://golang.org/pkg/net/http/pprof/
  689. # it is strongly recommended that you don't expose this on a public interface;
  690. # if you need to access it remotely, you can use an SSH tunnel.
  691. # set to `null`, "", leave blank, or omit to disable
  692. # pprof-listener: "localhost:6060"
  693. # lock file preventing multiple instances of Ergo from accidentally being
  694. # started at once. comment out or set to the empty string ("") to disable.
  695. # this path is relative to the working directory; if your datastore.path
  696. # is absolute, you should use an absolute path here as well.
  697. lock-file: "ircd.lock"
  698. # datastore configuration
  699. datastore:
  700. # path to the datastore
  701. path: ircd.db
  702. # if the database schema requires an upgrade, `autoupgrade` will attempt to
  703. # perform it automatically on startup. the database will be backed
  704. # up, and if the upgrade fails, the original database will be restored.
  705. autoupgrade: true
  706. # connection information for MySQL (currently only used for persistent history):
  707. mysql:
  708. enabled: false
  709. host: "localhost"
  710. port: 3306
  711. # if socket-path is set, it will be used instead of host:port
  712. #socket-path: "/var/run/mysqld/mysqld.sock"
  713. user: "ergo"
  714. password: "hunter2"
  715. history-database: "ergo_history"
  716. timeout: 3s
  717. max-conns: 4
  718. # this may be necessary to prevent middleware from closing your connections:
  719. #conn-max-lifetime: 180s
  720. # languages config
  721. languages:
  722. # whether to load languages
  723. enabled: true
  724. # default language to use for new clients
  725. # 'en' is the default English language in the code
  726. default: en
  727. # which directory contains our language files
  728. path: languages
  729. # limits - these need to be the same across the network
  730. limits:
  731. # nicklen is the max nick length allowed
  732. nicklen: 32
  733. # identlen is the max ident length allowed
  734. identlen: 20
  735. # realnamelen is the maximum realname length allowed
  736. realnamelen: 150
  737. # channellen is the max channel length allowed
  738. channellen: 64
  739. # awaylen is the maximum length of an away message
  740. awaylen: 390
  741. # kicklen is the maximum length of a kick message
  742. kicklen: 390
  743. # topiclen is the maximum length of a channel topic
  744. topiclen: 390
  745. # maximum number of monitor entries a client can have
  746. monitor-entries: 100
  747. # whowas entries to store
  748. whowas-entries: 100
  749. # maximum length of channel lists (beI modes)
  750. chan-list-modes: 60
  751. # maximum number of messages to accept during registration (prevents
  752. # DoS / resource exhaustion attacks):
  753. registration-messages: 1024
  754. # message length limits for the new multiline cap
  755. multiline:
  756. max-bytes: 4096 # 0 means disabled
  757. max-lines: 100 # 0 means no limit
  758. # fakelag: prevents clients from spamming commands too rapidly
  759. fakelag:
  760. # whether to enforce fakelag
  761. enabled: true
  762. # time unit for counting command rates
  763. window: 1s
  764. # clients can send this many commands without fakelag being imposed
  765. burst-limit: 5
  766. # once clients have exceeded their burst allowance, they can send only
  767. # this many commands per `window`:
  768. messages-per-window: 2
  769. # client status resets to the default state if they go this long without
  770. # sending any commands:
  771. cooldown: 2s
  772. # exempt a certain number of command invocations per session from fakelag;
  773. # this is to speed up "resynchronization" of client state during reattach
  774. command-budgets:
  775. "CHATHISTORY": 16
  776. "MARKREAD": 16
  777. "MONITOR": 1
  778. "WHO": 4
  779. # the roleplay commands are semi-standardized extensions to IRC that allow
  780. # sending and receiving messages from pseudo-nicknames. this can be used either
  781. # for actual roleplaying, or for bridging IRC with other protocols.
  782. roleplay:
  783. # are roleplay commands enabled at all? (channels and clients still have to
  784. # opt in individually with the +E mode)
  785. enabled: false
  786. # require the "roleplay" oper capability to send roleplay messages?
  787. require-oper: false
  788. # require channel operator permissions to send roleplay messages?
  789. require-chanops: false
  790. # add the real nickname, in parentheses, to the end of every roleplay message?
  791. add-suffix: true
  792. # external services can integrate with the ircd using JSON Web Tokens (https://jwt.io).
  793. # in effect, the server can sign a token attesting that the client is present on
  794. # the server, is a member of a particular channel, etc.
  795. extjwt:
  796. # # default service config (for `EXTJWT #channel`).
  797. # # expiration time for the token:
  798. # expiration: 45s
  799. # # you can configure tokens to be signed either with HMAC and a symmetric secret:
  800. # secret: "65PHvk0K1_sM-raTsCEhatVkER_QD8a0zVV8gG2EWcI"
  801. # # or with an RSA private key:
  802. # #rsa-private-key-file: "extjwt.pem"
  803. # # named services (for `EXTJWT #channel service_name`):
  804. # services:
  805. # "jitsi":
  806. # expiration: 30s
  807. # secret: "qmamLKDuOzIzlO8XqsGGewei_At11lewh6jtKfSTbkg"
  808. # history message storage: this is used by CHATHISTORY, HISTORY, znc.in/playback,
  809. # various autoreplay features, and the resume extension
  810. history:
  811. # should we store messages for later playback?
  812. # by default, messages are stored in RAM only; they do not persist
  813. # across server restarts. however, you may want to understand how message
  814. # history interacts with the GDPR and/or any data privacy laws that apply
  815. # in your country and the countries of your users.
  816. enabled: true
  817. # how many channel-specific events (messages, joins, parts) should be tracked per channel?
  818. channel-length: 2048
  819. # how many direct messages and notices should be tracked per user?
  820. client-length: 256
  821. # how long should we try to preserve messages?
  822. # if `autoresize-window` is 0, the in-memory message buffers are preallocated to
  823. # their maximum length. if it is nonzero, the buffers are initially small and
  824. # are dynamically expanded up to the maximum length. if the buffer is full
  825. # and the oldest message is older than `autoresize-window`, then it will overwrite
  826. # the oldest message rather than resize; otherwise, it will expand if possible.
  827. autoresize-window: 3d
  828. # number of messages to automatically play back on channel join (0 to disable):
  829. autoreplay-on-join: 0
  830. # maximum number of CHATHISTORY messages that can be
  831. # requested at once (0 disables support for CHATHISTORY)
  832. chathistory-maxmessages: 1000
  833. # maximum number of messages that can be replayed at once during znc emulation
  834. # (znc.in/playback, or automatic replay on initial reattach to a persistent client):
  835. znc-maxmessages: 2048
  836. # options to delete old messages, or prevent them from being retrieved
  837. restrictions:
  838. # if this is set, messages older than this cannot be retrieved by anyone
  839. # (and will eventually be deleted from persistent storage, if that's enabled)
  840. expire-time: 1w
  841. # this restricts access to channel history (it can be overridden by channel
  842. # owners). options are: 'none' (no restrictions), 'registration-time'
  843. # (logged-in users cannot retrieve messages older than their account
  844. # registration date, and anonymous users cannot retrieve messages older than
  845. # their sign-on time, modulo the grace-period described below), and
  846. # 'join-time' (users cannot retrieve messages older than the time they
  847. # joined the channel, so only always-on clients can view history).
  848. query-cutoff: 'none'
  849. # if query-cutoff is set to 'registration-time', this allows retrieval
  850. # of messages that are up to 'grace-period' older than the above cutoff.
  851. # if you use 'registration-time', this is recommended to allow logged-out
  852. # users to query history after disconnections.
  853. grace-period: 1h
  854. # options to store history messages in a persistent database (currently only MySQL).
  855. # in order to enable any of this functionality, you must configure a MySQL server
  856. # in the `datastore.mysql` section. enabling persistence overrides the history
  857. # size limits above (`channel-length`, `client-length`, etc.); persistent
  858. # history has no limits other than those imposed by expire-time.
  859. persistent:
  860. enabled: false
  861. # store unregistered channel messages in the persistent database?
  862. unregistered-channels: false
  863. # for a registered channel, the channel owner can potentially customize
  864. # the history storage setting. as the server operator, your options are
  865. # 'disabled' (no persistent storage, regardless of per-channel setting),
  866. # 'opt-in', 'opt-out', and 'mandatory' (force persistent storage, ignoring
  867. # per-channel setting):
  868. registered-channels: "opt-out"
  869. # direct messages are only stored in the database for logged-in clients;
  870. # you can control how they are stored here (same options as above).
  871. # if you enable this, strict nickname reservation is strongly recommended
  872. # as well.
  873. direct-messages: "opt-out"
  874. # options to control how messages are stored and deleted:
  875. retention:
  876. # allow users to delete their own messages from history,
  877. # and channel operators to delete messages in their channel?
  878. allow-individual-delete: false
  879. # if persistent history is enabled, create additional index tables,
  880. # allowing deletion of JSON export of an account's messages. this
  881. # may be needed for compliance with data privacy regulations.
  882. enable-account-indexing: false
  883. # options to control storage of TAGMSG
  884. tagmsg-storage:
  885. # by default, should TAGMSG be stored?
  886. default: false
  887. # if `default` is false, store TAGMSG containing any of these tags:
  888. whitelist:
  889. - "+draft/react"
  890. - "+react"
  891. # if `default` is true, don't store TAGMSG containing any of these tags:
  892. #blacklist:
  893. # - "+draft/typing"
  894. # - "typing"
  895. # whether to allow customization of the config at runtime using environment variables,
  896. # e.g., ERGO__SERVER__MAX_SENDQ=128k. see the manual for more details.
  897. allow-environment-overrides: true