Tip of the day: If you still have users on plaintext port 6667, consider enabling Strict Transport Security to gently move users to SSL/TLS on port 6697.

Installing from source

From UnrealIRCd documentation wiki
Jump to navigation Jump to search
This page contains changes which are not marked for translation.
Other languages:

To install UnrealIRCd 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.

NOTE: If you are upgrading an existing installation from UnrealIRCd 5.x or 6.x, then read Upgrading instead.

Prerequisites

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.

If, for some reason, you are curious what libraries UnrealIRCd uses or can use, then see Libraries used by UnrealIRCd.

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 'unrealircd' or similar (sudo adduser unrealircd) and do all steps below as that user (login as user 'unrealircd' or su - unrealircd). If you need more information, see Do not run as root.

Upgrading?

If you are upgrading an existing UnrealIRCd installation, then we recommend using ./unrealircd upgrade which will do all the work for you. See also Upgrading.

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 --trust-server-names https://www.unrealircd.org/downloads/unrealircd-latest.tar.gz

On FreeBSD you may have to use:

fetch https://www.unrealircd.org/downloads/unrealircd-latest.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.X.tar.gz
cd unrealircd-6.1.X

Replace the 6.1.X with the actual version number!

NOTE: There's some logic here. If the file is called, say, unrealircd-6.1.0.tar.gz then it will extract to the unrealircd-6.1.0/ directory. The he 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

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

make

Finally, run make install (important!):

make install

Creating a configuration file

UnrealIRCd needs a configuration file. Don't worry, you don't have to create this file from scratch. We ship with an example configuration file that you have to walk through and tweak at a few places:

  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
    cp conf/examples/example.conf conf/unrealircd.conf
    TIP: Is your native language not English? Then check the conf/examples directory. We ship with several example configuration files in different languages. If you want to use one of those, simply copy that one instead.
  3. Open the file with an editor (eg: nano conf/unrealircd.conf)
  4. Read the Configuration file syntax article. It will only take a few minutes and will save you a lot of trouble in next step(s)!
  5. Walk through the unrealircd.conf block by block / line by line and edit the settings to suit your needs. This takes 10 - 20 minutes.
    DO NOT RUSH THIS because you NEED to change some values, otherwise the server will refuse to start!
  6. Boot UnrealIRCd by running ./unrealircd start from your ~/unrealircd directory.
  7. Errors while trying to start UnrealIRCd?
    • Did you really go through the config file from top to bottom? You need to, because some values MUST be changed.
    • Read the error on your screen and edit your unrealircd.conf to fix the error, then try starting UnrealIRCd again.
    • See the FAQ for common configuration mistakes!
  8. Up and running? Connect with an IRC client to your server and have fun. See next section too.

Further reading

  • If the server is running and you change any configuration files (or MOTD) then be sure to REHASH to make the changes take effect.
  • See the FAQ if you have any problems. A lot of common problems are answered there.
  • Read the IRCOp guide to learn more about how to do server administrative tasks.
  • Add a Cron job to make sure UnrealIRCd (re)starts after system startup or a crash
  • Get a real SSL/TLS certificate, such as from Let's Encrypt
  • Consider installing Services like anope - see Linking UnrealIRCd with anope
  • See Features for various available features on UnrealIRCd and Configuration for all possible things you can configure on UnrealIRCd.