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.

Updated 5 min read vProxy Cloud team

vPanel Player management with the whitelist on, listing Builder_Amy, RedstoneKai and CaveMia with their UUIDs, plus a field for adding players and tabs for the whitelist, OPs, banned players and banned IPs

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.

Whitelist commands in Minecraft Java Edition
CommandWhat 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
The vPanel console log: whitelist add Builder_Amy answered with Added Builder_Amy to the whitelist, whitelist list answered with 1 whitelisted player, Builder_Amy, and op RedstoneKai answered with Made RedstoneKai a server operator
Each command gets a one-line reply from the server, such as Added Builder_Amy to the whitelist (demo screen).

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.

OP permission levels in Minecraft Java Edition
LevelWhat 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 mod

Kicking and banning

Commands for kicking and banning players in Minecraft Java Edition
CommandWhat 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.

The server folder in vPanel Files, listing banned-ips.json, banned-players.json, bukkit.yml, commands.yml, eula.txt, help.yml and ops.json with their sizes
The ban lists and the OP list are JSON files in the server folder, so stop the server before you edit them by hand (demo screen).

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.

Adding an OP in vPanel Player management, with permission level 4 (all commands, including stopping the server) selected next to the player name field, a Can join when full checkbox on the right, and Builder_Amy listed at level 4 below
The OP tab, where you pick a permission level when adding a player (demo screen, Chinese interface). The menu in the top-right corner switches vPanel to English.

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.

Access and security in vPanel Game settings: Account verification, Require secure chat identity and Enable allowlist switched on, Enforce allowlist immediately switched off, and a notice that these settings apply after the next server restart
Access and security in Game settings. Each switch matches a server.properties key.

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 list

Use the player's Xbox gamertag. Unlike Java Edition, Bedrock requires OPs to be on the allowlist as well, or they can't join.

References

FAQ

Do OPs need to be on the whitelist?
Not on Java Edition. An OP can join without being on the whitelist. Bedrock works differently, and OPs have to be on the allowlist too.
I removed my own OP by mistake. How do I get it back?
Type op <your name> in the server console. The console isn't limited by permission levels, so it can always give OP back.
Do I need to restart after changing the whitelist?
Not if you use commands. They apply right away. Changing white-list or enforce-whitelist in server.properties needs a restart. After editing whitelist.json by hand, run whitelist reload.
Will turning on the whitelist kick players who are already online?
Not by default. Online players who aren't on the list are kicked only when enforce-whitelist in server.properties is true.
Can I use a whitelist on an offline-mode (cracked) server?
You can, but it won't stop impostors. With online-mode set to false, anyone can log in under someone else's name, so whitelist and OP entries can be abused. Keep online-mode set to true on any server that is open to the public.
How do I see who is online?
Type list in the console. It shows how many players are online and their names.

Start a Minecraft server

Taiwan from NT$99/mo, Singapore from NT$120Billed every 30 days