Configuring your Node Database
Last updated
Last updated
This database is separate from the Panel's database and included in my Wings compose file. This ensures that the data stored is segregated from the Panel DB (reducing risk of corrupting the panel) and allowing for the game server to connect to a DB on the same host, which will result in better performance.
Firstly, we need to create the Wings user. This is unfortunately a manual step that needs to be done on the DB but its pretty straight forward
Log into Portainer and navigate to Stacks
Open the Pterodactyl Panel stack and take note of the MYSQL_PASS_ROOT variable
Use a password manager to generate a password for the 'Wings' user, please ensure you save these credentials
Scroll down and click on the database container
Click on Console, then Connect
Type mysql -u root -p
, hit enter and input the Root password from step 2
Copy and paste the below text into Notepad, and change update the password field
Copy and paste each individual line into Portainer and hit enter
This will create a 'wings' user that can connect from anywhere ( % ) with admin privileges... Keep these creds safe!
Now we need to add the Database into Pterodactyl. Luckily - this is much easier to do!
Log into your Pterodactyl Panel as an administrator
Hit the settings cogs / admin button in the top right
On the left, click on Databases
Fill out the database per below and hit Create
Name
A friendly name for easy viewing purposes. I recommend using the same as the nodes hostname.
Host
Your server hostname / IP
Port
Username
wings
Password
The password you generated above
Linked Nodes
The Node the database is stored on
Please note: Your Wings nodes will need to be able to comminute with your Database. This means that you will need them in the same LAN / Network, or some form of VPN or port forwarding (not recommended...) to allow them to communicate.
Open an existing game server, or create a new Minecraft server (please ensure it has a database limit of more than 1)
Click on Databases
Click on 'New database'
Give it a name and hit 'Create'
Click on the eye to view the database details, such as the username, password and connection string. This information is needed to configure your game server to use the DB
The
Time Required
10 minutes
Difficulty
Low