Operators can run admin commands: change gamemode, teleport, ban players, stop the server. As the owner you'll want this for yourself.
Op yourself
In the Console tab:
op YourName
You'll see "Made YourName a server operator". The Players tab also lists operators and lets you add and remove them.
To remove it:
deop YourName
Op levels
op-permission-level in server.properties sets how powerful new operators are (default 4):
| Level | Can |
|---|---|
| 1 | Build inside spawn protection |
| 2 | Most cheats: gamemode, give, teleport, command blocks |
| 3 | Kick and ban players, op others |
| 4 | Everything, including stopping the server |
Give yourself level 4. For anyone else, think hard before giving them op at all.
Don't op your staff
Op is all or nothing at each level. A moderator who only needs /kick and /tempban doesn't need the power to stop your server or give themselves items.
On Paper, Purpur and Spigot servers, use LuckPerms instead. It lets you make a "moderator" group with exactly the commands they need:
lp creategroup moderator
lp group moderator permission set essentials.kick true
lp user Steve parent add moderator
On modded servers (Fabric, Forge, NeoForge), LuckPerms has mod versions too, and many mods use op levels for their own commands.
Commands that work from the console
Commands typed in the Console tab run as the server itself, with full power. You don't need to be op to use them, and you don't put a / in front.
Questions
I opped myself but commands say I don't have permission.
Check op-permission-level in server.properties is at least the level the command needs (4 for everything), then deop and op yourself again so the new level applies.
Is it safe to op friends?
Only if you'd trust them with the whole server. Anyone at level 3 or 4 can ban you, op others and change anything. Use a permissions plugin for limited powers.
Where are operators stored?
In ops.json in the server's top folder, with each player's level.