...CLI: Configure Weechat for Libera.Chat with CertFP
Freenode is dead, it’s weird to say it, but it is. I am not going to go into detail around the circumstances but the folk behind Freenode have moved on to a new IRC network, Libera.Chat. For those of you looking to hook into this new community with a TUI I highly recommend WeeChat for your CLI IRC needs and here is a quick how to on how to hook it up with CertFP for easy authentication.
-
Install WeeChat, on MacOS this can be done with homebrew, for other operating systems follow the guides on WeeChat’s site
brew install weechat
-
Launch WeeChat (
weechat
) and add the Libera.Chat server to your config/server add liberachat irc.libera.chat/6697 -ssl
-
We can now connect to Libera.Chat for the first time
/connect liberachat
-
Once connected it is time to claim our nickname (you will have connected with a default nickname that is likely not available). To do so we first need to switch to the nickname to see if it is free
/nick <YOUR_NICKNAME>
-
If it is free you will see your nickname change to the one you selected, if not try another. Once you have selected your nickname successfully we need to register it
/msg NickServ REGISTER <YOUR_PASSWORD> <YOUR_EMAIL@EXAMPLE.COM>
-
Check your email and copy and paste in the command from that email to complete the registration of your nickname. At this point you have registered your nickname and can log into it with the password specified in step 5. For ease and security though we are going to switch to CertFP so we can use a cert for auth so for now disconnect from the server with
/disconnect
-
In a new terminal window create a new certificate with openssl
openssl req -x509 -new -newkey rsa:4096 -sha256 -days 1096 -nodes -out libera.pem -keyout libera.pem
-
Create the certificate directory for WeeChat
mkdir ~/.weechat/certs
-
Copy your new certificate into our new directory
mv libera.pem ~/.weechat/certs
-
Switching back to our WeeChat window we now need to configure WeeChat to use our certificate
/set irc.server.libera.addresses irc.libera.chat/6697 /set irc.server.liberachat.ssl on /set irc.server.liberachat.ssl_verify on /set irc.server.liberachat.ssl_cert %h/certs/libera.pem /set irc.server.liberachat.sasl_mechanism external /set irc.server.liberachat.nicks <MY_NICKNAME> /save
-
Now we log into Libera.Chat using our password for (hopefully) the last time and register our certificate fingerprint
/connect /msg NickServ IDENTIFY <YOUR_NICKNAME> <YOUR_PASSWORD> /msg NickServ CERT ADD
-
Finally disconnect and reconnect to test your new, password free, login
/disconnect /connect