My ‘cloud’ IM setup

Posted on August 18th, 2010 by Luke Sheldrick.
Categories: IT / Tech.
Tags: , , , , , , , , , , , , , , , .

18 08 2010

For a long time now, I’ve had a number of different applications I use to connect to various different IM (instant messaging) mediums, such as Irssi for IRC, Pidgin for Jabber/MSN/etc on my desktops/laptops and usually BeeJive on my iPhone when I’m out and about.

This has all ‘kinda’ worked, it hasn’t been the most elegant of solutions, but it did do what I need it to. Until you add something like the iPad to the mix.

The problem I had, was I’d be signed on to say MSN on my MacBook, and then decide I’ve worked enough for the day, so sign off. Then whilst watching TV in the evening, want to send a message to someone, who only uses MSN, so grab my iPad and sign on via BeeJive. Well that kind of works, except, if I forget to sign off BeeJive, it keeps me online on their ‘cloud’, so I can connect back at any time via the iPad, only the iPad though.

If someone was to send me a message when the client is closed on the iPad, sure it sends a push message to it, but no other device. If I go out, and I know someone has sent me a message, I can’t connect to it via BeeJive on the iPhone, as it doesn’t keep them in sync. Same as if I wanted to log in with the MacBook, I can’t see what that message was.

So I decided this doesn’t work how I want and need it to. So I set about designing my own solution. The aim was to set something up running on my infrastructure, at little or no cost (not always easy when you add any iOS devices in the mix), and reliable.

What I came up with, works really well for me, so thought I’d document what I put together.

The server components run on a machine that is always on, the is the core of the solution. The underlying OS I used is a Fedora 14 box (so Fedora rawhide – the development branch). The packages I’ve used are widely available on pretty much every Linux distribution, ports (OS X, *BSD), so the OS here, really doesn’t make much of a difference.

Server side:
Irssi – a cross platform IRC client.
ZNC – a cross platform IRC bouncer.
BitlBee – a cross platform IM gateway for IRC.

Client side:
Colloquy Mobile – iOS IRC client – use this on the iPad and iPhone.
Adium (Beta) – OS X IM client – use the beta version as it supports IRC.
Pidgin – a cross platform IM client – use this on any Windows or Linux machines i happen to be on.

Again the client side really doesn’t matter, just as long as you have something you can connect to an IRC server with, it should be all good.

The setup uses BitlBee to connect to MSN, G-Talk, Jabber, Facebook chat, and pretty much any other IM network you’d want to connect into. BitlBee presents it’s self as a IRC server, and you contact list is all shown as a room. When you chat to someone you do so as you would traditionally. That part worked a treat.

At first I just had Irssi running with the proxy module enabled, this allows you to reconnect into your Irssi session, with a local client, and ‘pose’ as remote session. This worked well, so I just left Irssi running in a remote screen session, then when I wanted to connect in and chat, I would just open say Pidgin locally, and it would connect to all the rooms the Irssi session had.

This was fine, however, Irssi on it’s own doesn’t support playback. What I mean here is, if someone had sent me a DM, Irssi would have it, but when I logged in with Pidgin, Irssi wouldn’t send me a copy of that message, it only forwards new messages. For these kind of features, I’d need to employ a bouncer, not the thuggish type that stand outside nightclubs, but an IRC bouncer.

I tried a few, but settled with ZNC. I should point out here, that when using ZNC, there isn’t really any need to use Irssi in the equation any more, I just kept it as have a few custom scripts, and all my historic logs are there, so decided to keep it.

ZNC will connect to all your favourite IRC networks, keep you online, and when you connect to it with your client, it will replay all the conversations and DMs you missed since you last connected in. this was exactly the functionality I was looking for.

There are also a host of other cool things you can do with ZNC, so I have mine configured to set me away everywhere 5 minutes after my client disconnects. Also if you team colloquy mobile up with ZNC, you can have it push message your iPhone or iPad if you’re mentioned in a chat, or if someone sends you a DM, I have mine set to only do this if there are no other clients connected, else when I’m at computer having a conversation, both my iPhone and iPad have a bit of a push message spasm. This push message function was exactly what I was looking for to replace BeeJive, except this pushes it to all my devices, not just the one that has my account singed in.. neat I thought.

This my no means is the simplest way to set up your MSN, but for if you want all the prerequisites I did, it really works.

The server topology may be a bit complex so have (for my sins) put together a diagram of how it’s set out, along with a few screenshots.

Any questions, please feel free to ask.

[flickr album=72157624731660072 num=5 size=Thumbnail]

0 comments.

Leave a comment

Comments can contain some xhtml. Names and emails are required (emails aren't displayed), url's are optional.