PixelRaid Billing Cloud Hosting Control

Mastering Velocity Proxy Configuration for Seamless Player Journeys

Published 2026-11-26 18:18 UTC · by PixelRaid Owner

Mastering Velocity Proxy Configuration for Seamless Player Journeys

Running a successful Minecraft server network goes beyond simply linking a few servers together. For growing communities, a robust and expertly configured proxy is the linchpin of a smooth, lag-free player experience. Velocity, renowned for its performance, modern architecture, and extensive features, has become the go-to choice for many server owners aiming to build dynamic, interconnected Minecraft worlds. This article delves into advanced Velocity proxy configuration, offering practical steps to ensure your network provides truly seamless player journeys.

Understanding Velocity's Core Role

At its heart, Velocity acts as the intelligent gateway to your Minecraft network. It sits between players and your backend servers, routing connections, managing player sessions, and providing a unified entry point. This centralisation offers numerous benefits:

- Load Balancing: Distributes players across multiple backend servers to prevent overload.
- Enhanced Security: Hides backend server IP addresses, filters malicious connections, and provides DDoS protection layers.
- Seamless Transitions: Allows players to switch between different game modes or worlds without disconnecting.
- Cross-Platform Support: Integrates with GeyserMC to enable Bedrock Edition players to join Java Edition networks.
- Centralised Authentication: Handles player authentication once at the proxy level.

While the basic setup of Velocity is straightforward, unlocking its full potential requires a deeper understanding of its configuration options, particularly within the velocity.toml file.

Essential Configuration Foundations

Your velocity.toml file is the control centre for your proxy. Before diving into advanced features, ensure your foundational settings are correct:

- bind: This is the IP address and port Velocity will listen on. For most setups, "0.0.0.0:25565" is common, allowing connections from any IP on the standard Minecraft port.
- forwarded-host: Set this to true. It's crucial for backend servers to receive the player's real IP address and UUID, which is vital for plugins like anti-cheat, moderation tools, and IP bans to function correctly. This works in conjunction with BungeeGuard or similar IP forwarding plugins on your backend servers.
- compression-threshold: Adjust this to balance network usage and CPU. A value of 256 (default) is often suitable, but for networks with high bandwidth or many small packets, experimentation might yield better results.

Optimising Listeners for Diverse Player Access

Listeners define how Velocity accepts incoming connections. A well-configured listener setup is critical for supporting both Java and Bedrock players, and for handling different connection types.

By default, Velocity will have one listener. You can add more for specific purposes:

- Default Java Listener:
listeners:
- query-enabled: true
query-port: 25565
motd: "&bWelcome to &6Your Network!"
force-default-host: true
host: "0.0.0.0:25565"
max-players: 500
proxy-protocol: false
# Optional: Enable Geyser for Bedrock players on this listener
# You'll need to configure Geyser-Velocity separately
# This listener would typically be where Geyser listens on if configured for the same port.

- Geyser Integration (for Bedrock Players):
If you're using GeyserMC for cross-play, it's typically configured to integrate directly with Velocity. Geyser itself will listen on a separate UDP port (e.g., 19132) and forward connections to Velocity's Java listener. Ensure your firewall allows UDP traffic on Geyser's port.

- Forced Hosts (Virtual Hosts):
The `forced-hosts` section in your listener allows you to redirect players based on the domain name they use to connect. This is excellent for directing players to specific game modes or lobbies based on their chosen subdomain (e.g., play.yournetwork.com goes to the lobby, creative.yournetwork.com goes to the creative server).
forced-hosts:
"creative.yournetwork.com": "creative_server"
"survival.yournetwork.com": "survival_server"

Dynamic Server Management and Fallbacks

Your `servers` section lists all your backend Minecraft servers. Proper configuration here is vital for reliability and player experience.

- Registering Servers:
servers:
lobby:
address: "127.0.0.1:25566"
restricted: false
# Optional: Add a BungeeGuard key if using it
# bungee-guard-token: "your_secret_token"
survival_server:
address: "127.0.0.1:25567"
restricted: false
creative_server:
address: "127.0.0.1:25568"
restricted: false

- Note: `address` should be the internal IP and port of your backend server, not the public one.
- `restricted: true` prevents players from directly joining this server unless they have a specific permission (velocity.command.server.<server_name>).

- Fallback Servers (`try` order):
The `try` list within your listener defines the order in which players will be sent to servers upon connection or if their current server becomes unavailable. A robust fallback system prevents players from being stranded if a server crashes or restarts.
listeners:
- # ... other listener settings ...
try:
- "lobby"
- "survival_server"
- "creative_server"

This means players will first attempt to join `lobby`. If `lobby` is offline, they'll try `survival_server`, and then `creative_server`. If all fail, they will receive a disconnect message.

Enhancing Network Security

Velocity itself offers crucial security features beyond simply hiding backend IPs.

- Connection Throttling:
To mitigate basic bot attacks or spam, configure connection throttling in `velocity.toml`.
limiter:
enabled: true
period: 1s
max-connections: 3 # Max connections from a single IP per period

This helps prevent a single IP from spamming your proxy with connection attempts.

- Firewall Integration:
Your proxy server should be the *only* server with its ports (e.g., 25565, 19132 for Geyser) publicly accessible. All backend servers should only be accessible internally within your network, ideally via a private IP address range. Configure your firewall (e.g., UFW on Linux, cloud provider firewall rules) to block direct external access to your backend server ports.

- BungeeGuard/IPForward:
While `forwarded-host` is set to `true` in Velocity, you must also use a plugin like BungeeGuard on your backend Paper/Purpur servers. This prevents players from bypassing Velocity and connecting directly to your backend servers, potentially spoofing their IP address or UUID. BungeeGuard adds a security token to forwarded connections, ensuring only authorised connections from your Velocity proxy are accepted.

Managing Player Data and Sessions

Velocity correctly handles player UUIDs and IP addresses by default when `forwarded-host` is enabled. This is crucial for plugins on your backend servers that rely on this information for bans, permissions, and player data storage. Ensure your backend servers are also configured to accept forwarded IP addresses (e.g., in `spigot.yml` set `bungeecord: true` for Paper/Purpur).

Performance Considerations

While Velocity is highly performant, its JVM (Java Virtual Machine) still benefits from optimisation, especially on busy networks.

- JVM Arguments:
Use Aikar's flags for your Velocity instance to ensure optimal garbage collection and memory management. These are typically applied in your startup script:
- `java -Xms1G -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=16M -XX:GCLockerEdenExpansionPercent=10 -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapWastePercent=5 -XX:G1MixedGCMaxOperations=8 -XX:G1OldCSetRegionThresholdPercent=30 -XX:G1LogLevel=debug -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -Dusing.aikars.flags=https://mcflags.emc.gs -jar velocity.jar`
- Adjust `-Xms` (initial memory) and `-Xmx` (maximum memory) based on your network's player count and number of backend servers. Velocity generally requires less RAM than a full Minecraft server.

- Network I/O:
Ensure your host machine has sufficient network bandwidth and a stable connection. High latency between your proxy and backend servers can introduce lag, even if individual servers are performing well.

Troubleshooting Common Velocity Issues

- Connection Refused: Check firewall rules, ensure Velocity is running, and verify the `bind` address in `velocity.toml`.
- Cannot Connect to Backend Server: Verify backend server addresses and ports in `servers` section. Check backend server logs for connection attempts and errors. Ensure BungeeGuard (or similar) is correctly configured on backend servers.
- Player Stuck/Disconnecting During Server Switch: Check `forwarded-host` on Velocity and `bungeecord: true` on backend servers. Review Velocity logs for errors during player transfer.
- Lag/Performance Issues: Profile Velocity's CPU and memory usage. Review JVM arguments. Check network latency between proxy and backend servers.

Checklist for a Seamless Velocity Network

- Velocity's `forwarded-host` is `true`.
- Backend servers have `bungeecord: true` in `spigot.yml` (or equivalent).
- BungeeGuard (or similar IP forwarding plugin) is installed and configured on all backend servers.
- Firewall rules restrict direct access to backend server ports.
- `try` order in `listeners` is configured with robust fallbacks.
- `forced-hosts` is set up for domain-based server routing.
- Connection throttling is enabled in `limiter` section.
- Velocity's JVM arguments are optimised (e.g., Aikar's flags).
- GeyserMC (if used) is correctly integrated and its UDP port is open.

Mastering Velocity's advanced configuration creates a highly available, secure, and user-friendly Minecraft network. It ensures players can move effortlessly between game modes, always find an available server, and enjoy a consistent experience. For those seeking reliable infrastructure to host their Velocity proxy and backend servers, PixelRaid Hosting offers managed solutions designed for performance and stability, allowing you to focus on your community while we handle the hardware.

Sources and further reading

- Velocity Documentation: https://docs.velocitypowered.com/
- Aikar's Flags for Minecraft Servers: https://aikar.co/2018/07/02/no-just-no-dont-use-them-minecraft-love-you/
- GeyserMC Wiki: https://wiki.geysermc.org/