For Creators & Hosts

How to OP Yourself on a Minecraft Server (Console, Hosts, Aternos and Bedrock)

The one command that makes you an operator on your own server, and the traps that make it look broken.

Here's how to OP yourself on a Minecraft server you run: open the server console and type op yourname, with no slash in front. That's the whole trick. The reason it feels broken is that you can't do it from in-game chat until someone is already an operator, so a brand-new server owner gets stuck typing /op in chat and getting "no permission." Use the console instead.

Below is how that looks on your own PC, a host panel, Aternos, a Bedrock Dedicated Server and singleplayer, plus what each OP level can do and how to take it away. This is a guide for people who run the server. If you're trying to get OP on someone else's, the short answer is no, and the section near the end explains why.

Which route do you need?

Where you playHow you OP yourself
Java server on your own PCop yourname in the server console window
Paid or free panel hostop yourname in your host's console tab
AternosPlayers page, then Ops (or the console)
Bedrock Dedicated Serverop yourname in the server console
SingleplayerTurn on cheats for the world

On your own PC (Java server)

Start the server and click into the console, which is the window the server software runs in. Type op yourname and hit enter. Commands typed in a server console don't take a slash; chat commands do. The command adds you to ops.json at the default level, and it's a dedicated-server command. If you haven't set the server up yet, how to make a Minecraft server walks through it.

Spell your name exactly as it appears in game. A wrong name gets you a "that player doesn't exist" style error. Once you're an operator at level 3 or higher (the default is 4), you can run /op friendname in game too, since that's the level Java's /op needs.

On a host panel

Most paid hosts work the same way: open your host's console tab, make sure the server is running, and type op yourname with no slash. If the console won't take commands, the server is probably offline.

How to give OP on Aternos

Aternos has a screen for this. Go to the Players page, open Ops, type your username and add it. That's the route Aternos itself recommends, and owning the Aternos account doesn't make you an in-game op automatically; you have to add yourself.

The fallback is to start the server, open the console page and type /op yourname. Aternos accepts the slash there. If you've got cracked players enabled, Aternos warns the console method might not work properly, so stick with the Players page.

Weighing Aternos against other free options? There's a rundown in free Minecraft server hosting.

On a Bedrock Dedicated Server

The console command is the same: op yourname. The player has to be online when you run it. Under the hood, Bedrock keeps permissions in permissions.json, a list of player IDs (XUIDs) with a role of operator, member or visitor. That file needs online-mode=true in server.properties, because the XUID has to be verified online. After you change it by hand, run permission reload from the server console.

Two server.properties settings matter here:

On a Bedrock dedicated server, an operator is only permission level 1. That covers most gameplay commands, but /op and /deop need level 2 and /allowlist, /permission and /stop need level 4, so do those from the server console. Setting up from scratch? See how to make a Minecraft Bedrock server. One more Bedrock fact: the allowlist applies to everyone, operators included, whereas Java ops can join a whitelisted server even when they aren't on the list. The whitelist guide covers that side.

Singleplayer and LAN

There's no server console in singleplayer, so the equivalent is cheats. On Java, a world created with cheats on gives you permission level 4. If you made the world without them, you can open it to LAN and allow cheats for that session, which isn't permanent. That menu changed after Java 26.3, so the buttons may look different on your version. On both editions you can also toggle cheats in the world's options at any time. On Bedrock, turning cheats on permanently stops achievements in that world.

What each OP level can do

Java has five levels, and each one includes the ones below it. op-permission-level in server.properties sets what a fresh /op hands out. It runs 0 to 4 and defaults to 4. Changes to server.properties need a restart.

LevelNameWhat it adds
0OperatorBasically nothing beyond a regular player, like seeing console output if broadcast-console-to-ops is on
1ModeratorBypass spawn protection
2GamemasterCommand blocks and most gameplay commands (gamemode, give, tp, time, weather)
3AdminManagement commands: ban, kick, op, deop, whitelist
4OwnerEverything, including stop and save-all

Per-player levels live in ops.json. Each entry has a uuid, a name, a level (it defaults to op-permission-level) and bypassesPlayerLimit, which lets that op into a full server. If you hand-edit the file, restart afterwards. A typo in that JSON is a classic way to break your ops list, so I'd use the console command unless you have a reason not to.

Bedrock levels are different (see the Bedrock section above), so don't mix the two tables up. And if no ops are set on a Java server, spawn protection switches itself off.

How to deop

Run deop friendname in the console. In game it's /deop, which needs level 3 on Java and level 2 on Bedrock.

Why you shouldn't OP everyone

Because the default is level 4, a plain op gives that person the keys to everything, including the ability to stop the server. Even level 3 can ban people and make other ops. I'd only default-op people I'd trust with the host login.

You've got a couple of ways to shrink that. Lower op-permission-level to something like 2, or set a level per player in ops.json. If you need more control than five levels, a permissions plugin lets you give people individual commands instead of blanket OP. LuckPerms is one example. Plugins need a server that supports them, not the plain vanilla server file, so check the best Minecraft server plugins before you pick your software.

Can you OP yourself on someone else's server?

No. Only the person who runs the server, or an operator of high enough level, can hand out OP. Op status is stored on the server, in files you can't touch from your own game. Any site, video or download that promises OP on a server you don't run is a scam or a malware lure. Skip it. If you want commands, ask the owner, or start your own world.

If it's not working