Skip to main content

Configuring Centralised Plugins For Linked Database Access

Plugins such as LiteBans and LuckPerms need to use the same database to communicate their information across all your servers successfully. There are many benefits to doing this rather than:

  • Keeping your permissions in a flat file as they won't sync across all servers. This causes confusion for server owners with many ranks, having to remake them each time.
  • Bans just being stored on one server so when they connect back through the Bungee network, they can join other servers, just not the one you banned them on!

For each plugin, make a different database. Don't merge them together as it makes organisation a headache later on down the line when you want to migrate to a new system and tables are merged. You may also cause conflicts when the table names are the same such as different CoreProtect servers, as the prefix is always co_, so linking your Hub and Survival together would cause data mismatches due to them both using the co_block table.

Firstly, go to the Databases tab on your panel and create one for the plugin name. I would recommend making this database on the proxy as it's better to organise databases by location, such as:

  • LuckPerms = Global = Proxy
  • CoreProtect = One Server = Survival

For this example tutorial, we will be using LuckPerms. The same process applies to other global plugins.

image.png image.png image.png image.pngimage.png

Go to the File Manager > Plugins > LuckPerms > config.yml. Scroll down and firstly set the server name to "Proxy" or "Bungee" so LuckPerms knows it's the proxy.

image.png

In the storage-method variable, set it to "MariaDB" from H2 to start linking to the database.

image.png

Scroll down a bit more and find the address. Replace with 172.18.0.1 as the IP and some plugins require "3306" as a colon next to the IP, some have a dedicated option for the port such as Port: 3306.

image.png

Right click the tab with "Duplicate" then you will have one tab which has the configuration file open on it, and the other one you can click back to the Databases tab on the panel.

image.png  image.png image.png

Copy the database name by clicking it on the panel, in our case, s2_luckperms, and then putting it into the config. Repeat the same for the username. For the password, click the eye symbol and you will see the password to also put into the config.

image.png image.png

You can now save it with Ctrl + S or the "Save Content" button.

image.png

You can now restart the server and it will link successfully to the database.

image.png

For the other servers, basically copy and paste the host, database, username and password onto your clipboard, pop onto the next server, and just edit the server name and storage-method. For example, let's go to the Hub. We need to rename the server to "Hub", set the storage-method to "MariaDB" then paste in our database information from the proxy, or you can follow the duplicate tab > click and paste method above, whichever is easier for you.

image.png image.png

Provided an example GIF below of how you can simply just copy and paste the details over.

Restart the server and it will link to the same database!