Somewhat complex IRC server which implements a subset of RFC1459.
By default the server will run on port 6667
and prometheus metrics are exposed on port 2112
. See docker-compose.yml
for example environment variable configuration.
- TLS
- CAP
- PRIVMSG
- NICK
- USER
- JOIN
- PART
- TOPIC
- WHO
- WHOIS
- KICK
- LUSERS
- PASS
- OPER (pertial, no commands)
- LIST (partial, no ELIST)
- INVITE
- VERSION (partial, local server only)
- ADMIN
- MODE (client: iortz, channel: mspnzt, member: vhoaq)
- AWAY
- LINK
- IRCv3
- SERVER_NAME (string)
- SERVER_VERSION (string)
- PORT (int)
- PORT_TLS (int)
- PROMETHEUS (unset is false)
- TLS (unset is false)
- TLS_CERTIFICATE (path)
- TLS_KEY (path)
mkdir tls && cd tls
openssl genrsa -out servercakey.pem
openssl req -new -x509 -key servercakey.pem -out serverca.crt
openssl genrsa -out server.key
openssl req -new -key server.key -out server_reqout.txt
openssl x509 -req -in server_reqout.txt -days 3650 -sha256 \
-CAcreateserial -CA serverca.crt -CAkey servercakey.pem -out server.crt
- Run
go mod download && go build -v -o ./dist/ircd ./cmd
. - The binary can be found under the
dist
directory. - Run with
SERVER_NAME=foo SERVER_VERSION=0.1 PORT=6667 ./dist/ircd
Note: in order for clients to discover their IP address and get the real remote IP address, the server needs to run using the host network driver. If host networking is not enabled all clients will use the Docker gateway address which might lead to interesting situations.
- Configure the environment variables in in
docker-compose.yml
. - Run
docker compose up
.