The console is the server's text window. It shows what the server is doing, and you type commands into it with the highest privileges. Here's how to use the console in the customer area, plus a cheat sheet of the most useful commands, including game rules and remote management over RCON.
What you'll need
- A Minecraft server at StormHost
- The Console permission (the owner always has it)
- About 10 minutes
The console in the customer area#
- Open My services, click your server and go to the Console tab.
- The server has to be running. If it's off, you'll see “The server is off. Start it with the Start button.”
- In the “Type a command and press Enter” field, type a command without a slash at the start and press Enter (or click Send).
- The server's response appears in the output above the field.
The console output hides IP addresses if you have streamer mode turned on. The full log since the last start is in the logs/latest.log file (the Files tab); older logs are in the same folder, compressed as .log.gz.
Console or in-game chat?#
| Console in the customer area | In-game chat | |
|---|---|---|
| How you type a command | Without a slash: time set day | With a slash: /time set day |
| Who runs the command | The server, with the highest privileges | The player, according to their permissions (op, LuckPerms) |
Selectors and ~ coordinates | @a, @r and @e work. The console isn't a player, so @s selects nobody, and @p and ~ are counted from the world spawn | They work and are relative to you |
| Where the response appears | In the console output | In chat |
The cheat sheets below show commands without a slash. In the game, add a slash in front of them.
Server management#
| Command | What it does |
|---|---|
stop | Saves the world and shuts the server down. The server stays off; start it with the Start button. |
save-all | Saves the world to disk. save-all flush saves everything immediately (the server pauses for a moment). |
save-off / save-on | Turns automatic world saving off / on. Used when copying the world by hand. Don't forget save-on after the copy. |
list | Players online, for example There are 3 of a max of 20 players online: … |
say <message> | A message to all players under the name [Server] |
tps | Server performance over 1, 5 and 15 minutes (Paper, Purpur). The ideal is 20.0. |
mspt | How many milliseconds one game tick takes over the last 5, 10 and 60 seconds (Paper). Under 50 ms is fine. |
version | Server version and type. version <PLUGIN_NAME> shows a plugin's version. |
plugins | List of plugins (Paper, Purpur, Folia) |
seed | The world seed |
help | List of available commands |
Performance and the tps and mspt numbers are explained in detail in the article Performance and optimization.
Players#
| Command | What it does | Example |
|---|---|---|
gamemode <mode> [player] | Game mode: survival, creative, adventure, spectator | gamemode creative Steve |
tp <player> <target> | Teleports a player to another player | tp Steve Alex |
tp <player> <x> <y> <z> | Teleports a player to coordinates | tp Steve 100 64 -200 |
give <player> <item> [count] | Gives a player items (the Minecraft item name) | give Steve diamond 64 |
clear <player> [item] | Clears the inventory, or just the given item | clear Steve dirt |
effect give <player> <effect> [seconds] [amplifier] | Gives an effect. Amplifier 0 = level I. | effect give Steve speed 60 1 |
experience add <player> <amount> [levels] | Adds experience; with levels, whole levels | experience add Steve 10 levels |
kill <target> | Kills players or entities | kill Steve |
op, deop, kick, ban, pardon, whitelist | Access management | see Whitelist, operators and bans |
World#
| Command | What it does | Example |
|---|---|---|
time set <time> | Sets the time: day (1000), noon (6000), night (13000), midnight (18000), or a number | time set day |
weather <weather> [duration] | Weather: clear, rain, thunder | weather clear |
difficulty <difficulty> | Difficulty: peaceful, easy, normal, hard. Until the next restart; to make it permanent, use Server properties. | difficulty hard |
defaultgamemode <mode> | The default game mode for new players | defaultgamemode survival |
gamerule <rule> [value] | A game rule (table below). Without a value, it prints the current one. | gamerule keep_inventory true |
worldborder center <x> <z> | The center of the world border | worldborder center 0 0 |
worldborder set <width> [seconds] | The border size. The number is the full width (diameter), not the radius. With a time, the border moves gradually. | worldborder set 10000 |
setworldspawn [x y z] | Sets the world spawn. Without coordinates, where you're standing (in the game only). | setworldspawn 0 70 0 |
Game rules (gamerule)#
Game rules have new names since 1.21.11
In version 1.21.11, Mojang renamed all game rules from the keepInventory form to keep_inventory (lowercase with underscores). On a server running 1.21.11 or 26.x, use the new names; on older versions, the old ones. Guides on the internet often still use the old names.
| New name (1.21.11+) | Old name | Default | What it does |
|---|---|---|---|
keep_inventory | keepInventory | false | Players keep their inventory and experience after death |
advance_time | doDaylightCycle | true | Day and night cycle. false stops time. |
advance_weather | doWeatherCycle | true | Weather changes |
spawn_mobs | doMobSpawning | true | Natural mob spawning |
mob_griefing | mobGriefing | true | Creepers, endermen and other mobs change blocks. false also stops creeper explosions from breaking blocks. |
fire_ | doFireTick (removed) | 128 | How far from a player fire spreads. 0 = fire doesn't spread (replaces the old doFireTick false), -1 = no limit. |
players_ | playersSleepingPercentage | 100 | What percentage of players must sleep for the night to end. On a server with more players, 50 or less works well. |
pvp | pvp (up to 1.21.8 the pvp option in server.properties) | true | Players can hurt each other |
spawn_monsters | spawnMonsters (up to 1.21.8 the spawn-monsters option) | true | Natural spawning of hostile mobs |
command_blocks_work | commandBlocksEnabled (up to 1.21.8 the enable-command-block option) | true | Command blocks work |
allow_ | allowEnteringNetherUsingPortals (up to 1.21.8 the allow-nether option) | true | Entering the Nether through a portal |
show_death_messages | showDeathMessages | true | Death messages in chat |
show_ | announceAdvancements | true | Advancement announcements in chat |
natural_ | naturalRegeneration | true | Health regenerates from food |
immediate_respawn | doImmediateRespawn | false | Instant respawn without the death screen |
spawn_phantoms | doInsomnia | true | Phantoms attack players who haven't slept for a long time |
respawn_radius | spawnRadius | 10 | The radius around spawn where players appear |
random_tick_speed | randomTickSpeed | 3 | How fast plants grow and other random changes happen. Higher values put load on the server. |
send_command_feedback | sendCommandFeedback | true | Command responses in chat |
command_block_output | commandBlockOutput | true | Command blocks report what they did to operators |
block_drops | doTileDrops | true | Broken blocks drop as items |
mob_drops | doMobLoot | true | Mobs drop items and experience when they die |
tnt_explodes | tntExplodes | true | TNT explodes when lit |
Game rules are saved in the world data, so restarting the server doesn't change them.
Since version 1.21.9, the pvp, spawn_monsters, command_blocks_work and allow_ rules have replaced the old options in server.properties. On a server running 1.21.9 or newer, don't change them in the Server properties tab (if they're still in the file from an older version, the server ignores them); use the gamerule command instead, for example gamerule pvp false (on 1.21.9 and 1.21.10 the same rules are called pvp, spawnMonsters, commandBlocksEnabled and allowEnteringNetherUsingPortals).
Paper and Purpur: rules apply to each world separately
On Paper and Purpur, each dimension (Overworld, Nether, End) has its own game rules. The gamerule command in the console only changes the Overworld. For the Nether and the End, run the same command again through execute in, for example execute in minecraft:the_nether run gamerule keep_inventory true and execute in minecraft:the_end run gamerule keep_inventory true. On Vanilla, Fabric and NeoForge, the rules apply to the whole server. Details are in the guide server.properties.
gamerule keep_inventory true[12:00:01 INFO]: Game rule keep_inventory is now set to truegamerule– the command for game rules.keep_inventory– the rule name (keepInventoryon versions older than 1.21.11).true– the new value. Without it, the server prints the current value.
Selectors: who a command applies to#
Instead of a player name, you can use a selector in the game:
| Selector | Who it selects |
|---|---|
@a | All players online |
@p | The nearest player |
@r | A random player |
@s | Whoever runs the command (you) |
@e | All entities (players, mobs, items on the ground …) |
@n | The nearest entity (since version 1.21) |
You add conditions in square brackets:
/give @a bread 16
/gamemode survival @a[gamemode=creative]
/kill @e[type=zombie,distance=..50]
/tp @r @sgive @a bread 16– every player gets 16 bread.gamemode survival @a[gamemode=creative]– switches everyone in creative to survival.kill @e[type=– kills zombies within 50 blocks of you. Without thezombie, distance= ..50] typecondition,@ewould kill every entity, including players and items.tp @r @s– teleports a random player to you.
Careful with @e without conditions
The kill @e command kills every entity in loaded chunks: players' animals, villagers, items in item frames, armor stands and players. Only a backup can undo it. Always add type=… and a distance.
Plugin commands#
| Plugin | Command | What it does |
|---|---|---|
| EssentialsX | tempban <NICK> 3d [reason] | Temporary ban |
| EssentialsX | broadcast <message> | Announcement to all players |
| EssentialsX | seen <NICK> | When the player was last online |
| LuckPerms | lp user <NICK> parent add <group> | Adds a player to a group |
| LuckPerms | lp editor | Web permission editor |
| CoreProtect | co lookup u:<NICK> t:1d r:30 | What the player changed in the last day within 30 blocks |
| CoreProtect | co rollback u:<NICK> t:1d r:30 | Rolls back their changes |
| Chunky | chunky start / chunky pause | Starts / pauses world pre-generation |
| spark | spark tps | Detailed server performance and CPU usage |
| spark | spark profiler start --timeout 600 | A ten-minute performance measurement with a link to a report |
You'll find the details in the articles Recommended plugins, LuckPerms and Performance and optimization.
RCON: remote console#
RCON lets another program send commands to the console over the network, for example a Discord bot, a script or an app on your computer. You don't need it for everyday management; the console in the customer area is enough.
RCON needs its own port. The game runs on the main port. Only the service owner or a member with the Secrets permission can turn on and configure RCON.
- In the Network tab, click Add port. Note the number of the new port under Additional ports.
- Generate a strong password, for example with the Password generator tool.
- In the Server properties tab, open the Network and RCON group.
- Turn on Remote console (RCON), enter the new port in the RCON port field and paste the password into the RCON password field.
- Click Save and restart.
In the server.properties file, this corresponds to these lines:
enable-rcon=true
rcon.port=<EXTRA_PORT>
rcon.password=<STRONG_PASSWORD>
broadcast-rcon-to-ops=true| Setting | What it does | Recommended value | When to change it |
|---|---|---|---|
enable-rcon | Turns RCON on | true only if you use it | false if you don't need RCON |
rcon.port | The port RCON listens on (TCP) | An additional port from the Network tab | Never the main game port |
rcon.password | The password for connecting. If it's empty, RCON doesn't start. | A long random password | Regularly, and whenever someone may have seen the password |
broadcast-rcon-to-ops | Whether the output of RCON commands is shown to operators in the game | true | false if the messages bother you |
Replace <EXTRA_PORT> with the port from step 1 and <STRONG_PASSWORD> with the password from step 2.
Connecting with mcrcon#
The mcrcon (opens in a new window) tool works on Windows and Linux. You can download a ready-made program for these systems from the Releases page of its repository (on macOS you need to build it from source following the instructions in the repository). An interactive console:
mcrcon -H <SERVER_IP> -P <EXTRA_PORT> -p <STRONG_PASSWORD> -t-H– the server address (the IP from the Network tab, without the port).-P– the RCON port (capital P).-p– the RCON password (lowercase p).-t– terminal mode: opens a console where you type commands. Exit with theQcommand or Ctrl+C.
Send one-off commands (for example from a task scheduler) without -t, and put commands with spaces in quotes (the say message in the example is Czech for “Restart in 5 minutes”):
mcrcon -H <SERVER_IP> -P <EXTRA_PORT> -p <STRONG_PASSWORD> "say Restart za 5 minut" save-allRCON doesn't encrypt the connection
The password and commands travel over the network unencrypted. Anyone who knows the password has full control of the server. Use a long random password you don't use anywhere else, don't put it in public scripts, and turn RCON off when you don't need it.
Troubleshooting#
Unknown or incomplete command. See below for error#
The command doesn't exist, has a typo, or you don't have permission (in the game, commands you lack permission for behave as if they don't exist). On servers running 1.21.11 and newer, an old game rule name such as keepInventory also triggers this error. Use the new name, keep_inventory.
Unknown command. Type "/help" for help.#
The same thing in the older form used by Spigot and older Paper versions. Current Paper and Purpur report an unknown command the same way as the official server (Unknown or incomplete command. See below for error). Check the command name and whether the plugin that adds it is loaded (plugins).
No player was found#
No player with that name is online, or the selector didn't find anyone.
A player is required to run this command here#
A command without a player name applies to whoever ran it, and the console isn't a player. Typically gamemode creative typed in the console. Add the player name (gamemode creative Steve), or run the command in the game.
In the game you get I'm sorry, but you do not have permission…#
The plugin command needs a permission you don't have. Give it to yourself through LuckPerms, see LuckPerms, or use operator rights.
RCON won't connect#
- RCON only works on a port assigned to you in the Network tab. Check
rcon.port. - The server needs a restart after the change.
- The password can't be empty.
- Enter the IP address without the game port, and the RCON port separately with
-P.
Summary
- In the customer area console, type commands without a slash; in the game, with a slash.
stopsaves and shuts down the server,save-allsaves the world,listshows players,tpsandmsptshow performance.- Game rules have new names since 1.21.11 (
keep_inventory,advance_time…). - The
@a,@p,@r,@s,@eand@nselectors work in the game. Don't usekill @ewithout conditions. - RCON needs its own port and a strong password. The connection isn't encrypted.