Digital strategist, front end + email developer, WordPress enthusiast, IT tinkerer, and not-so-horrible writer

How to Add a Level 4 Operator to a Minecraft Server

In this tutorial I'm going to explain how to add a level 4 operator to your Minecraft server using Minecraft Java Edition and SSH. But first let me unpack four things you're going to see sprinkled throughout:

  1. I run a Minecraft Spigot server running on Debian 11, but all the listed commands should work for a vanilla Minecraft server running on a different flavor of Linux.
  2. A level 4 operator is the top tier for Minecraft server admins so I'm going to refer to it as a super admin since you'll be able to issue every command available to admins.
  3. Player name will occasionally be shortened to just name.
  4. User ID will be shortened to UUID from this point forward.

The first step is to connect to your Minecraft server in Minecraft Java Edition so your player name (name) and user ID (UUID) appear in the user connection list. Now exit the game.

Please connect to your server via SSH then navigate to the folder where your your Minecraft server was installed. In my case it's in the /spigot directory.

Now type:

cat usercache.json

This will show you the list of players who have connected to the server with the most recent appearing at the top. Please copy and paste your name and UUID into a temporary text file.

Now copy and paste the following text into the same text file and weave your name and UUID from the previous step into it:

[
	{
		"Uuid":"paste your UUID here between the double quotes",
		"Name":"paste your name here between the double quotes",
		"level": 4,
		"bypassesPlayerLimit": true
	}
]

! Please note: the last line adds a parameter to allow you to bypass the player limit in case the server's already full – very handy if your server's regularly full!

Back in SSH, please type:

nano ops.json

If the server doesn't have any operators yet then you'll just see an opening and closing square bracket. Please delete the characters and paste in the text from your temporary text file, starting with the opening square bracket to the closing one.

Now restart your Minecraft server so the changes are picked up. In my case I typed:

systemctl reboot

After the server comes back up please reconnect with Minecraft Java Edition and hit the / key to open up the console so we can try an admin-level command. For instance, I kicked myself:

/kick @UnholyMiner777 Test punt

You'll find the Minecraft console will guide you when issuing commands but, to be clear, here's the format:
/kick @PlayerName reason

So that's it, you're now a super admin (level 4 operator) of your own Minecraft server. Be sure to use your new powers carefully!

Leave a reply