Listeners
Listeners Block
Section titled “Listeners Block”listeners: [ {:tcp, [port: 6667]}, {:tls, [ port: 6697, transport_options: [ keyfile: Path.expand("data/cert/selfsigned_key.pem"), certfile: Path.expand("data/cert/selfsigned.pem") ] ]}, {:http, [port: 8080]}, {:https, [ port: 8443, keyfile: Path.expand("data/cert/selfsigned_key.pem"), certfile: Path.expand("data/cert/selfsigned.pem") ]}]Listener Types
Section titled “Listener Types”| Type | Protocol | Default Port | Underlying Server |
|---|---|---|---|
:tcp | IRC plaintext | 6667 | ThousandIsland |
:tls | IRC with SSL/TLS | 6697 | ThousandIsland |
:http | WebSocket (plain) | 8080 | Bandit |
:https | WebSocket (SSL) | 8443 | Bandit |
TCP Listener
Section titled “TCP Listener”{:tcp, [ port: 6667, # Optional ThousandIsland options: num_acceptors: 100, num_connections: 10_000,]}Standard plaintext IRC connection. Supports all IRC commands but not encrypted.
TLS Listener
Section titled “TLS Listener”{:tls, [ port: 6697, transport_options: [ keyfile: Path.expand("data/cert/privkey.pem"), certfile: Path.expand("data/cert/fullchain.pem") # Optional: add chain/CA cert ], # Optional ThousandIsland options: num_acceptors: 100,]}SSL/TLS encrypted IRC connection (RFC 7194). Users connecting via TLS receive the +Z (Secure Connection) user mode automatically.
Self-signed certificates: If keyfile points to selfsigned_key.pem and certfile points to selfsigned.pem, ElixIRCd will automatically generate self-signed certificates on startup. This is for development only.
HTTP WebSocket Listener
Section titled “HTTP WebSocket Listener”{:http, [ port: 8080, # Optional Bandit options: thousand_island_options: [ num_acceptors: 100, num_connections: 10_000, ]]}Allows IRC clients to connect over WebSocket (WS). Compatible with web-based IRC clients like KiwiIRC.
HTTPS WebSocket Listener
Section titled “HTTPS WebSocket Listener”{:https, [ port: 8443, keyfile: Path.expand("data/cert/privkey.pem"), certfile: Path.expand("data/cert/fullchain.pem"), # Optional Bandit options: thousand_island_options: [...]]}Encrypted WebSocket (WSS) listener. Users connecting via WSS receive the +Z (Secure Connection) mode.
Multiple Listeners
Section titled “Multiple Listeners”You can configure multiple listeners of the same type on different ports:
listeners: [ {:tcp, [port: 6667]}, {:tcp, [port: 6668]}, # Alternative port {:tls, [port: 6697, transport_options: [...]]}, {:tls, [port: 6699, transport_options: [...]]}, # Alternative TLS port {:http, [port: 8080]}, {:https, [port: 8443, keyfile: ..., certfile: ...]}]ThousandIsland Options
Section titled “ThousandIsland Options”For :tcp and :tls listeners, you can pass any ThousandIsland option:
{:tcp, [ port: 6667, num_acceptors: 100, # Number of acceptor processes num_connections: 10_000, # Maximum connections read_timeout: 60_000, # Read timeout in milliseconds]}Bandit Options
Section titled “Bandit Options”For :http and :https listeners, you can pass any Bandit option:
{:http, [ port: 8080, thousand_island_options: [ num_acceptors: 100, num_connections: 10_000, ]]}