diff options
| author | salmonik <salmonik@tuta.io> | 2026-07-12 18:25:06 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-07-12 18:25:06 +0200 |
| commit | 0c2e661e55e175082481cc5a15d50fed2eb40c9a (patch) | |
| tree | aa905efecb74558c253cac21a5d30f723bddd5dc /docs/adr/0001-rcon-only-interaction.md | |
| download | minecraft-ui-0c2e661e55e175082481cc5a15d50fed2eb40c9a.tar.gz minecraft-ui-0c2e661e55e175082481cc5a15d50fed2eb40c9a.zip | |
architecture
Diffstat (limited to 'docs/adr/0001-rcon-only-interaction.md')
| -rw-r--r-- | docs/adr/0001-rcon-only-interaction.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/adr/0001-rcon-only-interaction.md b/docs/adr/0001-rcon-only-interaction.md new file mode 100644 index 0000000..ec7bb41 --- /dev/null +++ b/docs/adr/0001-rcon-only-interaction.md | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | # ADR 0001: RCON-only Minecraft server interaction (no console, no file editing) | ||
| 2 | |||
| 3 | ## Status | ||
| 4 | |||
| 5 | Accepted | ||
| 6 | |||
| 7 | ## Context | ||
| 8 | |||
| 9 | The webUI needs to interact with the running Minecraft server for several operations: querying player count (dashboard), managing the whitelist, managing OPs, and managing bans. Two primary approaches exist: | ||
| 10 | |||
| 11 | 1. **File editing** — Read and write `whitelist.json`, `ops.json`, `banned-players.json` directly on disk. Requires a server restart or `/reload` to apply changes. | ||
| 12 | 2. **RCON** — Send commands over the RCON protocol. Changes apply immediately, no restart needed. Also enables querying server state (`/list`). | ||
| 13 | 3. **Docker stdin/stdout** — Attach to the container's console. Enables log streaming and command input. Requires persistent WebSocket/SSE connection. | ||
| 14 | |||
| 15 | ## Decision | ||
| 16 | |||
| 17 | We will use **RCON exclusively** for all webUI-to-server interaction: | ||
| 18 | |||
| 19 | - Player count queries via RCON `/list` | ||
| 20 | - Whitelist, OP, and ban management via RCON commands (`/whitelist add`, `/op`, `/ban`, etc.) | ||
| 21 | - No log streaming, no Docker console attachment | ||
| 22 | - No direct editing of `whitelist.json`, `ops.json`, or other server files | ||
| 23 | - RCON password is auto-generated per Instance and stored internally | ||
| 24 | |||
| 25 | ## Consequences | ||
| 26 | |||
| 27 | ### Positive | ||
| 28 | - Changes apply immediately without server restart | ||
| 29 | - No WebSocket or SSE infrastructure required | ||
| 30 | - No log parsing or streaming complexity | ||
| 31 | - User-facing player management is username-based (users don't need to know UUIDs or JSON structure) | ||
| 32 | - Simpler codebase: request/response pattern over TCP, not persistent connections | ||
| 33 | |||
| 34 | ### Negative | ||
| 35 | - No server logs visible in the webUI — debugging crashes requires Docker CLI access (but this is a system administration concern, out of scope for the webUI) | ||
| 36 | - RCON must be enabled and reachable (`enable-rcon=true`, port exposed) for the webUI to function for live Instance operations | ||
| 37 | - If the Minecraft process crashes inside the container, RCON becomes unreachable and the webUI can only report "crashed — check Docker logs" rather than showing the error | ||
