How to manage the whitelist of your Minecraft server
Learn how to use the whitelist to protect your private Minecraft server. Prevent strangers from joining and messing with your Minecraft server.
When your Minecraft server is connected to the internet, anyone is able to join your Minecraft server. If you run a public Minecraft server, then this is generally desired. However if you run a private server for friends or family, then you don't want strangers to join and mess with your server. For this use case there exists the whitelist.
What is a whitelist
A whitelist is used to prevent strangers from joining your Minecraft server and potentially messing with your Minecraft world. By specifying which players are allowed to join your Minecraft server. Anyone not on the whitelist is not allowed access to your Minecraft server. A whitelist is also referred to as an allowlist.
Adding players to whitelist
To add a player to the whitelist use the /whitelist add <player>
command.
Example:
/whitelist add Steve
/whitelist add Alex
Removing players from whitelist
To remove a player from the whitelist use the /whitelist remove <player>
command.
Example:
/whitelist remove Steve
/whitelist remove Alex
Viewing players on whitelist
To view the players on the whitelist use the /whitelist list
command.
How to enable the whitelist
Once you have added players to the whitelist, you are ready to enable the whitelist.
To enable the whitelist you can run the /whitelist on
command in the server console or in-game if you have operator privileges.
Once the whitelist is enabled, players that are not on the whitelist will be unable to join the server.
Enforce whitelist
You might be wondering what happens to players when you enable the whitelist, that are currently connected but not on the whitelist. The default behaviour is that these players will stay connected, but will not be able to re-join the server.
There is the option to kick players that are not on the whitelist.
To enable this, edit the server.properties
file and set enforce-whitelist=true
.
Save the changes and restart the server.
Now whenever you turn on the whitelist, players that are not on the whitelist will be kicked from the server.
How to disable the whitelist
To disable the whitelist you can run the /whitelist off
command in the server console or in-game if you have operator privileges.
FAQ
Where is the whitelist stored?
The whitelist is stored in the whitelist.json
file.