The Ultimate Guide to InspIRCd Setup InspIRCd is a modular, stable, and highly customizable Internet Relay Chat (IRC) server daemon. Written from scratch in C++, it is designed to be lightweight while offering extensive features through its modular architecture. This guide walks you through the entire process of setting up your own InspIRCd server from scratch on a Linux-based system. Prerequisites
Before beginning the installation, ensure your system meets the following requirements:
A server running a modern Linux distribution (Ubuntu 22.04 LTS or Debian 12 recommended). Root or sudo user access to the server.
A registered domain name with an A record pointing to your server’s IP address (highly recommended for SSL/TLS configuration). Essential build tools installed on your system. Step 1: System Preparation and Dependency Installation
First, update your package lists and install the necessary dependencies required to build and run InspIRCd. Open your terminal and execute the following commands:
sudo apt update && sudo apt upgrade -y sudo apt install build-essential libgit2-dev libssl-dev pkg-config git -y Use code with caution.
For security reasons, never run an IRC daemon as the root user. Create a dedicated unprivileged system user and group named ircd:
sudo adduser –system –group –disabled-login –home /home/ircd ircd Use code with caution. Step 2: Downloading and Compiling InspIRCd
Switch to your newly created ircd user to perform the download and compilation steps: sudo -u ircd -i Use code with caution.
Clone the latest stable release branch from the official InspIRCd GitHub repository. We will use the v4 branch, which is the modern standard:
git clone https://github.com –branch v4 –single-branch cd inspircd Use code with caution.
Run the interactive configuration script. This script detects your system environment and asks where you want to install the binary files. For a standard setup, you can press Enter to accept the default directory layout (usually installing to /home/ircd/inspircd-build or similar standard paths). ./configure Use code with caution.
If you wish to enable specific modules that require external libraries during this phase, such as SSL/TLS support via OpenSSL, ensure you append the appropriate flags or enable them when prompted: ./configure –enable-modules=m_ssl_openssl Use code with caution.
Once the configuration is complete, compile and install the program using make: make -j$(nproc) make install Use code with caution. Step 3: Configuring InspIRCd
After a successful installation, navigate to the configuration directory created by the installer (typically located within your installation prefix, such as ~/inspircd/conf/ or /home/ircd/inspircd-build/conf/ depending on your choices during ./configure). cd ~/inspircd/conf/ Use code with caution.
InspIRCd provides a comprehensive sample configuration file. Copy it to create your active configuration: cp inspircd.conf.example inspircd.conf Use code with caution.
Open inspircd.conf in your preferred text editor (e.g., nano inspircd.conf) and update the following essential blocks: Server Information Define your server’s unique identity within the network.
Use code with caution.
Note: The id must consist of exactly three characters. The first character must be a digit (0-9), and the remaining two can be letters or digits. Admin Information Provide contact details for the server administrator:
Use code with caution. Bind Ports
Configure the ports on which your server will listen for incoming client connections:
Use code with caution. Operator Logins (O-Lines)
Define IRC Operator credentials to manage the server remotely:
Use code with caution. Save and close the file when you are finished making edits. Step 4: Configuring SSL/TLS (Optional but Recommended)
To ensure secure, encrypted communications over port 6697, configure an SSL certificate. If you use Let’s Encrypt, you can link your existing certificates. Copy your certificate files into the InspIRCd configuration directory or point directly to them:
Use code with caution.
Ensure the ircd user has read permissions for these certificate files. Step 5: Launching and Testing the Server
You can now start your InspIRCd server using the control script provided in the installation binary directory: cd ~/inspircd/ ./inspircd start Use code with caution.
Check the log files to ensure that everything loaded successfully without any syntax or configuration errors: tail -n 50 logs/ircd.log Use code with caution.
To test the connectivity, open an IRC client (such as HexChat, AdiIRC, or WeeChat) on your local computer and connect to your server: Server Address: ://yourdomain.com Port: 6667 (Non-SSL) or 6697 (SSL)
Once connected, type /oper admin your_secure_password to verify that your Operator block works properly. Step 6: Setting up a Systemd Service
To ensure InspIRCd automatically starts when your server reboots, configure it as a system service. Exit the ircd user session back to your sudo user: exit Use code with caution. Create a new systemd service file: sudo nano /etc/systemd/system/inspircd.service Use code with caution. Paste the following configuration into the file:
[Unit] Description=InspIRCd Daemon After=network.target [Service] Type=forking User=ircd Group=ircd ExecStart=/home/ircd/inspircd/inspircd start ExecStop=/home/ircd/inspircd/inspircd stop ExecReload=/home/ircd/inspircd/inspircd reload Restart=on-failure [Install] WantedBy=multi-user.target Use code with caution.
Note: Adjust the file paths in ExecStart, ExecStop, and ExecReload if your installation directory differs.
Reload the systemd manager configuration, enable the service, and start it:
sudo systemctl daemon-reload sudo systemctl enable inspircd sudo systemctl start inspircd Use code with caution. You can check the status of your service at any time with: sudo systemctl status inspircd Use code with caution. Conclusion
Leave a Reply