mcserver/docs/operations-manual.md

3.3 KiB

Server Operations & Administration Manual

1. Instance Target Context

Set the active container target in your shell session:

export INSTANCE_NAME="mc_forge_server"

2. Data Preservation Reference Matrix

When performing world resets or maintenance, classify directories according to this matrix:

Category Directory / File Path Purpose Action on Reset
Immutable data/config/ Mod configuration files (except player auth store) Preserve
Immutable data/mods/ Server mod JAR files Preserve
Immutable data/automodpack/ AutoModpack configuration & client host payload Preserve
Immutable data/server.properties Generated server settings Preserve
Immutable data/eula.txt EULA agreement file Preserve
Volatile data/world/ Dynamic terrain & player data Delete to reset seed
Volatile data/config/lts_auth/players.json LTS Auth player account credentials Delete on full reset
Volatile data/logs/ Server console log files Safe to purge
Volatile data/crash-reports/ Crash stack traces Safe to purge
Volatile data/simplebackups/ World backup archives Store or purge
Volatile data/.cache/ Mod resource cache Safe to purge
Volatile data/modernfix/ Structure cache files Safe to purge

3. Lifecycle & Reset Workflows

Clean World Reset (Preserving Configs & Mods)

docker stop $INSTANCE_NAME
mv data/world data/world_backup_$(date +%Y%m%d_%H%M%S)
docker start $INSTANCE_NAME

Targeted Dimensional Wipes

docker stop $INSTANCE_NAME
rm -rf data/world/DIM-1    # Nether
rm -rf data/world/DIM1     # End
docker start $INSTANCE_NAME

Full Nuclear Server Reset

docker compose down
rm -rf data/world data/logs/* data/crash-reports/* data/.cache data/modernfix/structureCacheV1 data/usercache.json data/banned-players.json data/banned-ips.json data/ops.json data/config/lts_auth/players.json
docker compose up -d

Host File Ownership Recovery

sudo chown -R $USER:$USER ./data
chmod -R u+rwX ./data

4. Diagnostics & Telemetry

Log Filter Pipeline (Errors & Warnings)

docker logs $INSTANCE_NAME 2>&1 | grep -iE "ERROR|WARN|Exception|Fatal|Failed|Caused by" | tail -n 60

Health & Container Status Check

docker ps -f "name=$INSTANCE_NAME" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"

5. Universal RCON Command Reference

Note

: For instance-specific mod commands (e.g., Distant Horizons pre-generation or FLAN claim reloads), refer to the specific instance's README.md.

Performance Profiling (spark)

docker exec -i $INSTANCE_NAME rcon-cli "spark profiler --timeout 30"
docker exec -i $INSTANCE_NAME rcon-cli "spark healthreport"

Moderation & Player Control

docker exec -i $INSTANCE_NAME rcon-cli "whitelist add <player>"
docker exec -i $INSTANCE_NAME rcon-cli "whitelist remove <player>"
docker exec -i $INSTANCE_NAME rcon-cli "tp <player1> <player2>"
docker exec -i $INSTANCE_NAME rcon-cli "gamerule keepInventory true"
docker exec -i $INSTANCE_NAME rcon-cli "op <player>"
docker exec -i $INSTANCE_NAME rcon-cli "deop <player>"