"Failed to verify username" is a server-side message: the server tried to verify a player with Mojang/Microsoft auth and couldn't. Here's why and how to fix it, including the clock-skew cause admins often miss.
Quick answer
"Failed to verify username" means the server could not check a player with Mojang/Microsoft authentication. It is usually a temporary auth outage, a player on a cracked (offline) account joining an online-mode server, or a backend behind BungeeCord/Velocity that is not set up for player forwarding. A wrong system clock on the server can cause it too.
Cause 1: Mojang auth is temporarily down
With online-mode=true, the server checks each player against Mojang's auth servers. If those are down or flaky, verification fails. Check the Minecraft service status — if it's an outage, just wait it out.
Cause 2: players using "cracked"/offline accounts
An online-mode server rejects non-premium (cracked) accounts — that's the point of online-mode. Players must use legitimate accounts, or the server must run offline (not recommended).
Cause 3: behind a proxy without forwarding
If your backend server sits behind a proxy (BungeeCord/Velocity), the backend should be online-mode=false and rely on the proxy's IP/player forwarding. A misconfigured proxy setup causes verify failures.
Setting online-mode=false to "fix" this on a standalone server removes all account security — anyone can join as anyone. Only do it for offline play, and always with a whitelist or a proxy that handles auth.
It's an auth check. Wait out Mojang outages, require legit accounts, and on a proxy network set the backend to offline with proper forwarding.
Cause 4: server clock is wrong
Mojang/Microsoft auth tokens are time-sensitive. If the server's system clock has drifted, session validation can fail even with a correct account and a working internet connection. Check the time with timedatectl status and enable NTP sync with timedatectl set-ntp true if it's off.
Cause 5: outbound access to Mojang's servers is blocked
A restrictive host or corporate firewall that blocks outbound HTTPS to Mojang/Microsoft's session servers will cause every join to fail verification, even though the server itself is healthy. Confirm outbound HTTPS isn't filtered.
Related errors
If players can't even reach the server before this point, see fixing "Connection refused: no further information". For a new server setup with online-mode configured correctly from the start, see how to make a Minecraft server.
Minecraft is a trademark of Mojang Synergies AB / Microsoft. ESAGAMES is an independent hosting provider, not affiliated with or endorsed by Mojang or Microsoft.