Please follow the highlighted code; you should be able to just copy and paste all of the code and have a BungeeCord server, however, we’ve also added instructions for learning purposes.
Connect via SSH to the VPS that will run the BungeeCord server. Make sure you have your apt packages update and a text editor such as nano installed first:
apt-get update && apt-get upgrade
apt-get install nano
Once you have ran both of those commands, you’ll be able to run the following commands to install Java, which is required to run BungeeCord. You will be asked some basic questions and will have to accept Oracle’s license; just agree to install everything.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Now we will install screen, which will help you leave BungeeCord open after you close out of SSH. This means it will continue running, even after you exit when finishing this tutorial.
apt-get install screen
Copy the URL for the version of BungeeCord you want and then use the following commands to create a folder for BungeeCord to be placed in. Once the folder is created, the last command will download the BungeeCord file and place it in the folder. For this tutorial, we’ve used a link for the latest BungeeCord build.
cd ~ && mkdir bungeecord
Now we need to run the JAR file once to generate the files and ensure you’ve properly downloaded the file.
java -jar BungeeCord.jar
Once you see that the server is running and everything is done loading, it should say “listening on…” and then you can press ctrl+c to exit. Now, it’s time to set up crontab to make sure BungeeCord will always run, even if you reboot the server.
Then paste the following, and press ctrl+x to close out in nano text editor and save, or i to insert and the escape key and :wq if you’re using vim.
@reboot cd /root/bungeecord/; screen -dmS bungee java -jar BungeeCord.jar
To run BungeeCord and leave it open, type the following:
cd /root/bungeecord/; screen -dmS bungee java -jar BungeeCord.jar
Keep in mind you still need to configure BungeeCord to properly link your servers. To quickly add two servers, you need to edit the config.yml file in the BungeeCord folder we created. To edit this file, type:
Locate this portion in the config.yml file:
lobby: address: localhost:25565 restricted: false motd: '&1Just another BungeeCord - Forced Host'Then simply edit localhost:25565 to the IP and port of your lobby server. The lobby will automatically be the default server. You can add/edit additional servers by copying the same code and changing “lobby” to what you want the server to be called. Don’t forget to edit the address for the new server as well.
For example, if you have a server with the IP 22.214.171.124 and port 25566, and want it to be the lobby server, it will simply end up looking like this:
lobby: address: 126.96.36.199:25566 restricted: false motd: '&1Just another BungeeCord - Forced Host'After you’re done editing the config.yml, you need to restart the server. The easiest way to do this is to reboot the VPS, and this way, you can confirm that BungeeCord properly restarts after a reboot.