Guides / server.properties

How to whitelist a Minecraft server

Make your Minecraft server invite-only with the whitelist, step by step, including enforce-whitelist.

Updated

A whitelist makes your server invite-only. Only players on the list can join.

Turn it on

In server.properties:

white-list=true
enforce-whitelist=true

Or, while the server is running, from the console or as an operator:

/whitelist on

enforce-whitelist kicks anyone online who isn't on the list when the whitelist is reloaded. Without it, they stay until they log out.

The Friends SMP preset in the server.properties generator sets both.

Add and remove players

/whitelist add PlayerName
/whitelist remove PlayerName
/whitelist list

Add yourself first. The server checks names against Mojang, so players need the exact username of a real account. Names are stored with account IDs in whitelist.json, so name changes don't lock anyone out.

Editing whitelist.json by hand

If you edit the file directly, run /whitelist reload afterwards. Getting the format wrong stops the list loading, so the commands are safer.

Operators

Operators can join even when they aren't on the whitelist. Keep the operator list short.

Whitelist plus online-mode

The whitelist is only safe with online-mode=true. With it off, anyone can join using a whitelisted name. See online-mode explained.

Work it out for your server

The free server.properties generator gives you the exact settings for your setup.

Open the server.properties generator →