UnrealIRCd webpanel

The UnrealIRCd Administration WebPanel gives you an overview of your IRC network, with detailed information about servers, users and channels. You can easily add and remove server bans, spamfilters and do other administrative tasks, all from the convenience of your web browser.

Requirements
Requirements: The webpanel can run on the same machine as UnrealIRCd or can be hosted elsewhere.
 * UnrealIRCd 6.0.6 or later
 * A webserver (e.g. apache or nginx)
 * PHP 8 or later

PHP 8 may require special installation instructions. Here are some instructions for:
 * Ubuntu 22.04:
 * Ubuntu 20.04
 * Debian
 * CentOS
 * For more installation methods for PHP 8, make a websearch for how to install PHP 8 on your operating system.

Configuring UnrealIRCd
In UnrealIRCd you need to load the required JSON-RPC modules. Simply put this in your unrealircd.conf: include "rpc.modules.default.conf";

Then, open up a port (Listen block) and add at least one api user (Rpc-user block): /* HTTPS on port 8600 for the JSON-RPC API */ listen { ip *; port 8600; options { rpc; } }

/* API user */ rpc-user adminpanel { match { ip 127.*; } password "password"; }

If you are not running the webpanel on the same machine as UnrealIRCd, then change the  from above to your web servers public IP.

Configuring the webpanel
Note: This instructional assumes this is going to be hosted in the webroot directory. In some distros or setups you have to install at another location.


 * Go to your webserver root and clone the webpanel repository:

cd /var/www/html git clone https://github.com/unrealircd/unrealircd-webpanel
 * Go into the directory and run composer to install the dependencies (If you don't have composer, then install it first):

cd unrealircd-webpanel composer install
 * Edit the configuration file

cp config.php.sample config.php nano config.php Edit the configuration file to match your UnrealIRCd's RPC credentials and save

You can now use the webpanel by surfing to http://localhost/unrealircd-webpanel/ (adjust the URL for your case)

IMPORTANT: By default the webpanel allows full access without any login. So, either Do not leave your webpanel open to the world!
 * Continue reading below to enable SQL Authentication so people get a login screen, OR
 * Put it behind a   file or similar

Authentication
Right now, by default everyone being able to access the URL can use the webpanel. In future versions this will no longer be the case.

SQL Authentication
First, create a database and a user in MySQL or MariaDB. Typical commands to do so are:

CREATE DATABASE unrealircdwebpanel; CREATE USER 'unrealircdwebpanel'@'localhost' IDENTIFIED BY 'enter-some-random-password-here'; GRANT ALL ON unrealircdwebpanel.* TO 'unrealircdwebpanel'@'localhost'; Now, open your  and in the define PLUGINS section load the   module by uncommenting the // from the   line. And fill in the information for your SQL setup, so set,  ,   and   properly.

Finally, configure a first admin user by setting the information in. This will be added to the SQL database first time you start the panel.

Then, surf to the webpanel page and you should see a login page. If you don't see a login page then you have not loaded the sql_auth plugin properly.

Once succesfully logged in you should remove the  item again from your   because it is no longer needed.

You can now add and delete users through the Panel Access tab.

Updating for end-users
For end-users, when you want to update to the latest webpanel version, run:

git pull composer install

Developers
Developers of the webpanel will naturally use the same procedure as above. However, sometimes you will want to update to a newer version of the unrealircd-rpc-php library. You then need to run:

composer update git commit composer.lock Commiting the composer.lock file updates the dependency for all other users, that way a  by end-users will update to exactly the version that   just installed.
 * 1) For devs only!