Accessing libera.chat via Tor

28 July 2021

libera.chat runs it’s own onion service at libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion. To connect with the onion service we need to configure our irc client and also ensure that we have the tor service running. For the purposes of this post, I will be using irssi since it is the irc client of my choice.

  1. Generate a client certificate. Run the following command in the terminal:

openssl req -x509 -new -newkey rsa:4096 -sha256 -days 1096 -nodes -out liberator.pem -keyout liberator.pem

  1. To inspect the certificate. Run the following command:

openssl x509 -in liberator.pem -noout -enddate

  1. We now need the fingerprint, which can be obtained by the following command:

openssl x509 -in liberator.pem -noout -fingerprint -sha512 | awk -F= '{gsub(":",""); print tolower ($2)}'

Connecting to libera.chat with irssi

  1. Moving the certificate to irssi’s cert directory
mkdir ~/.irssi/certs

 mv -iv liberator.pem ~/.irssi/certs

Configure Tor

  1. Assuming you have tor installed on your system. Edit torrc at /etc/tor/torrc and add the following line.

MapAddress palladium.libera.chat libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion


MapAddress libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion

  1. Restart the tor service. (systemctl restart tor)

Commands to run in irssi

  1. Connect to libera.chat (over clearnet) and associate the fingerprint with the nick.
$ irssi
 [(status)] /connect irc.libera.chat

 [(status)] /msg NickServ identify <your password here>

 [(status)] /msg NickServ CERT ADD <your fingerprint (see above)>
  1. Add the libera.chat network and server to the irssi config. Alternatively, you can also edit the irssi config located at ~/.irssi/config.
[(status)] /network add -sasl_username <username> -sasl_password <password> -sasl_mechanism EXTERNAL liberator

 [(status)] /server add -auto -ssl -ssl_cert ~/.irssi/certs/liberator.pem -network liberator palladium.libera.chat 6697`

 [(status)] /server add -auto -ssl -ssl_cert ~/.irssi/certs/liberator.pem -network liberator 6697

 [(status)] /save

Connect to libera.chat (over Tor)

$ torsocks irssi

 [(status)] /connect liberator


  1. https://libera.chat/guides/certfp
  2. https://libera.chat/guides/connect
  3. https://gitlab.torproject.org/legacy/trac/-/wikis/doc/TorifyHOWTO/irssi
  4. https://tor.stackexchange.com/questions/14080/connecting-to-freenode-using-irssi/14345#14345