You may or may not have heard about Cryptocat:

A secure IM client.

The documentation says you can set up your own server and explains some steps, but it assumes the reader is well versed in setting up the server:

If anyone can help me through the steps required to get this working I would be very thankful.