When setting up a Minecraft server, you may want to have different game modes or worlds available for your players. It’s possible to run them all on one server, but you may soon run into hardware limitations. A solution to this problem is setting up a proxy network using BungeeCord or Velocity. This will allow you to host these game modes and worlds on entirely different dedicated servers.
Set up a Proxy
To achieve this, you need to set up a proxy for your players to connect to. The proxy is no Minecraft server by itself but rather manages which server to send players to. The following picture will illustrate how a proxy works. There are two main proxies available. The ones from the BungeeCord family (most commonly Waterfall is used) and the Velocity proxy. Both proxies are free to use. We recommend using the Velocity proxy since it is a more modern proxy and it is secure by design. That’s why the Velocity Proxy is discussed in the first part of this guide, and in the second part, BungeeCord is discussed.
Configuring your Velocity Proxy
We recommend using Velocity over BungeeCord/Waterfall since it performs better and is secure by default. Of course, Velocity is also free to use for your needs. Unfortunately, most BungeeCord Plugins do not support Velocity. Secondly, you need to use PaperMC instead of Spigot for your backend servers. The good thing is, that Paper is fully compatible with all of your Spigot plugins. That means, using Paper instead of Spigot is no hassle at all. The following steps are taken from the official Velocity website.
Running a proxy is not as resource-hungry as running a game server, also referred to as a backend server. Download the Velocity software from the official Velocity website. After downloading Velocity on your server, you can run it using the following command:
java -Xms512M -Xmx512M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -jar velocity.jar
After the first start-up, the needed configuration files have been created.
Edit the velocity.toml file
- Set the
player-info-forwarding-mode to modern
- Save your forwarding-secret value for later.
- Under servers, configure all of your server backend names, IP addresses, and ports. The default server, usually your lobby, is also specified here.
- That’s all there is to configure on the velocity proxy. Now save the config file and restart the server
Configuring the Backend-servers (Gameserver)
Any other server, which is not your proxy, is considered a backend server. For example your Lobby, your Minigame servers, or your farmworld. When using Velocity, you need to use Paper.mc for the backend servers. Nevertheless, the setup is very simple.
- Find the online-mode setting in server.properties and set it to true.
- Edit the spigot.yml file and make sure bungeecord is set to false.
- Finally, edit the paper.yml file and set enabled to true, online-mode to true and set the secret to the secret you copied in the previous step from your velocity server.
- Restart your backend server and repeat this step for all your other backend servers.
Security when using Velocity and Paper
Velocity is secure by default! With the forwarding-secret option we configured earlier, your backend servers will automatically reject any connections attempting to impersonate you. To confirm this, you can attempt to join your server using one of your backend IPs and ports. If you get an error message, then your server is properly secured.
Configuring your BungeeCord Proxy
BungeeCord was the first Minecraft proxy and is still very popular. Whether you are using Bungeecord or Waterfall, the setup is the same. Waterfall is a fully compatible BungeeCord fork, by the same team which is also behind Velocity and Paper. All BungeeCord plugins are fully compatible with Waterfall. Start by downloading Waterfall on their official page.
After having downloaded Waterfall you can run it using the following command:
java -Xms512M -Xmx512M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -jar waterfall-###.jar
- Now, the configuration files have been created.
- Locate the config.yml and set the ip_forward option to true. Furthermore, start adding your backend servers to the servers option in the same file. Sort them by priority. That means your Lobby should be the first server, then all your players are first sent to the lobby.
Configuring the Backend-servers (Gameserver)
- Locate the server.properties file and set online-mode to false.
- The next step is to locate the spigot.yml and set Bungeecord: true. Save the config and restart your server.
- Repeat this step for all of your servers.
Security when using BungeeCord and Spigot
Security is a serious concern for all Minecraft proxy networks. Especially as BungeeCord does not make it easy to reach a good level of security.
One way is to set up a firewall. You can find the official firewall guide here: https://www.spigotmc.org/wiki/firewall-guide. The second option is to use a whitelisting plugin like BungeeGuard. Find a full-setup tutorial of BungeeGuard here. Do not skip this step, since then your network is at serious risk to hackers.
Try VyHub, Manage Your Game Servers, and Earn Money
Configuring a Minecraft server network (proxy) is easy to do and can be a very rewarding experience once you get it set up right. As long as you’ve followed all of the steps in this guide, your network should be properly set up to secure against attacks. Do you want to earn some money with your newly set up BungeeCord or Velocity Minecraft server network? We recommend you to check out VyHub, the modern website to manage your game servers with the additional perk of earning some money.