How To OP Yourself In Minecraft (Server And Single Player)

6 minute read · Updated November 2026
Short answer

Run op YourUsername in your server console.
Replace YourUsername with your Minecraft username, and leave out the leading /. In single player, enable commands in your world settings instead.

Operator status, usually called OP, lets you use administrative commands to change game modes, teleport players and manage your server. You need access to the server console or help from an existing operator to give yourself these permissions.

How to OP yourself on a Minecraft Java server

These steps work on Vanilla, Paper and modded Java servers.

  1. Log in to Server Heron and open your server under My servers.
  2. Start the server if it is stopped.
  3. Open Console.
  4. Enter the following command and press Enter:
op YourUsername

Use your current Minecraft username, rather than your Microsoft account email address. For example, if your Minecraft name is HeronBuilder, enter:

op HeronBuilder

The console should confirm that you are now a server operator. You can run this command before joining the server.

To check your permissions, join the server and enter this in Minecraft chat:

/time query daytime

If Minecraft returns the world's current time, you have access to that command. Unlike changing your game mode, this test does not alter your gameplay.

Add an operator through the Server Heron panel

You can also give yourself OP without using the console:

  1. Open your server's Players tab.
  2. Find the Operators section.
  3. Enter your Minecraft username and select Add.

Your account will appear in the operators list, along with its permission level. You can remove operators from the same section.

This option is available for Java and modded servers. For Bedrock, use the console method described below.

How to OP yourself on Aternos

On Aternos, open Players → Ops, enter your Minecraft username and add it as an operator. Alternatively, start your Java server, open its console and enter /op YourUsername, as shown in Aternos's own instructions.

Owning the hosting account does not automatically give your Minecraft character operator permissions.

Console commands versus in-game commands

In the server console, enter commands without /:

op TheirUsername

In Minecraft chat, start commands with /:

/op TheirUsername

You must already have permission to manage operators to use /op in-game. A player without those permissions cannot grant themselves OP by typing it in chat.

To remove someone's operator status, run this in the console:

deop TheirUsername

Or, as an operator with the necessary permissions, use /deop TheirUsername in chat. Removing OP does not ban the player or remove their builds; it takes away their operator permissions.

How to enable commands in single player

In a single-player world, you normally enable commands rather than use /op on yourself.

Minecraft Java: a new world

When creating your world, turn Allow Commands on before selecting Create New World. Older versions call this setting Allow Cheats.

Once the world loads, open chat and try:

/gamemode creative

You can return to Survival with /gamemode survival.

Minecraft Java: an existing world

If you created the world with commands disabled, Java 26.1 and later let you enable Allow Commands through World Options. In versions with the updated game menu, World Options is available directly from the Esc menu.

On older versions without World Options, use Open to LAN:

  1. Open the world and press Esc.
  2. Select Open to LAN.
  3. Turn Allow Commands on, or Allow Cheats in older versions.
  4. Select Start LAN World.

With this LAN method, you can use commands for the rest of that session. After you leave and reopen the world, repeat these steps if you need command access again.

Opening to LAN also makes the world available to other players on your local network while that session remains open.

Minecraft Bedrock: a single-player world

Open your world's settings, find the cheats section under Game, and enable Activate Cheats. You can do this when creating a world or by editing an existing world's settings.

Enabling cheats disables achievements for that world permanently, even if you turn cheats off afterward.

Once cheats are enabled, load the world and use commands through chat.

How to OP yourself on a Bedrock server

On a Bedrock dedicated server, use your Xbox gamertag rather than a Java username.

  1. Start the server and join it.
  2. Open the server console.
  3. Enter the following, keeping quotation marks around a gamertag that contains spaces:
op "Your Gamertag"

Bedrock requires the target player to be online when you run op.

Operator status and cheats are separate settings. To use commands such as /gamemode and /give, cheats must also be enabled. On Server Heron, open Settings → Game settings, enable cheats, then save and restart the server to apply the change.

Enabling cheats also disables achievements for the Bedrock world.

What permissions does OP give you?

On a standard Java server, operators receive permission level 4 by default. This allows broad administrative access, including managing other operators and stopping the server. A server configured with a lower operator level may allow gameplay commands while restricting administrative ones.

Paper plugins and mods can add their own permission rules, so OP does not necessarily grant access to every command they provide.

Only give OP to people you trust. Commands can change builds, remove entities and affect other players. If someone only needs a few moderation tools on a Paper server, a permissions plugin can give them specific access without making them an operator.

Minecraft operator status does not grant access to your Server Heron account or control panel. Panel access is managed separately through Members.

If OP is not working

  • The console cannot find your Java username: check your current Minecraft name and spelling. Join the server once, then try again.
  • Bedrock cannot find the player: make sure the player is online and use their full gamertag, with quotation marks if it contains spaces.
  • Chat says you do not have permission to use /op: run op YourUsername from the hosting console instead, or ask an existing administrator.
  • Some Java commands work, but others do not: check your operator level. A plugin or mod may also require a separate permission.
  • Bedrock grants OP, but gameplay commands still fail: check that cheats are enabled and restart after changing the setting.
  • Single-player Java commands stopped working after reopening the world: if you used Open to LAN, enable commands through it again. In versions with World Options, use its Allow Commands setting instead.

Once your permissions are working, you can run administrative commands directly from Minecraft chat. Keep console access available so you can add or remove operators whenever needed.