Although I only live with 4 others, wife, son & 2 cats, in a small 5 room apartment most evenings we are in different rooms, or in the summer 3 different floors, wearing headphones chilling to our own choices in music & tv. As I think it's uncouth to yell out of the window or across the apartment to get someone's attention I setup a Raspberry Pi Model B as an XMPP server running MUC. As it's only for 3 people, unless we have visitors, I chose to run Prosody, it's pretty lightweight, easy to setup, the stable version is in the raspbian repos & i've used it before. I've also used and run ejabberd, openfire, tigase, jabberd,... but IMHO they are heavier on resources and a bit harder to setup, and are overkill for my needs and anyway I like lua.
As stable Prosody, currently 8.2, is in the raspbian repos you install it via apt.
sudo apt-get install prosody
which will install (if they are not already installed)
liblua5.1-0 lua-event lua-expat lua-filesystem lua-sec lua-socket prosody ssl-cert
Once Prosody is installed you'll need to create a config file & add some users.
First create an admin user for the server. As Prosody is running on birstall.leicestershire.lan, i'll use This email address is being protected from spambots. You need JavaScript enabled to view it. as my admin account & create it using the prosodyctl utility.
sudo prosodyctl adduser%MINIFYHTML58c76454d66f6b895dceeb0cbc81194021%%MINIFYHTML58c76454d66f6b895dceeb0cbc81194022%This email address is being protected from spambots. You need JavaScript enabled to view it.%MINIFYHTML58c76454d66f6b895dceeb0cbc81194023%
which will ask you to enter a password for that user (twice)
Enter new password: Retype new password:
[As i'm going to disallow in-band registration i also created accounts for my wife & son & a non-admin account for myself after creating the admin account also using prosodyctl. But if you are going to allow users to create their own accounts you can just skip to creating the config file.]
sudo prosodyctl adduser%MINIFYHTML58c76454d66f6b895dceeb0cbc81194024%%MINIFYHTML58c76454d66f6b895dceeb0cbc81194025%This email address is being protected from spambots. You need JavaScript enabled to view it.%MINIFYHTML58c76454d66f6b895dceeb0cbc81194026%
sudo prosodyctl adduser%MINIFYHTML58c76454d66f6b895dceeb0cbc81194027%%MINIFYHTML58c76454d66f6b895dceeb0cbc81194028%This email address is being protected from spambots. You need JavaScript enabled to view it.%MINIFYHTML58c76454d66f6b895dceeb0cbc81194029%
sudo prosodyctl adduser%MINIFYHTML58c76454d66f6b895dceeb0cbc81194030%%MINIFYHTML58c76454d66f6b895dceeb0cbc81194031%This email address is being protected from spambots. You need JavaScript enabled to view it.%MINIFYHTML58c76454d66f6b895dceeb0cbc81194032%
Now you need to create a config file. It's written in lua, but you don't need to know lua to create it as it's pretty human readable.
Create a file in /etc/prosody/conf.avail with the filename of FQDN of the host Prosody is running on and a suffix of .cfg.lua using whatever editor you are comfortable with, in my case I happen to like vi/vim so i'll use that.
sudo vi /etc/prosody/conf.avail/birstall.leicestershire.lan.cfg.lua
My configuration file looks like this.
VirtualHost "birstall.leicestershire.lan" -- FQDN of host server is running on
admins = {"%MINIFYHTML58c76454d66f6b895dceeb0cbc81194033%%MINIFYHTML58c76454d66f6b895dceeb0cbc81194034%This email address is being protected from spambots. You need JavaScript enabled to view it.%MINIFYHTML58c76454d66f6b895dceeb0cbc81194035%"} -- admin account
modules_enabled = {
"roster"; -- Allow users to have a roster. Recommended [If you want to allow in-band registration, users can register an account from their XMPP client, uncomment the
"register"; -- Enable mod_register
&
allow_registration = true -- Allow users to register new accounts
lines.]
After you have created & saved the configuration file you need to create a symlink to it in the /etc/prosody/conf.d directory.
sudo ln -s /etc/prosody/birstall.leicestershire.lan.cfg.lua /etc/prosody/birstall.leicestershire.lan.cfg.lua
[Change birstall.leicestershire.lan to your hosts name]
And then start Prosody
sudo /etc/init.d/prosody start
Actually you are restarting it as it's already running as you installed it using apt and it'll start automatically when you reboot as well. You can now login to the server, if you are the admin user create muc/chatrooms, im logged in users and do all the other things you can do using xmpp by using any xmpp compliant client such as adium, pidgin, Tkabber, psi, ...
This is just a very simple setup that works for my needs as I don't need to worry about setting up SRV records, portforwarding, federation or even much security. If you want to do a more complicated setup or just read a bit more about XMPP look at these sites.
http://prosody.im
http://xmpp.org