How to Add Operators to a Minecraft Server

Give someone operator rights safely: what the command actually grants, how permission level 4 differs from level 3, and how to take it back when it goes wrong.

Written by
Mihail Griniuc
Last updated
Checked against
Minecraft: Java Edition 1.21.11 on Paper 1.21.11
Reading time
3 min

Short answer

Run /op PlayerName in game or the console. Operator can run any command, including anything that deletes or changes the world, so give it to the one or two people who manage the server, and take it away with /deop.

Operator is the permission level that runs commands. It is also the level that can delete a world with one line, so the decision of who gets it is a real one, and the default of giving it to everyone in a friend group is how servers end up with griefed spawn points.

This guide covers what operator actually grants, the two permission levels that matter, and the specific things an operator can do to your server that a normal player cannot.

Before you start

  • To grant operator, you need to already have it, or access to the server console
  • The player's exact username
  • The server stopped if you are editing ops.json by hand

1. Grant operator with /op

/op adds a player to the operator list, which the server stores in ops.json and applies at once. It can be run in game by an operator, or typed into the console, which is how you do it for someone who is not online.

Take the player's exact username as they have it, not the display name. Then tell them: in the pause menu, their name will have a second line showing their permission level, and that is how they confirm it worked.

in game or console
/op SomePlayer
/deop SomePlayer
/op SomePlayer 3

2. Know what level 4 actually allows

Permission levels are numbered and cumulative. Level 4, the default for operators, runs every command: teleporting players into the world, editing blocks, changing the gamemode, managing the whitelist, banning, and the destructive ones such as /fill over a build.

That last group is why the count matters. Every operator is a person who can accidentally destroy the thing the server exists for, and also a person a mischievous friend can log in as.

server.properties
op-permission-level=4
  • Level 4: every command, including /fill, /clone and world-affecting operations.
  • Level 3: player and world management without the most destructive commands.
  • Level 2: commands needed to use functions and blocks, which is the default for function-permission-level.
  • Level 0: a player with no command access.

3. Give it to two people, not everyone

The minimum that works is two: you, and someone who can manage the server if you are away. That covers a holiday, a lost password and a crashed world, and it keeps the number of people who can undo everything to two.

Say out loud that they have the rights. People assume the owner is the only one allowed, and an administrator who does not know they are an administrator is a wasted one.

in game or console
/op OwnerName 4
/op SecondAdmin 3

4. Take it back cleanly

/deop removes a player from the operator list and takes effect immediately. Use it when someone leaves the group, when a shared account was used, or when you gave operator to test something and would rather not leave it.

If you are locked out entirely, the server console still works, and ops.json in the server folder is the file to edit with the server stopped. It is JSON, it is small, and it is readable: an entry has the player's UUID and name at the level you choose.

ops.json, edited with the server stopped
[
  {
    "uuid": "00000000-0000-0000-0000-000000000000",
    "name": "OwnerName",
    "level": 4,
    "bypassesPlayerLimit": false
  }
]

Good to know

  • Operator rights are about the game, not the hosting panel. A player can be a full operator in game and have no access to your server files at all.
  • bypassesPlayerLimit in ops.json lets an operator join a full server. It is useful for you and dangerous for everyone else.
  • If the problem is players editing each other's builds rather than administering the server, operator rights are the wrong tool. A protection plugin is the right one.
  • Whitelisting controls who may join, and banning controls who must not. Operator controls what an admitted player may do.
  • Write the operator list down where the whole group can see it, and remove people when they leave. A rights list kept in one person's memory stops existing when that person stops playing.

Common questions

What does operator let someone do?

Run any command, at the level the server sets for operators. That includes managing players, changing gamemode, editing the world and the destructive block commands. It is why the list should be short.

How do I give operator to someone who is not online?

Type /op TheirName into the server console rather than in game. Operators can be added for players who are not connected, and it applies the next time they join.

What is permission level 3 good for?

Managing players and the server without the commands that can overwrite large parts of a build. Set it per player with /op Name 3, or set op-permission-level=3 in server.properties to change the default for everyone.

I accidentally made someone an operator. How do I undo it?

/deop TheirName, which takes effect immediately. If you have lost all operator access, type it into the server console instead, or edit ops.json with the server stopped.

Do I need operator to give someone operator?

Yes, in game. The console is the way around it, since anyone with access to the server console can run any command regardless of permission level in the game.

Sources

Official documentation this guide was checked against.

Written and maintained by Mihail Griniuc. Last reviewed against Minecraft: Java Edition 1.21.11 on Paper 1.21.11. Spotted a mistake or something out of date? Email [email protected].

Revision history
  • Rewritten around what operator grants, the permission levels, and the recovery path when rights are given to the wrong person.

Rather not run this on your own machine? PufferHost gives every player a free Minecraft server with 3 GB of RAM and 10 slots. Create a free server.