Charybdis – complete IRC daemon

In the previous part, we set up our IRC daemon, Charybdis. Now is the time to spice things up a bit, and help our IRC server offer interesting features by putting Atheme on the rails. Let’s go!

I – Picking an Atheme release

Atheme is available at GitHub. You can clone the repository to get the latest development source code.

For environments that need to rely on absolutely stable software, you may download the most recent release tarball for Atheme. Unlike Charybdis, new releases for Atheme are pushed out every few months, and they bring a further guarantee of stability.

Stable and long-term support versions of Atheme can be obtained on the Atheme download page.

II – Installing and configuring Atheme

1 – Downloading Atheme

You can either clone Atheme’s GitHub repository or download a release tarball from Atheme’s project page. Respectively,

and, using the v7.0.7 release tarball as an example:

 2 – Installing Atheme

Atheme offers a few build configuration options, such as enabling support for large networks (over 2000 users) and adding user-contributed modules. I wish I had such a large userbase, but until then, a normal build with Perl & PCRE support, and extra modules, should do it.

If you had specified another installation directory for Charybdis, it would be wise to install Atheme to the same location (e.g. /usr/local/) using the --prefix parameter. As the ircd user:

{% highlight bash %}$ cd ~/atheme* $ git submodule update –init # (ONLY if you’ve downloaded Atheme from GitHub) $ ./configure –enable-contrib –with-pcre –with-perl{% endhighlight %}

Check out the configuration summary, then compile Atheme and install it. That too could take some time.

 

Perfect! Atheme is now installed. Let’s configure it.

III – Configuring Atheme

Atheme includes a plethora of services (NickServ, ChanServ, HostServ, BotServ, RPGServ, etc) and modules, and you can easily get a headache without receiving some kind of explanation.

The example configuration file, located at /home/ircd/atheme/etc/atheme.conf.example, is well-detailed, but it still leaves room for confusion over some points. Begin by moving it to atheme.conf:

The options are gathered in different sections, so that should make things easier.

1. Modules

Starting out with the modules section, we’ll enable most Atheme services – though, you should feel free to remove some if you feel you won’t need them (e.g. RPGServ). The following configuration should give you the basic features of every module, and some more advanced ones. Edit it to fit your needs, and refer to the comments for more information:
Configuration file: modules.txt

2. Services runtime configuration

a. serverinfo{}

This section contains important blocks, so we’ll detail each block below. Do NOT copy and paste this without modifying the settings, or Atheme won’t correctly work!
Configuration file: serverinfo-block.txt

b. uplink{}

Next on, the uplink{} block. This is probably the most important part of the Atheme configuration file; make sure you don’t miss anything. As a reminder, we’re using port 6665 for Atheme to connect (link) to the server.

Atheme cannot link over SSL. Don’t use the SSL port to link Atheme to your server. If you want to link Atheme over SSL, connect it to a local IRC daemon which connects to the network over SSL.
Configuration file: uplink-block.txt

c. Services configuration

The following settings will add some information to the services. You shouldn’t have to change anything but the host parameter for every service, as well as the HTTP & LDAP blocks (whether you’d like to use them or not).

I would rather be against modifying the nicks for those services, as your users won’t be able to clearly identify them. If you decide to, change the alias{} blocks in /home/ircd/etc/ircd.conf.
Configuration file: services-config.txt

3. Logging

The logging section provides different levels of logging, and can either save logs to file or display them in a channel on your network. I recommend going against the latter option, as it is rather unsafe, even with restricted access.

You can use the following settings, which will log relevant information to actual files.
Configuration file: logging-section.txt

4. General parameters configuration

Some general parameters must be set; those include flood protection, default K-line durations, K-line exemption, etc. Change them at will.
Configuration file: general-config.txt

5. Operator and privileges configuration section

This section defines operator classes (ircop, sra by default) and operators themselves. This grants them the right to use Atheme’s operator powers, not the Charybdis’ ones – those are two distinct things.

You should use an additional password to login with OperServ. By default, if you just /oper, you’ll also be able to login with OperServ, but adding another layer of security is never bad.

If you plan on using a second password, launch Charybdis and Atheme, and send a message to NickServ. Do not use the same password as for the IRCd operator!

 

Stop Charybdis and Atheme, then copy the resulting hash to the password parameter in the operator{} block.

6. Include configuration

We won’t need this section; leave it commented out.

7. Crontab entry

Adding a crontab entry will allow cron to execute a script at regular intervals of time. Atheme provides a cron script to check whether Atheme services are still running; if they are not, they will be (re)started. We’ll use it to ensure that services will reconnect to the server, if anything goes wrong.

Add the following line after the commented part:

This will run a periodic check every 5 minutes. Change the value by modifying */5, but it needs to be inferior to 60 minutes (that is 1 hour).

There we have it – Atheme is configured. Let’s start our server up!

IV – Running the IRC server

1 – Running Charybdis

To run the daemon, invoke the dedicated script as the ircd user:

Charybdis is now up and running. Great!

2 – Running Atheme

Atheme is started as simply as Charybdis is:

Both Charybdis and Atheme should now be running.

V – Finalizing the setup

One of the first things you should do is to register the admin(s)’s nickname with NickServ. Then try to /oper up, and to login with OperServ:

/msg OperServ IDENTIFY mysecondpassword

If everything’s working out well, you should now be logged in as both the IRC server and the services’ operator. Try to register a channel with ChanServ.

VI – Troubleshooting the setup

You will probably encounter runtime problems after setting up your IRC server. To track them down, check the logs within Charybdis’ and Atheme’s respective directories. Attempt to figure out your errors and correct them from there.

The most common errors include linking Atheme over SSL, not using an open port to link Atheme and missing a required module.

If you need further help, comment below, or join Atheme’s IRC channel at #atheme on irc.bnc.im.

In the meanwhile, enjoy chatting on your new IRC server. If you’re planning to have a large userbase, advertise your IRC network through social networks and websites dedicated to IRC.

1 comment for “Charybdis – complete IRC daemon

  1. -
    May 10, 2014 at 21:55

    Best IRCd in my opinion!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.