In this tutorial we will explain step by step how to install BungeeCord on our Panel in order to link some servers together. For the purpose of this installation we will be using a total of 4 servers.
BungeeCord – 184.108.40.206:25565 – This server will be used to run BungeCord. Think of this server as a “traffic director.”
Hub – 220.127.116.11:25565 – This server will contain the actual hub that will have portals to other servers.
Survival – 18.104.22.168:25565 – This will be one of the servers that is linked from the hub.
Creative – 22.214.171.124:25565 – This will be one of the servers that is linked from the hub.
(you might not have all default 25565 ports, so just use whatever ports came with your servers)
The server names and IPs that you use will be different from the ones above and ones used throughout this tutorial. These are simply here as a reference for when you set this up yourself. Also, this tutorial assumes that all of your servers will be running Spigot as it works best with BungeeCord.
As you can see above, we only have two actual servers: survival and creative. The other two will be used to route players.
Step 1: Go to mod manager and install BungeeCord
Step 2: Start your BungeeCord server so all the files can generate (Please Note the built-in console will not work with BungeeCord)
Step 3: Go to Configuration files on the left hand side. Look for BungeeCords config.yml and click text Editor. (It is recommended to edit this file via FTP with VS Code or some code editor) This will Open the newly generated config.yml file located in the server’s main directory. Double check the following. The host: should automatically pull the IP of the server BungeeCord is running on. In this tutorial that would be 126.96.36.199:25565. So, you should end up with something like this: host: 188.8.131.52:25565 in your configuration file. All the IP addresses and Ports should pull automatically.
Step 4: You can change the line – lobby under priorities: to – hub (If you chose to call your BungeeCord server as lobby you can leave those like that or use whatever name that you want).
Step 5: Now where it says servers: is where we will be adding our hub, survival, and creative server information. You should end up with something like this: https://hastebin.com/gewuyajiho and your whole config.yml will look something like this: https://hastebin.com/iholozumat
Step 6: You can set force_default_server: setting to true, If you set this to true, when a player logs into your BungeeCord server they will always go to the hub server first because that’s what we set as the default server in step 4. If you set this to false they will instead end up on the server they were connected to last.
You can find explanation for the rest of the configuration options here. If you don’t know what a setting does, don’t touch it.
You are now done with the configuration file for BungeeCord and you can go ahead and save the changes.
Step 7: Now you will need to perform a few things on the servers you are linking together. In this tutorial those servers are hub, survival, and creative. First make sure all of the servers are stopped.
– You need to set online-mode setting to false for every server except the one that is running BungeeCord.
– Download IPWhitelist Since your servers will be running in off-line mode you don’t want anyone joining them directly. This plugin will do that for you. It will force players to join only through your BungeeCord server which is in on-line mode and will authenticate the player. Once you have uploaded IPWhitelist.jar into each of the servers, start the server and the configuration files will generate for the plugin, and then stop the servers again.
Step 8: Connect to the spigot server through Bungeecord. Assuming you did this correctly, IPWhitelist will detect you are connecting through bungeecord, and whitelist your IP. Once this is done, it will only accept connections connecting through this IP address. Also, in the config.yml for IPWhitelist set setup: true to setup: false after whitelisting your BungeeCord IP. More info on IPWhitelist plugin and its usage can be found here.
Step 9: Start all of your servers, including the BungeeCord one. Now when you try to join any of the servers except the BungeeCord one it should tell you to “Please join the server using 184.108.40.206”
Step 10: Join your BungeeCord server and it will place you onto your Hub server. To go to other servers simply use the /server command like so: /server [server name] so let’s say you wanted to go to the survival server from this example. You would then type in /server survival which would take you there.
IP Fordwarding: (advanced)
By default all players will have the same IP when connecting to your servers using BungeeCord, because BungeeCord’s IP will be passed since they are all coming through the BungeeCord server. This becomes an issue when you want to IP ban someone because that will essentially ban everyone. So, if you plan to IP ban players, it’s best to setup IP forwarding. This can be done by following these steps:
Step 1: In the config.yml for BungeeCord at the bottom set ip_forward: to true like so ip_forward: true
Step 2: On all other servers in open up the spigot.yml file and set bungeecord to true.
Now when players connect to your servers though BungeeCord their actual IP address will pass through. One issue that you might have with this enabled is that you might get an error message when trying to connect to servers directly, but that should not be an issue as your players should connect using your BungeeCord IP anyway.
You are now ready to enjoy your own server network
More BungeCord resources:
Official Forum: http://www.spigotmc.org/forums/bungeecord.21/
Official Wiki: http://www.spigotmc.org/wiki/index/
BungeCord Resouces: http://www.spigotmc.org/resources/