Source: https://waylonwalker.com/docker-minecraft-server/
# Start server
docker compose up -d
# Update server to latest version
docker-compose down
docker compose pull
docker-compose up --force-recreate --build -d
docker image prune -f
# Generate New World
cd ~/Docker/minecraftServer/data
docker-compose down
rm -rf {world/,logs/,*.properties}
docker compose pull
docker-compose up --force-recreate --build -d
docker image prune -f
# How To Reset the World on Your Minecraft Server
cd ~/Docker/minecraftServer/data
docker-compose down
# rm -rf {world/,logs/,*.txt,*.json,*.properties}
rm -rf {world/,logs/,*.properties}
# rm -rf backups/playerdata/ && cp -r world/playerdata/ backups/
# rm -rf {world/!(playerdata),logs/,*.txt,*.json,*.properties}
docker-compose up --force-recreate --build -d
# Open/Attach minecraft server Console
#NOTE: Press Ctrl-P, followed by Ctrl-Q, to detach from your connection.
docker attach minecraft
docker compose logs -f
# Game Rules
#(https://nodecraft.com/support/games/minecraft/using-gamerules-in-minecraft#h-list-of-gamerules-fc34423d4)
/whitelist off/on
/gamerule doImmediateRespawn true #Players respawn immediately without showing the death screen
/gamerule keepInventory true #Whether the player should keep items in their inventory after death
/gamerule logAdminCommands true #Whether the player should keep items in their inventory after death
/gamerule pvp true #Whether the player can fight with other players
# Game Commands
#(https://minecraft.fandom.com/wiki/Commands)
#(https://www.ign.com/wikis/minecraft/Console_Commands_and_Cheats_List#All_Console_Commands_and_Cheats_List)
/op @a #Grants All players operator status on the server.
/op playername #Grants playername operator status on the server.
/gamemode creative #Switch your server to Creative Mode
/gamemode survival #Switch your server to Survival Mode
/locate structure village #Find villages GPS
/tp [player] [x y z] #Teleport a player to a specific location
/experience add <player> <amount> #Give a player free experience points
/difficulty <level> #Change the difficulty of your game (Peaceful, Easy, Normal, or Hard)
/weather <type> #Change the weather
/time set night #Set night
/give <player> <item> [quantity] #Give a player free items
/summon <entity> [x y z] #Create a mob at the select location
/execute as @e[limit=16] run summon minecraft:zombie ~ ~ ~ #Spawn lot of zombie (https://www.digminecraft.com/mobs/index.php)
/give @s netherite_axe[minecraft:custom_name='{"text":"MEGA SEKACKA"}',enchantments={levels:{sharpness:255,sweeping_edge:255,looting:255,fire_aspect:255,mending:255,unbreaking:255}}] 3
/give @p crossbow[custom_name='{"text":"MEGA KUSE"}',enchantments={levels:{'multishot':255,'quick_charge':255,'unbreaking':255,'mending':255}}] 3
/give @p netherite_sword[custom_name='{"text":"MEGA MECIK"}',enchantments={levels:{'sweeping_edge':255,'sharpness':255,'knockback':255,'fire_aspect':255,'looting':255,'unbreaking':255,'mending':255}}] 3
# mods forge
https://github.com/NikitaCartes/EasyAuth
https://www.curseforge.com/minecraft/mc-mods/easywhitelist
# restore backup
rclone copy jp:/srv5/Docker-incrementals/20250116.062501/minecraftServer /root/Docker/minecraftServer -v --tpslimit 7 -c --checkers=20 --transfers=5 --drive-chunk-size 256M --fast-list
/locate structure village #Find villages GPS
1.21 Java Edition - https://beebom.com/best-minecraft-1-21-seeds/
Seed Code: -7833842402223417925
Spawn Biome: Forest
Coordinates for the first trial chamber south from spawn: X: 7 Z: 345
Coordinates for the first village south from spawn: X: 64 Z: 656
Coordinates for the second trial chamber south from spawn: X: 7 Z: 855
Coordinates for the third trial chamber south from spawn: X: -9 Z: 1193