Tree Host

How to Whitelist a Minecraft Server (Java and Bedrock)

Updated · by the Tree Host team

To whitelist a Minecraft Java server, open the console and run /whitelist add PlayerName for each player, then /whitelist on. Only people on the list can join. Remove someone with /whitelist remove PlayerName. You need operator rights, or you can type the commands in the server console.

This guide covers Minecraft Java Edition 1.21 and newer on Vanilla, Paper, Purpur and Fabric, plus a short section on Bedrock. If you are still setting up your first world, start with how to make a Minecraft server for friends.

What a whitelist does

A whitelist is a list of players who are allowed to join. When it is on, everyone else sees a message and cannot connect, even if they know your server address. It is the simplest way to keep a private server private.

It is a good fit for a server with friends, family, a school club or a small SMP. It will not help a public server, because there you want strangers to be able to join. For those, look at a ban list, a permissions plugin and anti-grief tools instead.

1. Turn the whitelist on

There are two ways. Pick one.

Turning it on does not kick anyone who is already online. We cover that in step 5.

2. Add players to the whitelist

You can use a selector instead of a name when the player is online, for example /whitelist add @a adds everyone currently connected. This is a quick way to whitelist your group before you switch the whitelist on.

3. Remove a player

Type /whitelist remove PlayerName. The player stays connected until they leave, but they cannot come back. If you want them out right away, kick them with /kick PlayerName as well, or use step 5.

All the whitelist commands

CommandWhat it does
/whitelist onTurns the whitelist on
/whitelist offTurns the whitelist off
/whitelist add <name>Adds a player
/whitelist remove <name>Removes a player
/whitelist listShows everyone on the list
/whitelist reloadReads whitelist.json again after you edit it by hand

These commands need operator permission level 3 or higher. If you are not an operator yet, run them from the server console, which always has full rights. To make yourself an operator, run op YourName in the console.

4. Edit whitelist.json by hand

The list lives in whitelist.json in your server folder. Each entry has a name and a UUID, like this:

Editing by hand is useful when you move a server. Copy whitelist.json from your old server to the new one and the whole list comes with you. See how to move your server to Tree Host for the other files worth copying.

5. Kick players who are not on the list

By default, the server only checks the whitelist when someone tries to join. Set enforce-whitelist=true in server.properties and the server also removes anyone who is not on the list when you run /whitelist reload or restart. Use it when you turn the whitelist on for a server that already has visitors.

6. Fix 'You are not white-listed on this server'

This is the message a blocked player sees. Check these causes in order:

More join problems, such as a wrong port or a version mismatch, are in the troubleshooting guide.

Whitelist on Bedrock

Bedrock uses different words and files. How you do it depends on how your Bedrock players connect.

SetupTurn it onAdd a player
Bedrock Dedicated Serverallow-list=true in server.properties, or allowlist onallowlist add Name
Java server with Geyser and FloodgateThe normal Java whitelist (/whitelist on)/fwhitelist add Name for Bedrock players

The Bedrock Dedicated Server stores its list in allowlist.json. With Floodgate, Bedrock names get a prefix (a dot by default) so they do not clash with Java names, so ask Bedrock players to join once or check the prefix in your Floodgate config before you add them. Crossplay needs plugins, and our guide on adding plugins to a Minecraft server shows how to install them.

Whitelist on Tree Host

You do not need to remember any of these commands on Tree Host. Set your Minecraft name in Account, open the Console tab and click Whitelist me. The OP me button whitelists you and gives you operator rights in one click. The whitelist switch also sits in Settings, under game settings. The servers guide shows where each button is.

Tree Host has not launched yet. Anyone who is signed in can try the shared demo server now, and creating your own server opens at launch. See what Tree Host offers in the meantime.

Keep your list tidy

Tree Host gives you a console with one-click Whitelist me and OP me buttons, so friends can join and strangers cannot. Check the plans or try the demo server.

More guides

← More guides