Connecting several Minecraft servers with a Velocity proxy

A Velocity proxy places several Minecraft servers behind a single connection address. Players come in through the proxy, then move from one server to another without leaving the game or typing an address again. This tutorial covers installing the proxy, declaring the servers, enabling player information forwarding and closing direct access to the servers behind it.

Versions covered: Velocity on its stable branch, announced as compatible with Minecraft Java 1.7.2 to 26.2 on its server compatibility page. The method described here, called modern forwarding, requires Minecraft 1.13 or higher on the client side and Paper 1.13.2 or higher on the server side. Minecraft Java 26.2 is the stable version as of August 6, 2026. Allow about an hour if your two servers are already running.

What a proxy changes in a Minecraft network

A proxy is an intermediate server: it accepts the player’s connection, then relays the traffic to a real game server. These game servers behind the proxy are called backend servers. The proxy runs no world and doesn’t replace a Minecraft server: it routes connections.

Velocity is the proxy developed by the PaperMC project. In practice, it lets you publish a single address for a network made up of, for example, a lobby server and a survival server, and allows switching from one to the other during a session. Without a proxy, each server has its own address and every change requires a full disconnection.

One point needs to be made right now: setting up a proxy means disabling Mojang authentication on the backend servers. This is safe only if those servers become unreachable from outside. The section on closing direct access covers this point, and it isn’t optional.

Prepare Java, ports and backups

Velocity is written in Java and its installation documentation states Java 25 at minimum. Check the version installed on the machine that will host the proxy:

java -version

On the server side, you need at least two Paper instances on 1.13.2 or higher, already working separately. If your servers still run Vanilla, the prior conversion is described in our tutorial on migrating a Minecraft server to Paper.

Then plan the port assignment. Velocity listens by default on TCP port 25565, the one Minecraft Java servers usually use. On the same machine, two programs can’t listen on the same port: the proxy takes 25565, and each backend server must be moved to another port, for example 25566 and 25567, via the server-port line of its server.properties file. If your servers run at a host, ports are usually assigned: use the ones allocated to each instance in a hosting panel.

To copy before any change, on each backend server

  • server.properties
  • spigot.yml
  • config/paper-global.yml

Add a full backup of the world folders. The three files above are the ones the procedure changes; copying them is enough to return to the initial state without reinstalling anything.

Install and start the proxy a first time

Download Velocity from PaperMC’s official download page, choosing the latest stable version, then place the JAR file in an empty folder dedicated to the proxy. This folder must not contain any game server.

Build number: note it on the download page when you install rather than reusing a number read elsewhere. Development versions sit alongside stable versions there, and only the stable branch is suitable for a production network.

On Windows

Create a start.bat file in the proxy folder, with the content provided by the installation documentation:

@echo off
java -Xms1G -Xmx1G -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -jar velocity.jar
pause

Rename the downloaded file to velocity.jar, or replace that name in the script with the actual file name. Then double-click start.bat.

On Linux

Create a start.sh file in the proxy folder:

#!/bin/sh
java -Xms1G -Xmx1G -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -jar velocity*.jar

Make it executable, then launch it from that folder:

chmod u+x start.sh
./start.sh

In both cases, the console should show the proxy starting and a listening line similar to Listening on /0.0.0.0:25565, followed by Done. This first launch creates two essential items in the folder: the velocity.toml configuration file and the forwarding.secret file, which contains the key shared between the proxy and your servers. Then type end in the console to stop the proxy cleanly before configuring it.

Declare your servers in velocity.toml

Open velocity.toml in a text editor and find the [servers] section. Each line pairs a short name, which you choose, with the address and port of the corresponding backend server. The try list sets the order in which the proxy tries to connect a player who has just arrived or been sent back from a server.

[servers]
lobby = "127.0.0.1:25566"
survival = "127.0.0.1:25567"

try = [
  "lobby",
  "survival"
]

Use 127.0.0.1 if the proxy and the servers are on the same machine, and each server’s private address otherwise. In the same configuration section, set the forwarding mode to modern:

player-info-forwarding-mode = "modern"

This mode passes the player’s unique ID, username, skin and real address to the backend servers, in a format signed with the forwarding.secret key. Without it, all players would appear to connect from the proxy’s address, with no skin or correct ID.

Tune the Paper servers to the proxy

Three settings must be applied on each backend server, with the server stopped. They’re described on the official player information forwarding page.

In server.properties, set online-mode to false. Authentication with Mojang’s servers is then handled by the proxy instead of the game server.

Warning: a server in online-mode=false accepts any username if someone manages to connect to it directly. Until the next section is applied, don’t leave these servers reachable from the Internet: anyone could connect under the identity of an authorized player, including an admin.

In spigot.yml, check that settings.bungeecord is set to false. The two forwarding modes can’t coexist, and an old setting left active prevents modern forwarding from working.

Finally, in config/paper-global.yml, fill in the proxy block:

proxies:
  velocity:
    enabled: true
    online-mode: true
    secret: "paste-the-contents-of-forwarding.secret-here"

The secret value must exactly match the contents of the proxy’s forwarding.secret file, and the online-mode value must match the online-mode setting in velocity.toml. Then restart the server.

Paper 1.18.2 or earlier: these three options are in paper.yml, under settings.velocity-support.enabled, settings.velocity-support.secret and settings.velocity-support.online-mode.

Close direct access to the backend servers

The official documentation devotes a whole page to securing servers behind a proxy and explicitly recommends using a firewall. Two approaches are detailed there, and modern forwarding doesn’t replace them.

If the proxy and the backend servers run on the same machine, the simplest method is to restrict the servers’ listening to the local interface. In each backend server’s server.properties, set:

server-ip=127.0.0.1

The servers then stop accepting connections from outside, and only the proxy, on the same machine, can reach them. Check that the addresses in the [servers] section of velocity.toml do point to 127.0.0.1, otherwise the proxy will no longer find its servers.

If the servers are spread over several machines, this method doesn’t apply: you then need to filter the backend servers’ ports at system level, with Windows Firewall or with iptables or nftables on Linux, so as to allow only the proxy’s address. The documentation also reminds you to run the servers under an unprivileged account rather than as root.

Check the result and roll back

Start the backend servers first, then the proxy. Then connect with the Minecraft client to the proxy’s address on port 25565. You should land on the server at the top of the try list. Once in game, the built-in server switch command lets you check moving from one instance to the other:

/server survival

The switch should be instant, with no disconnection screen. Also check that your skin and username display correctly on the destination server: it’s the sign that modern forwarding works. If one of these points fails, the most common causes are:

  • Failed to bind to port in the proxy console: port 25565 is still in use, most often by a backend server that wasn’t moved to another port.
  • Connection refused with an invalid key message: the secret value in paper-global.yml doesn’t match the contents of forwarding.secret.
  • Immediate disconnection on entry: the online-mode setting in velocity.toml and the one in Paper’s proxy block don’t match.
  • Modern forwarding has no effect: the backend server runs a Paper version earlier than 1.13.2, or settings.bungeecord was left at true in spigot.yml.
  • The proxy starts but no server can be reached: the addresses in [servers] point to a port or address the servers no longer listen on since server-ip was added.

Rolling back: stop the proxy, then restore on each backend server the copies of server.properties, spigot.yml and config/paper-global.yml made before starting. This sets online-mode back to true, removes the server-ip line and disables the proxy block. After a restart, each server is directly reachable again at its original address.

Further reading