Set up your chat server
1 Install Prosody
Open Terminal on your Raspberry Pi or connect via SSH and run the command sudo apt-get install prosody , then press Y to confirm you want to install the software on your device. In the next step, you’ll need to change your configuration, so run sudo nano /etc/prosody/
prosody.cfg.lua .
3 Restart and add an administrator
Run the command sudo /etc/init.d/prosody restart to restart Prosody. Next, add an administrator account with the command sudo
prosodyctl adduser admin@yourdomain , sudo prosodyctl adduser admin@192.168.1.2 . You’re asked to type an administrator password. Do so and press Return. Retype the password and then press Return once again.
5 Make it accessible over the internet
If you only want to use the chat server in your home or office, this step isn’t necessary. However, if you want to be able to chat to people in the world at large, follow the steps outlined in Opening Your Chats to the World Wide Web (page64).
2 Modify config file
Scroll to the section labelled Virtual Hosts and change example.com to your domain – for example, 192.168.1.2 . Scroll up to the section named Server Wide Settings and, under Admins, change, to
admins = {"admin@yourip"} – admins = {"admin@192.168.1.2"} , for example. Next, search for the words ‘allow_registration’ and change to true . Press Ctrl +X, Y, then Return to save and exit.
4 Generate a SSL certificate
This step is optional but recommended. At this stage, you may wish to generate an SSL certificate to allow messaging clients to connect securely to your server. Follow the steps in Securing Your Chats (previouspage) to do this.
6 Connect with an XMPP client
Finally, use Pidgin or another XMPP-compatible program to connect to your chat server. Provide the details to your friends or co-workers to make sure that they can connect, too. And that’s it – you’re ready to chat away to your heart’s content.