Skip to content

Listeners

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")
]}
]
TypeProtocolDefault PortUnderlying Server
:tcpIRC plaintext6667ThousandIsland
:tlsIRC with SSL/TLS6697ThousandIsland
:httpWebSocket (plain)8080Bandit
:httpsWebSocket (SSL)8443Bandit
{: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, [
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, [
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, [
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.

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: ...]}
]

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
]}

For :http and :https listeners, you can pass any Bandit option:

{:http, [
port: 8080,
thousand_island_options: [
num_acceptors: 100,
num_connections: 10_000,
]
]}