NEW 📢 Save up to 30% on your first month, limited time offer!

How to set up a whitelist and ban players on your Minecraft server

MinecraftUpdated Oct 5, 20266 min read

A whitelist makes your server private: only the players you list can join. A ban does the opposite and keeps one player or address out. Both are managed from the panel, and this guide covers Java Edition first and Bedrock at the end. Bedrock has two server types, Bedrock and Pocketmine, and they differ.

Turn on the whitelist (Java)

  1. Open your server in the panel and click Settings, then Server Properties (Java).
  2. Switch Whitelist on. If you want players who are online and not listed to be kicked, also switch Enforce whitelist on. The game kicks them after the server reloads the whitelist (whitelist reload), and the whitelist is also read again when the server starts.
  3. Click Save & restart. See Minecraft server properties explained.

Some newer Minecraft versions switch the whitelist on by default, so a new server may already be private. Check the switch before you ask friends to join, and add yourself and them first.

Add and remove players

With the server Online, open the Console tab and type these commands. Do not type a slash.

CommandWhat it does
whitelist add AlexAdds Alex to the whitelist
whitelist remove AlexRemoves Alex
whitelist listShows who is on the list
whitelist onTurns the whitelist on now
whitelist offTurns it off now
whitelist reloadReads the list file again after you edited it by hand

Use the name exactly as it appears in the game. With Online mode on, the server checks the name against Mojang, so a mistyped name is refused.

The list is stored in whitelist.json in the main server folder, which you can open from Files. To edit it by hand, stop the server first, or run whitelist reload afterwards. Players you add with the command are saved in that file straight away. Use the Whitelist switch on the settings page as the place to check whether it is on, because the panel shows and saves it there.

Keep Online mode on. With it off, the whitelist cannot tell one person from another who types the same name. See How to join your Minecraft server.

Kick and ban from the Overview page

On the Overview page of a Java server you may see an Active players card with the names of players who are online, when the server publishes them. The card is offered on most Java types: Vanilla, Paper, Purpur, Spigot, Folia, Fabric, Quilt, Forge, NeoForge, Magma, Ketting, Mohist and modpack servers. Proxies, Sponge and Custom Jar servers do not get it, so use the Console there. If you have access to the console, each name has a menu with Copy name, Kick and Ban. A kicked player can rejoin straight away. A banned player cannot rejoin until you unban them in the console. The card sends the same commands as below, and a name with unusual characters is not offered, so use the Console for those.

Ban and unban with the Console

CommandWhat it does
kick AlexRemoves Alex from the server for now. They can rejoin
kick Alex Please read the rulesSame, with a reason the player sees
ban AlexBans Alex's account, with an optional reason after the name
ban-ip 203.0.113.5Bans an IP address. You can also give a player's name, to ban the address they are using
banlistShows the banned players (banlist ips shows banned addresses)
pardon AlexUnbans Alex
pardon-ip 203.0.113.5Unbans an address

Bans are stored in banned-players.json and banned-ips.json in the main server folder. A banned player sees that they are banned when they try to join.

An address ban also blocks everyone who shares that address, such as people in the same household, so use it with care.

Only operators can run these in the game

In the game, these commands are typed with a slash and need operator level 3 or higher. The Console needs none. See How to op yourself and manage permissions.

Bedrock Edition

These steps are for the Bedrock server type, not Pocketmine. Bedrock calls the whitelist an allow list. It checks players by their Xbox gamertag.

  1. Open Settings, then Server Properties (Bedrock), switch Allow list on and restart.
  2. In the Console, type allowlist add Gamertag. If the gamertag has a space, put it in quotes: allowlist add "Gamer Tag".
  3. Use allowlist remove Gamertag to remove someone and allowlist reload after editing allowlist.json by hand.

Microsoft's server guide describes the allow list as the way to choose who can join and does not describe a ban list, so use the allow list to keep people out of a Bedrock server.

On a Pocketmine server, the switch is called Whitelist and is under Settings, then Server Properties (PocketMine). PocketMine's own commands differ from the ones above, so type help in the Console to see the commands your server knows, and see How to run a Minecraft Bedrock server.

If a command does nothing in the Console, open a ticket. See How to open a support ticket.

CREATE YOUR GAME SERVER
READY TO GET STARTED?

Save up to 30% on your new game server.
Premium performance, instant activation, and unbeatable reliability all at a better price.

OUR LATEST BLOGS