A secure, single-file installer and browser-based administration control panel for deploying and managing an ngIRCd IRC server with Anope IRC Services on Debian and Ubuntu systems.
xsukax IRC Server Admin CP is an all-in-one deployment and administration utility for building and managing a self-hosted IRC server on Debian-based Linux systems.
The project combines:
- ngIRCd as the IRC daemon
- Anope for IRC network services
- Flask for the browser-based administration interface
- Gunicorn as the WebUI application server
- SQLite for local administrator authentication and auditing
- systemd for service management
- OpenSSL for IRC TLS certificate generation
- A restricted privileged helper for safely performing administrative operations from the WebUI
The installer automatically configures the IRC daemon, links Anope to ngIRCd, creates system services, generates IRC TLS credentials, installs the administration panel, creates the required filesystem permissions, and verifies that the installation is working.
The project is designed as a single-file deployment utility, making it easy to download, inspect, configure, run, fork, and modify.
Repository:
https://github.com/xsukax/xsukax-IRC-Server-Admin-CP
- Automatic installation and configuration of ngIRCd
- Plain IRC listener support
- TLS-encrypted IRC listener
- Configurable IRC hostname
- Configurable network name
- Configurable server information
- Configurable administrator email
- Configurable listen addresses and ports
- MOTD management
- Native ngIRCd configuration access
- Built-in configuration validation using
ngircd --configtest - IRC service start, stop, restart, enable, disable, and rehash operations
- Listener and service status inspection
- Automatic configuration backups
Integrated Anope IRC Services provide:
- NickServ
- ChanServ
- MemoServ
- OperServ
- BotServ
- HostServ
The installer automatically configures Anope to communicate with the local ngIRCd server.
Administrative options include:
- Start / stop / restart Anope
- Enable / disable Anope at boot
- View Anope status
- View Anope logs
- Configure NickServ registration policy
- Configure nickname expiration
- Configure email requirements
- Configure ChanServ expiration
- Configure maximum registered channels
- Edit supported Anope configuration files
- Back up Anope configuration and database data
Several account-registration policies are supported:
none
mail
admin
disable
Where:
none— registrations are immediately acceptedmail— email confirmation is requiredadmin— registration requires Services operator approvaldisable— new nickname registrations are disabled
The WebUI provides dedicated pages for:
- Overview
- IRC Services
- Quick Settings
- Advanced Configuration
- MOTD
- Backups
- Logs
- Configuration Reference
- Security
The panel can be used to administer the server without manually editing every configuration file from the terminal.
The WebUI includes:
- One-time bootstrap token for initial setup
- Single local administrator account
- Minimum 12-character administrator passwords
- PBKDF2-SHA256 password hashing
- 600,000 PBKDF2 iterations
- Random password salts
- SQLite credential storage
- CSRF protection
- Login rate limiting
- Setup-token rate limiting
- Secure session cookies
- HttpOnly cookies
- SameSite=Lax cookies
- 45-minute session lifetime
- Administrative activity auditing
The one-time bootstrap token is deleted after the first administrator account is successfully created.
The WebUI does not run as root.
Instead, the installer creates an unprivileged system account:
xsukaxcp
A separate restricted root helper broker performs the small set of operations that genuinely require elevated privileges.
Communication between the WebUI and privileged helper takes place through a Unix domain socket:
/run/xsukax-irc-admin-helper.sock
The broker:
- Uses an explicit allow-list of supported operations
- Rejects unsupported commands
- Validates command arguments
- Checks Linux peer credentials
- Accepts requests only from the expected WebUI account
- Restricts temporary file locations
- Limits request and output sizes
- Applies timeouts to privileged commands
The generated WebUI and privileged helper services use systemd hardening options including:
NoNewPrivileges=true
PrivateTmp=true
ProtectHome=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictNamespaces=true
LockPersonality=true
The WebUI automatically creates backups before modifying important server configuration.
Backups are stored under:
/var/backups/xsukax-irc-admin
Supported operations include:
- Automatic backup before configuration changes
- Manual backups
- Configuration restore
- MOTD backup
- Anope configuration backup
- Anope database backup
- Validation before restored configurations become active
The installer also records the system state that existed before installation so that a pre-existing ngIRCd or Anope installation can be restored when possible during uninstall.
The installer automatically creates a dedicated self-signed TLS certificate for the IRC listener.
Default TLS port:
6697
The certificate uses:
- RSA 3072-bit key
- SHA-256
- Subject Alternative Name matching the configured IRC hostname
- Server Authentication Extended Key Usage
- Configurable certificate lifetime
Important: A self-signed certificate encrypts the connection, but it is not automatically trusted by IRC clients. Users must explicitly trust the certificate or the administrator should replace it with a certificate issued by a trusted Certificate Authority.
The installer is designed for apt-based Debian-family distributions, particularly:
- Debian
- Ubuntu
- Debian-derived distributions with
apt - Ubuntu-derived distributions with
apt
The machine must also use systemd.
Installation requires root privileges.
Either log in as root:
sudo -i
or execute the installer using sudo:
sudo bash xsukax-irc-server-admin-cp.sh install
The default ports are:
| Service | Default Port | Protocol |
|---|---|---|
| Web Administration Origin | 7674 |
HTTP |
| IRC | 6667 |
TCP |
| IRC TLS | 6697 |
TLS/TCP |
The ports can be changed before installation.
For a public IRC server, create a DNS record such as:
irc.example.com
pointing to your server's public IP address.
Then configure:
IRC_SERVER_NAME="irc.example.com"If using Cloudflare DNS for the IRC hostname, the IRC record should normally remain DNS only, rather than being proxied through the standard Cloudflare HTTP proxy.
The installer automatically installs its required server packages:
ngircd
anope
python3
python3-flask
gunicorn
sqlite3
openssl
curl
iproute2
If cloning the repository using Git, you will also need:
sudo apt install git
git clone https://github.com/xsukax/xsukax-IRC-Server-Admin-CP.git
Enter the repository:
cd xsukax-IRC-Server-Admin-CPAlways inspect administrative scripts before running them as root:
less xsukax-irc-server-admin-cp.sh
Open the script:
nano xsukax-irc-server-admin-cp.sh
Locate:
# USER CONFIGURATION — EDIT THESE VALUES BEFORE INSTALLATIONAt minimum, replace the example IRC hostname and administrator email.
For example:
IRC_SERVER_NAME="irc.example.com" IRC_NETWORK_NAME="MyIRC" IRC_SERVER_INFO="My IRC Server" IRC_ADMIN_EMAIL="[email protected]"
For an Internet-accessible WebUI using a reverse proxy or Cloudflare Tunnel on the same server, consider binding the administration origin only to localhost:
WEBUI_LISTEN_IP="127.0.0.1"sudo bash xsukax-irc-server-admin-cp.sh install
Alternatively, running the script without an argument opens its interactive menu:
sudo bash xsukax-irc-server-admin-cp.sh
The menu provides:
1) Install
2) Uninstall
3) Status
4) Exit
After a successful installation, the installer displays a value similar to:
FIRST-RUN SETUP TOKEN: <random-token>
This token is required to create the initial administrator account.
Treat this token as a secret.
The token is automatically removed after the administrator account is created successfully.
The WebUI intentionally uses HTTP between the proxy/tunnel and the local application.
Do not expose the WebUI's HTTP origin directly to the public Internet.
Recommended architecture:
Browser
│
│ HTTPS
▼
Cloudflare Tunnel / HTTPS Reverse Proxy
│
│ HTTP on trusted/local origin
▼
xsukax WebUI :7674
A Cloudflare Tunnel running on the same server can use:
http://127.0.0.1:7674
A reverse proxy such as Nginx, Caddy, Apache, HAProxy, or another trusted HTTPS gateway may also be used.
The WebUI uses Secure session cookies, so browser administration is intended to take place through an HTTPS frontend.
Open the HTTPS hostname configured for the administration interface.
The first visit redirects to the setup page.
Enter:
- The one-time setup token
- Administrator username
- Administrator password
- Password confirmation
Administrator passwords must contain at least 12 characters.
After successful creation, the bootstrap token is removed.
Most initial configuration options are grouped near the beginning of:
xsukax-irc-server-admin-cp.sh
WEBUI_LISTEN_IP="0.0.0.0"For a reverse proxy or Cloudflare Tunnel running on the same machine, a more restrictive configuration is recommended:
WEBUI_LISTEN_IP="127.0.0.1"IRC_LISTEN_IP="0.0.0.0"This allows ngIRCd to listen on all IPv4 interfaces.
IRC_SERVER_NAME="irc.example.net"Change this before installation.
Example:
IRC_SERVER_NAME="irc.example.com"The value must be a valid fully qualified hostname.
IRC_NETWORK_NAME="xsukax"Example:
IRC_NETWORK_NAME="MyNetwork"IRC_SERVER_INFO="xsukax IRC Server"IRC_ADMIN_EMAIL="[email protected]"By default, the Services hostname is automatically derived from the IRC hostname:
SERVICES_SERVER_NAME="services.${IRC_SERVER_NAME#*.}"For example:
irc.example.com
becomes:
services.example.com
It may also be overridden manually.
NICKSERV_REGISTRATION_MODE="none" NICKSERV_FORCE_EMAIL="yes" NICKSERV_EXPIRE="21d"
Supported registration modes:
none
mail
admin
disable
If you enable:
NICKSERV_REGISTRATION_MODE="mail"you must configure a working mail transport mechanism for Anope to send confirmation messages.
CHANSERV_EXPIRE="14d" CHANSERV_MAX_REGISTERED="20"
Default ports:
WEBUI_PORT="7674" IRC_PORT="6667" IRC_TLS_PORT="6697"
All three ports must be different.
SELF_SIGNED_CERT_DAYS="825"This controls the lifetime of the automatically generated self-signed IRC certificate.
Run:
sudo bash xsukax-irc-server-admin-cp.sh status
This displays:
- Configured addresses
- WebUI port
- IRC port
- IRC TLS port
- IRC server hostname
- WebUI service status
- Privileged helper status
- ngIRCd status
- Anope status
- Listening TCP sockets
- TLS certificate subject
- TLS certificate issuer
- Certificate validity dates
- SHA-256 certificate fingerprint
Default:
irc.example.com:6667
Plain IRC is not encrypted.
Recommended:
irc.example.com:6697
Example for mIRC:
/server irc.example.com +6697
Because the automatically generated certificate is self-signed, the client may display a certificate trust warning.
Verify the certificate fingerprint with the server administrator before permanently trusting a self-signed certificate.
After connecting to the IRC server:
/msg NickServ REGISTER StrongPassword [email protected]
Replace:
StrongPassword
with a strong password and:
with the user's email address.
To identify after reconnecting:
/msg NickServ IDENTIFY StrongPassword
For additional NickServ commands:
/msg NickServ HELP
For channel registration help:
/msg ChanServ HELP
After signing in, the control panel provides the following areas.
Displays:
- ngIRCd service state
- Server information
- Listening ports
- Recent administrator actions
- Administrative service controls
Manage Anope and its services, including:
- NickServ
- ChanServ
- MemoServ
- OperServ
- BotServ
- HostServ
Modify commonly used IRC configuration values without editing the entire configuration manually.
Provides access to:
/etc/ngircd/ngircd.conf
Changes are validated before replacing the currently active configuration.
A backup is automatically created before applying a valid change.
Warning: The advanced configuration can contain server passwords, IRC operator credentials, link secrets, TLS settings, and other sensitive values. Do not share its contents publicly without reviewing and redacting secrets.
Modify:
/etc/ngircd/ngircd.motd
The server is reloaded after the change.
Create and restore server configuration backups.
Inspect relevant systemd journal output for troubleshooting.
Provides administrative reference information for working with the IRC configuration.
View administrator information and change the WebUI administrator password.
sudo bash xsukax-irc-server-admin-cp.sh install
sudo bash xsukax-irc-server-admin-cp.sh status
sudo bash xsukax-irc-server-admin-cp.sh uninstall
The alias:
sudo bash xsukax-irc-server-admin-cp.sh remove
is also accepted.
bash xsukax-irc-server-admin-cp.sh --help
To remove the control panel and components introduced by the installer:
sudo bash xsukax-irc-server-admin-cp.sh uninstall
The installer records whether ngIRCd and Anope existed before xsukax IRC Server Admin CP was installed.
Where possible, uninstall restores:
- Previous ngIRCd configuration
- Previous ngIRCd MOTD
- Previous ngIRCd enabled/disabled state
- Previous ngIRCd running/stopped state
- Previous Anope configuration
- Previous Anope enabled/disabled state
- Previous Anope running/stopped state
Packages that existed before installation are retained.
The project intentionally uses a single primary source file:
xsukax-IRC-Server-Admin-CP/
├── xsukax-irc-server-admin-cp.sh
├── README.md
└── LICENSE
The shell script generates and manages the runtime components during installation.
/opt/xsukax-irc-admin/
└── app.py
The generated Flask administration application is installed under:
/opt/xsukax-irc-admin
/var/lib/xsukax-irc-admin/
├── admin.db
└── tmp/
This contains the local administrator database and restricted temporary files.
/etc/xsukax-irc-admin/
├── session.secret
├── bootstrap.token
└── anope-link.secret
The bootstrap token exists only until the first administrator account is created.
/etc/ngircd/
├── ngircd.conf
├── ngircd.motd
├── xsukax-irc.crt
└── xsukax-irc.key
Configuration:
/etc/anope/
Database:
/var/lib/anope/db/
Logs:
/var/log/anope/
/var/backups/xsukax-irc-admin/
/usr/local/sbin/xsukax-irc-admin-helper
Broker:
/usr/local/libexec/xsukax-irc-admin-helper-broker
Unix socket:
/run/xsukax-irc-admin-helper.sock
/etc/systemd/system/xsukax-irc-admin.service
/etc/systemd/system/xsukax-irc-admin-helper.service
The project also manages the distribution-provided services:
ngircd.service
anope.service
The project currently relies primarily on installation-time validation and manual integration testing rather than a separate automated test suite.
During installation, the script verifies that:
- The generated ngIRCd configuration passes:
ngircd --configtest
-
ngircd.serviceis running. -
anope.serviceis running. -
A temporary IRC client can connect to the server.
-
NickServis visible on the IRC network. -
The privileged helper broker is running.
-
The WebUI account can access the helper Unix socket.
-
The WebUI account has the required filesystem permissions.
-
The administration service is running.
-
The WebUI HTTP origin responds locally.
An installation fails rather than silently completing if critical verification checks fail.
Run:
sudo bash xsukax-irc-server-admin-cp.sh status
sudo systemctl status ngircd sudo systemctl status anope sudo systemctl status xsukax-irc-admin sudo systemctl status xsukax-irc-admin-helper
sudo ngircd --config /etc/ngircd/ngircd.conf --configtest
sudo ss -lntp
Look for the configured ports, normally:
6667
6697
7674
openssl s_client \
-connect irc.example.com:6697 \
-servername irc.example.com </dev/nullBecause the default certificate is self-signed, certificate-chain verification will normally report that the issuer is not publicly trusted. This is expected unless the certificate has been replaced.
ngIRCd:
sudo journalctl -u ngircd.service -n 100 --no-pager
Anope:
sudo journalctl -u anope.service -n 100 --no-pager
WebUI:
sudo journalctl -u xsukax-irc-admin.service -n 100 --no-pager
Privileged helper:
sudo journalctl -u xsukax-irc-admin-helper.service -n 100 --no-pager
Contributors are encouraged to install and use ShellCheck:
sudo apt install shellcheck
Then run:
shellcheck xsukax-irc-server-admin-cp.sh
Testing changes in a clean disposable Debian or Ubuntu virtual machine is strongly recommended before submitting a pull request.
The installer does not replace the need for an appropriate host or provider firewall policy.
For a public IRC server, expose only the ports you actually require.
For example, if using UFW:
sudo ufw allow 6697/tcp
If plaintext IRC is intentionally required:
sudo ufw allow 6667/tcp
Avoid exposing:
7674/tcp
directly to the Internet when the WebUI is behind a local reverse proxy or Cloudflare Tunnel.
If you require a TLS-only IRC service, do not expose port 6667 publicly and adjust the ngIRCd configuration according to your deployment requirements.
This project manages security-sensitive infrastructure and should be deployed accordingly.
The administration application is intentionally designed to run as an unprivileged user.
Privileged actions are delegated to an allow-listed root helper rather than providing unrestricted root or sudo access to the WebUI.
The application also implements:
- Password hashing
- CSRF protection
- Session expiration
- Secure cookies
- HttpOnly cookies
- SameSite cookie restrictions
- Authentication throttling
- Initial setup throttling
- Administrator activity logging
- Restricted file permissions
- Configuration validation
- Automatic backups
- Privileged-command validation
The WebUI's Gunicorn origin uses HTTP.
For Internet-facing deployments, place it behind:
- Cloudflare Tunnel
- Nginx with HTTPS
- Caddy
- Apache with HTTPS
- HAProxy with TLS
- Another trusted HTTPS reverse proxy
A recommended same-host setup is:
WEBUI_LISTEN_IP="127.0.0.1"Do not send administrator credentials over a publicly exposed unencrypted HTTP connection.
Port 6697 uses a self-signed certificate by default.
A self-signed certificate provides encryption but does not provide automatic public Certificate Authority trust.
For a private network, trusted community server, testing environment, or manually managed client population, administrators may distribute and verify the certificate fingerprint directly.
For public deployments, consider replacing the self-signed certificate with a certificate issued by a trusted Certificate Authority.
Port:
6667
is plaintext by default.
Do not use plaintext IRC for credentials or sensitive conversations over untrusted networks.
If plaintext connectivity is unnecessary, restrict the port with your firewall or modify the ngIRCd configuration.
Never publish files such as:
/etc/xsukax-irc-admin/session.secret
/etc/xsukax-irc-admin/bootstrap.token
/etc/xsukax-irc-admin/anope-link.secret
/etc/ngircd/xsukax-irc.key
Also review before sharing:
/etc/ngircd/ngircd.conf
/etc/anope/*.conf
/var/backups/xsukax-irc-admin/
Configuration and backup files may contain passwords, server-link secrets, IRC operator credentials, or other sensitive information.
Regularly install security updates:
sudo apt update sudo apt upgrade
For Internet-facing servers, also consider:
- SSH key authentication
- Disabling unnecessary SSH password authentication
- A restrictive firewall
- Automated security updates
- Log monitoring
- Regular backups
- Server monitoring
- Brute-force protection
- Restricting WebUI access to trusted networks when possible
Please do not disclose an unpatched security vulnerability in a public GitHub issue.
If GitHub Security Advisories are enabled for this repository, use the repository's Security → Report a vulnerability feature to report the issue privately.
Include, where possible:
- A description of the vulnerability
- Affected version
- Reproduction procedure
- Potential security impact
- Relevant logs with secrets removed
- Suggested remediation, if known
Do not include live credentials, private keys, bootstrap tokens, IRC operator passwords, or other production secrets in reports.
Start with:
sudo bash xsukax-irc-server-admin-cp.sh status
Check:
sudo journalctl -u ngircd.service -n 100 --no-pager
Then validate the configuration:
sudo ngircd --config /etc/ngircd/ngircd.conf --configtest
Check Anope:
sudo systemctl status anope.service
Then:
sudo journalctl -u anope.service -n 100 --no-pager
Also inspect ngIRCd:
sudo journalctl -u ngircd.service -n 100 --no-pager
Check:
sudo systemctl status xsukax-irc-admin.service
and:
sudo journalctl -u xsukax-irc-admin.service -n 100 --no-pager
Check the helper:
sudo systemctl status xsukax-irc-admin-helper.service
and:
sudo journalctl -u xsukax-irc-admin-helper.service -n 100 --no-pager
Confirm the helper socket exists:
sudo ls -l /run/xsukax-irc-admin-helper.sock
Check whether port 6697 is listening:
sudo ss -lntp | grep 6697Inspect the certificate:
sudo openssl x509 \ -in /etc/ngircd/xsukax-irc.crt \ -noout \ -subject \ -issuer \ -dates \ -fingerprint \ -sha256
Contributions are welcome.
-
Fork the repository.
-
Clone your fork:
git clone https://github.com/YOUR-USERNAME/xsukax-IRC-Server-Admin-CP.git
- Create a feature branch:
git checkout -b feature/my-improvement
-
Make your changes.
-
Run ShellCheck:
shellcheck xsukax-irc-server-admin-cp.sh
-
Test installation on a clean Debian or Ubuntu system.
-
Test:
sudo bash xsukax-irc-server-admin-cp.sh install sudo bash xsukax-irc-server-admin-cp.sh status sudo bash xsukax-irc-server-admin-cp.sh uninstall
- Commit your changes:
git add . git commit -m "Improve IRC administration feature"
- Push your branch:
git push origin feature/my-improvement
- Open a Pull Request.
Contributors should:
- Keep the installer compatible with Debian/Ubuntu systems
- Maintain Bash strict-mode compatibility
- Avoid unnecessary dependencies
- Preserve the single-file deployment approach where practical
- Quote shell variables correctly
- Validate external/user-controlled input
- Preserve secure filesystem permissions
- Preserve privilege separation
- Avoid running the WebUI itself as root
- Keep privileged helper commands narrowly allow-listed
- Preserve configuration validation before replacing live configuration
- Avoid exposing secrets in logs or error messages
- Maintain rollback and backup behavior
- Test both fresh installation and uninstall behavior
- Document new configuration options
- Keep user-facing messages clear
- Avoid committing credentials, tokens, certificates, or private keys
Changes that expand the privileged helper's capabilities should receive especially careful security review.
This project is distributed under the GNU General Public License version 3 (GPL-3.0).
You are free to use, study, modify, and redistribute the software under the terms of the GPL-3.0 license.
See:
LICENSE
for the complete license text.
When distributing modified versions, ensure that the requirements of the GPL-3.0 license are followed.
xsukax
GitHub:
Project repository:
https://github.com/xsukax/xsukax-IRC-Server-Admin-CP
For questions, bugs, installation problems, or feature requests, use the project's GitHub Issues page:
https://github.com/xsukax/xsukax-IRC-Server-Admin-CP/issues
Before opening an issue, please include useful diagnostic information such as:
sudo bash xsukax-irc-server-admin-cp.sh status
and, where relevant:
sudo journalctl -u ngircd.service -n 100 --no-pager sudo journalctl -u anope.service -n 100 --no-pager sudo journalctl -u xsukax-irc-admin.service -n 100 --no-pager sudo journalctl -u xsukax-irc-admin-helper.service -n 100 --no-pager
Remove passwords, private keys, setup tokens, server-link secrets, public IP information you do not wish to disclose, and other sensitive information before posting logs publicly.
Running an Internet-facing IRC service requires appropriate system administration and security practices.
The project can automate installation and provide security-oriented defaults, but server administrators remain responsible for:
- DNS configuration
- Firewall configuration
- Network exposure
- Reverse-proxy configuration
- Certificate trust
- Operating-system security
- Backups
- Monitoring
- Updates
- IRC moderation
- Compliance with applicable laws and hosting-provider policies
If you find xsukax IRC Server Admin CP useful:
- ⭐ Star the repository
- 🍴 Fork it
- 🐛 Report bugs
- 💡 Suggest improvements
- 🔧 Submit pull requests
- 📖 Improve the documentation
Contributions from the IRC and open-source communities are welcome.