46 Commits

Author SHA1 Message Date
a88437f95f Add world management for Space Engineers (list/switch/create/clone/rename/delete)
All checks were successful
Deploy GSM / deploy (push) Successful in 25s
Mirrors Factorio's world feature for the SE server. The SE docker image always
loads the flat config/World dir and its entrypoint rewrites <LoadWorld> on every
start, so repointing the cfg is useless. Instead inactive worlds live in a
sibling config/Worlds library (not mounted) and switching is an instant mv-swap;
the active world name is tracked in .gsm-worldname and files are chowned to
1000:1000. New worlds are created from the image's built-in CustomWorlds
templates or by cloning the active world. Switch/clone require a stopped server.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 23:12:45 +02:00
024d97e544 Speed up server list & detail loads
All checks were successful
Deploy GSM / deploy (push) Successful in 28s
Three compounding causes made the dashboard and detail pages slow:

- Detail page fetched the WHOLE fleet (every SSH/Prometheus/RCON call for
  all servers) just to show one. Switch ServerDetail to GET /servers/:id
  (add api.getServer) so it costs one server's worth of work, not N.
- No server-side caching: every 10s poll, from every open tab, recomputed
  everything. Add a shared 5s-TTL per-server cache + in-flight dedup behind
  both GET / and GET /:id; invalidate on start/stop/restart so power
  actions still reflect immediately.
- Prometheus fetch had no timeout, so a slow/restarting Prometheus hung the
  whole aggregation indefinitely (the .catch can't catch a hang). Add
  AbortSignal.timeout to queryPrometheus/queryPrometheusRange.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 13:46:34 +02:00
2f6fc841b2 Keep sessions alive: proactive token refresh + longer access TTL
All checks were successful
Deploy GSM / deploy (push) Successful in 27s
The 15m access token only refreshed on a 401, but the dashboard uses optionalAuth and returns 200 even with an expired token, so the live page never noticed expiry until a manual reload.

Backend: ACCESS_TOKEN_TTL 15m -> 1h. Frontend: export refreshAccessToken; App.jsx schedules a refresh ~1min before the token expires (and on tab focus/return), and logs out cleanly (redirect to /login) if the refresh token is gone — no reload needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 19:28:50 +02:00
c842513116 Report unreachable hosts consistently so dashboard stops flapping
All checks were successful
Deploy GSM / deploy (push) Successful in 35s
getServerStatus returned 'offline' for both a stopped server AND an unreachable host. The dashboard hides 'unreachable' but shows 'offline', so an off VM oscillated in/out of the list as the failed-host breaker expired and re-tripped. Now distinguish: connection failure/hang -> 'unreachable' (host down), reachable-but-process-stopped -> 'offline'. Both autoshutdown and the Discord bot already treat non-online as not running.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 20:17:03 +02:00
12b43a5f99 Fix flapping online/offline status for powered-off hosts
All checks were successful
Deploy GSM / deploy (push) Successful in 25s
Cached SSH connections had no keepalive, so when a VM/host is powered off the socket stays 'connected' (~2h OS TCP timeout) and execCommand hangs with no timeout, stalling status aggregation and leaving the dashboard on a stale 'online'.

Add keepaliveInterval/keepaliveCountMax to ssh.connect (dead peers detected in ~15s). Wrap getServerStatus/getProcessUptime in an 8s timeout that drops the dead cached connection and trips the failed-host breaker, so the fast 'unreachable' path kicks in. Affects all servers (V Rising, Palworld, etc.).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 20:07:23 +02:00
5ab3154351 Switch Minecraft server to FTB StoneBlock 4 (name + modpack metadata)
All checks were successful
Deploy GSM / deploy (push) Successful in 43s
config.json, discordBot.js, serverUpdates.js and ServerCard.jsx updated from Biohazard to FTB StoneBlock 4. Docs (infrastructure/gsm/CLAUDE) updated and docs/minecraft-modpack-install.md added. No Discord update notification is triggered (minecraft supportsUpdate=false).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 19:44:09 +02:00
33011056c2 Recover SE updates from stuck state 0x6 by removing appmanifest and retrying
All checks were successful
Deploy GSM / deploy (push) Successful in 22s
A validate pass alone does not unstick SteamCMD when it lands in state 0x6
with BytesToDownload=0 and a TargetBuildID newer than buildid: Steam never
schedules a depot fetch. Verified manually that deleting appmanifest_298740.acf
forces a clean reconciliation and a full re-validate that actually downloads
the missing depot. The handler now retries with the manifest removed when the
first pass leaves a pending target.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 20:18:04 +02:00
71e77f7842 Use validate flag and verify SE update via build id, not stdout text
All checks were successful
Deploy GSM / deploy (push) Successful in 23s
Steam was reaching state 0x6 with BytesToDownload=0, a known stuck-mid-update
pattern that resolves when SteamCMD is told to validate. Also stop relying on
the "Success!" stdout marker, which is missing in many real successes — compare
the buildid in appmanifest before and after instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 20:12:13 +02:00
902aa04726 Add Space Engineers update handler that works around broken upstream entrypoint
All checks were successful
Deploy GSM / deploy (push) Successful in 21s
The mmmaxwwwell SE image calls steamcmd with +login before +force_install_dir,
which Steam rejects ("Please use force_install_dir before logon!"), so container
restarts never actually update the game. The new handler runs SteamCMD in a
sibling one-shot container with the correct argument order, mounting the same
volumes as the live container, then leaves the server stopped for the operator
to start. The version cache is invalidated after a successful update so the UI
shows the new build immediately.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 20:07:13 +02:00
bb48f75b5d Show Space Engineers build ID and last update time in detail view
All checks were successful
Deploy GSM / deploy (push) Successful in 23s
Reads the SteamCMD appmanifest_298740.acf via SSH and exposes
buildid + LastUpdated through a new /api/servers/:id/version endpoint.
The overview tab now renders a "Server Version" card and surfaces a
pending update hint when TargetBuildID differs from the installed build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 20:02:48 +02:00
7bc93f3b70 Refresh-Token-System: kurzlebiger Access-Token (15m) + rotierender Refresh-Token (90d)
All checks were successful
Deploy GSM / deploy (push) Successful in 29s
Bisher: 7d JWT im localStorage. Jeder 403 loggte den User aus — auch "Insufficient
permissions"-Responses fuer Background-Requests — wodurch User sich effektiv taeglich
neu einloggen mussten.

Backend:
- Neue refresh_tokens Tabelle (SHA256-gehasht, mit Rotation + Revoke)
- /auth/refresh tauscht Refresh-Token gegen frischen Access-Token (rotiert beide)
- /auth/logout revoked den Refresh-Token
- Access-Token-TTL auf 15m; Guest-Refresh 7d, Discord-Refresh 90d
- Daily cleanup-Job fuer abgelaufene/revoked Tokens

Frontend:
- api.js refreshed bei 401 automatisch (single-flight) und retryt die Anfrage
- 403 wird nicht mehr als Session-Ablauf behandelt
- Discord-Callback + Guest-Login liefern beide Tokens
- App.jsx synced React-State per gsm_token_refreshed CustomEvent

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 11:21:38 +02:00
975fb77845 Register spaceengineers in SERVER_JOBS for Prometheus metrics
All checks were successful
Deploy GSM / deploy (push) Successful in 31s
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 21:30:16 +02:00
a0a608766a Fix Space Engineers player log parsing
All checks were successful
Deploy GSM / deploy (push) Successful in 42s
Use real SE dedicated log patterns:
- Join:  'OnConnectedClient <Name> attempt'
- Leave: 'User left <Name>' (successful) / 'User left [<steamid>]' (failed attempt)

Unresolved leaves pop the oldest pending entry so failed connection attempts
don't stick in the player list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 21:29:01 +02:00
8cc7397f44 Shorten Space Engineers address to space.zeasy.dev
All checks were successful
Deploy GSM / deploy (push) Successful in 31s
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 21:14:51 +02:00
49002a515f Change Space Engineers port to 27020
All checks were successful
Deploy GSM / deploy (push) Successful in 32s
Router conflict on 27016 — move SE to 27020 everywhere.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 21:12:03 +02:00
807446920f Add Space Engineers server support
All checks were successful
Deploy GSM / deploy (push) Successful in 34s
Integrates Space Engineers dedicated server (docker+wine on 192.168.2.78) into GSM:
- config.json entry with docker runtime and log-based player detection
- getSpaceEngineersPlayers() parses docker logs for connect/disconnect events
- Extends type-check sites in rcon, autoshutdown, discordBot, servers routes
- Frontend ServerCard/ServerDetail logo + address wiring

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 20:57:14 +02:00
99ca25c9e3 Replace ATM10 with Biohazard: Project Genesis modpack
All checks were successful
Deploy GSM / deploy (push) Successful in 31s
Switched Minecraft server from All the Mods 10 to Biohazard: Project Genesis
(Beta 0.4.5, MC 1.20.1 + Forge 47.4.0). Updated server name, Discord bot
display, frontend modpack link, and documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 23:27:58 +02:00
Alexander Zielonka
fe188cdab1 Auto-detect SteamCMD path on servers
All checks were successful
Deploy GSM / deploy (push) Successful in 23s
- Add findSteamCmd() helper that searches common locations
- Provide path hints per server type as fallback
- Remove hardcoded paths, more robust for different setups
- Check /usr/games/steamcmd, ~/steamcmd/, ~/Steam/ etc.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 11:53:50 +01:00
Alexander Zielonka
6771722cdd Add SteamCMD-based updates for V Rising, Palworld, Zomboid, Terraria
All checks were successful
Deploy GSM / deploy (push) Successful in 24s
- Create generic SteamCMD handler factory for reusable update logic
- Check build IDs via appmanifest files and Steam API
- Support V Rising (1829350), Palworld (2394010), Zomboid (380870), tModLoader (1281930)
- Show update button for all supported server types in UI
- Minecraft, OpenTTD, Hytale marked as manual-update-only

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 11:50:19 +01:00
Alexander Zielonka
68de66b0fd Fix Docker status: treat 'created' as offline, not starting
All checks were successful
Deploy GSM / deploy (push) Successful in 23s
Container status 'created' means it was never started yet (e.g. after
docker create during update), so it should show as offline.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 11:47:25 +01:00
Alexander Zielonka
d840faeda9 Add modular server update feature with Discord notifications
All checks were successful
Deploy GSM / deploy (push) Successful in 25s
- Add serverUpdates.js service with handler registry for extensibility
- Implement Factorio Docker image update (pull + container recreate)
- Add GET/POST /servers/:id/update routes for check/perform
- Add ServerUpdateButton component with auto-check and confirm dialog
- Integrate update card in ServerDetail overview tab
- Auto-send Discord notification on successful update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 11:42:22 +01:00
Alexander Zielonka
ed60bc33c7 Use server logos as thumbnails in Discord update embeds
All checks were successful
Deploy GSM / deploy (push) Successful in 23s
Replaced emoji icons with actual server logos from gsm.zeasy.dev
as embed thumbnails for a more professional look.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 12:30:39 +01:00
0b5e573d45 Fix Terraria log parsing for player leave detection
All checks were successful
Deploy GSM / deploy (push) Successful in 24s
Changed detection pattern from "hat das Spiel verlassen" to "ist weg"
to match actual Terraria server log format.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 09:59:36 +01:00
df390e63e4 Add Terraria player detection via log parsing
All checks were successful
Deploy GSM / deploy (push) Successful in 27s
- Add getTerrariaPlayers function in ssh.js for PM2 log parsing
- Support German and English join/leave messages
- Update rcon.js to use Terraria log parsing
- Add Terraria to player fetch conditions in servers.js
- Update autoshutdown.js and discordBot.js for Terraria support
- Update config path to tModLoader directory
- Add global error handlers in server.js
- Update CLAUDE.md with deployment rules and Terraria info

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 21:38:32 +01:00
6b4fb7aa47 Add localhost-only internal Discord update route
All checks were successful
Deploy GSM / deploy (push) Successful in 28s
2026-01-15 14:34:06 +01:00
751991143a Add Hytale to Discord bot alerts and status
All checks were successful
Deploy GSM / deploy (push) Successful in 28s
- Add hytale to serverDisplay config with icon 🏰 and color
- Fix fetchServerStatuses to get players for Hytale (no RCON)
- Enables player join/leave alerts for Hytale

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:32:11 +01:00
14b031bb93 Fix API routes to fetch Hytale players without RCON
All checks were successful
Deploy GSM / deploy (push) Successful in 25s
Add server.type === 'hytale' check to player count API routes,
matching the fix in autoshutdown.js.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:28:17 +01:00
4b74010ccb Remove debug logging from Hytale player detection
All checks were successful
Deploy GSM / deploy (push) Successful in 28s
2026-01-15 14:25:45 +01:00
df4200d425 Fix autoshutdown to check Hytale players without RCON
All checks were successful
Deploy GSM / deploy (push) Successful in 25s
Hytale uses log parsing instead of RCON, so add explicit check for
server.type === 'hytale' to enable player count checking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:24:05 +01:00
a518bb2b7f Add debug logging to Hytale player detection
All checks were successful
Deploy GSM / deploy (push) Successful in 30s
2026-01-15 14:22:29 +01:00
30a7f3edf0 Fix Hytale player detection with correct log patterns
All checks were successful
Deploy GSM / deploy (push) Successful in 26s
- Join: [World|*] Player 'Name' joined world ... (UUID)
- Leave: [PlayerSystems] Removing player 'Name (Name)' from world ... (UUID)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:19:04 +01:00
9a732c819c Add Hytale player detection via log parsing
All checks were successful
Deploy GSM / deploy (push) Successful in 26s
- Add getHytalePlayers function to ssh.js that parses server logs
- Track player joins via [Universe|P] Adding player pattern
- Track disconnects via Removing player pattern
- Integrate with rcon.js getPlayers and getPlayerList functions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:14:38 +01:00
7aad85c5d4 Fix Hytale prometheus metrics and config editor syntax highlighting
All checks were successful
Deploy GSM / deploy (push) Successful in 27s
- Add missing "hytale" entry to SERVER_JOBS in prometheus.js
- Fix config editor regex bug that was corrupting CSS class names (e.g. text-cyan-400 becoming text-cyan-<span>400</span>)
- Use placeholder tokens to prevent numbers regex from matching inside already-replaced spans

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:55:28 +01:00
8a3690d61f Add Hytale config editor and Prometheus integration
All checks were successful
Deploy GSM / deploy (push) Successful in 25s
- Add Node Exporter target for Hytale server (10.0.30.204:9100)
- Add Hytale config read/write functions to ssh.js
- Add GET/PUT /hytale/config API routes
- Create HytaleConfigEditor.jsx with JSON syntax highlighting
- Add Hytale config tab to ServerDetail.jsx
- Add stopCmd and port to Hytale server config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:50:45 +01:00
b2dde62476 Add Hytale server support with tmux runtime
All checks were successful
Deploy GSM / deploy (push) Successful in 29s
- Add tmux runtime support to ssh.js (status, start, stop, logs, uptime)
- Add Hytale server configuration to config.json
- Add Hytale server info and logo to frontend (ServerCard, ServerDetail)
- Add Hytale emoji to Discord notification mapping
- Update documentation with Hytale server details

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:39:58 +01:00
8447484270 Add Discord update API route
All checks were successful
Deploy GSM / deploy (push) Successful in 26s
Adds POST /api/servers/discord/send-update endpoint that allows
superadmins to send announcements to all Discord guild update channels.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 03:13:49 +01:00
51b95240f2 Logging für REST Abfragen aus dem Palworld Server etnfernt
All checks were successful
Deploy GSM / deploy (push) Successful in 24s
2026-01-12 03:07:23 +01:00
4bfb870fbb Add Palworld player count and list support via RCON
All checks were successful
Deploy GSM / deploy (push) Successful in 41s
- Add ShowPlayers RCON command handling for Palworld servers
- Update SSH access documentation with jump host instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 20:58:11 +01:00
b07ec607eb Remove SQLite databases from git tracking
All checks were successful
Deploy GSM / deploy (push) Successful in 24s
Database files should not be in version control as they contain
production data that gets overwritten on each deployment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:55:25 +01:00
3dc7e9e7e7 Restrict server detail access for guests
All checks were successful
Deploy GSM / deploy (push) Successful in 26s
- Add isGuest flag to UserContext
- Block guests from navigating to /server/:id route
- Make ServerCards non-clickable for guests
- Add rejectGuest middleware to backend
- Protect server detail endpoints (/:id, /metrics/history, /whitelist)

Guests can now only view the dashboard overview without accessing
individual server details.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 20:57:34 +01:00
Alexander Zielonka
2d9a5910fa Cleanup repo, add Gitea CI/CD workflow, improve error handling
All checks were successful
Deploy GSM / deploy (push) Successful in 1m25s
- Remove temp files and reorganize docs
- Add .gitea/workflows/deploy.yml for automated deployment
- Add unreachable host checks to server routes (/:id, logs, start/stop/restart)
- Add unreachable checks to config routes (zomboid, terraria, openttd)
- Return HTTP 503 with unreachable flag instead of crashing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 12:15:32 +01:00
f2f9e02fb2 zustand auf server wiederhergestellt 2026-01-09 08:43:18 +01:00
Alexander Zielonka
4fcc111def Add multi-guild Discord bot support with auto-setup
- Bot creates category and channels automatically when joining a server
- Channel structure: info, status, alerts, updates, diskussion, requests (forum)
- Add guild_settings database table for per-server configuration
- Add Discord bot invite button to Dashboard
- Add display settings API functions
- Add comprehensive Discord bot documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 18:29:13 +01:00
Alexander Zielonka
ff3fa0752e palworld added 2026-01-07 12:35:23 +01:00
2bb4dd723c ja 2026-01-07 02:41:37 +01:00
4194f68968 xd 2026-01-06 21:22:10 +01:00