Make yourself admin on your Minecraft server by typing op YourName in the game panel's Console. Turn the white-list on with whitelist on, then add players with whitelist add PlayerName.
How to add an admin to your Minecraft server
An admin (operator, or OP) can use commands in game, including kicking and banning players. Only OP people you trust.
- Start your server, log in to the game panel and click Manage Server.
- Open the Console and type
op PlayerName, using the player's exact in-game name. In the console you type commands without a slash. - To take admin away again, type
deop PlayerName.
If the player is online, you can also click the add-OP button next to their name on the Players page. See Adding and removing a player as admin (OP).
Once you're an operator, you can type the same commands in game chat with a slash, for example /op PlayerName.
How to white-list players
With the white-list on, only the players on the list can join your server.
- In the Console, type
whitelist on. - Add each player with
whitelist add PlayerName. - Check who is on the list with
whitelist list. Take someone off withwhitelist remove PlayerName.
Operators can always join, even when they're not on the white-list. Switching the white-list on doesn't kick players who are already online: set enforce-whitelist=true in server.properties if players who aren't on the list should be removed when the list reloads. New servers on Minecraft Java 26.3 and later start with the white-list switched on, so add your friends before they try to join.
What about ops.txt and white-list.txt?
Older guides tell you to type names into ops.txt and white-list.txt. Current Minecraft servers keep these lists in ops.json and whitelist.json, which identify each player by their UUID, so use the commands above and let the server write the files for you. If you do edit whitelist.json while the server is running, type whitelist reload afterwards.
Minecraft admin questions
What is the admin command for a Minecraft server?
Type op PlayerName in the game panel's Console to make a player admin (operator), and deop PlayerName to remove it. Once you're an operator you can also use /op PlayerName in game chat.
How do I add players to the whitelist on my Minecraft server?
Type whitelist on in the Console, then whitelist add PlayerName for each player. whitelist list shows who is on it and whitelist remove PlayerName takes someone off.
I added names to ops.txt but nothing changed. Why?
Current Minecraft servers keep operators in ops.json, which identifies players by UUID, not in the old ops.txt. Type op PlayerName in the Console instead and the server adds the player for you.
On a Bedrock server? See Adding and removing a player as admin on your Minecraft Bedrock server. Want your own Minecraft server? See our Minecraft server hosting.
Related guides
Any questions, or need our help? Open a support ticket.
