How to install UnrealIRCd 6

To install UnrealIRCd 6 on Linux, FreeBSD, OpenBSD, OS X and other *NIX systems you generally compile and install from source. In addition to that you will also need to configure UnrealIRCd. This page explains how to do all that. Even if you are completely new to UnrealIRCd then all these steps to get the IRCd up and running shouldn't take more than 30 minutes in total.

At a minimum, UnrealIRCd needs a compiler and the OpenSSL library. Even better is if you install a few other libraries, but this is not required as UnrealIRCd will fallback to its own libraries if you miss them.

  • Ubuntu 20.*/21.*/22.*: sudo apt-get install build-essential pkg-config gdb libssl-dev libpcre2-dev libargon2-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev
  • Ubuntu 18.*: sudo apt-get install build-essential pkg-config gdb libssl-dev libpcre2-dev libargon2-0-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev
  • Ubuntu 16.*: sudo apt-get install build-essential pkg-config gdb libssl-dev libpcre2-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev
  • Debian 9/10/11: sudo apt-get install build-essential pkg-config gdb libssl-dev libpcre2-dev libargon2-0-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev
  • For unlisted Linux distro's which use apt-get, the minimum requirement is: sudo apt-get install build-essential libssl-dev
  • For Linux distro's that use yum: you need a compiler and the openssl-dev/openssl-devel/libssl-dev package.
  • For FreeBSD: Your system normally already has a compiler (clang) and the openssl development library installed, but you need to install gmake to build: pkg install devel/gmake, and you are good to go.
Don't run as root

Be sure to build and run the IRCd as a regular user and not as root. If you are on a VPS / root shell then create a user 'ircd' or similar (sudo adduser ircd) and do all steps below as that user (login as user 'ircd').

Grab the source (.tar.gz)

From the shell

Connect to the *NIX server via SSH. All the following commands execute on the *NIX server.

wget https://sisrv.net/files/ircd/unrealircd-6.1.4.tar.gz

On FreeBSD you may have to use:

fetch https://sisrv.net/files/ircd/unrealircd-6.1.4.tar.gz

If neither works, for example you get an 'unknown command' then you should install the 'wget' package on your system or try uploading (see next).

Alternative: uploading to shell

You can also choose to download the .tar.gz of UnrealIRCd via your browser, save it to disk, and then upload it to the shell via SCP or SFTP.

Extract the source

Extract the .tar.gz and enter the unrealircd-x.y.z directory:

tar xzvf unrealircd-6.1.4.tar.gz
rm -rf unrealircd-6.1.4.tar.gz
cd unrealircd-6.1.4

NOTE: There's some logic here. If the file is called, say, unrealircd-6.0.1.tar.gz then it will extract to the unrealircd-6.0.1/ directory.
As you can see, the directory name is different for each release to make sure you don't accidentally overwrite your existing installation.

Compiling

First, run the ./Config script which will ask a number of questions. You can just press Enter to accept the default answers.

./Config
We will now ask you a number of questions. You can just press ENTER to accept the defaults!

If you have previously installed UnrealIRCd on this shell then you can specify a
directory here so I can import the build settings and third party modules
to make your life a little easier.
Found previous installation in: ../unrealircd-6.1.3.
You can enter a different path or type 'none' if you don't want to use it.
Just press Enter to accept the default settings.
[../unrealircd-6.1.3] -> ../unrealircd-6.1.3

In what directory do you want to install UnrealIRCd?
(Note: UnrealIRCd 6 will need to be installed somewhere.
 If this directory does not exist it will be created.)
[/home/sisrv/unrealircd] -> /home/sisrv/unrealircd

What should the default permissions for your configuration files be? (Set this to 0 to disable)
It is strongly recommended that you use 0600 to prevent unwanted reading of the file
[0600] -> 0600

If you want, you can manually enter the path to OpenSSL/LibreSSL here.
In most cases you can leave this blank and it will be detected automatically.
[] ->

UnrealIRCd requires a TLS certificate in order to work.
Do you want to generate a TLS certificate for the IRCd?
Only answer No if you already have one.
[Yes] -> Yes

UnrealIRCd comes with support for 'remote includes', this allows things like:
include "https://www.example.org/files/opers.conf";
Do you want to compile with the libcurl library to enable additional protocols?
If you answer 'No' then only https:// links will work for remote includes.
Answer 'Yes' if you need other protocols, such as plaintext http, ftp, tftp or smb.
Most people answer 'No' here because they don't use remote includes or only need https.
[Yes] -> Yes - only if you have multiple servers

Do you want me to automatically download and install curl for you?
[Yes] -> Yes

Specify the directory you installed libcurl to
[/home/sisrv/unrealircd-6.1.4/extras/curl] -> /home/sisrv/unrealircd-6.1.2.4/extras/curl

How far back do you want to keep the nickname history?
[2000] -> 2000

GeoIP is a feature that allows converting an IP address to a location (country)
Possible build options:
     classic: This is the DEFAULT geoip engine. It should work on all systems
              and receives automatic updates.
libmaxminddb: This uses the libmaxminddb library. If you want to use this, then
              you need to install the libmaxminddb library on your system first
        none: Don't build with any geoip library (geoip-csv is still built)
Choose one of: classic, libmaxminddb, none
[classic] -> classic


What is the maximum number of sockets (and file descriptors) that
UnrealIRCd may use?
It is recommended to leave this at the default setting 'auto',
which at present results in a limit of up to 16384, depending on
the system. When you boot UnrealIRCd later you will always see
the effective limit.
[auto] -> auto

Are you running UnrealIRCd as a test, debugging a problem or developing a module?
Then it is possible to run with AddressSanitizer enabled. This will make it
catch bugs such as out-of-bounds and other memory corruption issues, which can
be really helpful in some cases. The downside is that it will consume a lot
more memory and run slower too. So, only answer 'Yes' if you are OK with this.
Also, on some systems (notably FreeBSD), when you enable AddressSanitizer,
UnrealIRCd may fail to start. So when in doubt, answer 'No'.
Do you want to enable AddressSanitizer?
[No] -> No

Would you like to pass any custom parameters to configure?
Most people don't need this and can just press ENTER.
Otherwise, see `./configure --help' and write them here:
[] ->

This may take couple of minutes for UnrealIRCd to compile
At the end you should get this message:
 
TLS certificate already exists in configuration directory, no need to regenerate.

 _______________________________________________________________________
|                                                                       |
|                    UnrealIRCd Compile-Time Config                     |
|_______________________________________________________________________|
|_______________________________________________________________________|
|                                                                       |
|                        - The UnrealIRCd Team -                        |
|                                                                       |
|              Bram Matthys (Syzop) - syzop@unrealircd.org              |
|       Krzysztof Beresztant (k4be) - k4be@unrealircd.org               |
|                            Gottem - gottem@unrealircd.org             |
|                                 i - i@unrealircd.org                  |
|_______________________________________________________________________|
|_______________________________________________________________________|
|                                                                       |
| Now all you have to do is type 'make' and let it compile. When that's |
| done, you will receive other instructions on what to do next.         |
|_______________________________________________________________________|

Now, compile UnrealIRCd by running make, this may take a minute (or two):

make

Finally, run make install (important!):

make install

If you see this message below, that means your installation is successful

* UnrealIRCd is now installed.
* Leave this directory and run "cd /home/sisrv/unrealircd" now
* Directory layout:
 * Base directory: /home/sisrv/unrealircd
  * Configuration files: /home/sisrv/unrealircd/conf
  * Log files: /home/sisrv/unrealircd/logs
  * Modules: /home/sisrv/unrealircd/modules
* To start/stop UnrealIRCd run: /home/sisrv/unrealircd/unrealircd"

Again, be sure to change to the /home/sisrv/unrealircd directory!

Creating a configuration file

  1. Change to the installed UnrealIRCd directory, this is /home/yourusername/unrealircd by default (For more information on the directory structure see UnrealIRCd files and directories).
    cd ~/unrealircd
  2. Copy conf/example/example.conf to your conf/ directory and rename it to unrealircd.conf
    sisrv@sisrv.net:~/unrealircd$ cp conf/examples/example.conf conf/unrealircd.conf

Some extra commands

run these commands in /home/user/unrealircd/ directory

./unrealircd configtest    Test the configuration file
./unrealircd start         Start the IRC Server
./unrealircd stop          Stop (kill) the IRC Server
./unrealircd rehash        Reload the configuration file
./unrealircd reloadtls     Reload the SSL/TLS certificates
./unrealircd restart       Restart the IRC Server (stop+start)
./unrealircd upgrade       Upgrade UnrealIRCd to the latest version
./unrealircd upgrade-conf  Upgrade the configuration file from UnrealIRCd
                           3.2.x/4.x to 5.x format
./unrealircd mkpasswd      Hash a password
./unrealircd version       Display the UnrealIRCd version
./unrealircd module        Install and uninstall 3rd party modules
./unrealircd croncheck     For use in crontab: this checks if the server
                           is running. If not, the server is started.
./unrealircd genlinkblock  Generate link { } block for the other side.
./unrealircd gencloak      Display 3 random cloak keys
./unrealircd spkifp        Display SPKI Fingerprint

Remember to add ./ before your command, like ./unrealircd start or ./unrealircd restart

and you should be able to see the following output

Validating configuration...
Configuration test OK.
Stopping UnrealIRCd..
Starting UnrealIRCd
 _   _                      _ ___________  _____     _
| | | |                    | |_   _| ___ \/  __ \   | |
| | | |_ __  _ __ ___  __ _| | | | | |_/ /| /  \/ __| |
| | | | '_ \| '__/ _ \/ _` | | | | |    / | |    / _` |
| |_| | | | | | |  __/ (_| | |_| |_| |\ \ | \__/\ (_| |
 \___/|_| |_|_|  \___|\__,_|_|\___/\_| \_| \____/\__,_|
                           v6.1.4

UnrealIRCd is brought to you by Bram Matthys (Syzop),
Krzysztof Beresztant (k4be), Gottem and i

This server can handle 16384 concurrent sockets (16376 clients + 8 reserve)

[info] Loading IRCd configuration..
[info] Testing IRCd configuration..
[info] Configuration loaded
[info] Configuration test passed OK
[info] UnrealIRCd is now listening on the following addresses/ports:
[info] IPv4: *:6900(TLS), *:6697(TLS), *:6667
[info] IPv6: *:6900(TLS), *:6697(TLS), *:6667
[info] UnrealIRCd started.

 Upgrading

Upgrading from UnrealIRCd 5.x.x to 6.y.y is very simple. You can upgrade from any version to any newer version.

Linux/BSD/OS X

  1. Backup your existing /home/USER/unrealircd directory:
    cp -Rav /home/USER/unrealircd /home/USER/unrealircd.bak
  2. Download and install latest version of UnrealIRCd. See Installing from source and stop before Creating a configuration file.
  3. Double check: make sure you ran make install as this will install all new files in /home/USER/unrealircd.
  4. Restart the IRCd to make the changes effective:
    cd /home/USER/unrealircd
    ./unrealircd restart

Get the latest source code

Most people should use the downloads from www.unrealircd.org. Those are releases that have actually been tested by several people.

There also exists something else, which is the very latest source code from our git repository. This contains code changes committed only minutes or days ago and is considered bleeding edge. Possibly nobody has tested this code, or just one person. It may not even compile. People run this code to help UnrealIRCd development, to find bugs, or to get fixes for issues that have not been addressed in a release.

The 'real way' to get the latest bleeding edge source...

This describes how to 'checkout' the repository on your machine, which allows you to easily pull in updates (which happen every day/week). First, run:

git clone https://github.com/unrealircd/unrealircd.git unrealircd-src

This will create a directory unrealircd-src with all the source code (UnrealIRCd 6 bleeding edge).

cd unrealircd-src
./Config
make
make install

Now go unrealircd directory and run:

./unrealircd configtest

If you see no errors, that means your config file is correct and you may restart your server

If there is a new release and you want to pull in the latest changes then run the following in your unrealircd-src directory: git pull

Did this tutorial help? How about buy me a cup of coffee?

  • install UnrealIRCd 6, compile UnrealIRCd 6, UnrealIRCd 6, configure UnrealIRCd 6
  • 288 Users Found This Useful
Was this answer helpful?

Related Articles

Upgrading from UnrealIRCd 4 to UnrealIRCd 5

Upgrading from UnrealIRCd 4.x to UnrealIRCd 5.x is really easy, there are almost no configuration...

How to install UnrealIRCd modules

UnrealIRCd has a module manager which allows you to install, update and uninstall 3rd party...

UnrealIRCd FAQ

Is UnrealIRCd suitable for me? UnrealIRCd is a highly advanced and customizable IRC daemon. It...

How to install UnrealIRCd 5

To install UnrealIRCd on Linux, FreeBSD, OpenBSD, OS X and other *NIX systems you generally...

How to link Unrealircd servers

This page explains how to link two (or more) UnrealIRCd servers securely so you have a...

Powered by WHMCompleteSolution