How to turn a Raspberry Pi into an IRC server

IRC is one of the classic chat protocols still used by many modern online communities. Today, there is no shortage of IRC servers and clients available. You can also set up your own IRC server with a Raspberry Pi.

Dating back to the 1980s, IRC is one of the classic chat protocols still used by many modern online communities, including the famous Twitch streaming platform. Today, there is no shortage of IRC servers and clients available. You can also set up your own IRC server with a Raspberry Pi.

In this article, you will learn how to turn a Raspberry Pi into an IRC server.

Things to prepare

To complete this tutorial, you will need:

  1. Raspberry Pi runs the Raspberry Pi operating system
  2. The power cable is compatible with the Raspberry Pi
  3. External keyboard and ways to connect to the Pi.
  4. HDMI or micro HDMI cables, depending on the Raspberry Pi model
  5. External screen
  6. Ethernet cable if not connected via WiFi

Set up Raspberry Pi

To get started, connect the power cable and all peripherals to the Raspberry Pi.

When the Raspberry Pi starts, make sure it is connected to the Internet. Open Terminal and type the following commands to update the system:

sudo apt update && sudo apt -y upgrade

If the Raspberry Pi does not install any updates, reboot the Pi before proceeding to the next step.

Install IRC server Ircd-Hybrid

You will create the IRC server using the Ircd-Hybrid daemon. Please install the Ircd-Hybrid package with the following command:

sudo apt install ircd-hybrid

This download may take a while!

Server security: Create an encrypted password

You will have to create an encrypted password that you will use to connect to the IRC server as an operator. This will give you privileges, similar to the moderator or admin account.

To create an encrypted password, run the following command:

/usr/bin/mkpasswd your-password-here

Replace your-password-here with the password you want to use.

The terminal will return a series of letters and numbers, which is your encrypted password. Write down this password, as you will need it to set up an operator account.

Configure IRC server

Next, you will need to configure the Ircd-Hybrid software:

sudo nano /etc/ircd-hybrid/ircd.conf

This will open the ircd.conf configuration file in the Nano editor.

How to turn a Raspberry Pi into an IRC server Picture 1How to turn a Raspberry Pi into an IRC server Picture 1 The ircd.conf configuration file opens in the Nano editor

This file contains many settings, but at a minimum, you should make the following changes:

Name the IRC server

Scroll to the serverinfo block { and find the following information:

name = "hybrid8.debian.local";

You should give your server a unique name. For example:

name = "JessicaServer.irc";

Provide a description

You will need to provide a short description to display every time someone connects to your IRC server.

Find the line below:

description = "ircd-hybrid 8.1-debian";
How to turn a Raspberry Pi into an IRC server Picture 2How to turn a Raspberry Pi into an IRC server Picture 2 Provide a description

Replace this text with your own description. For example:

description = "Raspberry Pi IRC Server";

Tell people about your network!

Move to the following:

network_name = "debian"; network_desc = "This is My Network";

These two lines describe the network where the server is running, so you should update it to reflect your specific network. For example:

network_name = "MyNetwork"; network_desc = "This is my Raspberry Pi IRC Network";

Set some limits

By default, Ircd-Hybrid allows 512 connections at any time. If you want to change this limit, look for the following line:

default_max_clients = 512;

You can now increase or decrease this 512 user limit. In this case, the article only allows up to 100 connections to the IRC server:

default_max_clients = 100;

Create the operator

Next is to define some settings for the operator. Move to block operator {. Note that this section may require uncommenting, so please remove the first # in each line.

How to turn a Raspberry Pi into an IRC server Picture 3How to turn a Raspberry Pi into an IRC server Picture 3 Delete the first # symbol in each line

Once done, find the following line:

name = "sheep";

Replace this line with the name you want to assign to the operator group

name = "operator";

You need to specify who can run the operator command by editing the following line:

user = "*@192.0.2.240/28";

This will allow everyone to access the operator, if they have the correct credentials:

user = "*@*";

Finally, add the encrypted password you created earlier. Find the line below:

password = "xxxxxxxxxxxxx";

Make sure you replace this line with an encrypted password, not a plain text version!

When you are satisfied with the information entered, save the configuration file by pressing the keys Ctrl+ Oand then Ctrl+ Xto close.

Run IRC server

Restart the Hybrid-IRCD server:

sudo /etc/init.d/ircd-hybrid restart

When the server restarts, it is ready to use!

mIRC: Connect to a Raspberry Pi server

You can connect to the IRC server using any IRC client. The article uses mIRC, but other popular alternatives including WeeChat and LimeChat for macOS also work.

To connect to the IRC server, launch the client you selected and then add a new server. Depending on the IRC client, you will now be prompted to enter the following information:

  1. Description: This is how the server will be displayed in the IRC client, so enter any values ​​you want to use.
  2. Address: This is the IP address of the Raspberry Pi IRC server. If you don't know the IP address, you can access this information by opening a Terminal on the Raspberry Pi and running the hostname -I command .
  3. Ports: You should set to 6667 , because this is the default port for most servers.
How to turn a Raspberry Pi into an IRC server Picture 4How to turn a Raspberry Pi into an IRC server Picture 4 Enter the required information

Click Add to be able to connect to the IRC server.

How to turn a Raspberry Pi into an IRC server Picture 5How to turn a Raspberry Pi into an IRC server Picture 5 Click Add to be able to connect to the IRC server

As you can see, setting up an IRC server on the Raspberry Pi is quite easy. There are many things that the Raspberry Pi can also do, such as performing the role of a WiFi access point or even a personal web server.

4 ★ | 51 Vote