Guide Velocity configuration and setup guide

Overwrite

New member
Sep 10, 2022
2
1
3
⦁ Point 1 - Install and run
There should be no problems here, because here the process is similar to installing a regular core for a server or a bungee.
1) Download Velocity from the Papermc website.
2) Put the one you downloaded .jar file to a specific folder, then create a file in it start.bat (start.sh if linux) , in which write the following: java -Xmx2G -Xms2G -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -jar velocity.jar (Note. You will need Java version 11 or higher!)
3) Now run it. After that, wait until all folders and files are created and after a message like "Done (2,2s)!" close the console window that opens. Run it again after full configuration.

⦁ Point 2 - Velocity setting
Velocity has one configuration file - velocity.toml. It can be opened using any text editor.
YAML:
config-version = "2.6"

bind = "0.0.0.0:25577"

motd = "<#09add3>A Velocity Server"

show-max-players = 500

online-mode = true

force-key-authentication = true

prevent-client-proxy-connections = false

# 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 = "NONE"

# If you are using modern or BungeeGuard IP forwarding, configure a file that contains a unique secret here.
# The file is expected to be UTF-8 encoded and not empty.
forwarding-secret-file = "forwarding.secret"

# Announce whether or not your server supports Forge. If you run a modded server, we
# suggest turning this on.
# 
# If your network runs one modpack consistently, consider using ping-passthrough = "mods"
# instead for a nicer display in the server list.
announce-forge = false

# If enabled (default is false) and the proxy is in online mode, Velocity will kick
# any existing player who is online if a duplicate connection attempt is made.
kick-existing-players = false

# Should Velocity pass server list ping requests to a backend server?
# Available options:
# - "disabled":    No pass-through will be done. The velocity.toml and server-icon.png
#                  will determine the initial server list ping response.
# - "mods":        Passes only the mod list from your backend server into the response.
#                  The first server in your try list (or forced host) with a mod list will be
#                  used. If no backend servers can be contacted, Velocity won't display any
#                  mod information.
# - "description": Uses the description and mod list from the backend server. The first
#                  server in the try (or forced host) list that responds is used for the
#                  description and mod list.
# - "all":         Uses the backend server's response as the proxy response. The Velocity
#                  configuration is used if no servers could be contacted.
ping-passthrough = "DISABLED"

# If not enabled (default is true) player IP addresses will be replaced by <ip address withheld> in logs
enable-player-address-logging = true

[servers]
# Configure your servers here. Each key represents the server's name, and the value
# represents the IP address of the server to connect to.
lobby = "127.0.0.1:30066"
factions = "127.0.0.1:30067"

# In what order we should try servers when a player logs in or is kicked from a server.
try = [
    "lobby"
]

[forced-hosts]
# Configure your forced hosts here.
"lobby.example.com" = [
    "lobby"
]
"factions.example.com" = [
    "factions"
]

[advanced]
compression-threshold = 256

compression-level = -1

login-ratelimit = 3000

connection-timeout = 5000

read-timeout = 30000

haproxy-protocol = false

tcp-fast-open = false

bungee-plugin-message-channel = true

show-ping-requests = false

failover-on-unexpected-server-disconnect = true

announce-proxy-commands = true

log-command-executions = false

log-player-connections = true

[query]
enabled = false

port = 25577

map = "Velocity"

show-plugins = false

Now let's go directly to the setup.

First of all, let's define the type of "forwarding"
And here I am ready to give you advice. If you keep the server on versions 1.13+, then as indicated, use the player-info-forwarding-mode = "modern". If you keep the server on versions 1.12 and below, you are recommended to use the player-info-forwarding-mode = "bungeeguard".
Specify this value according to what is suitable for you.
Next, we need to come up with a key and specify it in the file that is specified in the forwarding-secret = "forwarding.secret" column.

If you chosen modern mode, then this key will need to be set in paper.yml by finding the velocity-support field, then activating it by setting enabled: true, then finding the secret: field, the default: field in it, and inserting the key you invented into quotes.
If you have chosen bungeeguard, you will need to download the BungeeGuard plugin and insert the key you invented into its config in the allowed-tokens field:

Important note:
In the spigot.yml file there is a string bungeecord: false
If you have configured player-info-forwarding-mode = "modern" and enabled velocity support in paper.yml, this field should remain false. If you have a bungeeguard value, it should be set to true!

Next, we need to configure the servers. Everything is simple here. In the servers section you have examples of configured servers. You just need to substitute your values and, if necessary, rename the servers for yourself. Just specify server_name = "Server IP:server port".
After you have added all the servers you need, specify the server to which the player will be connected immediately after entering in the try = column

Now let's look at some settings that you will probably change.
1) tcp-fast-open = false - set to true if you are running the server on Lunix (on a VDS/VPS/Dedicated server).
2) announce-proxy-commands = true - set it to false if you don't want the tabcompletion to issue your proxy commands to players.
3) force-key-authentication = true - set it to false if your server is using offline mode (We don't approve of it!)

⦁ Point 3 - Velocity Commands.

By default, Velocity has 4 commands:
/velocity (version|plugins|reload|dump) - shows the velocity version | shows the velocity plugins | reloads the proxy | unloads the dump with proxy information, respectively
/end - disables the proxy
/shutdown - the same as end
/glist - shows how many players are on proxy
/server - allows you to move between servers

You can read more about them here: https://docs.papermc.io/velocity/built-in-commands

⦁ Point 4 - Useful utilities:

1) Probably the most important part is protection from bots. This function is performed by the following two plugins: LimboFilter + LimboApi. Actually, after installing them, everything depends on you. You can completely customize the anti-bot checks.

2) By default, there is no way to set up groups and permissions in velocity. The LuckPermsVelocity plugin will help with this. Install it on a proxy and use it as a permission manager.

3) On velocity, as you could see, there are no commands that are in the bungeecord, such as /send, /find, etc. In order to add them, use the VelocityTools plugin. In addition to these commands, it includes useful functions, by the type of command /lobby, the ability to restrict connections directly from a digital IP, and so on.

4) The CommandSync plugin may be quite useful for you. Recently, cycling support has been added to it, which has made it relevant again. In short, it is needed in order to execute proxy commands on servers. Very handy if you can't use the database, but you have several game modes.

5) It is also worth thinking about blocking commands. If you need to restrict other commands on the proxy server, it is recommended that you use the CommandWhitelist plugin. By the name, I think it's already clear what it does.

Point 5 - Useful links.

https://docs.papermc.io/velocity - of. velocity docks page
 
Last edited:
  • Like
Reactions: KungfuEpt