How to enable or disable command blocks
Command blocks are off by default on every server, for good reason. Turning them on is one setting, and the part worth reading is who can then use them.
The setting
Stop the server, open server.properties, and set:
enable-command-block=trueSave, then start the server. To turn them off again, set it back to false and restart. Existing command blocks stay in the world but stop executing.
Edit the file while the server is stopped. A running server rewrites the file on shutdown and will overwrite your change.
Getting a command block
Command blocks are not craftable and not in the creative inventory. You need operator status and the give command:
/give YourName minecraft:command_blockPlace it, right click to open it, and type the command without the leading slash. The three modes on the left of that interface are Impulse, which runs once when powered, Chain, which runs after the block pointing into it, and Repeat, which runs every tick while powered.
Needs Redstone versus Always Active is the other toggle people miss. Always Active is what you want for a repeating block with no redstone attached.
Who can actually use them
This is where servers get into trouble. Placing and editing a command block requires operator level 2 and creative mode, so a normal player cannot touch one. But a command block itself executes with high permission, which means anything that can trigger one can effectively run that command.
The practical rules: never leave a repeating command block wired to something players can reach, be careful with commands built from player input, and remember that giving a builder operator status to place command blocks gives them everything else too. On a plugin server, use a permissions plugin to grant the specific nodes instead of blanket operator.
Why servers keep them off
Three reasons. A repeating command block running an expensive command every tick is one of the easiest ways to destroy tick performance. A badly scoped selector can affect every player on the server. And on a server with any kind of economy, a command block that gives items is a dupe waiting to be found.
If your server has a spawn built by contributors, consider enabling command blocks on a test world only, building there, then copying the finished structure across.
Alternatives worth knowing
Most things people reach for command blocks to do have a safer plugin equivalent: signs that run commands, a region system with entry and exit actions, scheduled tasks, or a scripting plugin with proper permission checks.
Those cost you a plugin and give you an audit trail, a permission node and a config file you can back up. A command block in a wall is invisible to everyone who did not place it. Our plugin guide covers which ones are worth running, and the server.properties reference lists the other settings in that file worth knowing.