Turn the whitelist on
The switch lives in server.properties, in the folder the server runs from. The property is white-list on Java Edition (allow-list on Bedrock). Set it to true:
white-list=true
Changes to server.properties need a restart to take effect. You can also switch the list on and off while the server is running with whitelist on and whitelist off; these two subcommands are not implemented on Bedrock.
Add your friends
From the server console, or in game as an operator, run:
whitelist add FriendName
whitelist remove FriendName
whitelist list
The players do not need to be online when you add or remove them. whitelist list prints everyone currently on the list, which is the quickest way to check that a friend who cannot join was really added. On Java Edition the command needs permission level 3.
What gets written to disk
The list is stored in whitelist.json in the server's working directory. It is a JSON array with one object per player, and each object holds the player's uuid (in hyphenated form) and name:
[
{ "uuid": "00000000-0000-0000-0000-000000000000", "name": "FriendName" }
]
The uuid above is a placeholder. The important detail is that Java Edition checks the UUID, not the typed name. If a friend renames their account, the old entry no longer matches the person and you need to add the new name.
Editing the file by hand
If you prefer to paste in a whole group at once, edit whitelist.json and then run:
whitelist reload
That reloads the profiles from the file, which is what you want after editing it outside the game. Without it, the running server keeps using the list it already had in memory.
Kicking people who are already online
Adding the whitelist to a server that is already full of people does not remove anyone by itself. The enforce-whitelist property in server.properties changes that: with it set to true, players who are online but not on the list are kicked after the whitelist reloads. It is false by default.
Operators and the whitelist
On Java Edition, operators can always connect while the whitelist is active, even if they are not listed. That is handy for you as the admin, but remember it when you test: if you are an operator, you joining proves nothing about whether the list works. Test with a friend, or with an account that is not an operator. On Bedrock the rule is different: players must be on the allow list whatever their operator status.
Operators are also the people who can bypass the player cap if you give them bypassesPlayerLimit in ops.json; those players still count toward max-players.
Offline-mode servers behave differently
online-mode controls whether the server checks accounts against Minecraft's account database. If it is switched off on Java Edition, the whitelist checks against an offline UUID generated from each username, so a list built on real UUIDs will not match. For a group of friends on a normal server, leave online-mode at its default of true.
Quick fixes
- A friend says they are not whitelisted. Run
whitelist listand look for the exact name. Typos and renamed accounts are the usual cause. - You edited the file and nothing changed. Run
whitelist reload. - Everyone can still join. Check that
white-list=trueis saved in theserver.propertiesthe server actually reads, and that you restarted afterwards.