Minecraft 26.2 Fabric server stack with CraftDeck management panel

- docker-compose: itzg/minecraft-server (Fabric, offline mode, whitelist
  enforced, Modrinth-managed mods), itzg/mc-backup sidecar, custom dashboard
- Gated auth for offline mode: approve username -> whitelisted with a short
  registration window -> EasyAuth /register + /login; auto-revoke on expiry
- CraftDeck panel (Next.js 16, zero native deps): live console (SSE), players
  & stats, lag diagnostics (server TPS vs player ping via spark), performance
  graphs, Modrinth mod search/manager, backups & restore, sandboxed file
  browser/editor, .env config editor with compose apply, cron schedules,
  Discord alerts, scrypt-hashed panel login
- scripts/setup.sh generates secrets; docs/ covers auth, mods, updating,
  backups, networking (Tailscale), troubleshooting

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Aryan SinghandClaude Fable 5 committed 2026-07-10 11:07:07 -05:00
commit 279d137ce5
98 files changed
+9925

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Manual backup restore (fallback for when the dashboard is unavailable).
# The dashboard's Backups page does this same procedure with one click.
#
# Usage: ./scripts/restore.sh data/backups/world-20260710-120000.tgz
set -euo pipefail
cd "$(dirname "$0")/.."
archive="${1:-}"
[[ -n "$archive" && -f "$archive" ]] || {
echo "Usage: $0 <backup .tgz file>"
echo "Available backups:"
ls -1h data/backups/*.tgz 2>/dev/null || echo " (none)"
exit 1
}
echo "This will STOP the server and overwrite the current world with:"
echo " $archive"
read -r -p "Type 'restore' to continue: " confirm
[[ "$confirm" == "restore" ]] || { echo "Aborted."; exit 1; }
docker compose stop mc
tar -xzf "$archive" -C data/mc
docker compose start mc
echo "✔ Restore complete — server starting."
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# One-time setup: creates .env with generated secrets, prepares data dirs.
# Usage: ./scripts/setup.sh
set -euo pipefail
cd "$(dirname "$0")/.."
if [[ -f .env ]]; then
echo ".env already exists — leaving it untouched."
echo "Delete it first if you really want to regenerate secrets."
exit 1
fi
command -v openssl >/dev/null || { echo "openssl is required"; exit 1; }
rcon_pw="$(openssl rand -hex 24)"
session_secret="$(openssl rand -hex 32)"
admin_pw="$(openssl rand -base64 12 | tr -d '/+=' | cut -c1-16)"
sed -e "s|^RCON_PASSWORD=.*|RCON_PASSWORD=${rcon_pw}|" \
-e "s|^PANEL_SESSION_SECRET=.*|PANEL_SESSION_SECRET=${session_secret}|" \
-e "s|^PANEL_ADMIN_PASSWORD=.*|PANEL_ADMIN_PASSWORD=${admin_pw}|" \
.env.example > .env
mkdir -p data/mc data/backups data/dashboard
echo
echo " ✔ .env created with generated secrets"
echo " ✔ data directories prepared"
echo
echo " Dashboard login (you must change this password on first login):"
echo " username: admin"
echo " password: ${admin_pw}"
echo
echo " Next: docker compose up -d"
echo " Panel: http://<server-ip>:8080 Minecraft: <server-ip>:25565"