How to install Anope IRC Services 2.0 from source on Debian / UbuntuA practical guide to compile and run
Anope 2.0 (NickServ, ChanServ, etc.) on Debian and Ubuntu. Based on the official documentation:
Anope Wiki — Installation (https://wiki.anope.org/index.php/2.0/Installation)
Anope 2.0 README (https://github.com/anope/anope/blob/2.0/README.md)
Anope is the most widely used IRC services package and works with UnrealIRCd, InspIRCd, and others.
1. PrerequisitesAnope 2 is built with
CMake. You also need a C/C++ compiler.
sudo apt-get update
sudo apt-get install build-essential cmake wget
Check CMake:
cmake --version
Optional extras (only if you need them later):
# MySQL module
sudo apt-get install default-libmysqlclient-dev
# SQLite module
sudo apt-get install libsqlite3-dev
# GnuTLS (alternative SSL)
sudo apt-get install libgnutls28-dev
2. Download the sourceGet the latest 2.0 release from GitHub:
github.com/anope/anope/releases (https://github.com/anope/anope/releases)
Example:
wget https://github.com/anope/anope/releases/download/2.0.17/anope-2.0.17-source.tar.gz
tar xzvf anope-*-source.tar.gz
cd anope-*
(Adjust the version number to whatever is current on the releases page.)
3. Optional — enable extra modulesExtra modules (MySQL, SQLite, etc.) are not built by default. From the source directory:
./extras
Follow the prompts, then continue with Config below.
Third-party modules can be placed in [tt]modules/third[/tt].
4. Configure, compile, install./Config
cd build
make
make install
[tt]./Config[/tt] asks a few questions (install path, etc.). Defaults are fine for most people — install path is usually [tt]~/services[/tt].
When finished:
cd ~/services
5. Create the configurationcd ~/services
cp conf/example.conf conf/services.conf
nano conf/services.conf
You
must configure at least:
- serverinfo — services server name (e.g. [tt]services.example.net[/tt])
- uplink — host, port, password to your IRCd
- module { name = "unreal" } (or [tt]inspircd[/tt], etc. — match your IRCd)
Example uplink block (Anope side):
uplink
{
host = "127.0.0.1"
ipv6 = no
ssl = no
port = 7000
password = "mypassword"
}
Use a strong, unique password. The port must be a
server listen / link port on your IRCd, not a normal client port.
6. Link block on UnrealIRCdOn the IRCd, add a matching link + ulines (example for UnrealIRCd 6). See also:
Linking UnrealIRCd with anope (https://www.unrealircd.org/docs/Linking_UnrealIRCd_with_anope)
link services.example.net {
incoming {
mask { ip 127.0.0.1; }
};
password "mypassword";
class servers;
};
ulines { services.example.net; };
Rehash the IRCd after saving:
./unrealircd rehash
Important: the services name in [tt]ulines[/tt] and the [tt]link[/tt] block must match [tt]serverinfo[/tt] in Anope, and the password must match the uplink password.
7. Start Anopecd ~/services
./bin/services
For support / debug logs:
./bin/services --support
Check that services appear as a linked server on your network ([tt]/LINKS[/tt], or your IRCd's server list).
8. Useful next steps- Create your services root / oper account (see Anope docs / first-time setup)
- Copy and edit other example configs if needed ([tt]modules.example.conf[/tt] → [tt]modules.conf[/tt], then update [tt]include[/tt] lines)
- Anope Wiki (https://wiki.anope.org)
- Anope modules site (https://modules.anope.org)
- Support: #anope on [tt]irc.teranova.net[/tt]
Quick reference# packages
sudo apt-get install build-essential cmake wget
# build
wget https://github.com/anope/anope/releases/download/2.0.17/anope-2.0.17-source.tar.gz
tar xzvf anope-*-source.tar.gz
cd anope-*
./Config
cd build
make
make install
# configure
cd ~/services
cp conf/example.conf conf/services.conf
nano conf/services.conf
# start
./bin/services
Sources:- wiki.anope.org — 2.0 Installation (https://wiki.anope.org/index.php/2.0/Installation)
- GitHub anope/anope (2.0 README) (https://github.com/anope/anope/blob/2.0/README.md)
- UnrealIRCd — Linking with Anope (https://www.unrealircd.org/docs/Linking_UnrealIRCd_with_anope)
- anope.org (https://www.anope.org)
Stuck on linking or config? Post your IRCd type, the uplink/link blocks (passwords redacted), and any error from [tt]./bin/services --support[/tt].