Howto Setup Ircd Hybrid and Anope Services with SSL on Ubuntu

IRCD Hybrid is a free and open source lightweight internet relay chat (IRC) daemon. IRCD-Hybrid is a commonly known for its blazing fast and high performance. The performance of ircd-hybrid gets more better and strong with Anope. Anope is a set of IRC Services forked from Epona in early 2003. Since that, anope has become very powerful and featured set of IRC services with improvements on quality and functionality of it. Some of the popular services provided by Anope are NickServ, ChanServ, MemoServ, OperServ, BotServ and HostServ. Besides these, HelpServ, DevNull, and Global are other awesome services featured by Anope. So, the combination of IRCD-Hybrid and Anope services creates an awesome solution for feature rich, high performance IRC server.

In this article, we'll learn how to configure IRC Hybrid and Anope Services on Ubuntu 15.04 linux distribution. Here are some simple steps on how we can do that.

1. Downloading IRCD-Hybrid

First of all, before we setup ircd-hybrid in our Ubuntu machine, we'll need to download it. Though ircd-hybrid is available in the official repository of ubuntu, we'll gonna compile it from its source code as the version of ircd-hybrid in the repository may not be the latest. To download the latest release of it ie. 8.2.8 from the official github repository ie . To do so, we'll need to run the following command.

$ cd /tmp/
$ wget

--2015-07-18 08:35:31--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘8.2.8.tar.gz’
8.2.8.tar.gz [ <=> ] 1022K 675KB/s in 1.5s
2015-07-18 08:35:35 (675 KB/s) - ‘8.2.8.tar.gz’ saved [1046078]

After it is downloaded, we'll gonna extract the tarball using tar command.

$ tar -xvf 8.2.8.tar.gz

2. Installing IRCD-Hybrid

After we finish extracting the tarball, we'll now gonna get into the directory that was just extracted. To do so, we'll need to run the following command.

$ cd ircd-hybrid-8.2.8/

Then, we'll go for configuring it so that Makefile can be generated for ircd-hybrid so that we can compile ircd-hybrid source codes to binary using make command. To do so, first we'll need to install the dependencies required for generating the makefile.

$ sudo apt-get install build-essential

After the dependencies are installed, we'll now run the following command to generate the makefile.

$ ./configure --prefix="/home/arun/ircd"

After the makefile has been generated, we'll gonna compile the source code to binary. To do so, we'll need to run the following command.

$ make

We'll now gonna install our latest built ircd-hybrid server by running the following command. This will install ircd-hybrid inside our home directory under a directory named ircd.

$ make install

3. Downloading Anope Services

We'll now download the latest release of anope services from their official github repository ie . The latest release of anope service currently is 2.0.2 . We'll gonna download anope services in the similar manner how we downloaded ircd-hybrid.

$ cd /tmp/
$ wget

--2015-07-18 08:55:14--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1775003 (1.7M) [application/octet-stream]
Saving to: ‘anope-2.0.2-source.tar.gz’
anope-2.0.2-source.t 100%[========================>] 1.69M 611KB/s in 2.8s
2015-07-18 08:55:19 (611 KB/s) - ‘anope-2.0.2-source.tar.gz’ saved [1775003/1775003]

After it is successfully downloaded, we'll gonna extract the tarball using tar command.

$ tar -xvf anope-2.0.2-source.tar.gz

4. Installing Anope Services

After the tarball is extracted, we'll now gonna install anope services in our Ubuntu linux distribution. To do so, we'll need to first configure to generate the makefile so that we can compile the source codes to binary and we can install it in our system. But before that, we'll need to fulfill our package dependency that is required to run Config script. To install that dependency, we'll need to run the following command.

$ sudo apt-get install cmake

Then, we'll run the following command to generate the makefile.

$ cd anope-2.0.2-source/

$ ./Config

The above command will run a program which will ask us several questions regarding the setup and configuration for our anope service. We can simply hit "Enter" to select the default values then, the makefile will be generated inside build directory. We'll now compile the source code to binary. To do so, we'll need to run the following command.

$ cd build
$ make

We'll now gonna install anope services by running the following command. This will install anope services inside our home directory under services.

$ make install

5. Fixing ownership

As we have just installed ircd-hybrid server and anope services inside our home directory, we'll need to make sure that the user we are running ircd-hybrid and anope services have full read-write access and ownership of the directory. So, to change the ownership of those directories, we'll need to run the following command.

$ sudo chown -R arun: ~/ircd ~/services

Note: Here, arun is the username through which we're gonna run our anope service and ircd-hybrid server. So, please replace it according to your system and configuration.

6. Generating Encrypted Password

Now, we'll go for configuring our ircd-hybrid so that it will work properly as expected. First of all, we'll need to generate an encrypted password  hash using mkpasswd which will be required for the configuration of ircd-hybrid and anope services. The plain text password will be used to gain operator rights our irc server. To generate the encrypted password hash, we'll need to run mkpasswd followed by the password we wanna encrypted to. As mkpasswd is located inside bin directory of our ircd-hybrid installation directory we'll need to run the following command.

$ cd ~/ircd/bin/
$ ./mkpasswd


Note: This generated encrypted password has ie $1$jcKeU1nP$3u.uVI3wxyLswDnw1S5mA/ will be used for the configuration of ircd-hybrid and plain password will be needed for gaining operator right. So, it is strongly recommended to keep this password in a safe place so that we can use it later.

7. Configuring ircd-hybrid

Here, we'll now gonna configure our ircd-hybrid server with simple configurations that are enough to run a healthy IRC server. Here are some basic configurations that we need to make so that our IRC server will work fine. To do so, we'll first need to create our default configuration file name as ircd.conf inside ~/ircd/etc/ directory. We can easily create it by copying the reference.conf to ircd.conf. To do so, we'll run the following command.

$ cp ~/ircd/etc/reference.conf ~/ircd/etc/ircd.conf

Then, we'll gonna edit the ircd.conf file using our favorite text editor.

$ nano ~/ircd/etc/ircd.conf

Now, we'll gonna change the first section ie serverinfo{} block as required. Here, we'll gonna change the values for name, description, network_name, and network_description as shown below.

/* serverinfo {}: Contains information about the server. (OLD M:) */
serverinfo {
name = "";
description = "Linoxide IRC Server";
network_name = "Linoxide";
network_desc = "Linoxide IRC Network";

Next, we'll make changes to the admin{} block. This block contains and displays the information of administration about the server. So, we'll make changes to the value of name, description and email as our requirement.

/* admin {}: contains admin information about the server. (OLD A:) */
admin {
name = "Linoxide Admin";
description = "Linoxide IRC Server Administrator";
email = "<>";

Then, we'll gonna comment the host option with "#" in the listen{} block to bind the server all available IP addresses.

#   host = "";

After that, we'll gonna comment the flags = need_ident line under auth{} block which lies just above the operator{} block.

#   flags = need_ident

After that, we'll need to scroll down to the operator{} block. This block defines the operator of the server. Here, name defines the name of the operator, user with value as *@ defines that any localhost user can connect as root. Then, we'll add the encrypted password hash in the password option as shown below.

/* operator {}: defines ircd operators. (OLD O:) */
operator {
name = "root";
user = "*@*";
password = "$1$jcKeU1nP$3u.uVI3wxyLswDnw1S5mA/";
encrypted = yes;

Now, we'll gonna edit our connect{} block so that we can define ircd-hybrid server to connect with anope services using the below configuration. This configuration should match with the anope services configuration we'll create in next step. Here, name section is not the server name of ircd-hybrid but its the name of the anope services.

connect {
name = "";
host = "";
send_password = "mypassword";
accept_password = "mypassword";
encrypted = no;
hub_mask = "*";
class = "server";

After all the desired and required configurations are done, we'll gonna save the file and exit.

Then, we'll gonna start our ircd-hybrid server by running the following command.

$ cd ~/ircd/bin/
$ ./ircd

This will run our IRC server. We can test it by trying to connect to our IRC server using the IP Address of the server or using the domain of the irc server with out IRC client. To connect, we can also run the following command in our IRC Client.


IRC Connect

8. Configuring Anope Services

We'll now gonna configure our anope services to connect with our ircd-hybrid server. To do so, first we'll need to create our default configuration file named services.conf inside conf directory of anope services installation directory. There is an example.conf file located which we can modify to make anope services working fine. So, we'll need to copy example.conf and paste as services.conf.

$ cd ~/services/conf/
$ cp example.conf services.conf

Now, we'll edit our anope services configuration file using our favorite editor.

$ nano services.conf

Now, we'll gonna make changes to uplink{} block. Here, host is kept as as our IRC server is running in our same server under localhost. As we're not using ipv6, we'll simply disable it. If we are running anope in different server, it is recommended to enable ssl by keeping value as "yes" but as we're running both irc server and anope under same server, we'll simply disable it with the value "no". As the default port of irc server is 6667, we'll keep it as same. The password option should define the password that we have assigned in the connect{} block of ircd configuration (ircd.conf) ie mypassword in our case.

host = ""
ipv6 = no
ssl = no
port = 6667
password = "mypassword"

Next, we'll set the name of our anope service and description of our Anope Services which is located under serverinfo{} block. The value of the name of it must match to the value we have assigned in connect{} block of the configuration of ircd (ircd.conf), here we have kept .

name = ""
description = "Services for Linoxide IRC Networks"
pid = "data/"
motd = "conf/services.motd"

Next, as we're running ircd-hybrid as our irc server, we'll simply assign the value of name under modue{} block as "hybrid".

name = "hybrid"

And we'll keep the networkname as "Linoxide IRC" in the networkinfo{} block.

networkname = "Linoxide IRC"

After everything is configured as our requirement and desire, we'll now save and exit the file.

9. Starting Anope Services

Finally, after we have completed confguring our anope config, we'll now start our anope services. To do so, we'll need to get inside the bin folder located inside anope installation directory. Then, we'll run our anoperc script as shown below.

$ cd ~/services/bin/
$ ./anoperc start

Starting Anope
Anope 2.0.2, build #2, compiled 12:22:26 Jul 18 2015
Using configuration file conf/services.conf
Attempting to connect to uplink #1 (, port 6667
Successfully connected to uplink #1
Successfully linked, launching into background...

This will start our Anope Services. If unexpectedly our anope services doesn't start, we can simply fix it by checking our log which is located inside logs directory. Here, in our installation, its under ~/services/logs/

Now, to check whether our anope service is working fine or not, we can simply run /msg NickServ help in our IRC client. If we saw options and flags for NickServ command, then we can verify that our Anope service is working superb. First we need to gain operator access using /oper command followed by username and password that we had created above for operator.

/oper root password

After we are logged in as operator, we'll gonna rehash our ircd-hybrid IRC server.


Rehash with Anope Services

Then, we'll finally test our anope server by running below command.

/msg nickserv help

Nickserv Help

10. Enabling SSL/TLS Encryption

In order to enable ssl encryption, we'll need to install openssl development package in our Ubuntu 15.04 machine. Then, we'll need to recompile our ircd-hybrid, generate own SSL certificates as we don't have a trusted certificate and configure the configuration of ircd-hybrid to enable ssl port ie 6697.

So, to install openssl development package, we'll need to run the following command.

$ sudo apt-get install libssl-dev

We can simply follow step 1 and 2 to recompile ircd-hybrid. Next, we'll gonna generate our own SSL certificates and keep them under ~/ircd/etc/ directory.

$ cd ~/ircd/etc/
$ openssl genrsa -out rsa.key 2048
$ chmod 600 rsa.key

Generating RSA Key

After the RSA key has been generated, we'll now generate the certificate and DH parameter file.

$ openssl req -new -days 365 -x509 -key rsa.key -out cert.pem
$ openssl dhparam -out dhparam.pem 2048

Generating SSL and DHparam

Now, we'll gonna configure our ircd.conf and enable SSL/TLS encryption method. To do so, we'll open ircd.conf with our favorite editor.

$ nano ~/ircd/etc/ircd.conf

Now, we'll uncomment the following lines which are located in serverinfo{} block.

rsa_private_key_file = "etc/rsa.key";
ssl_certificate_file = "etc/cert.pem";
ssl_dh_param_file = "etc/dhparam.pem";

Finally, we'll gonna restart our ircd-hybrid server. To restart, we'll need to run the following commands.

$ killall -9 ircd
$ ~/ircd/bin/ircd

After our server is running, we'll need to test our SSL/TLS encryption is working or not. We can now login to our irc server with SSL/TLS encryption by running the following command in our IRC client.

/server +6697

SSL Encryption IRC


IRCD-Hybrid is a great example of lightweight fast and efficient IRC server. Though IRCs are considered as old technologies for electronic communication but it is an awesome fast and secure means of communication. Anope adds some awesome functionalists and features on top of ircd-hybrid which makes our irc server properly managed. So, it is always recommended to use anope as service if you are running ircd-hybrid as irc daemon. To enable scanners to monitor our IRC server against open proxies, hopm is also a great tool which is developed by the ircd-hybrid developers. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-)


Share This :

Free Linux Ebook to Download

Comments (9)

Trackback URL | Comments RSS Feed

  1. Justin says:

    Hey! I am running Ubuntu 14.04 on one of my desktop's and I was wondering if these instructions (since they are for 15.04) can be used for 14.04. Thanks!

  2. Simon SC says:

    Thanks so much for the detail and executable steps to guide me very successful. I was implemented in my Ubuntu 14.04 without any problem and run it happily. Just a bit to polish is at the end of STEP4, the last third command should be "cd /build" instead of "cd", everything is pretty prefect!
    One short question, can irc client receive a specific text message to translate to an executable command, e.g. run an predefined .sh script (run a cron job etc)

  3. AceChat says:

    hi i am sorry i have been through this now twice i am using a ubuntu droplet from digital ocean and twice i have tried installing this following every step and checking everything i do but

    when i got to starting the server the first time
    $ cd ~/ircd/bin/
    $ ./ircd

    i have tried connecting using the server locally and the external ip and the external web address. all i get is
    Unable to connect server ip address port 6667 [Connection refused]

    • Fredric says:

      I get the same error. The problem seems to be that ircd reports itself as starting, but a ps -aux reveals that it's not running.

      I'm in the middle of troubleshooting this myself and if I find an answer I'll get back to you

  4. AceChat says:

    im getting the following error in my logs
    ERROR: No server name specified in serverinfo block.

    i have put in my server address in the name section

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.