# How to Enable Command Blocks on a Minecraft Server (26.x Fix)

Fix "Command blocks are not enabled on this server": use /gamerule command_blocks_work true on 1.21.9 and newer, or enable-command-block on older servers.

Updated 2026-10-08. https://gamezservers.com/guides/how-to-enable-command-blocks-on-a-minecraft-server

To enable command blocks on a Minecraft Java server running 1.21.9 or newer, including all 26.x versions, run `gamerule command_blocks_work true` in the server console. On 1.21.8 and older, set `enable-command-block=true` in `server.properties` and restart. Then make sure you are an operator in creative mode, and get one with `/give @s minecraft:command_block`. If you still see "Command blocks are not enabled on this server", the steps below find the reason.

## Why "Command blocks are not enabled on this server" appears

That message means the server has command blocks switched off. On a dedicated server they used to be off by default, because a command block can run almost any command, including ones that give items, teleport players or wipe areas.

Where the switch lives depends on your version:

| Server version | The setting | How to change it |
| --- | --- | --- |
| Java 1.21.9, 1.21.10 | A camel case game rule | Type `gamerule command` in the console and press Tab to see its exact name |
| Java 1.21.11 and 26.x | `command_blocks_work` game rule | `gamerule command_blocks_work true` |
| Java 1.21.8 and older | `enable-command-block` in `server.properties` | Set to `true`, then restart |
| Bedrock Dedicated Server | `commandblocksenabled` game rule, plus cheats | `gamerule commandblocksenabled true` and `allow-cheats=true` |

The reason guides disagree is that Java 1.21.9 moved the setting out of `server.properties` into a game rule, and 1.21.11 then renamed every game rule to snake case. An old guide telling you to edit `enable-command-block` is right for old servers and does nothing on a 26.x server.

## Step 1: Turn command blocks on (Java 1.21.9 and newer)

1. Open the server console.
2. Run:

```
gamerule command_blocks_work true
```

3. Check with `gamerule command_blocks_work`. It should say `true`.

No restart is needed, and the setting is saved in the world. On 1.21.9 and 1.21.10 the rule still had its older camel case name: type `gamerule command` in the console and press Tab, and the console fills in the exact name your version uses.

On Paper, Purpur and Spigot every dimension has its own game rules. If you have command blocks in the Nether or the End, set it there too:

```
execute in minecraft:the_nether run gamerule command_blocks_work true
execute in minecraft:the_end run gamerule command_blocks_work true
```

## Step 1 for older servers (1.21.8 and below)

1. Stop the server.
2. Open `server.properties` in the main folder.
3. Change `enable-command-block=false` to `enable-command-block=true`.
4. Save and start the server.

The file is only read when the server starts, so changing it while the server runs and not restarting is the most common reason this "does not work". Also check you edited the real `server.properties` in the server's root folder, not a copy in another directory.

## Step 2: Become an operator

Only operators can place, open and edit command blocks. Run this in the console:

```
op YourName
```

Command blocks need operator level 2 or higher. The default `op-permission-level` is `4`, so a normal `op` is plenty. If someone was given a lower level by hand in `ops.json`, raise it. Details in [how to op someone on a Minecraft server](https://gamezservers.com/guides/how-to-op-someone-on-a-minecraft-server).

## Step 3: Switch to creative and get a command block

Command blocks only show in the creative inventory if you turn on the Operator Items Tab in your Controls settings, and you can only edit them in creative mode. The `/give` command is quicker:

```
/gamemode creative
/give @s minecraft:command_block
```

Place it, right click it, and type your command into the box. Commands inside command blocks do not need a slash. For the other types, give yourself `minecraft:chain_command_block` or `minecraft:repeating_command_block`.

## Step 4: Test it

Put `say Hello` in the block, set it to **Needs Redstone**, and place a button on it. Press the button. If "Hello" appears in chat, everything works. If not, check the table below.

## Still not working? Checklist

| Symptom | Cause | Fix |
| --- | --- | --- |
| "Command blocks are not enabled on this server" | Game rule or property is off | Step 1 for your version |
| Right click does nothing | You are not in creative, or not an op | `/gamemode creative`, then `op YourName` from the console |
| The block runs once, then never | It is set to Impulse | Set it to Repeat, or power it again |
| A repeating block does nothing | Needs Redstone with no power | Set it to Always Active |
| A chain block does nothing | It does not face out of the previous block, or is set to Conditional with a failing block before it | Point the arrow away from the block before it |
| "Incorrect argument" for the game rule | Wrong name for your version | Use `command_blocks_work` on 1.21.11 and 26.x. On older versions, type `gamerule command` and press Tab to get the right name |
| Works in the Overworld, not the Nether | Paper per world game rules | Use the `execute in` lines above |
| Placing is blocked near spawn for a non op | Spawn protection | Op the builder, or set `spawn-protection=0` |

## Stop command blocks spamming chat

Every time a command block runs, operators see a grey message in chat, and repeating blocks flood it. Turn that off:

```
gamerule command_block_output false
```

To also hide the replies commands send to the person who ran them, use `gamerule send_command_feedback false`. On servers before 1.21.11, the names are `commandBlockOutput` and `sendCommandFeedback`. The full list is in [how to change game rules on a Minecraft server](https://gamezservers.com/guides/how-to-change-game-rules-on-a-minecraft-server).

## Command blocks on a Bedrock server

On Bedrock Dedicated Server, command blocks need two things:

1. `allow-cheats=true` in `server.properties`, then a restart. This disables achievements for that world.
2. The game rule on, which is the default. If someone turned it off, run `gamerule commandblocksenabled true` in the console.

Then op yourself, switch to creative and run `/give @s command_block`. Bedrock's [server.properties guide](https://gamezservers.com/guides/minecraft-bedrock-server-properties-explained) has the rest of the settings.

## Is it safe to turn on command blocks?

Command blocks can only be placed and edited by operators, so on a friends server with trusted ops they are fine. The risk is on public servers: anyone with operator can create a block that ops them again after you deop them, or that destroys an area. Keep operator for people you trust, and use a permissions plugin like LuckPerms to give helpers only the commands they need. Custom maps that rely on command blocks are covered in [how to add a custom map to a Minecraft server](https://gamezservers.com/guides/how-to-add-a-custom-map-to-a-minecraft-server).

Note for 26.3 map makers: signs no longer run commands in their text by default unless they have the new `allow_op_features` field set, as covered in our [26.3 server update notes](https://gamezservers.com/guides/minecraft-26-3-wilderness-bound-server-update). That is separate from command blocks.

## Command blocks on GamezServers

On a [GamezServers Minecraft server](https://gamezservers.com/games/minecraft), open the **Console** tab, run `gamerule command_blocks_work true`, then click **Make operator** with your username. You do not need to edit any files or restart. Older versions use the **Files** tab to edit `server.properties`, then **Restart**.

## FAQ

### How do I enable command blocks on a Minecraft server in 26.x?

Run `gamerule command_blocks_work true` in the server console. The `enable-command-block` line in `server.properties` was removed in 1.21.9.

### Why is enable-command-block missing from my server.properties?

Your server runs Java 1.21.9 or newer, where the setting became a game rule. Use the `gamerule` command instead.

### Do I need to restart after enabling command blocks?

Not on 1.21.9 and newer, since game rules apply instantly. On older servers, yes, because `server.properties` is only read on start.

### Why can't I open a command block?

You need to be an operator and in creative mode. Run `op YourName` in the console, then `/gamemode creative`.

### How do I get a command block in Minecraft?

Use `/give @s minecraft:command_block`. It only appears in the creative inventory when the Operator Items Tab is turned on in Controls settings.
