Databases
Some game servers or mods (like Minecraft plugins) can benefit from having a dedicated database. This can result in increased performance, and you can also connect multiple servers to the 1 database. A good use-case for this is the McMMO plugin. This allows your players levels to follow them between all of your Minecraft servers.
Database solutions
There are a few ways to do this, each with their own advantages and disadvantages
Shared Database
Per Node
Panel Database
Higher is worse (eg harder or less secure)
Shared database
The database is hosted on a dedicated node, and the other nodes connect to this one. The other nodes need to be able to communicate with the host.
If you migrate a server from node A to B everything will continue to function.
If your database corrupts you may lose all data for all nodes.
If one of your game servers is breached and the bad actor got your database credentials they may be able to alter the other server DBs. This is unlikely though, as Pelican creates a dedicated user per database.
Database per node
This is the most secure method, as each node has its own database - there is no communication outbound. Migrating a game server from node A to B will break the database connection
If your database corrupts you may lose all data on a single node
If one of your game servers is breached and the bad actor got your database credentials they may be able to alter DBs on the node. This is unlikely though, as Pelican creates a dedicated user per database. The bad actor will not be able to touch databases on other nodes.
Use the Panel database
This is the most dangerous option.
If one of your game servers is breached and the bad actor gained database credentials, they may be able to alter your Pelican database. This would allow them to create an administrator user and take over your Pelican install.
If your database corrupts you may lose all data for all nodes and the Panel data. This would require a Pelican reinstall or restore from backup.
Create your Database
This guide will step you through how to create a shared database from a Ptero / Pelican egg.
This requires all nodes to be able to access the machine hosting the database. If your notes are not located all at the same site, you could use a VPN client or go down the per node route.
Do not port forward your DB
Create your Database
If you haven't already, import the relevant database egg per Import eggs
I am going to assume MariaDB for this guide - your commands may be different if using something else
You may need to do some reading on your servers / mod / plugins database requirements to select the correct DB type
Create your database using one of your intenal ports
Do not use one of your play / join ports. Doing so will expose your DB to the internet, which increases the risk of the db being breached or taken offline.
Start the database container and ensure it is marked as running. You should see something similar to
Add database to Pelican Panel
Now we need to add the database to the panel, assign a host and create the Database user
Log into your panel and navigate to the Admin UI
On the left, click on Database hosts
Click on the + symbol
Preperations tab:
Save the provided credentails to your password manager
Click next / OK
Database setup tab:
Copy paste the commands from the Panel into the MariaDB console
Run the following commands to allow for login outside of local host (127.0.0.1)
Click on next / OK
Panel setup tab:
Host
DNS name or IP of the wings node running the database container
Port
The port selected during creation
Display name
Whatever you want - I would suggest the hostname / DNS name of the server
Linked nodes
Set this to any Wings nodes you want to talk to this DB. These nodes need to be able to reach the hostname / IP in the host field
Click on create
Configure backup schedules
Backups are good, use backups.
Feel free to import one of my existing schedules from https://github.com/trentnbauer/PelicanEggs/tree/main/schedules
Per node
Follow the above guide, but you will need to do it for each node. In step 6, set the linked node as the machine running the database - do not set any other linked nodes.
Panel database
I will not show you how to configure this. The risk to bricking your install of Pelican is too high. Follow the shared guide
Troubleshooting
"Unable to resolve host" or similar message.
Try your servers IP address - some containers are unable to resolve internal network names.
Last updated