NewSchokr 13 is here. A whole new UI, seven locations, snapshots and more. Read more →

How to enable command blocks on a Minecraft server

Fix 'Command blocks are not enabled on this server' by turning on enable-command-block, then get and use a command block.

Updated · 2 min read

Command blocks are off by default on servers. Set enable-command-block=true in server.properties, restart the server, and make sure you are an op in creative mode to place and edit them.

Enable command blocks

  1. Open the file manager and edit server.properties.
  2. Change:
enable-command-block=true
  1. Save and restart the server.

If this key is missing from your file, you may be on a very recent Minecraft version where Mojang has moved some settings into game rules. Type /gamerule in-game and press Tab to look for a command block rule. Paper and other platforms may also have their own options; check the console on startup.

Get a command block

Command blocks are not in the creative inventory search by default. As an op, run in-game:

/give @s minecraft:command_block

To place and edit a command block you need:

Right-click the block to open it and type a command without the leading slash.

Command block types

TypeBehavior
Impulse (orange)Runs once each time it is powered
Chain (green)Runs after the block pointing into it
Repeat (purple)Runs every game tick while powered

Set Always Active to run without redstone, or Needs Redstone to run only when powered.

Hide the chat spam

Command blocks report their output to ops in chat. Turn it off with:

/gamerule commandBlockOutput false

See gamerules for rule naming on newer versions.

Performance and safety

  • Repeating command blocks run 20 times a second. Heavy commands such as large fill, entity selectors without limits, or execute as @e can cause serious lag. Add selectors like limit=1 and distance=..10 where you can.
  • Anyone who can edit a command block effectively has op powers, because a command block can run nearly any command. Only give op and creative to trusted players.
  • On Paper, many simple command block setups can be replaced with plugins or data pack functions, which are easier to manage.

Still says "Command blocks are not enabled"?

  • You edited server.properties but did not restart.
  • There are two enable-command-block lines and the later one is false.
  • You edited a file in the wrong folder. The correct one is in the server root, next to eula.txt.