How to op yourself on a Minecraft server

By Kosy · · 2 min read

An operator (op) can run commands such as /gamemode and /tp and change the world. On your own server you start with no one opped, so the first thing to do is op yourself.

From the console

The console is the one place that always works, because it is not a player. Open your server's Console tab and type:

op YourName

Use your exact Minecraft name, with the same capital letters. The server answers "Made YourName a server operator". Join the game, and commands work. To undo it:

deop YourName

On Saryno the Console tab accepts these directly. If you linked your Minecraft account to Saryno, /saryno manage in game also opens a small menu to kick or ban players and change the time, without needing op at all.

Op levels

Operators have a level from 1 to 4. The default for op is set in server.properties as op-permission-level:

  1. Can bypass spawn protection.
  2. Can use cheat commands like /gamemode, /give and /tp, and command blocks.
  3. Can also manage players with /kick, /ban and /op.
  4. Can use every command, including /stop and /save-off.

The default is 4, which is more than most helpers need. For helpers, a permissions plugin is a better idea, see how to set up LuckPerms: give moderators only the commands they need and keep op for yourself.

If it does not work

  • "That player does not exist": check the spelling. On an offline-mode server the name decides the UUID, so capital letters matter, see the offline UUID generator.
  • Commands still say "unknown": the server must be running Minecraft's commands, and plugin commands need their plugin installed.
  • You opped the wrong name: run deop for it and check ops.json in the server folder.

Never give op to someone you do not fully trust: an operator can break or delete the world. Back it up first, see how to back up a world.

More to read