How to Make Yourself OP (Admin) on Your Minecraft Server

Learn how to give yourself and your moderators operator permissions from the console or ops.json - and what the difference between operator levels 0 to 4 really is.


What does OP mean?

OP is short for operator - the administrator role built into Minecraft. An operator can use commands such as /gamemode, /tp, /give, /ban and /stop, and is automatically allowed through the server whitelist.

Note: OP is a very powerful role. On the default setting an operator can also stop the server and ban other players - including you. Only give it to people you fully trust.


This is the only method that works when nobody on the server is an operator yet.

  1. Log in to the Potionhost control panel and select your server.
  2. Make sure the server is running.
  3. Open Console.
  4. Type the following and press Enter:
op Your-Minecraft-Username
  1. The console replies with Made Your-Minecraft-Username a server operator.

In the console the command is written without a slash. In-game you write it with one: /op YourUsername.

Use the exact Minecraft username - capitalisation matters. If the server cannot find the player, ask them to join the server once and try again.


Method 2 - Grant OP to others from in-game

If you are already an operator you can pass the role on without opening the control panel:

/op PlayerName

Method 3 - Edit ops.json manually

If you need to add several operators at once, or give them different levels, you can edit the file directly.

Important: Stop the server first. The server writes ops.json to disk when it shuts down, so anything you edit while it is running will be overwritten.

  1. Stop the server in the control panel.
  2. Open Files and find ops.json in your server root directory.
  3. Edit the file using this template:
[
  {
    "uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
    "name": "Notch",
    "level": 4,
    "bypassesPlayerLimit": false
  }
]
  1. Save the file and start the server again.

You can look up a player UUID from their username at mcuuid.net. bypassesPlayerLimit decides whether the person can join even when the server is full.


How to Make Yourself OP (Admin) on Your Minecraft Server

The level decides how much an operator is allowed to do. The default level for new operators is set with op-permission-level in server.properties - by default 4.

Level Role What it unlocks
0 Regular player No operator permissions
1 Moderator Can build inside the spawn protection area
2 Gamemaster Command blocks, /gamemode, /difficulty, target selectors
3 Admin Player management such as /ban, /kick and /whitelist
4 Owner Everything - including /stop, /op and /deop

If you want moderators who can kick and ban but not stop the server, set their "level" to 3 in ops.json.


Removing OP again

In the console or in-game:

deop PlayerName

Run deop on every account you no longer use. A forgotten operator account is one of the most common reasons a server gets griefed.


A better option for multiple admins: LuckPerms

If several people need different permissions, OP is too blunt a tool. Install a permissions plugin such as LuckPerms instead (requires Paper or Spigot). Then you can create groups like moderator and builder and grant exactly the commands each group needs - without handing out OP.


Troubleshooting

Symptom Likely cause Fix
You do not have permission to use this command You are not OP, or your level is too low Run op from the console and rejoin the server
The console command does nothing You typed /op with a slash in the console Type op without the slash
Your changes to ops.json disappeared The file was edited while the server was running Stop the server, edit, then start again
That player does not exist A typo, or the player has never joined the server Check the spelling, or let the player join first
OP does not work for a plugin command The plugin handles its own permissions Grant the permission node through LuckPerms
Command blocks do not work Command blocks are disabled on the server On 1.21.8 and older: set enable-command-block=true in server.properties. On 1.21.9 and newer this is a game rule - type /gamerule and press tab to find it

Good advice

  • Never give OP to a player you do not know - level 4 can wipe your entire world.
  • Use level 3 for moderators and keep level 4 for yourself.
  • Run deop immediately when an admin leaves your team.
  • Take a backup before experimenting with permissions.

Completely locked out of your own server? Contact our support team - we can help you regain access.

MinecraftOrder now

Guide Information

Published
August 23, 2026
Last Updated
September 2, 2026
Views
128