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 = 127.0.0.1 DaemonPort = 8171 OperPassword = password AllowAccountAdd 1 HostName = example.com
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
$ cvs -d firstname.lastname@example.org:/cvs checkout -P ports/net/bitlbee-discord/
$ doas pkg_add telegram-purple
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
$ doas pkg_add olm glib json-glib $ cd ~/ $ git clone https://github.com/matrix-org/purple-matrix.git $ cd purple-matrix $ gmake MATRIX_NO_E2E=1 $ doas gmake install
$ doas pkg_add purple-rocketchat
$ doas pkg_add bitlbee-mastodon
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.
then save it.
next time you connected into bitlbee, you can login via NickServ or write directly in &bitlbee
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:
and for checking avaliable protocols supported by libpurple:
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
let's add a jabber account:
account add jabber email@example.com MyVerySecurePassword
of course, replace firstname.lastname@example.org 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
will open a query with my_buddy user. if you want to message your buddy in jabber, do following