How to whitelist players and give OP on a Minecraft server
The whitelist decides who can join your server, and OPs are the players who can run admin commands. You set up both with console commands, and the newer vPanel also lets you manage them with buttons in Player management.
Whitelist on by default since 26.3
Starting with Minecraft Java Edition 26.3, a server that creates server.properties on its first start sets white-list to true instead of false. Only OPs can get into a fresh server, and friends see this message.
You are not white-listed on this server!Servers upgraded from an older version are not affected. Their server.properties keeps whatever value it already had. The same applies whether you host at home or rent a server, and the control panel does not touch this setting when it installs the server.
A private server can keep the whitelist and add friends one by one. If you'd rather let in anyone who has the address, turn it off.
Whitelist commands
Type these in the server console without a leading slash. In game, put a / in front, and you need to be an OP with permission level 3 or higher.
| Command | What it does |
|---|---|
whitelist add <player> | Adds a player. They don't need to be online |
whitelist remove <player> | Removes a player from the whitelist |
whitelist list | Lists everyone on the whitelist |
whitelist on | Turns the whitelist on |
whitelist off | Turns the whitelist off and keeps the list |
whitelist reload | Reloads whitelist.json after you edit it by hand |
Use the player's Java Edition username. Capital letters don't matter. The list lives in whitelist.json in the server folder and stores each player's UUID, so a player who changes their name stays on it.
server.properties also has enforce-whitelist, which defaults to false. Set it to true and any online player who isn't on the list gets kicked when you turn the whitelist on or remove someone from it.
OP and permission levels
An OP (operator) is a server admin. op <player> grants it and deop <player> takes it away. OP permissions come in 4 levels, and each level includes everything below it.
| Level | What it allows |
|---|---|
| 1 | Can place and break blocks inside spawn protection |
| 2 | Can use cheat commands such as gamemode, tp and give, and use command blocks |
| 3 | Can use player management commands such as kick, ban, whitelist and op |
| 4 | Every command, including server commands such as stop and save-all |
The op command grants the level set by op-permission-level in server.properties. It defaults to 4, which means every command. To give someone a lower level, stop the server, open ops.json and change that player's level.
Level 4 can shut the server down, so keep it for yourself and people you really trust. On a plugin server where moderators need only a few commands, you can skip OP and install the permissions plugin LuckPerms, which hands out permissions by group. These three lines create a mod group, let it use kick and add a player to it.
lp creategroup mod
lp group mod permission set minecraft.command.kick true
lp user <player> parent add modKicking and banning
| Command | What it does |
|---|---|
kick <player> <reason> | Kicks the player. They can rejoin right away |
ban <player> <reason> | Bans the account |
ban-ip <player or IP> | Bans the IP address. Other accounts on the same network are blocked too |
pardon <player> | Lifts an account ban |
pardon-ip <IP> | Lifts an IP ban |
banlist | Shows the ban list |
The reason is optional. A kicked player sees it on screen. A player banned with ban is disconnected with You are banned from this server
, and the ban reason appears on the next attempt to join.
Bans are saved in banned-players.json and banned-ips.json. Use IP bans with care, because people in the same home or school may share one IP.
Doing it in vPanel
Console commands
The whitelist, OP and ban commands all go into the vPanel Console while the server is running, and the changes take effect immediately.
Player management
The newer vPanel turns these commands into buttons on the Player management page (Players). At the top are the whitelist switch and the players who are online. Below that are 4 tabs for the whitelist, OPs, banned players and banned IPs. When you enter a name, vPanel looks up the account first. On a running server, changes go through console commands and apply at once, and the server updates its own list files.
When you add an OP, you can choose the permission level. Ticking Can join when full lets that OP in even when the server is full.
Game settings
Under Access and security in the Game settings tab there are two switches. Enable allowlist maps to white-list, and Enforce allowlist immediately maps to enforce-whitelist. Both edit server.properties, so restart the server after saving.
OP is an admin role inside the game. Server users in the control panel is something else. It decides who can sign in to vPanel to start and stop the server or edit files, and has its own permissions.
The Bedrock allowlist
On a Bedrock server, the whitelist is called the allowlist. Set allow-list in server.properties to true, restart, and then add players with commands.
allowlist add <gamertag>
allowlist remove <gamertag>
allowlist listUse the player's Xbox gamertag. Unlike Java Edition, Bedrock requires OPs to be on the allowlist as well, or they can't join.
References
- /whitelist Minecraft Wiki
- /op Minecraft Wiki
- Permission level Minecraft Wiki
- server.properties Minecraft Wiki