Bridge IM accounts to your IRC client with bitlbee

Many Internet Relay Chat (IRC) clients in Fedora (xchat, hexchat, irssi) only support the IRC protocol, however many users also converse in other Instant Messaging (IM) protocols like Google Talk and Facebook Messenger. One option to have all your IMs and Chats in one application is to switch to a client that supports both IRC and IM, such as pidgin or empathy. However, there is another option that does not require you to switch IRC clients — bitlbee.

Bitlbee is an IRC server that runs in the background on your machine and forwards all your IM chats straight through to your IRC client. Each chat with a contact in your IM just appears as a PM in your IRC client.

In this article, we will step through installing bitlbee on Fedora, setting up bitlbee to run on localhost on your machine, and how to set up a IM service to forward your chats through to your IRC client.


Installing bitlbee

First up, we need to install bitlbee. Since bitlbee is included in the default fedora repositories, you can either install with the Software application in Fedora or with the command line:

<span class="pln">sudo yum install bitlbee</span>

Starting the bitlbee service

After installing, we need to start the bitlbee service to run in the background. To start the bitlbee service, we run the following command in terminal:

<span class="pln">sudo systemctl start bitlbee</span><span class="pun">.</span><span class="pln">service</span>

Note that systemctl normally doesn’t output anything here so to check that bitlbee has actually started. To check that bitlbee is in fact running, use the command:

<span class="pln">sudo systemctl status bitlbee</span><span class="pun">.</span><span class="pln">service</span>

And it should output something similar to:

<span class="pln"> bitlbee</span><span class="pun">.</span><span class="pln">service </span><span class="pun">-</span><span class="typ">BitlBee</span><span class="pln"> IRC</span><span class="pun">/</span><span class="pln">IM gateway
    </span><span class="typ">Loaded</span><span class="pun">:</span><span class="pln"> loaded </span><span class="pun">(</span><span class="str">/usr/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">systemd</span><span class="pun">/</span><span class="pln">system</span><span class="pun">/</span><span class="pln">bitlbee</span><span class="pun">.</span><span class="pln">service</span><span class="pun">;</span><span class="pln"> disabled</span><span class="pun">)</span><span class="typ">Active</span><span class="pun">:</span><span class="pln"> active </span><span class="pun">(</span><span class="pln">running</span><span class="pun">)</span><span class="pln"> since </span><span class="typ">Wed</span><span class="lit">2014</span><span class="pun">-</span><span class="lit">02</span><span class="pun">-</span><span class="lit">12</span><span class="lit">14</span><span class="pun">:</span><span class="lit">54</span><span class="pun">:</span><span class="lit">35</span><span class="pln"> EST</span><span class="pun">;</span><span class="lit">1min</span><span class="lit">13s</span><span class="pln"> ago
  </span><span class="typ">Main</span><span class="pln"> PID</span><span class="pun">:</span><span class="lit">27148</span><span class="pun">(</span><span class="pln">bitlbee</span><span class="pun">)</span><span class="typ">CGroup</span><span class="pun">:</span><span class="str">/system.slice/</span><span class="pln">bitlbee</span><span class="pun">.</span><span class="pln">service
            </span><span class="pun">└─</span><span class="lit">27148</span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">sbin</span><span class="pun">/</span><span class="pln">bitlbee </span><span class="pun">-</span><span class="pln">D </span><span class="pun">-</span><span class="pln">n</span>

What you are looking for in that output is the following text telling us that the bitlbee service is Active:

<span class="typ">Active</span><span class="pun">:</span><span class="pln"> active </span><span class="pun">(</span><span class="pln">running</span><span class="pun">)</span>

Note also that just activating the service is not enough to make the bitlbee service restart every time you reboot. To ensure that bitlbee starts every time you reboot, you need to enable the bitlbee service with:

<span class="pln">sudo systemctl enable bitlbee</span><span class="pun">.</span><span class="pln">service</span>

Connect to and configure bitlbee

Now, fire up your IRC client of choice, and configure a new connection to a server. By default, bitlbee runs on port 6667, so just set the new server address to localhost:6667.

Once you have connected to the server, bitlbee should have automatically joined you to the channel


. This channel is where you will now send commands to to configure bitlbee.

Switch to the chat window for the


channel, and type in the following command to create an account on your local bitlbee server for your IRC nick (obviously changing mypassword to your password):

<span class="kwd">register </span><span class="str">&lt;mypassword&gt;</span>

Bitlbee will create an account for you and log you in, and should respond with a message like:

&lt;root&gt; Account successfully created * ryanlerch sets mode +R on ryanlerch

Everytime — from now on — when you reopen your IRC client you will need to identify yourself to the bitlbee server. This is done with the command:

<span class="pln">identify </span><span class="str">&lt;mypassword&gt;</span>

So i don’t have to worry about registering every time, i just set up a connect command for the bitlbee server to always run:

<span class="pun">/</span><span class="pln">MSG </span><span class="pun">&amp;</span><span class="pln">bitlbee identify </span><span class="str">&lt;mypassword&gt;</span>

Setting up Accounts

Now you have bitlbee running and configured, we need to add a chat account to bitlbee. In this example, we are going to configure a Google Talk jabber account.

To set up a google account, run the following command in the



<span class="pln">account add jabber you@gmail</span><span class="pun">.</span><span class="pln">com</span>

Then tell the gtalk account to use oauth to authorise the account with the command:

<span class="pln">acc gtalk set oauth on</span>

The default name format that google talk can sometimes also be a bit messed up, so tell bitlbee to use the full name of your contact when displaying it with the command:

<span class="pln">account gtalk </span><span class="kwd">set</span><span class="pln"> nick_format </span><span class="pun">%</span><span class="pln">full_name</span>

And then turn the account on with the command:

acc gtalk on

A new PM window will show up in the bitlbee server in your IRC window with the following message. Follow the link, get the auth token that google generates, and then paste it back into this PM window.

<span class="tag">&lt;jabber_oauth&gt;</span><span class="pln"> Open this URL in your browser to authenticate: https://...
 </span><span class="tag">&lt;jabber_oauth&gt;</span><span class="pln"> Respond to this message with the returned authorization token.</span>

Now switch back to the


chat window, and all your online gtalk contacts should be there in the users list. Create a PM with any of them to chat directly.

Also, if you have multiple chat accounts set up, you are able to join channels in bitlbee to show just the contacts for that account. For this example, you join the


channel on your bitlbee server, and it will only show your google talk contacts.

You are done!

If you want to connect to other accounts, the bitlbee wiki has further details on how to create accounts for a bunch of different protocols, including Facebook chat.

Fedora Project community

1 Comment

  1. Jhun

    Hi Ryan,

    I really appreciate your step by step explanation on how to install bitlbee and it does work. Can you please help me on installing bitlbee-libpurple realy appreciate it.


Comments are Closed

The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat. Fedora Magazine aspires to publish all content under a Creative Commons license but may not be able to do so in all cases. You are responsible for ensuring that you have the necessary permission to reuse any work on this site. The Fedora logo is a trademark of Red Hat, Inc. Terms and Conditions

%d bloggers like this: