How to set up a whitelist on your Minecraft server
Turn on the whitelist so only approved players can join your Minecraft Java server, and add or remove players with commands.
Updated · 2 min read
A whitelist makes your server private: only players on the list can join. Turn it on with whitelist on, add players with whitelist add <name>, and enable enforce-whitelist so removed players are kicked.
Turn the whitelist on
Run these in the Schokr console (no slash needed) or in-game as an op with a slash:
whitelist on
whitelist add YourName
whitelist add FriendName
Add yourself first, or you will lock yourself out. Ops are not automatically exempt.
The command updates white-list in server.properties for you. To set it in the file instead:
white-list=true
enforce-whitelist=true
Whitelist commands
| Command | What it does |
|---|---|
whitelist on | Turn the whitelist on |
whitelist off | Turn it off (anyone can join) |
whitelist add <name> | Add a player |
whitelist remove <name> | Remove a player |
whitelist list | Show everyone on the whitelist |
whitelist reload | Reload whitelist.json after editing it by hand |
What enforce-whitelist does
By default, removing someone from the whitelist does not kick them if they are already online. With enforce-whitelist=true, players who are not on the list are kicked when the whitelist is reloaded or changed. Turn it on so removing someone actually removes them.
The whitelist.json file
Players are saved in whitelist.json in the server root:
[
{
"uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
"name": "Notch"
}
]
Using the command is easier, because the server looks up the correct UUID for you. If you edit the file by hand, run whitelist reload afterwards.
Common problems
- "You are not whitelisted on this server" means the name is not on the list, or it was added with a typo. Run
whitelist listto check. - Player changed their username. The whitelist is stored by UUID, so they can still join. The name in the file updates over time.
- Adding a player fails. The server looks up the name with Mojang. Check the spelling, which must match the Java Edition username.
- Bedrock players through Geyser and Floodgate use a prefixed name (often a dot, like
.PlayerName) and may need to be added through Floodgate's own command. Check the Floodgate docs.
Whitelist vs online-mode
A whitelist only works if online-mode=true. In offline mode anyone can type a whitelisted name. See online-mode explained.
To remove troublemakers from a public server instead, see ban, kick and pardon players.