Minecraft: Java Edition guide

Minecraft server whitelist and operators

Turn on the whitelist, add players, make operators and ban players on a Minecraft Java server, and what whitelist.json and ops.json hold.

Updated · By the HostForge team

Minecraft servers have no password. Who may join is the whitelist, and who runs the server in game are its operators. Both are commands on the server's console, or on the chat for an operator, with a slash.

Turn on the whitelist

Set white-list=true in server.properties, or run whitelist on. With enforce-whitelist=true too, players removed from the list are kicked at once instead of at their next join.

  • whitelist add Alex lets a player in.
  • whitelist remove Alex takes them off.
  • whitelist list shows who is on it.
  • whitelist reload reads whitelist.json again after you edit it by hand.

The server looks each name up with Mojang and saves it with the player's ID in whitelist.json, so a player who changes their name stays on it.

Make someone an operator

op Alex gives a player the server's commands; deop Alex takes them back. Operators are saved in ops.json with a level, 4 by default (op-permission-level): every command, including stop. Lower levels in ops.json give fewer commands.

Kick and ban

  • kick Alex removes a player once.
  • ban Alex keeps them out, saved in banned-players.json; pardon Alex lets them back.
  • ban-ip and pardon-ip do the same for an address, in banned-ips.json.

Editing the files

The server reads the lists at start and rewrites them when they change in game, so stop it before editing them by hand, or use whitelist reload. Each is a JSON list; an empty one is [].

On HostForge

Private servers use the whitelist

A private Minecraft server on HostForge has its whitelist on. The Minecraft name in your settings is made an operator and added for you; the Console tab runs whitelist add, op and the rest, and Configuration files edits the lists.

See also joining a server, or start a free one on HostForge.

More Minecraft: Java Edition guides