Building a Minecraft Network: Four Servers Pretending to Be One Place
A proxy, a lobby, an SMP and a PvP arena is four JVMs that know nothing about each other. What actually has to be shared, why your permissions don't follow players, and the two LuckPerms defaults that silently share nothing at all.
A network is not four Minecraft servers. It is four Minecraft servers that have been made to lie convincingly about being one place.
Nothing in the software wants to help you with this. Each backend is a complete, self-contained server that boots with its own world, its own player data, its own permissions database and no idea the others exist. The proxy in front of them moves connections around. It does not move anything else. Every piece of continuity a player experiences — their rank surviving a trip to the arena, a ban applying everywhere, the economy balance that doesn't reset — is something you built, with a database behind it.
Get that wrong and the failure is not a crash. It is a player who is an admin on the lobby and nobody on the SMP, discovered three weeks later by the wrong person.
What Actually Gets Shared
Start here, before you install anything, because this decision shapes every other one. Not all state should be network-wide, and the two worst outcomes are both single rows of this table read backwards: inventories shared when they shouldn't be, and permissions not shared when they should. Each gets its own section below.
| State | Share it? | Why |
|---|---|---|
| Permissions and ranks | Yes, with per-server scoping | A rank that stops at a server boundary isn't a rank; one that ignores boundaries entirely is worse |
| Punishments (bans, mutes) | Yes | A ban that only covers the lobby is a suggestion |
| Economy balance | Yes | Currency that varies by server is an arbitrage bot |
| Player profile, playtime, stats | Yes | Cheap to share, confusing not to |
| Chat | Selectively | Global channels yes; PvP trash talk in the build server, no |
| Inventory and ender chest | Almost never | See below |
| World data | No | That's the point of separate servers |
| Plugin configs | No | Per-role tuning is the whole reason you split |
The inventory row is the one that bites. Synchronising inventories across servers sounds like the friendly thing to do, and it is correct for two servers of the same kind — two SMP shards, a survival overflow. Across different gamemodes it is a duplication exploit with a friendly name. A player fills up in creative on the build server, walks to the SMP, and your economy is finished. If the gamemodes differ, the inventories stay separate.
The Proxy Is Just a Router
Velocity's job is small and worth stating precisely: it authenticates the player with Mojang once, then hands the connection to whichever backend you tell it to. It holds no world data, which is why its memory profile looks nothing like a backend's.
A four-server layout, in velocity.toml:
online-mode = true
player-info-forwarding-mode = "modern"
forwarding-secret-file = "forwarding.secret"
[servers]
lobby = "10.0.0.11:25566"
smp = "10.0.0.12:25566"
pvp = "10.0.0.13:25566"
build = "10.0.0.14:25566"
try = ["lobby"]
[forced-hosts]
"pvp.example.com" = ["pvp"]
"play.example.com" = ["lobby"]
try is the login destination and the fallback: the shipped config describes it as the order "we should try servers when a player logs in or is kicked from a server." That second clause is the one that matters operationally — when a backend goes away, players land in the lobby instead of being disconnected, and your downtime becomes an inconvenience rather than an exodus. Put the lightest, most reliable server first.
Be precise about what "goes away" covers. The comment on the setting that governs it carves out the case you are most likely to hit:
failover-on-unexpected-server-disconnect = true
By default, Velocity will attempt to gracefully handle situations where the user unexpectedly loses connection to the server without an explicit disconnect message by attempting to fall the user back, except in the case of read timeouts. BungeeCord will disconnect the user instead. You can disable this setting to use the BungeeCord behavior.
Note the carve-out: "except in the case of read timeouts." A backend that dies — JVM exits, process killed, socket closes — fails players back to the lobby. A backend that hangs does not. It sits there holding open sockets and answering nothing until read-timeout expires, which the shipped config puts at 30 seconds, and then everyone on it is disconnected rather than relocated.
That matters because hanging is the common failure. A clean crash is rare; a server frozen by a long GC pause, a deadlocked plugin, or a chunk-generation storm is routine. So the honest version of the fallback promise is: try protects you from crashes, and does nothing for freezes. The protection against freezes is the per-role tuning further down and the profiling section after it, not a line in velocity.toml.
forced-hosts routes by the hostname the player connected with, so pvp.example.com drops them straight into the arena. It costs one DNS record per entrance and it is the difference between a network and a menu.
Who Can Go Where
One default to check before you register a staff server. From Velocity's ServerCommand:
.requires(src -> src instanceof Player
&& src.getPermissionValue("velocity.command.server") != Tristate.FALSE)
Read the comparison carefully. The check is != Tristate.FALSE — not == TRUE. An unset permission is not false, so /server is available to everyone by default, and the only way to take it away is to explicitly set velocity.command.server to false. On a fresh proxy, any player can type /server build and arrive on your build server.
It gets better. The tab-completion handler in the same file iterates every registered server with no permission check at all:
for (final RegisteredServer sv : server.getAllServers()) {
final String serverName = sv.getServerInfo().getName();
if (serverName.regionMatches(true, 0, argument, 0, argument.length())) {
builder.suggest(serverName);
}
}
So the names of your internal servers are discoverable by pressing Tab. Not a vulnerability; the connection is still subject to whatever the backend enforces. But if your plan was for staff-dev to be a secret, it isn't one. Name things as though players will read the list, deny the permission by default and grant it per group, and treat the backend's own access control as the thing actually protecting it.
This is where network design and network security stop being separable. A backend that trusts anything reaching it does not care which of your servers a connection came from, and the proxy security side of this covers the forwarding and firewall configuration this layout assumes. Build that first; everything below presumes it.
Why Your Permissions Don't Follow Players
This is the single most common broken network, and the cause is two defaults that are individually reasonable and jointly useless.
LuckPerms ships with:
storage-method: h2
H2 is a local embedded database. Each server writes its own file. Install LuckPerms on four backends with the default and you have four completely separate permission systems that happen to share a command syntax. A rank granted on the lobby does not exist anywhere else, and nothing warns you, because from each server's point of view everything is working.
Moving to a shared MySQL or MariaDB database fixes storage. It does not fix propagation, and that distinction is where people get stuck for a week.
The Messaging Service Is the Part People Miss
A shared database means every server can see the same data. It does not mean a running server notices when the data changes. LuckPerms loads a player's permissions on join and caches them. Change a rank from the lobby and the SMP keeps serving what it already has.
The config is explicit about the job:
# - If enabled and configured, LuckPerms will use the messaging service to inform other connected
# servers of changes.
# - Use the command "/lp networksync" to manually push changes.
# - Data is NOT stored using this service. It is only used as a messaging platform.
And the default:
messaging-service: auto
auto is documented as "Attempts to automatically setup a messaging service using redis or sql." Which means the two defaults interact in a way the release notes won't tell you: with storage-method: h2, there is no SQL to form a queue in and no Redis configured, so auto resolves to nothing at all. Default storage plus default messaging equals silence. Switch storage to MariaDB and the same auto setting starts working: the config notes that sql messaging "is chosen by default if the option is set to 'auto' and SQL storage is in use."
The options, with the constraints that decide between them:
| Service | Requires | Watch out for |
|---|---|---|
sql |
MySQL or MariaDB storage | Queue in the database; simplest if you already have one |
redis |
A Redis instance | Real pub-sub, supports Sentinel for failover |
rabbitmq / nats |
That broker | Sensible if you already run one for something else |
pluginmsg |
LuckPerms on the proxy and every backend | "Won't work if you have more than one proxy" |
auto |
Redis or SQL to actually exist | Silently does nothing if neither does |
That pluginmsg constraint is quoted from the config file itself, and it is the trap for anyone who starts with one proxy and later adds a second for capacity. It works perfectly until the day it is load-bearing.
One more pairing, from the same file. The messaging block says that if you enable a messaging service, "you should set sync-minutes to -1, as there is no need for LuckPerms to poll the database for changes" — and the sync-minutes entry says the opposite case too: "if you're using a remote storage type without a messaging service setup, you may wish to set this to something like 3." Two settings, one decision. Push-based with sync-minutes: -1, or poll-based at a few minutes' latency. Not both, and not neither.
If you run LuckPerms on the proxy as well as the backends — which you want, so the proxy can check permissions for /server — set broadcast-received-log-entries to false on one side or the other. The config explains why: otherwise "players being messaged twice about log entries."
Ranks That Differ Per Server
Sharing permissions network-wide is the easy half. The half people discover late is that you usually don't want them identical everywhere — a builder who needs WorldEdit on the build server should not have it on the SMP, and your PvP moderators have no business with /gamemode in survival.
The mechanism exists and it is one line, sitting in the section the config labels ESSENTIAL SETTINGS:
# The name of the server, used for server specific permissions.
#
# - When set to "global" this setting is effectively ignored.
# - In all other cases, the value here is added to all players in a "server" context.
server: global
Note the default. Every LuckPerms install calls itself global, and at that value the setting is "effectively ignored" — there is no server context, so server-specific grants have nothing to attach to. Four backends on defaults are four servers that all claim to be the same server, which is why "I granted it on the SMP only" doesn't work until you fix it.
Give each one a real name — server: lobby, server: smp, and so on — and every player on that backend picks up a server context you can scope permissions and groups to. The names are yours and need not match velocity.toml, but you will save yourself a bad afternoon if they do.
Then there are four resolution switches that decide how global and server-specific data combine. They sit apart from each other in the file, with explanatory comments between; gathered together, and all defaulting to inclusive, they are:
include-global: true
include-global-world: true
apply-global-groups: true
apply-global-world-groups: true
The config explains include-global as whether "users on this server should have their global permissions applied. When set to false, only server specific permissions will apply for users on this server." That switch inverts the model. Left true, a server is additive — global rank plus whatever you grant locally, which is what you want for an SMP. Set false, a server becomes an allowlist: nothing applies unless you granted it for that server by name.
false is the right answer more often than people expect. A staff-only build server, a test server, anywhere you would rather a forgotten global permission did not quietly follow someone in — those are servers where starting from nothing and adding deliberately beats inheriting everything and remembering to subtract.
One per-world gotcha from the same file, since an SMP has more than one world. World contexts are separate by default, and the aliases that would collapse them ship commented out:
world-rewrite:
# world_nether: world
# world_the_end: world
This only bites permissions you scoped to a world — anything granted globally still applies everywhere. But a permission scoped to world does not apply in world_nether unless you uncomment those lines or grant it there separately. The comment notes the aliases "are provided in addition to the real world name" and apply recursively. If a permission behaves correctly on the surface and mysteriously stops working through a portal, this is why.
Count Your Database Connections Before They Count You
A capacity wall arrives here without warning, usually on the night you add the fifth server.
LuckPerms' shipped pool settings:
pool-settings:
# Sets the maximum size of the MySQL connection pool.
# - Basically this value will determine the maximum number of actual
# connections to the database backend.
# - More information about determining the size of connection pools can be found here:
# https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
maximum-pool-size: 10
# Sets the minimum number of idle connections that the pool will try to maintain.
# - For maximum performance and responsiveness to spike demands, it is recommended to not set
# this value and instead allow the pool to act as a fixed size connection pool.
# (set this value to the same as 'maximum-pool-size')
minimum-idle: 10
Read those two values together. minimum-idle ships equal to maximum-pool-size, which the comment explicitly recommends, so the pool is not elastic — it is a fixed ten connections, held open, per instance. That is a sensible default for one server and a multiplication problem on a network.
Four backends plus the proxy is five LuckPerms instances: fifty persistent connections before any player has logged in. Now add a punishments plugin and an economy plugin, each with its own HikariCP pool and its own default of around ten, on each of the same five processes. Three pooled plugins network-wide is 150 connections sitting idle, and idle is the point — they are reserved whether or not anyone is playing.
Database servers cap this, and the cap is lower than people expect. Find yours rather than trusting a number from an article:
SHOW VARIABLES LIKE 'max_connections';
SHOW STATUS LIKE 'Threads_connected';
The first is your ceiling, the second is what you are using right now. If the gap is small, you have a network that works fine until one backend restarts and tries to open ten more connections while the old ones are still timing out.
Two fixes, in order. Lower the per-instance pool. Permission lookups are bursty and shallow, ten concurrent connections per server is generous to the point of waste, and the HikariCP sizing guide the config links to argues for far smaller pools than most people pick. Then raise the server's ceiling deliberately, with the memory cost in mind, rather than discovering it as an outage.
One related trap in the same block. maximum-lifetime defaults to 30 minutes, and the comment warns it "should be at least 30 seconds less than any database or infrastructure imposed connection time limit." If your database's wait_timeout is shorter, the pool hands out connections the server has already closed. The symptom is intermittent permission failures that correlate with nothing.
Per-Role Tuning Is the Whole Point
Here is the argument for splitting that has nothing to do with player counts. On one server, every setting is a compromise between incompatible workloads. A lobby wants a tiny view distance and no mobs. An SMP wants generous view distance and full simulation. A PvP arena wants neither of those as much as it wants a rock-steady tick. Split them and each one gets its own server.properties, which means each one gets the right answer instead of the average of three wrong ones.
A starting point per role:
| Setting | Lobby | SMP | PvP |
|---|---|---|---|
view-distance |
4 | 8–10 | 5–6 |
simulation-distance |
3–4 | 6–8 | 4–5 |
difficulty |
peaceful |
normal/hard |
peaceful |
spawn-protection |
large | 0 |
large |
| world border | tight | as designed | tight |
online-mode |
false (proxied) |
false (proxied) |
false (proxied) |
difficulty=peaceful is doing most of the work on the lobby and arena rows: it is the single setting that stops hostile mobs being a concern at all, which saves more tick budget than any limit you could tune. spawn-protection runs the other way — Paper documents its default as 16, applied "using the formula 2x+1, so the default protects a 33-block square," with 0 disabling it. A lobby is almost entirely spawn, so a generous value stops visitors redecorating it; an SMP wants 0, because a 33-block no-build square around spawn is a famous source of confused new players. Note the page's caveat that at least one operator must exist for spawn protection to apply.
Worth knowing what you are changing from. Paper's server.properties reference gives the stock values as view-distance=10, simulation-distance=10 and difficulty=easy — so the lobby row above is not a minor trim, it is a four-to-six-chunk reduction on both distance settings. Both are constrained to the range 3–32 inclusive, so 4 is legal and 2 is not.
One correction worth making loudly, because it is a popular piece of bad advice: do not reach for max-world-size to shrink a lobby. Paper's reference is specific that it "sets the maximum world radius in blocks, applied only to chunks generated at world creation, not the world border." It constrains generation, not movement, and its default is 29999984. What actually keeps players inside a small lobby is a world border, or better, a pre-built flat or void world with nothing to walk to. simulation-distance only exists on 1.18 and later; on anything older view-distance governs both.
The lobby row is doing most of the work. A lobby is a decorated waiting room: nothing needs to spawn, nothing needs to grow, nothing needs to be simulated eight chunks out. Set spawn-monsters=false and difficulty=peaceful and a large share of the tick budget simply stops being spent.
Mob limits deserve a second look, because of where their defaults live. Paper's per-world spawn settings default to -1, which means "inherit from bukkit.yml", and bukkit.yml ships with these (the ticks-per list is longer than shown; the rest follow the same pattern):
spawn-limits:
monsters: 70
animals: 10
water-animals: 5
water-ambient: 20
water-underground-creature: 5
axolotls: 5
ambient: 15
ticks-per:
animal-spawns: 400
monster-spawns: 1
water-spawns: 1
monster-spawns: 1 means the server attempts monster spawning every single tick. On an SMP that is correct and you tune the limits instead. On a lobby it is pure waste, which spawn-monsters=false removes more cleanly than any limit tuning. And note that Paper's per-player-mob-spawns defaults to true, so the monsters: 70 figure is counted per player rather than server-wide — a detail that changes what the number means entirely once you have forty people online.
If you want the deeper version of single-server tuning, the optimization guide goes through it properly. The network-specific insight is narrower: you are no longer tuning a server, you are tuning three different machines that happen to share a host.
The Modern Alternative Nobody Uses Yet
Since Minecraft 1.20.5 there is a second way to move a player, and it deserves a look even if you don't build on it today. Velocity's API, as of 3.3.0:
void transferToHost(@NotNull InetSocketAddress address);
void storeCookie(Key key, byte[] data);
void requestCookie(Key key);
The transfer packet hands a client to an arbitrary host rather than a registered backend; cookies stash small amounts of data on the client for retrieval later. Together they allow handoffs that never route through a proxy — entrances that redirect rather than relay.
Three cautions, and the first is a setup requirement rather than a warning. Receiving transferred players is off by default:
accepts-transfers = false
The comment is one line — "Allows players transferred from other hosts via the Transfer packet (Minecraft 1.20.5) to be received." Until you flip it, your proxy will not take handoffs from anywhere. That default is the right way round: an open door that any host on the internet can push players through is not something you want by accident, and leaving it closed until you have a reason is the correct posture.
Second, both API methods throw if the player is below 1.20.5, so this is additive rather than a replacement for proxy routing.
Third, cookie data lives on the client. It is data a determined player can tamper with — fine for a routing hint, useless for anything you would enforce with. The database stays the source of truth, and a cookie is a performance optimisation on top of it at best.
What This Doesn't Cover
Performance and operations. Sizing four JVMs on one host, start-up ordering, profiling and the settings that fix themselves are the second half of this subject, and they have an article of their own.
Cross-server chat signing. Since 1.19 chat messages carry client signatures, and relaying signed chat between servers is not the simple string-forwarding problem it used to be. Pick a chat plugin that has an opinion about this and read what it does.
Horizontal scaling of a single world. Four servers with four worlds is this article. One world across several processes is a different and much harder problem — Folia and the one-thread question is the honest state of it.
Database operations. The shared MariaDB this design rests on needs its own backups, its own monitoring, and its own capacity plan. It is now the thing whose failure takes down every server at once, and it deserves more than the default config and hope.
Plugin trust. Every shared database credential sits in a config file readable by every plugin on that server, and your forwarding secret sits beside it. What a malicious plugin can do with that is a separate article, and a network multiplies it: one compromised plugin on the least important server holds credentials for the most important one.
Which server JAR to run. Paper, Purpur, Pufferfish and friends differ in ways that matter per role — the server software guide has the comparison, and there is no rule that every backend has to be the same fork.
The Build Order
Do it in this sequence. Each step is testable before the next one can hide a mistake in it.
- One backend, bound to a private address, firewalled. Prove you can reach it from the proxy host and not from outside.
- Proxy with modern forwarding and one server in
try. Confirm your UUID and skin are correct in-game — that is the forwarding test, and it fails loudly rather than silently. - Grep the backend's startup log for forwarding errors before adding anything else. A network built on a backend that quietly stopped verifying is a network you will have to take apart.
- The shared database, then LuckPerms on MariaDB, with
sync-minutes: -1and a messaging service you chose deliberately. - Test propagation specifically. Grant a rank on the lobby, check it on the SMP without restarting anything. This is the step everyone skips and it is the only proof the messaging service works.
- Name each server in LuckPerms before you create a single group, because retrofitting server contexts onto ranks people already have is tedious and error-prone.
- Second and third backends, each with its own tuned
server.properties. - Punishments, economy, chat — one at a time, testing propagation on each, because a half-synced ban system is worse than none.
- Count your database connections once everything is installed.
SHOW STATUS LIKE 'Threads_connected';against your ceiling, while the network is idle. That number only goes up.
Then sizing, start-up and profiling, which is where the operations half picks up.
The thread running through all of it: a network is a distributed system wearing a game's clothes. The parts that break are the seams, not the servers, and almost every seam is a piece of state you assumed was shared and never checked. Granting yourself a rank on one server and walking to another to look for it takes thirty seconds and is the most valuable test in this article.
$ tail -f /forums
Discussion
Comments live on the community forums — sign in there to reply.