Velocity
Setting up Velocity
Updated
Preparing Your Server
Note
For Velocity to properly work, you need to disable online-mode. Lagless.gg may not be able to provide support for offline mode servers however it's needed in this scenario to function properly.
Under Utilities, select on Splits and create a sub-server to install Velocity on.


Modifying the Velocity Config
The power of velocity is in the config file, velocity.toml which tells where to send players. You can view this example config to start connecting other servers together.
Note
To make velocity properly work, make sure you are using the Server's UUID along with the port as shown below instead of the IP and port. If you are trying to send players to another server hosted in other regions that Lagless supports, you can use the IP and port instead.
Your server's UUID is under Settings, scroll all the way down and look for Server ID under the Debug Information header.
[servers]
lobby = "be24d008-b233-4a67-be65-b5702f13c3c5:25567"
hcf = "be24d008-b233-4a67-be65-b5702f13c3c5:25566"
prison = "be24d008-b233-4a67-be65-b5702f13c3c5:26678"
try = [
"lobby"
]
The try section of this config will tell Velocity where to try sending players once they first connect or if a server unexpectedly closes,
Velocity will send the player back here as well. The try block also goes down in order so if you had try = ["lobby", "hcf"], players will
automatically connect to lobby but if lobby is down, it'll try sending your players to hcf instead.
Configure Player Information Forwarder
Inside your velocity config, make sure you set your mode to modern.
# Should we forward IP addresses and other data to backend servers?
# Available options:
# - "none": No forwarding will be done. All players will appear to be connecting
# from the proxy and will have offline-mode UUIDs.
# - "legacy": Forward player IPs and UUIDs in a BungeeCord-compatible format. Use this
# if you run servers using Minecraft 1.12 or lower.
# - "bungeeguard": Forward player IPs and UUIDs in a format supported by the BungeeGuard
# plugin. Use this if you run servers using Minecraft 1.12 or lower, and are
# unable to implement network level firewalling (on a shared host).
# - "modern": Forward player IPs and UUIDs as part of the login process using
# Velocity's native forwarding. Only applicable for Minecraft 1.13 or higher.
player-info-forwarding-mode = "modern"
Configuring Backend Servers
Under your servers, go to Files and find your server.properties file. Open it and find the line that says:
online-mode: true
Change true to false then restart your server to apply the changes.
Forwarding Secret
You'll need the forwarding secret from your proxy server to put into your Paper server.


Inside of File Manager, open config/paper-global.yml and scroll down to proxies. Make sure you set bungee-cord's online-mode to false after enabling
velocity and pasting your secret key there.

Testing Velocity
Inside of Minecraft, you should be able to connect through your velocity proxy and be routed to the proper server. Thus taking you to the server you inputted prior.
[21:30:12 INFO]: [connected player] ondrya (/127.0.0.1:59292) has connected
[21:30:12 INFO]: [server connection] ondrya -> lobby has connected
[21:30:19 INFO]: [connected player] ondrya (/127.0.0.1:59292) has disconnected
[21:30:19 INFO]: [server connection] ondrya -> lobby has disconnected
Troubleshooting
If you receive an error called This server requires you to connect with Velocity., make sure that you have offline-mode set properly on your backend servers and your forwarding secret is correct. Should you need further assistance, you can submit a ticket for one of our staff to review your setup.


