How to Enable Command Blocks on Your Minecraft Server
Published on July 18, 2026
Command blocks are redstone blocks in Minecraft that execute commands when you activate them. You can use these blocks to run commands at specific times, create custom contraptions, and much more. Command blocks are disabled by default on older Minecraft versions. This guide explains how to enable command blocks on your Minecraft server.
Tip Not sure which Minecraft version your server is using? Go to Software under Management in the game panel.
Enabling command blocks from Minecraft 1.21.9 onward
From Minecraft 1.21.9 onward, command blocks are enabled by default. If they are not working, you can check the setting in the console and enable them again.
- Log in to the game panel and go to your Minecraft server.
- Start the Minecraft server if it is not already running and wait until it has fully started.
- Open the Console page.
- Enter the following command and press Enter:
gamerule commandBlocksEnabled trueCommand blocks will then be enabled immediately. You do not need to restart the Minecraft server.
Enabling command blocks in Minecraft 1.21.8 and older
- Log in to the game panel and go to your Minecraft server.
- Stop the Minecraft server if it is still running.
- Open the Files page.
- Click the
server.propertiesfile. - Find the following line:
enable-command-block=false- Change the value from
falsetotrue. The line should then look like this:
enable-command-block=true- Save the file.
- Start the Minecraft server using the green start button.
Tip Isenable-command-blockmissing from the file? Addenable-command-block=trueon a new line and save the file again.
Obtaining a command block
Command blocks are not available in the Minecraft Creative mode inventory and must therefore be obtained another way.
- Open the Console page.
- Give yourself or another player operator permissions.
- Replace
PLAYERNAMEin the command below with the username of the player who should receive the command block. - Enter the command:
give PLAYERNAME minecraft:command_block- The player can now place and use the command block.