Skip to content

How to whitelist and op players in Minecraft

Two lists decide who gets into a Minecraft server and who runs it. The whitelist keeps everyone out except the players you name. The operator list, or ops, gives chosen players admin commands. Both work the same way on every Java Edition server, Vanilla, Paper, Fabric and the rest, because they are part of the game itself. Bedrock Edition's own server calls its list the allowlist.

Where to type the commands

You can type every command below in the game's chat as an operator, or in the server console. In the console you can leave out the leading slash. Commands only work while the server is running.

Turn the whitelist on

Add yourself and your friends first, then switch the whitelist on, so nobody gets locked out:

  • /whitelist add Name adds a player by their Java Edition username.
  • /whitelist on turns the whitelist on, and /whitelist off turns it off.
  • /whitelist remove Name takes a player off the list.
  • /whitelist list shows everyone on it.
  • /whitelist reload reads the list again from its file after you edit it by hand.

The name must be the exact account name. The server looks it up with Mojang and stores the account's unique ID, so a player who later changes their name stays on the list.

The server.properties keys

The same switches live in server.properties, which the server reads at startup:

  • white-list=true turns the whitelist on, the same as the command.
  • enforce-whitelist=true also kicks players who are online but not on the list when the whitelist is turned on or reloaded. Without it they stay until they leave.
  • op-permission-level sets how much power a new operator gets. It is 4, the highest level, unless you change it.
  • online-mode=true makes the server check every account with Mojang. A whitelist means little without it, because anyone could join under any name.

Make someone an operator

/op Name makes a player an operator, and /deop Name takes it away. Operators get the level set by op-permission-level. The levels build on each other:

  • Level 1: can build inside the protected area around spawn.
  • Level 2: can use cheat commands such as changing game mode, teleporting and giving items, and can edit command blocks.
  • Level 3: can manage players, including kicking, banning and making other operators.
  • Level 4: can use every command, including stopping the server.

An operator at level 3 or 4 can op others and ban anyone, so give ops only to people you would trust with the whole world. On a friends server, one or two admins is usually plenty. If you want helpers who can use some commands but not all, a permissions plugin gives finer control, as how to add plugins explains.

The files behind the lists

The server keeps each list as a file in its main folder: whitelist.json, ops.json, banned-players.json and banned-ips.json. The first three store each account's ID and name, the IP list stores addresses, and ops.json also stores each operator's level, so you can give one person level 2 and another level 4 by editing it. Edit these files by hand only while the server is stopped, or run /whitelist reload straight after editing the whitelist: a running server keeps the lists in memory and writes its own copy back the next time one changes.

Bedrock players on a crossplay server

A Bedrock player has no Java account, so /whitelist add cannot find them. Floodgate, which lets Bedrock players in, has its own command: fwhitelist add Gamertag, typed with the gamertag alone and no dot in front. The crossplay guide explains why the dot appears.

On loothost

The Players tab does all of this without commands: whitelist, operators and bans in one place, kick, ban or op next to each name online, and a Whitelist-only switch. It reads the lists straight from the server's files, so you can see them while the server is stopped, and it can put the server into maintenance with one click. Our Properties editor keeps online-mode switched on. The Players docs have the steps, and the console takes every command on this page as well.

Manage players without memorising commands

Whitelist friends, choose your admins and ban troublemakers from one Players tab, all from your browser.

Start a server