← All guides
FreaksMC Guides

How to Enable Command Blocks on a Minecraft Server

Updated November 21, 2026 · 2 min read

Command blocks are how map makers build minigames, teleport pads and custom shops without plugins. On a server they start switched off, and turning them on changed in recent versions.

Short answer
On recent versions (including 26.x), run /gamerule command_blocks_work true. On older versions, set enable-command-block=true in server.properties and restart. Then, as an operator in Creative mode, run /give @s command_block to get one.

Step 1: Switch command blocks on

New versions: the game rule

Recent Minecraft versions moved this out of server.properties and into a game rule:

/gamerule command_blocks_work true

Run it in game as an operator, or from the console without the slash. It applies right away. Check the current value by running /gamerule command_blocks_work with no value.

Older versions: server.properties

If your server.properties has an enable-command-block= line, change it to:

enable-command-block=true

Then restart. Not sure which you have? Type /gamerule and press Tab. If command_blocks_work is listed, use the game rule.

Step 2: Get a command block

Command blocks aren't in the creative menu. Give yourself one:

/give @s command_block

There are three kinds: the orange impulse block (runs once per signal), the green chain block (runs after the block pointing into it) and the purple repeating block (runs every tick). Get the others with /give @s chain_command_block and /give @s repeating_command_block.

Step 3: Open it

To open and edit a command block you need both:

  1. Operator permission. See how to OP yourself.
  2. Creative mode: /gamemode creative.

If right-clicking does nothing, one of those is missing.

Stop the chat spam

By default every command block posts its result in chat for operators. On a busy map that's a wall of text. Turn it off with:

/gamerule command_block_output false

Keep them safe on a public server

Command blocks can run any command, including ones that give items or teleport everyone. Only give operator status to people you trust completely. On a public server, keep regular players non-op and use a permissions plugin like LuckPerms to hand out only the commands they need.

Related

FAQ

Why does it say "Command blocks are not enabled on this server"?

Command blocks are switched off for the server. On new versions run /gamerule command_blocks_work true. On older versions set enable-command-block=true in server.properties and restart.

I placed a command block but right-clicking does nothing. Why?

You need to be an operator and in Creative mode to open a command block. Check you're opped, then run /gamemode creative.

How do I stop command block messages spamming chat?

Run /gamerule command_block_output false. Command blocks keep working, they just stop posting their results in chat.

Want a server that just runs fast?

FreaksMC runs on NVMe hardware with performance-tuned defaults baked in - pre-optimized Paper, sane view distances, and one-click world pre-generation. Set up in 60 seconds.

See plans from $3/mo

We use cookies for analytics & ads to measure how our site performs. Essential cookies always run. See our Privacy Policy.