Despite modern alternatives like Slack, the ancient [IRC][irc-info] is still hugely popular as an online interactive chat platform.

This may be because there are IRC clients for almost every operating system and device, from the Commodore Amiga to your smartphone, and the technology behind IRC is reassuringly simplistic - it really is just raw text and a few control characters being bumped around the network.

Online servers, such as those offered by [Freenode][freenode], are wonderful for both public and private channels. But it’s equally easy to run your own private IRC server, giving you complete control over your data, logs and configuration settings whilst avoiding all the risks and frustrations of dealing with IRC spammers and bots.

In this tutorial, we’ll cover installing the [InspIRCd][inspircd] IRC server on Ubuntu, from installing its dependencies and building the latest version from GitHub, to configuration and execution.

What you’ll learn

What you’ll need

This tutorial is recommended for users who are comfortable using the terminal.

For the first step, we’ll install the dependencies needed to build and run InspIRCd, starting with git:

sudo apt-get install git

Next is Perl so we can run the configuration script included with InspIRCd:

sudo apt-get install perl
sudo apt-get install g++

And finally we need to make sure that make is installed:

sudo apt-get install make

The latest version of InspIRCd can be downloaded from: https://github.com/inspircd/inspircd/releases/latest

As we’re going to be building the latest version from the source code, we need to grab the tar.gz archive either with your browser or from the command line. To take version 2.0.25 as an example, you could use the following command to download the archive:

wget https://github.com/inspircd/inspircd/archive/v2.0.25.tar.gz

Use tar to extract the download:

tar xvf ./v2.0.25.tar.gz

With the source code downloaded and extracted, we can now configure how we want InspIRCd built.

First, enter the installation directory:

cd inspircd-2.0.25

The version number above needs to correspond with your downloaded version.

To begin configuring the installation, enter the following:

perl ./configure

You are now asked a series of questions. When unsure, press return to answer with the default values.

The final question will ask whether you’d like to check for updates to third-party modules, and you should answer y for yes.

The final output should be similar to the following:

Ok, 144 modules.
Writing inspircd_config.h
Writing GNUmakefile ...
Writing BSDmakefile ...
Writing inspircd ...
Writing cache file for future ./configures ...


To build your server with these settings, please run 'make' now.
*** Remember to edit your configuration files!!! ***

We can now proceed with the build step.

The server can now be built by executing make in the installation directory. This process will take around 10 minutes, depending on your system speed, so feel free to step away from the computer.

With that complete, type make install to move the executable files into the locations configured earlier. An overview of this process is output upon completion:

*************************************
*       BUILDING INSPIRCD           *
*                                   *
*   This will take a *long* time.   *
*     Why not read our wiki at      *
*     http://wiki.inspircd.org      *
*  while you wait for make to run?  *
*************************************

*************************************
*        INSTALL COMPLETE!          *
*************************************
Paths:
  Base install: /home/javier/build/inspircd-2.0.25/run
  Configuration: /home/javier/build/inspircd-2.0.25/run/conf
  Binaries: /home/javier/build/inspircd-2.0.25/run/bin
  Modules: /home/javier/build/inspircd-2.0.25/run/modules
  Data: /home/javier/build/inspircd-2.0.25/run/data
To start the ircd, run: /home/javier/build/inspircd-2.0.25/run/inspircd start
Remember to create your config file: /home/javier/build/inspircd-2.0.25/run/conf/inspircd.conf
Examples are available at: /home/javier/build/inspircd-2.0.25/run/conf/examples/

With InspIRCd fully installed, we can configure the server.

We can now proceed with the build step.

From the build directory, create a text file called run/config/inspircd.conf and insert the following:

<config format="xml">
<define name="bindip" value="1.2.2.3">
<define name="localips" value="&bindip;/24">

####### SERVER CONFIGURATION #######

<server
        name="SERVER_HOSTNAME/FQDN"
        description="SERVER_DESCRIPTION"
        id="SERVER_SID"
        network="NETWORK_NAME">


####### ADMIN INFO #######

<admin
       name="ADMIN_NAME"
       nick="ADMIN_NICK"
       email="ADMIN_EMAIL">

####### PORT CONFIGURATION #######

<bind
      address="SERVER_IP"
      port="SERVER_PORT"
      type="SERVER_TYPE">

Change the following values in the above text to reflect your own configuration:

The configuration file should now look something like this:

<config format="xml">
<define name="bindip" value="1.2.2.3">
<define name="localips" value="&bindip;/24">

####### SERVER CONFIGURATION #######

<server
        name="tutorials.ubuntu.com"
        description="Welcome to Ubuntu Tutorials"
        id="97K"
        network="tutorials.ubuntu.com">


####### ADMIN INFO #######

<admin
       name="tutorial ubuntu"
       nick="tutorial"
       email="tutorials@ubuntu.com">

####### PORT CONFIGURATION #######

<bind
      address="23.54.785.654"
      port="6697"
      type="clients">

Make sure you save your changes!

It’s now time to start up InspIRCd for the first time!

In your the terminal window, type:

./inspircd start
./inspircd status

If successful, you will see the following output:

InspIRCd is running (PID: 13301)

Congratulations! Your server is now online!

Any IRC client capable of accessing your server will now be able to connect to your IRC server.

You now know how to:

What’s Next?

Changes to your IRC server need to be made to the config file and a list of supported commands and other useful information can be found at InspIRCd’s Wiki.

Need Help?