You'll be getting a LetsEncrypt SSL cert in the process.
uberspace web domain add irc.host.tld
I think needed 3, for http, https and websockets
uberspace port add
I'm not sure whether I needed to set for the websocket port, or all three.
uberspace web backend set irc.host.tld --http --port 47363
Using wget
, extract archive after.
wget --trust-server-names https://www.unrealircd.org/downloads/unrealircd-latest.tar.gz
tar xzvf unrealircd-5.0.6.tar.gz
cd unrealircd-5.0.6
Some configuration. All three steps in order. Make sure you let the wizard generate the SSL certs for you. I have no idea how to do that manually afterwards.
./Config
make
make install
ONLY IF YOU DID NOT CREATE THE SSL CERTS! I missed the certs the first time and instead symlinked my LetsEncrypt certs, but this is bad for actual IRC servers I believe. Use with caution.
cd ~/unrealircd/conf/tls
ln -s ~/etc/certificates/irc.host.tld.crt ./server.cert.pem
ln -s ~/etc/certificates/irc.host.tld.key ./server.key.pem
Copy example config file to make a new one
cd ~/unrealircd
cp conf/examples/example.conf conf/unrealircd.conf
Use https://www.unrealircd.org/docs/Configuration as a guide.
Generate cloak keys (add to line 451+ of unrealircd.conf
)
./unrealircd gencloak
Add websocket module to unrealircd.conf
I added it to the very end of the file.
loadmodule "websocket";
Set an email as kline address in line 461 of unrealircd.conf
Change unrealircd.conf
as per https://www.unrealircd.org/docs/Using_Let%27s_Encrypt_with_UnrealIRCd
Set the ports you opened and note the path to your LetsEncrypt certs in the listen
blocks.
listen {
ip *;
port 47361;
options {
websocket {
type text;
}
};
}
/* IRC SSL/TLS */
listen {
ip *;
port 47362;
options { tls; };
tls-options {
certificate "../../etc/certificates/irc.host.tld.crt";
key "../../etc/certificates/irc.host.tld.key";
};
}
/* Websockets with WSS */
listen {
ip *;
port 47363;
options {
tls;
websocket {
type text;
}
};
tls-options {
certificate "../../etc/certificates/irc.host.tld.crt";
key "../../etc/certificates/irc.host.tld.key";
options { no-client-certificate; };
};
}
./unrealircd start
should show:
Configuration loaded.
Initializing TLS..
Dynamic configuration initialized.. booting IRCd.
UnrealIRCd is now listening on the following addresses/ports:
IPv4: *:47363(SSL/TLS), *:47362(SSL/TLS), *:47361(SSL/TLS), *:43180
IPv6: *:47363(SSL/TLS), *:47362(SSL/TLS), *:47361(SSL/TLS), *:43180
UnrealIRCd started.
Add server restart to crontab (crontab -e
)
https://www.unrealircd.org/docs/Cron_job
*/5 * * * * /home/yourusername/unrealircd/unrealircd croncheck
@reboot /home/yourusername/unrealircd/unrealircd croncheck
If the server is running and you changed the config, you need to rehash!
(Some settings require a full restart, with stop
and start
, such as server name changes)
./unrealircd rehash
Is this needed?
set {
ssl {
sts-policy {
port 47362;
duration 5m; /* you can always increase this later */
};
};
};