- Update & Upgrade Your Raspberry
- Install the IRC Server
- Make the IRC Server Start at Boot
- Finally Start Your IRC Server!
- Logging in from Your Instant Messenger Client
This is my quick and dirty method for setting up an IRC Server on your Raspberry Pi. This setup is only for use on your Local Area Network (LAN), setting it up so that you can access this IRC server from the wider Internet when you are not at home is outside of the scope of this article. But that’s definitely something I’m thinking of doing in the future.
If everybody is ready, I’ll begin!
We are going to be using SSH to log into our Raspberry Pi from our local machine, I’ve written a guide on how to do this and how to generate ssh keys so that you can log into your Raspberry Pi without using your password every time. The post is titled Generating SSH Keys, but it covers everything you need to know about logging into your Raspberry Pi using SSH.
Update & Upgrade Your Raspberry
you should now ssh in to your Raspberry Pi and update and upgrade the operating system, you should do this before any major changes you make to your system. It’s done with the following command:
sudo apt-get update && sudo apt-get upgrade
Install the IRC Server
After the update and upgrade process has finished, you will need to install the IRC software itself. In this case we are going to use a piece of software called ngircd, as I found it the easiest and fastest to set up. The command you need to install it is:
sudo apt-get install ngircd
Configure the IRC Server
We are going to use the nano text editor to edit the IRC configurations file, and you will need is:
Opening IRC Configuration File
sudo nano /etc/ngircd/ngircd.conf
Like I said earlier, this is going to be a quick and dirty setup to get a barebones IRC server up and running so you only need to make a couple of changes to the configuration file. I’m sure there are a million other ways to do this and that there are some security concerns1 doing it this way, but my threat model doesn’t include somebody trying to attack my IRC server from inside my house so I think I’ll be fine. After opening the file in nano using the command above, scroll down and make the following changes:
Change the Name of Your IRC Server
The hostname of the Raspberry Pi that this server is running on is first, so first.local seemed reasonable:
Change IRC Server Name
[Global] # Server name in the IRC network, must contain at least one dot # (".") and be unique in the IRC network. Required! Name = first.local
What IP Addresses Should the Server Listen On
In this section there will be two default IP addresses, I suggest you change the second IP address to that of your Raspberry Pi, this means it will only listen on its loopback address and its internal local area network address. Remove the semi-colon from the beginning of the line as well to make sure the IRC server uses it:
Set IP Address
# so the server listens on all IP addresses of the system by default. Listen = 127.0.0.1,192.168.0.51
Specify the Message of the Day File
You can leave this file alone and you will be greeted with the same message every time you login to the server, or you can open it in nano and change it to your heart’s desire.
Message of the Day
# Text file with the "message of the day" (MOTD). This message will # be shown to all users connecting to the server: MotdFile = /etc/ngircd/ngircd.motd
Which Port Should the Server Listen On
The default port is
6667, but if you specify another two or three ports it will make it easier should you have a clash with another service on your machine using that particular port. Don’t forget to remove the semi-colon from the beginning of the line activate the option!
# Ports on which the server should listen. There may be more than # one port, separated with ",". (Default: 6667) Ports = 6667, 6668, 6669
Make the IRC Server Start at Boot
The next job is to make sure that our IRC server starts each time the Raspberry Pi reboots, we do this with the following command:
Start IRC Server at Boot
sudo service ngircd enable
Finally Start Your IRC Server!
The last step on your Raspberry Pi is to actually start the IRC server, this is done with the following command:
Start Your IRC Server!
sudo service ngircd start
I would then reboot the Raspberry Pi just to make sure everything is ticketyboo, that’s done with this command:
Reboot Your Raspberry Pi
When the Raspberry Pi has rebooted you should log back in and make sure that the IRC server is running, that stung by using this command:
Check IRC Status
sudo service ngircd status
Everything is probably working here, but if not let me know and I might be able to help.
Logging in from Your Instant Messenger Client
As I use OS X pretty much exclusively for all of my Instant Messenger chatting, I use a client called Adium and these are the steps you need to take to get connected to your newly minted IRC server. I’m sure it’s pretty much the same on whichever Operating System you’re using, but obviously your mileage may vary:
- Open the Preferences pane in Adium and select the Accounts tab
- Press the plus sign in the bottom left-hand corner of the Accounts tab, and from the resulting menu select Jabber (XMPP)
- A new window will open and you should fill in the following options:
Set Adium Connection Details
Nickname: Your Nickname Hostname: Your Raspberry Pi's IP Address Password: (leave this blank)
- In the same window Select the Options tab and change the Port option to one of the ports you selected above, this is generally
- Click OK
- And that’s it, you should now be connected and can create IRC channels to your hearts content and so can anyone else that’s inside your house. It’s great for organising events and jobs that need doing around the house with the rest of your family.
Let me know how you get on and if you have any problems just leave a comment and I’ll see if I can help!
No no, I’m REALLY sure there are security concerns were I to configure this I see server to have access to the Internet. ↩