top of page

Install unrealircd on a shell

13/11/2017

Date: 10/11/2017
Install unrealircd on a shell.

introduction
------------

This guide was build by Lion-O and is based on pesonal experience and other guides.
guides:
    1. digitalocean.com - https://www.digitalocean.com/community/tutorials/how-to-run-an-unrealircd-chat-server-on-debian-7
    2. unrealircd.org - https://www.unrealircd.org/docs/Installing_from_source


Why should i read your guide if i have the other guides?
--------------------------------------------------------

The other guides might be outdated, missing some info and also sometimes not very easy to understand.
So this guide will try to be
    a - complete
    b - short
    c - updated as possible
    d - easy to understand


Environment
-----------

OS: ubuntu (on other OS's you might be missing some steps but you are more than welcome to try)
User: create a new user:
    # su
    # adduser ircd
    enter a new password for this user (twice), other info (you can skip all this by entering enter untill end of process )
    
    Group: add the user to the sudo group:
        # adduser ircd sudo
    Switch to new user and go to his home directory:
    # su ircd
    # cd ~

Update:
    # sudo apt-get update

Packages:
    you will need these packages:
        1. make
        2. gcc
        3. build-essential
        4. openssl
        5. libcurl4-openssl-dev
        6. zlib1g
        7. zlib1g-dev
        8. zlibc
        9. libgcrypt20
        10. libgcrypt11-dev
    and    11. libssl-dev

    I suggest you install them one by one and not all of them by one command.
    # sudo apt-get install gcc
    (repeat for every package)
    for the libgcrypt20 it might not find it with the number 20 in the end so try 21 or do a google search like i have done.
    just copy-past to google the error you get after the install attempt.

Unreal installation
-------------------

Download:
    from your desktop PC, go to unrealircd website: https://www.unrealircd.org/download
    search a link you can use to use in the shell so you can download the source files.
    should look something like this: https://www.unrealircd.org/unrealircd4/unrealircd-4.0.15.tar.gz
    once you find it - right click and choose to copy link.
    go to the shell (assuming you're still in your home directory) and type:
    # wget <paste here the link>
    and ofcourse enter. it should download the tar.gz file which contains the source files.
    from the page you downloaded the file, it might be a good idea to follow their instructions on
    how to verify the authenticity of the file. but its not a must.

Unpacking:
    Replace the name of the tar.gz with the name of your tar.gz file.
    Should be only a different version number.
    # tar xzvf unrealircd-4.0.15.tar.gz

Config build and install :
    From this point you have the option to follow the specific unrealircd version's instructions on how to
    build and config your unrealircd server.
    go to the unrealircd folder:
    # cd unrealircd-4.0.15    (again, replace Version number with your unrealircd version number)
    you will see a file named README.md
    # less README.md
    If you do choose to follow its instructions, open a second terminal window and ssh to you shell so
    it will be easy to both read the instructions and execute them.
    If you choose to continue and follow my guide, at least skim through the README.md document for something
    important you might don't want to miss.

    Configure: this will configure the ircd
        # ./Config

    the Config settup will ask you a few questions.
    on most of them you just press enter.
    only on one question i didn't:
    "
    In what directory do you want to install UnrealIRCd?
    (Note: UnrealIRCd 4 will need to be installed somewhere.
     If this directory does not exist it will be created.)
    [/home/ircd/unrealircd] -> /home/ircd/UnrealIRCd-V4.0.15  # (again, replace Version number with your unrealircd version number)
    "
    as you can see i requested it to install the ircd on the folder: "UnrealIRCd-V4.0.15"
    on my home directory.
    
    after a few more enter presses it will ask:
    "
    Do you want to generate an SSL certificate for the IRCd?
    Only answer No if you already have one.
    [Yes] ->
    "
    If you want ssl on your server - just press enter (recommended) and complete the information requested.
    If not - type No and enter.

    Make: this will build the ircd
    # make

    Install: this will install the ircd
    # make install

Creading and editing the conf file:
    change directory to your ircd folder:
    # cd /home/ircd/UnrealIRCd-V4.0.15/conf/examples    # (again, replace Version number with your unrealircd version number)
    You should see a file like: example.conf
    If you don't, use the command:
    # find /home/ircd/UnrealIRCd-V4.0.15/ -name "example.conf" # (again, replace Version number with your unrealircd version number)
    to find the conf file.
    Make a copy:
    # cp example.conf ../../conf/unrealircd.conf
    Edit the file:
    # vi ../../conf/unrealircd.conf
    Now, it is very very recommended to follow the instructions in the file.
    If you don't, you might be stuck with some none-must-configuration-make-you-look-noob-like defaults.
    But i can tell you what is the Must-to-change for a quick configuration so you can see this is alive.
    Change the other defaults right after that.
    Once entered to vi editor...
    The must:
        1. scroll down to the admin block, and change from "Bob Smith" to some other name. (use insert key to switch to edit mode)
        2. scroll down to the first oper block, and change from "bobsmith" to some other name.
        3. in the same block change the password too.
        4. scroll down to set block and change in the cloak keys. follow the commented instructions.
        5. scroll farther down to the second set block and change the email address in "kline-address"
           from set.this.to.email.address , to your email address.
    Save:
        to save press escape, ":wq"
    

Start you IRC server!
    ./unrealircd start

Expected results:
    You should see something like:

    Starting UnrealIRCd
     _   _                      _ ___________  _____     _
    | | | |                    | |_   _| ___ \/  __ \   | |
    | | | |_ __  _ __ ___  __ _| | | | | |_/ /| /  \/ __| |
    | | | | '_ \| '__/ _ \/ _` | | | | |    / | |    / _` |
    | |_| | | | | | |  __/ (_| | |_| |_| |\ \ | \__/\ (_| |
     \___/|_| |_|_|  \___|\__,_|_|\___/\_| \_| \____/\__,_|
                           v4.0.15

      using PCRE2 10.22 2016-07-29
      using TRE 0.8.0 (BSD)
      using OpenSSL 1.0.2g  1 Mar 2016

    Loading IRCd configuration..
    Configuration loaded without any problems.
    Initializing SSL..
    Dynamic configuration initialized.. booting IRCd.
    UnrealIRCd is now listening on the following addresses/ports:
    IPv4: *:6900(SSL), *:6697(SSL), *:6667
    IPv6: *:6900(SSL), *:6697(SSL), *:6667
    UnrealIRCd started.
    
If it doesn't start, and no error is seen, you can try to look at the logs:
# less logs/ircd.log

Open port:
    you need to open a port so your users will be able to connect.
    if you have ufw on your shell you can do:
    # sudo ufw allow 6667/tcp

I hope this guide was helpful for you and any questions will be welcomed.

 

bottom of page