How to Make Yourself Op on a Minecraft Server
To make yourself op on a Minecraft Java server, open the server console and type op YourName. Press Enter and the server confirms you are now an operator. You can then run commands like /gamemode and /give in-game. Use deop YourName to take the rights away again.
This guide covers Minecraft Java Edition 1.21 and newer on Vanilla, Paper, Purpur and Fabric, with a short note on Bedrock. If you are still setting up, read how to make a Minecraft server for friends first.
What op actually does
An operator, or op, is a player who is allowed to run admin commands. Without op, you can only play. With op, you can change the game mode, teleport, give items, change the weather and manage other players.
Op is not one switch. It has five levels, from 0 to 4, and each level unlocks more commands. We list them below. Most people only need level 2 or level 4.
1. Make yourself op from the console
The console is where you must start. Nobody can run commands in-game until someone has been given permission, so the very first op always comes from the console.
- Open your server console. On a home server this is the window the server runs in. On a host it is usually a Console tab in the dashboard.
- Type
op YourName. Use your exact Java username. You do not need a slash in the console. - Press Enter. You should see a line saying the player was made a server operator.
- Join the game. In chat, try
/gamemode creative. If it works, you are an op.
If you host with Tree Host, there is a shortcut. Set your Minecraft name under Account, then click OP me on the server's Console tab. The getting started guide shows the steps.
2. Make another player op
Once you are an op with level 3 or 4, you can do it from the game chat.
- Type
/op FriendNamein chat. - The player gets the level set by
op-permission-levelinserver.properties. - Check who has rights with the file
ops.jsonin the server folder.
A player does not need to be online to be made an op on an online-mode server. The server looks the name up and saves the real UUID.
3. Remove op
Run deop PlayerName in the console or /deop PlayerName in-game. It takes effect straight away. If the player is online, they lose command access without needing to rejoin.
Op levels explained
| Level | What it allows | Example commands |
|---|---|---|
| 0 | Nothing special. This is a normal player. | None |
| 1 | Bypass spawn protection, so you can build near spawn. | None |
| 2 | Gameplay and cheat commands. | /gamemode, /give, /tp, /time, /weather, /fill |
| 3 | Everything in level 2, plus managing players. | /kick, /ban, /op, /deop, /whitelist |
| 4 | Everything in level 3, plus server control. | /stop, /save-all |
Command blocks use a separate setting, function-permission-level, which is 2 by default.
4. Change the level a new op gets
By default /op gives level 4. If you want new ops to be safer, change the default.
- Stop the server.
- Open
server.propertiesand findop-permission-level. - Set it to
2(or3) and save the file. - Start the server. New ops now get that level.
This setting only applies to players you op after the change. To change someone who is already an op, edit their level in ops.json while the server is stopped, or deop and op them again.
What ops.json looks like
Each operator is one entry with four fields: uuid, name, level and bypassesPlayerLimit. The last one lets that player join even when the server is full. Edit the file only when the server is stopped, or the server may overwrite your change.
Why /op is not working
- "Unknown or incomplete command": you are not an operator yet. Use the console, not the game chat.
- You typed the wrong name: use the exact spelling. On an offline-mode server, capital letters matter because the UUID comes from the name.
- You are level 2 or lower: only levels 3 and 4 can run
/op. Use the console to raise your level. - Edits to
ops.jsondid nothing: the server was running. Stop it, edit, then start. - A plugin overrides op: permissions plugins can take over. See how to add plugins to a Minecraft server and check your permissions plugin for the same player.
Op on a Bedrock server
A Bedrock Dedicated Server does not use ops.json. You give rights with the op PlayerName command in the console, or by setting a player's permission level to operator in permissions.json using their XUID. Bedrock players on a Java server through Geyser follow the Java server's op list.
Safety tips for ops
- Give the lowest level that does the job. Level 2 is enough for most helpers.
- Never op someone you do not know. One bad command can wipe a build.
- Keep your own op for admin work and use a normal account to play when you can.
- Pair op with a whitelist so only people you chose can join at all.
- For larger communities, use a permissions plugin so each helper gets only the commands they need.
Tree Host is Minecraft server hosting that has not launched yet. Anyone signed in can try the shared demo server now, and you can read about what Tree Host offers or why we built it.
Want a server where op is one click away? See the plans, or try the demo server first.