]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blame - README.md
Lose the header in setup.php
[irc/unrealircd/unrealircd-webpanel.git] / README.md
CommitLineData
60230273 1 ## UnrealIRCd Administration WebPanel
1e35660c 2
60230273
VP
3[![Version](https://img.shields.io/badge/UnrealIRCd-6.0.6_or_later-darkgreen.svg)]()
4[![Version](https://img.shields.io/badge/Version-Beta-blue.svg)]()
5[![Maintained](https://img.shields.io/badge/Maintained-yes-darkgreen.svg)]()
6[![Unreal](https://img.shields.io/badge/PHP-8.0_or_later-darkgreen.svg)](https://unrealircd.org)
7
0fccde3c
BM
8The UnrealIRCd Administration WebPanel gives you an overview of your IRC network,
9with detailed information about servers, users and channels.
10You can easily add and remove server bans, spamfilters and do other administrative tasks,
11all from the convenience of your web browser.
e236ae9a 12
33f512fa 13## Example Overview from Desktop
5eac3f4d 14 <img src="https://i.ibb.co/7SdFZnk/Screenshot-from-2023-01-14-07-26-21.png">
80bc35b3 15 <img src="https://i.ibb.co/6vQ6wg7/spamfilter.png">
922a4534 16
33f512fa 17## Example Overview from Mobile
2bc9920e
VP
18<div class="row">
19<img src="https://i.ibb.co/KGLdB43/Screenshot-20230123-233804-Chrome.jpg" height="30%" width="30%">
20<img src="https://i.ibb.co/tB980kd/Screenshot-20230124-000204-Chrome.jpg" height="30%" width="30%">
21</div>
33f512fa 22
922a4534 23## Prerequisites ##
349ec8ff
BM
24- UnrealIRCd 6.0.6 or later
25- A webserver (e.g. apache or nginx)
0f498c3d 26- PHP 8 or later
922a4534 27
2f9ac14e
VP
28Note: PHP 8 may require special installation instructions.
29Here are some instructions for:
14d66385
BM
30- Ubuntu 22.04: `apt-get install apache2 libapache2-mod-php`
31- [Ubuntu 20.04](https://linuxhint.com/install-php-ubuntu/)
2f9ac14e
VP
32- [Debian](https://www.vultr.com/docs/how-to-install-php-8-on-debian-11/)
33- [CentOS](https://www.tecmint.com/install-php-8-on-centos/)
34
35For more installation methods for PHP 8, make a websearch for how to install PHP 8 on your operating system.
922a4534
VP
36## Installation ##
37
38Note: This instructional assumes this is going to be hosted in the webroot directory `/var/www/` (html/) directory.
922a4534
VP
39
40Please make sure you have [correctly setup UnrealIRCd for use with JSON-RPC](https://www.unrealircd.org/docs/JSON-RPC) before you continue.
41
f217c52a
BM
42- Go to your webserver root, for example `/var/www/html/`, and clone
43 this repository:
922a4534 44```
f217c52a 45cd /var/www/html
964e17d3 46git clone https://github.com/unrealircd/unrealircd-webpanel
922a4534
VP
47```
48
f217c52a
BM
49- Go into the directory and run composer to install the dependencies
50 (If you don't have composer, then [install it](https://getcomposer.org/download/) first):
7e236785 51```
f217c52a 52cd unrealircd-webpanel
7e236785
BM
53composer install
54```
7e236785 55
f217c52a 56- Edit the configuration file
922a4534 57```
e7192278 58cp config.php.sample config.php
922a4534
VP
59nano config.php
60```
922a4534
VP
61Edit the configuration file to match your UnrealIRCd's RPC credentials and save
62
66f6eec2
BM
63IMPORTANT: You will want to put the webpanel behind a login, using a
64`.htaccess` file or similar. Don't open it up to the world!
aef43f9e
BM
65
66## Updating for end-users ##
67For end-users, when you want to update to the latest version:
68```bash
69git pull
438920b3 70composer install
aef43f9e
BM
71```
72
8d6871b9 73## Authentication
66f6eec2
BM
74Right now, by default everyone being able to access the URL can use the
75webpanel. In future versions this will no longer be the case.
8d6871b9 76
5cb74056
BM
77### SQL Authentication
78First, create a database and a user in MySQL or MariaDB. Typical commands to
79do so are:
8d6871b9 80
5cb74056
BM
81```sql
82CREATE DATABASE unrealircdwebpanel;
83CREATE USER 'unrealircdwebpanel'@'localhost' IDENTIFIED BY 'enter-some-random-password-here';
84GRANT ALL ON unrealircdwebpanel.* TO 'unrealircdwebpanel'@'localhost';
85```
86
87Now, open your `config.php` and in the define PLUGINS section load the `sql_auth`
88module by uncommenting the // from the `"sql_auth"` line.
89And fill in the information for your SQL setup, so set `SQL_IP`,
90`SQL_DATABASE`, `SQL_USERNAME` and `SQL_PASSWORD` properly.
8d6871b9 91
5cb74056
BM
92Finally, configure a first admin user by setting the information in
93`SQL_DEFAULT_USER`. This will be added to the SQL database first time you
94start the panel.
8d6871b9 95
5cb74056
BM
96Then, surf to the webpanel page and you should see a login page. If you
97don't see a login page then you have not loaded the sql_auth plugin
98properly.
8d6871b9 99
5cb74056
BM
100Once succesfully logged in you should remove the `SQL_DEFAULT_USER` item
101again from your `config.php` because it is no longer needed.
8d6871b9 102
5cb74056 103You can now add and delete users through the `Panel Access` tab.
8d6871b9 104
aef43f9e
BM
105## Developers ##
106Developers of the webpanel will naturally use the same procedure as
107above. However, sometimes you will want to update to a newer version
108of the unrealircd-rpc-php library. You then need to run:
109```bash
110# For devs only!
438920b3 111composer update
aef43f9e
BM
112git commit composer.lock
113```
114Commiting the composer.lock file updates the dependency for all
115other users, that way a `composer update` by end-users will update
116to exactly the version that `composer install` just installed.