Bitlbee is a gateway from IRC clients to a variety of other protocols, by acting like a server for IRC clients and a client for those protocols. For example Telegram, Discord, or Slack. The core of bitlbee itself is written in C.

Installation and configuration

First, let's install the package:

$ doas pkg_add bitlbee-3.6p1-libpurple

Note : The developers suggest not installing OTR version of bitlbee if you plan to provide a public bitlbee instance. This is because the encryption provided by OTR (Off-the-Record) is undermined by the fact that the sysadmin can intercept the messages in plaintext. It gives a false sense of security. Moreover, OTR messaging is often broken when the same account is used with other XMPP clients besides bitlbee.

After installation edit /etc/bitlbee/bitlbee.conf:

RunMode = ForkDaemon
User = _bitlbee
# Bitlbee will only be bound to localhost on port 8171
DaemonInterface =
DaemonPort = 8171
OperPassword = password
AllowAccountAdd 1
HostName =

Replace password with your own password. We set bitlbee to be bound to localhost on port 8171, which users of our bouncer will be able to connect to, because remote connections of bitlbee server can't support SSL (unlike ZNC).

To start bitlbee:

$ doas rcctl enable bitlbee
$ doas rcctl start bitlbee

Discord Support

Use sm00th's bitlbee-discord plugin. Here is a convenient port provided by namtsui:

$ cvs -d checkout -P ports/net/bitlbee-discord/

Telegram Support

$ doas pkg_add telegram-purple

Matrix Support

From packages:

Note: packaged version of purple-matrix is not working with bitlbee, so we have to install it from source instead.

$ doas pkg_add purple-matrix

From source:

$ doas pkg_add olm glib json-glib
$ cd ~/
$ git clone
$ cd purple-matrix
$ gmake MATRIX_NO_E2E=1
$ doas gmake install

RocketChat support

$ doas pkg_add purple-rocketchat

Mastodon support

$ doas pkg_add bitlbee-mastodon

Adding accounts

connect with your IRC client to your bitlbee server, this usually will be localhost, then join &bitlbee (not #bitlbee), you can see your buddy list or generally your chats with people in there. by default only 'root' user exist in there. root can used as a configuration panel to bitlbee.

first let's register your account, this will helps to store your settings.

register <password>

then save it.


next time you connected into bitlbee, you can login via NickServ or write directly in &bitlbee

identify <password>

create your account using following command

account add <protocol> <username> [password] [server]

password and server are optional and depends on the protocol, for example, telegram does not require them by default. for protocol, there are two types of protocols, ones are supported by bitlbee and ones are supported by libpurple. for checking bitlbee built-in protocols:

help plugins

and for checking avaliable protocols supported by libpurple:

help purple

the add command by default gives a id to your account by the protocol name, for example if you add a matrix account it id will be 'matrix', if you had more than one matrix account, they will be named like matrix2, matrix3 and so on.

you can check your accounts using

account list

let's add a jabber account:

account add jabber MyVerySecurePassword

of course, replace with your JID and MyVerySecurePassword with your password (maybe YourVerySecurePassword? :] )

another example for telegram:

account add telegram +11234567

it will ask for login code later.

Note: telegram-purple is known to be buggy and can't connect to telegram sometimes. try to disconnect using following command:

account <id> off
account <id> on


after adding your accounts, you can start chating using msg or query command, for example

/query my_buddy

will open a query with my_buddy user. if you want to message your buddy in jabber, do following

/query JID