What online-mode=false actually does to your server

Offline mode is not just a cracked-client toggle. It changes how player identity works, and switching it on a live world looks exactly like data loss.

The short version

online-mode=false disables Mojang authentication, so anyone can join using any username, including your operators'. It also switches player data from Mojang UUIDs to offline UUIDs generated from the username, which is why flipping it on an existing world appears to wipe everyone's inventories.

Most people meet this setting as a suggestion in a forum thread: turn off online-mode and the login problem goes away. It does. Here is what else it does.

#What it changes

Authentication. In online mode the server verifies every join against Mojang. In offline mode it does not, and accepts whatever username the client sends.

Player identity. This is the part nobody mentions. In online mode, players are identified by their Mojang UUID, which is permanent and follows them through name changes. In offline mode, the server generates a UUID by hashing the username string.

Those two UUIDs are not the same. And every piece of player data on the server, inventories, ender chests, positions, advancements, permissions, home locations, claims, balances, is filed by UUID.

#The apparent data loss

Change online-mode on a world that has been played in, and every player joins with a UUID the server has never seen. So the server does what it does for any new player: gives them a fresh inventory at spawn.

Their base is still there. Their chests still have their contents. Their old character data still exists in playerdata, filed under a UUID nobody is presenting any more. Nothing was deleted; everyone was handed a new identity.

It is indistinguishable from data loss to the people it happens to, and the panic it causes is entirely rational given what they are looking at.

This is also the most common failure in server migrations. An import from a host that ran offline mode onto a server running online mode produces exactly this, and the world looks wiped. Check online-mode in the old server.properties before importing.

#Recovering from an accidental switch

Set it back. If nobody has played much since, changing online-mode back to its previous value restores the old UUIDs and everyone's data reappears.

If people have played under the new identities, you have two sets of player data and a decision to make. Restoring a backup from before the change is the clean route. Manually mapping playerdata files between UUIDs is possible and unpleasant.

#The security side

An offline-mode server reachable from the internet accepts anyone claiming any name.

That includes yours. Someone who sees your username in a YouTube video can join as you, and if you are an operator, they are an operator. There is no additional step, no password, nothing to bypass.

A whitelist raises the bar but does not fix it, because in offline mode the whitelist matches on username and the username is exactly what the attacker chooses.

#When offline mode is legitimate

Behind a proxy. Velocity and BungeeCord authenticate at the proxy and pass verified identity to backends, which run offline so they do not re-authenticate. This is correct, and it is safe only when backends are firewalled to accept connections from the proxy alone. Linkd sets up both halves; doing it by hand and forgetting the firewall is a well-known way to lose a network.

A LAN or private test server that is genuinely not reachable from the internet.

Deliberately supporting unauthenticated clients, with the security consequences understood and accepted, plus something else providing identity, usually a login plugin that adds its own passwords.

#If you are here because of a login error

If you arrived from a "failed to verify username" message, offline mode is not the fix. That error is usually a stale session on one player's launcher and it clears with a launcher restart. See failed to verify username.

#Frequently asked questions

What does online-mode=false do?

It turns off Mojang authentication. The server stops verifying that players own the accounts they claim, so anyone can connect with any username. It also switches player data keying from Mojang-issued UUIDs to offline UUIDs derived from the username string.

Why did everyone lose their items after I changed online-mode?

Nothing was deleted. Player data is filed by UUID, and changing online-mode changes every player's UUID, so the server looks for their data under a new identity and finds none. The old data is still in the world, filed under UUIDs nobody is presenting any more.

Is an offline-mode Minecraft server safe?

Not if it is reachable from the internet without other protection. Anyone who learns the address can join as any username, including your operators, and there is no authentication to stop them. A whitelist helps but is username-based, so it inherits the same weakness.

Written and maintained by the Hostd engineering team. Last updated 2026-08-05. Notice a mistake? Tell us.

Cookies