In this tutorial, I will be going over how you can link your Bungeecord server and other Spigot servers. For this purpose, I will be using the following servers for example:
Note: For the servers that you don't wish to be connected to publicly, put in a ticket asking for a local IP assignment. For example, Hub has a local IP address and if Bungeecord is on the same node, then it can be used, but Server2 is on another node, meaning it cannot be contacted by the Bungeecord with a local IP, therefore, you have to work with a Public IP address. For more info, you can contact us.
The server names and IPs will differ from the one mentioned above and will be used throughout the tutorial. This is just for reference. Also, this tutorial assumes you are using Spigot or PaperSpigot on all your servers as it is required to work with Bungeecord.
Let's start with setting up Bungeecord
- Start by removing all your files.
- Next, grab the Bungeecord.jar file from here. (usually, the latest build is the one you need)
- Upload the file to your Bungeecord server.
- Next, rename the Bungeecord.jar to server.jar.
- Now, restart the server.
- From the newly generated files open the config.yml. (you can use sFTP or the integrated file manager to do this)
- Now, change the host: to the IP of the Bungeecord server. In this case, it is 22.214.171.124:25565 i.e. host: 126.96.36.199:25565.
- Change the line - lobby under priorities to - Hub or what you will be calling your Lobby/Main Hub server. This means that whenever a player joins he will be directed to this server according to the priorities.
- Also, you should set ip-forwarding: to true as by default when a player joins your server his real IP won't be forwarded rather the Bungeecord IP address will be passed through which means if you were to IP ban a player the whole server will end up getting banned, therefore, it is advised to set it to true.
- Before we add the servers, you can go through all the other options. An explanation for the options can be found here.
- Now, moving on, we will add the servers to be linked. Under servers: add your server names, in this case, Hub and Server2. It should look something like this:
servers: hub: address: 127.0.0.1:25566 restricted: false motd: '&1Welcome to our hub server!' server2: address: 188.8.131.52:25567 restricted: false motd: '&1Welcome to our server!'
- Finally, save the file and restart your server.
Now, we will have to do some changes in the Spigot servers
- First, stop all your servers.
- Now, you have to change your Spigot server to offline mode. You can do this by going to the servers' server.properties file and changing online-mode: to false.
- Next, if you enabled ip-forwarding you will have to go the servers' spigot.yml and set bungeecord: to true.
- Before finishing don't forget to add the plugin, IPWhitelist to your spigot servers, since you will be running your spigot servers in offline mode you don't want anyone joining directly, IPWhitelist will prevent players to join your backend servers directly and force them to join through your Bungeecord. This is very important to maintain security. You can find more info on this topic here.
- Now, start all your servers.
All your servers will be linked now and players will be able to join through the Bungeecord IP.
You can find more information on Bungeecord here:
If you need any help you can contact us.