How to make yourself OP on a Minecraft server

Operator is the built in admin flag. Granting it takes one command, and the part worth knowing is which of the four levels you are handing over and why you should hand it over rarely.

From the server console

The console is always operator level 4, so this works even on a brand new server where nobody has any permissions yet. With the server running, type into the console window:

op YourUsername

No slash. The console does not use them. If you are on a host with a web panel, the console tab there is the same thing. To remove it again, deop YourUsername.

The username has to match exactly, including capitals, and the player must have joined at least once on an online-mode server so it can resolve the account to a UUID.

In game, once you already have it

An existing operator can promote someone else with the same command and a slash:

/op TheirUsername

This is why operator is dangerous to hand out. Anyone with it can give it to anyone else, and can take it from you. There is no audit trail beyond the server log.

Editing ops.json directly

When the server is stopped you can edit ops.json in the server folder. It is a list of objects, one per operator:

[
  {
    "uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
    "name": "Notch",
    "level": 4,
    "bypassesPlayerLimit": false
  }
]

Edit it while the server is stopped. A running server rewrites the file from memory when it shuts down and your change disappears. The UUID has to be the real one for that account, so this route is mostly useful for restoring access you locked yourself out of.

The four levels

Level 1 bypasses spawn protection. Level 2 adds the cheat commands and the ability to use command blocks. Level 3 adds player management, so kick, ban and whitelist. Level 4 adds /stop and the rest of the server control commands.

The default for /op is whatever op-permission-level in server.properties says, which ships as 4. Lowering it to 3 means a routine operator cannot stop the server, which is a small but real improvement. Our server.properties reference lists the setting.

Why most servers should not use it

Operator was designed for a server run by one person for their friends. It has no granularity, no expiry, and no way to give someone a single ability. The moment you have staff roles, a permissions plugin is the right answer and operator should sit unused on one account.

Our permissions guide covers setting that up. The short version: install LuckPerms, build a group ladder, deop everyone including yourself.

Frequently asked questions

Why does /op say the player does not exist?

On an online-mode server the name has to resolve to a Mojang account, and the player usually needs to have joined once. Check the spelling and capitals, and confirm the server has internet access to reach the authentication servers.

Can I be operator on a server I do not own?

Only if an existing operator or the console grants it. There is no way to give yourself operator from the client, and anything claiming otherwise is not doing what it says.

Does operator work on Bedrock servers?

Yes. Bedrock dedicated servers use the same op command and store the result in permissions.json rather than ops.json, with visitor, member and operator instead of the four numbered levels.

I deopped myself and locked myself out, now what?

Use the console, which is always level 4 regardless of ops.json. If you have no console access, stop the server, edit ops.json by hand, and start it again.

Next steps

All guides · Free owner tools · List your server