Tree Host

How to Make Yourself Op on a Minecraft Server

Updated · by the Tree Host team

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.

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.

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

LevelWhat it allowsExample commands
0Nothing special. This is a normal player.None
1Bypass spawn protection, so you can build near spawn.None
2Gameplay and cheat commands./gamemode, /give, /tp, /time, /weather, /fill
3Everything in level 2, plus managing players./kick, /ban, /op, /deop, /whitelist
4Everything 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.

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

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

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.

More guides

← More guides