Installing the UnrealIRCd server from source onto an AWS EC2 Centos 7 instance

From UnrealIRCd documentation wiki

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').

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-4.2.X.tar.gz
cd unrealircd-4.2.X

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

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

make

Finally, run make install (important!):

make install

Create 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
    syzop@vulnscan:~/unrealircd$ cp conf/examples/example.conf conf/unrealircd.conf
  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.
  6. Boot UnrealIRCd by running ./unrealircd start from your ~/unrealircd directory.
  7. Errors? Edit your unrealircd.conf, fix them (see the FAQ for common problems), and try starting UnrealIRCd again.
  8. Up and running? Connect with an IRC client to your server and have fun. See next section too.

Open port 6667 inbound

  1. Log on to the AWS console.
  2. Choose EC2, click on running instances, click on the instance, choose the description tab, and click on the instant access link. The instant-access security group appears.
  3. Click on the Inbound tab, then the Edit button, then the Add Rule button.
  4. Create two rules as in the image below, and click the Save button. The rules appear in the security group list. One rule is for IPv4 and the other is for IPv6.


  5. Logoff the AWS console, your IRC server is now ready to go.

Start the server

./unrealircd* start

Connect to the server using the kiwiirc client

  1. Navigate to kiwiirc.com
  2. Click the red Try Me :) button.
  3. Click the green Add Network... button
  4. Enter the domain of the server, e.g. irc.deckerd26354.net, then click the Connect To Network button.
  5. Enter the /join command to join a channel.
  6. chat away!