-
Notifications
You must be signed in to change notification settings - Fork 0
Installation (Automatic phpMyAdmin)
For the sake of this tutorial, we will assume that Pterodactyl, phpMyAdmin and the database hosts are already configured and installed. If this is not the case, here are some tutorials that may help you from other sources:
Please note that if you get a problem during a step, feel free to join our Discord to open a ticket.
In the .zip file downloaded after the purchase, and once unzipped, you will find two folders:
- phpmyadmin : The files contained in this folder will allow the connection to phpMyAdmin
- pterodactyl : It contains all the modifications brought to Pterodactyl
If you are missing folders, download the addon again.
Execute these commands :
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
apt install -y nodejs
curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -
sudo yum install -y nodejs yarn
curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -
sudo dnf install -y nodejs yarn
In your SSH terminal, run these commands :
npm i -g yarn
cd /var/www/pterodactyl
yarn install
Follow the PanelEdit_EN.txt or the PanelEdit_FR.txt file contained in the .zip file that you have downloaded.
Like Pterodactyl side, upload all the files of the folder phpmyadmin
of the .zip that you have downloaded in the folder of your phpMyAdmin installation.
Then, you will need to modify configuration for the host in config.inc.php
by adding these lines :
$cfg['Servers'][$i]['auth_type'] = 'signon';
$cfg['Servers'][$i]['SignonSession'] = 'TokenSession';
$cfg['Servers'][$i]['SignonURL'] = 'token.php';
$cfg['Servers'][$i]['LogoutURL'] = 'token-logout.php';
A server configuration should now look like this for example:
$i++;
$cfg['Servers'][$i]['verbose'] = 'example';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowRoot'] = false;
$cfg['Servers'][$i]['ForceSSL'] = true;
$cfg['Servers'][$i]['auth_type'] = 'signon';
$cfg['Servers'][$i]['SignonSession'] = 'TokenSession';
$cfg['Servers'][$i]['SignonURL'] = 'token.php';
$cfg['Servers'][$i]['LogoutURL'] = 'token-logout.php';
You can now edit the file token.php that you just uploaded to your needs :
-
$encryption_key
(line 14) and$encryption_iv
(line 16) : These variables must have the same values set in the Pterodactyl side (More information on how to generate theses here). -
$cookie_name
(line 18) : The name of the cookie to get data from, must be the same as in Pterodactyl side. -
$cookie_domain
(line 20) : The domain of the cookie, like the cookie name, must be the same as in Pterodactyl side (More information on how to choose one here).
Go to your admin part of your Pterodactyl Installation, then in the "Automatic-phpMyAdmin" category, click on create a new installation. Choose a name and a description. Then, for the URL, it needs to be the one of your phpMyAdmin installation. For the cookie name, it needs to be the same as configured in the token.php file of your phpMyAdmin installation, same for the cookie_domain, the encryption key and the encryption iv.
When the selected Database Host is none, this phpMyAdmin installation will be used for every Database Host when clicking on the button to connect to the database. But when there is one selected, it'll be this one that will be used when connecting to a database of this host.
Finally, for the phpMyAdmin Server ID, in most cases it'll need to be set to 1
. But if you are using a normal connection on phpMyAdmin like said here, you'll need to change that number to the corresponding configuration in phpMyAdmin. You can now save this installation !
The addon is now fully configured. You can use it perfectly.
If you got any idea to add to the documentation or you have a problem for a specific step, don't hesitate to tell use on our Discord by opening a ticket.