Essential Minecraft admin commands every server owner should know

You do not need to memorise hundreds of commands to run a server well. About two dozen cover nearly everything you will do as an admin. This is a practical reference grouped by job, with the small details that save you from mistakes.

Where to run them

Operators can type commands in the game, starting with /. You can also run them in the server console without the slash, and that is where you should run anything risky, because the console cannot be affected by your own connection dropping. The server console is built into your panel.

Managing players

CommandWhat it does
/op name and /deop nameGive or remove operator status
/whitelist add nameAllow a player to join when the whitelist is on
/whitelist on, off, reload, listTurn the whitelist on or off, reload it, or show it
/kick name reasonRemove a player from the server
/ban name reason and /pardon nameBan and unban by name
/ban-ip address and /pardon-ip addressBan an address
/listShow who is online

Be sparing with /op. Operator level is controlled by op-permission-level in server.properties, and the default of 4 is full power. A whitelist and a short operator list prevent most problems.

Moving things and people

  • /tp name1 name2 teleports one player to another, and /tp name x y z teleports to coordinates.
  • /gamemode survival name changes a player's mode. Use creative, adventure or spectator too.
  • /setworldspawn sets the spawn point where you stand.
  • /spawnpoint name sets an individual player's respawn point.

Items and building

  • /give name item amount gives items, such as /give Steve diamond 5.
  • /clear name empties a player's inventory. Careful, because it is instant.
  • /fill x1 y1 z1 x2 y2 z2 block fills a region with a block. It has a size limit per command, and a large fill can lag the server.
  • /setblock x y z block places one block.
  • /clone copies a region, which is handy for repairs.

Use ~ in coordinates for "relative to me". So /setblock ~ ~1 ~ stone places stone just above you.

World and time

  • /time set day, night, noon or a number of ticks.
  • /weather clear, rain or thunder, with an optional duration in seconds.
  • /difficulty peaceful, easy, normal or hard.
  • /seed prints the world seed, useful for map websites and tools.
  • /gamerule changes how the world behaves, covered in Minecraft gamerules explained.

Saving and stopping

Three commands matter for safety:

  • /save-all forces the world to be written to disk.
  • /save-off pauses automatic saving, and /save-on resumes it. Use these when copying files by hand, then turn saving back on.
  • /stop shuts the server down cleanly. Always prefer this to killing the process, because it saves everything first.

If you take a manual copy of the world, run /save-all and /save-off first, copy the folder, then /save-on. Otherwise you can copy a half-written world. Scheduled panel backups handle this for you, as described in Creating and restoring backups.

Messaging

  • /say text broadcasts a message to everyone, shown as a server announcement.
  • /tell name text or /msg sends a private message.
  • /title @a title {"text":"Restart in 5 minutes"} shows large text on screen. The text uses JSON.
  • /tellraw sends formatted chat, including links and colours, using the same JSON format.

Selectors

Many commands accept a target selector, and they are what makes commands powerful:

SelectorTargets
@aAll players
@pThe nearest player
@rA random player
@sThe one running the command
@eAll entities, including mobs

You can filter them. @e[type=zombie,distance=..20] means every zombie within 20 blocks. And /kill @e[type=item] removes dropped items, which can ease lag after a big farm accident. Be exact with @e, because /kill @e removes everything that is not a player.

A safety habit

Before any command that changes many things at once, run it on a copy or take a backup. A mistyped /fill or /kill cannot be undone with an undo button.


Still stuck? Open a ticket on Discord - run /ticket in any channel, pick a department, and include your Server ID or Invoice ID so we can jump straight in.