Minecraft

How to OP Someone on Your Minecraft Server

The console command, which of the four levels to give a friend, and how to set a different level for each player without handing out full control.

TheGameHosting Team 6 min read
OP Someone on Your Minecraft Server
Background: Minecraft © Mojang Studios

To OP someone Minecraft server owners use one console command: type op PlayerName in the server console (no slash), or /op PlayerName in chat if you are already a level 3 operator. The player gets the level set by op-permission-level in server.properties, which is 4 (full control) unless you change it. To give someone less power, lower that value or edit their level in ops.json.

This guide is about giving operator status to another player and picking the right level for them. If you still need to make yourself the first operator, start with how to OP yourself on a Minecraft server and come back. Everything below is for Java Edition; Bedrock works differently and has its own guide: how to OP someone on a Bedrock server.

Before you give anyone OP

  • You need level 3 or higher. The Minecraft Wiki lists /op as a level 3 command. The server console always has full rights, so it works even if nobody is OP yet.
  • Get the exact username. In online mode the name should belong to a real Minecraft account. The player does not have to be online: on Java, op accepts any valid player name.
  • Make a backup first. An operator can change the world, give items and ban people. If it goes wrong, a recent copy saves the day. See how to back up a Minecraft server world.

How to OP someone Minecraft server-side, step by step

  1. Check the default level. In the TheGameHosting panel, open Files, edit server.properties and look for op-permission-level. It accepts 0 to 4 and the default is 4. If your friend should be a moderator, set it to 2 or 3 before you run the command, save, and restart the server.
  2. Open the Console. Choose Console in the panel.
  3. Run the command with the exact name, without a slash: op PlayerName. The console answers that the player is now a server operator.
  4. Check ops.json. In Files, open ops.json. You will see the new entry with the player’s UUID, name and level.
  5. Ask them to test it with a command of their level, such as /gamemode creative for level 2 or more.
  6. Put the default back if you changed op-permission-level only for this player, so the next op uses the level you want.
Code
op PlayerName
op @a[distance=..5]

The second line uses a target selector, allowed since 1.13, to OP every player within five blocks of you. It only works in chat, where “near you” has a meaning. Use names unless you know exactly who is standing there.

Which level to give: 1, 2, 3 or 4

Levels add up: each one can do everything the lower ones can. The command examples come from the Minecraft Wiki’s permission level page and its command list.

LevelNameWhat it addsGood for
1ModeratorBuild and break inside spawn protectionA builder who decorates the spawn
2Gamemastergamemode, tp, give, time, weather, gamerule, difficulty, command blocksAn event helper or map maker
3Adminkick, ban, pardon, whitelist, op, deopA trusted co-admin who manages players
4OwnerServer commands such as stop and save-allYou, and almost nobody else

Heads-up: a level 3 admin can run op too, and the new operator receives the level in op-permission-level, not the admin’s own level. With the default of 4, a level 3 helper can create full owners. If you hand out level 3, consider lowering op-permission-level to 3 or less.

Give one player a different level in ops.json

When you want one moderator at level 2 and one admin at level 3, edit their entries directly. The Minecraft Wiki notes that a player whose entry you change by hand needs to rejoin.

  1. Stop the server from the panel, so it does not overwrite your edit.
  2. Open Files → ops.json and change the level number of each player.
  3. Set bypassesPlayerLimit to true for anyone who must be able to join when the server is full. The Wiki’s server.properties page confirms ops with this flag can join even when max-players is reached.
  4. Save, check that the JSON is valid (commas between entries, none after the last one) and start the server.
Code
[
  {
    "uuid": "player-one-uuid",
    "name": "BuilderFriend",
    "level": 2,
    "bypassesPlayerLimit": false
  },
  {
    "uuid": "player-two-uuid",
    "name": "CoAdmin",
    "level": 3,
    "bypassesPlayerLimit": true
  }
]

The easiest way to get a correct entry with the real UUID is to run op PlayerName first and then only change the number. Typing a UUID by hand is where most mistakes happen.

Change the default with op-permission-level

op-permission-level is “the default permission level for ops when using /op”. It only applies when op runs: operators already in ops.json keep their stored level. A practical setup for a friends server is:

Code
op-permission-level=2

With that line, every new op creates a gamemaster, and you raise your own entry to 4 in ops.json. Restart the server after changing server.properties.

If the command does not work

  1. Nothing happens in the panel console. Remove the leading slash: op PlayerName, not /op PlayerName.
  2. “Nothing changed”. The player is already an operator. To change their level, edit ops.json as shown above.
  3. The name is not found. Check the spelling. In online mode the name must match a real Minecraft account.
  4. Your helper cannot use /op in chat. They are below level 3. Raise their level in ops.json only if you want them to create operators.
  5. You need finer control than four levels. OP is broad. For ranks like builder or moderator with chosen commands, use a permissions plugin from the Plugin Installer, as in how to install plugins on a Paper server.

Changed your mind about someone? How to remove OP (deop) from a player covers it.

Share admin duties safely on TheGameHosting

OP decides what a player can do inside the game. To let a co-admin restart the server, read the Console or edit files, use Users in the TheGameHosting panel: you invite them to the panel without sharing your account password. Keep in mind that anyone with Console access can OP themselves, so invite only people you would trust with level 4.

Your Minecraft Java server is ready about 60 seconds after payment, online 24/7 in Dallas or Amsterdam with DDoS protection, and Files, Console and Backups sit in one panel. See the Minecraft server hosting page, compare sizes on plans and pricing (from $1.90 USD/month) and use FULL2026 for 15% off for life.

FAQ

How do I give someone OP on my Minecraft server?

Type op PlayerName in the server console, without a slash. In game chat, /op PlayerName works only if you are already a level 3 operator.

How do I OP someone with a lower level?

Set op-permission-level in server.properties to the level you want before running op, or stop the server and change that player’s level in ops.json.

Can I OP a player who is offline?

Yes, on Java Edition. The command takes a player name, so it works whether or not they are online. On an online-mode server the name must belong to a real account.

What level should a moderator have?

Level 2 lets them teleport, change game modes and use command blocks. Level 3 adds kick, ban, whitelist and op, so give it only to someone you trust to create other operators.

Hosting for these games

Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.

All posts