This guide contains useful commands to manage a Minecraft server (Java or Bedrock Edition) installed via Proxmox LXC container or VM.
cd /opt/minecraft # Java Edition
cd /opt/minecraft-bedrock # Bedrock Editioncd /opt/minecraft
./start.shTo run in the background via screen:
cd /opt/minecraft
screen -S minecraft ./start.shReconnect to the session:
screen -r minecraftDetach without stopping the server:
CTRL + A, then DIn the screen session with the server running:
stopThis cleanly shuts down the server.
cd /opt/minecraft
./update.shDownloads the latest PaperMC version and replaces server.jar.
Bedrock cannot be updated automatically. Instead, run:
cd /opt/minecraft-bedrock
./bedrock_helper.shThis script shows the manual download link.
Edit the start.sh file:
nano /opt/minecraft/start.shExample modification:
java -Xms4G -Xmx6G -jar server.jar noguicd /opt/minecraft/logs/If you're listed as OP (ops.json):
/gamemode creative
/give @p minecraft:diamond 64
/ban <playername>op <playername>Example:
op TimInTech| Command | Description |
|---|---|
| /gamemode creative | Switches to Creative Mode |
| /gamemode survival | Switches to Survival Mode |
| /give @p minecraft:diamond 64 | Gives 64 diamonds to nearest player |
| /time set day | Sets time to day |
| /weather clear | Clears the weather |
| /tp | Teleports player1 to player2 |
| /teleport @s 100 70 -100 | Teleports you to coordinates (x y z) |
| /ban | Permanently bans a player |
| /pardon | Unbans a player |
| /kick | Kicks player with optional reason |
| /stop | Shuts down the server |
To use these commands:
- Multiplayer: You must have OP status
- Singleplayer: Enable cheats (e.g., via LAN menu)
Located at:
/opt/minecraft/ops.jsonExample content:
[
{
"uuid": "PLAYER-UUID",
"name": "TimInTech",
"level": 4,
"bypassesPlayerLimit": false
}
]Command blocks enable automation using Redstone and custom logic.
Enable them in the server.properties file:
enable-command-block=true| Command | Description |
|---|---|
| /say Welcome to the server! | Sends a message to all players |
| /tp @a 100 65 -100 | Teleports all players to coordinates |
| /effect @p minecraft:levitation 5 2 | Gives levitation effect for 5 seconds |
| /title @a title {"text":"Bossfight!"} | Displays a title screen to all players |
| /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 stone | Fills an area with stone |
| /summon minecraft:zombie ~ ~1 ~ | Spawns a zombie above the block |
| Command | Description | |
|---|---|---|
| /setmaxplayers | Sets maximum number of players | |
| /ability fly <true | false> | Enables/disables flying for a player |
| /structure save | Saves a structure | |
| /structure load ~ ~ ~ | Loads a saved structure | |
| /event entity @e minecraft:on_fire | Triggers an entity event | |
| /camera shake @a 3 5 | Creates a camera shake effect |
Happy crafting and managing your Minecraft server! 🧱