panel v0.9.2 — public release
Self-hostable game server control panel: Go controller + agent, 26 game modules, embedded web UI. One-line install via install.sh / install.ps1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# panel-native Core Keeper runtime image.
|
||||
FROM debian:12-slim
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
TZ=Etc/UTC \
|
||||
LANG=en_US.UTF-8 \
|
||||
LC_ALL=en_US.UTF-8 \
|
||||
DISPLAY=:99
|
||||
|
||||
# Core Keeper is Unity headless-on-Linux; Unity still needs an X display
|
||||
# even with -nographics (some subsystem probes fail otherwise), so Xvfb.
|
||||
RUN dpkg --add-architecture i386 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
locales \
|
||||
tini \
|
||||
xvfb \
|
||||
xauth \
|
||||
lib32gcc-s1 \
|
||||
lib32stdc++6 \
|
||||
libc6:i386 \
|
||||
libxi6 \
|
||||
libxrandr2 \
|
||||
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
|
||||
&& locale-gen \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd -g 1000 panel \
|
||||
&& useradd -u 1000 -g 1000 -m -s /bin/bash panel \
|
||||
&& mkdir -p /game /game-saves \
|
||||
&& chown -R panel:panel /game /game-saves
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 27015/udp
|
||||
|
||||
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
# panel-native Core Keeper entrypoint.
|
||||
set -euo pipefail
|
||||
log() { printf '[panel-core-keeper] %s\n' "$*"; }
|
||||
|
||||
if [[ "$(id -u)" = "0" ]]; then
|
||||
chown -R panel:panel /game /game-saves /home/panel 2>/dev/null || true
|
||||
rm -f /tmp/.X99-lock /tmp/.X11-unix/X99 2>/dev/null || true
|
||||
mkdir -p /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix && chown root:root /tmp/.X11-unix 2>/dev/null || true
|
||||
exec setpriv --reuid=panel --regid=panel --clear-groups \
|
||||
--inh-caps=-all --bounding-set=-all \
|
||||
env HOME=/game-saves DISPLAY=:99 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
||||
GAME_ID="${GAME_ID:-}" \
|
||||
WORLD_NAME="${WORLD_NAME:-panel}" \
|
||||
WORLD_MODE="${WORLD_MODE:-0}" \
|
||||
MAX_PLAYERS="${MAX_PLAYERS:-10}" \
|
||||
GAME_PORT="${GAME_PORT:-27015}" \
|
||||
/entrypoint.sh "$@"
|
||||
fi
|
||||
|
||||
GAME_DIR=/game
|
||||
SAVE_DIR=/game-saves
|
||||
EXE="${GAME_DIR}/CoreKeeperServer"
|
||||
|
||||
if [[ ! -x "${EXE}" ]]; then
|
||||
log "ERROR: ${EXE} not found. Run 'Update' in the panel to install Core Keeper via SteamCMD."
|
||||
exit 78
|
||||
fi
|
||||
|
||||
log "starting Xvfb on :99"
|
||||
Xvfb :99 -screen 0 1024x768x24 -nolisten tcp &
|
||||
XVFB_PID=$!
|
||||
sleep 1
|
||||
|
||||
# Core Keeper writes saves under $HOME/.config/unity3d/Pugstorm/Core Keeper.
|
||||
# HOME is /game-saves so these persist.
|
||||
mkdir -p "${SAVE_DIR}/.config/unity3d/Pugstorm/Core Keeper"
|
||||
|
||||
trap 'log "SIGTERM"; kill "${XVFB_PID}" 2>/dev/null || true; exit 0' TERM INT
|
||||
|
||||
cd "${GAME_DIR}"
|
||||
log "starting Core Keeper dedicated server"
|
||||
log " world: ${WORLD_NAME} (mode ${WORLD_MODE}, max ${MAX_PLAYERS}), port ${GAME_PORT}"
|
||||
|
||||
# Steamworks needs the bundled linux64/steamclient.so and the GAME app id
|
||||
# (1621690, not the dedicated-server app 1963720) — per AMP's
|
||||
# core-keeper.kvp EnvironmentVariables.
|
||||
export LD_LIBRARY_PATH="${GAME_DIR}/linux64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
export SteamAppId=1621690
|
||||
|
||||
# -port makes the server open a direct UDP socket on the panel-allocated
|
||||
# port (instead of Steam-relay-only). -datapath keeps worlds in the
|
||||
# persistent save volume.
|
||||
ARGS=(-batchmode -logfile -
|
||||
-port "${GAME_PORT}"
|
||||
-datapath "${SAVE_DIR}/DedicatedServer"
|
||||
-worldname "${WORLD_NAME}" -worldmode "${WORLD_MODE}"
|
||||
-maxplayers "${MAX_PLAYERS}")
|
||||
if [[ -n "${GAME_ID}" ]]; then
|
||||
ARGS+=(-gameid "${GAME_ID}")
|
||||
fi
|
||||
mkdir -p "${SAVE_DIR}/DedicatedServer"
|
||||
|
||||
exec stdbuf -oL -eL "${EXE}" "${ARGS[@]}"
|
||||
@@ -0,0 +1,84 @@
|
||||
# Core Keeper — panel-native dedicated server module.
|
||||
#
|
||||
# Native Linux (Unity headless) from SteamCMD app 1963720. Unity server
|
||||
# still touches X so we need Xvfb (same pattern as Empyrion). No RCON —
|
||||
# admin is via in-game console when you hold the founders key.
|
||||
#
|
||||
# Reference: https://github.com/CubeCoders/AMPTemplates (CoreKeeperLinux.kvp)
|
||||
|
||||
id: core-keeper
|
||||
name: "Core Keeper"
|
||||
version: 0.1.0
|
||||
authors:
|
||||
- panel contributors
|
||||
|
||||
supported_modes:
|
||||
- docker
|
||||
|
||||
runtime:
|
||||
docker:
|
||||
image: panel-core-keeper:latest
|
||||
# Host networking -- container shares the host net namespace, so
|
||||
# any port the game/mod binds is directly on the LAN. AMP-like
|
||||
# model. Multi-instance safety comes from env-driven per-instance
|
||||
# ports (panel allocator + env: mapping on each ports entry).
|
||||
network_mode: host
|
||||
browseable_root: /game-saves
|
||||
browseable_roots:
|
||||
- name: "Saves & Configs"
|
||||
path: /game-saves
|
||||
hint: "Worlds + server.json"
|
||||
- name: "Game Files"
|
||||
path: /game
|
||||
hint: "Server binaries"
|
||||
env:
|
||||
GAME_ID: "" # leave empty to generate a new world; set to rejoin
|
||||
WORLD_NAME: "panel"
|
||||
WORLD_MODE: "0" # 0 = normal, 1 = hardmode, 2 = creative
|
||||
MAX_PLAYERS: "10"
|
||||
# Pre-declared so the agent's env filter lets the panel-allocated
|
||||
# port flow through to the container (same trap as soulmask).
|
||||
# The entrypoint passes it as -port; default matches the port default.
|
||||
GAME_PORT: "27015"
|
||||
volumes:
|
||||
- { type: volume, name: "panel-$INSTANCE_ID-saves", container: "/game-saves" }
|
||||
- { type: volume, name: "panel-$INSTANCE_ID-game", container: "/game" }
|
||||
- { target: "$DATA_PATH/logs", container: "/game-saves/logs" }
|
||||
|
||||
ports:
|
||||
- { name: game, proto: udp, default: 27015, required: true, env: GAME_PORT }
|
||||
|
||||
resources:
|
||||
min_ram_mb: 2048
|
||||
recommended_ram_mb: 4096
|
||||
# Log-derived player events. Regexes converted from CubeCoders'
|
||||
# AMPTemplates (core-keeper.kvp) — .NET (?<n>) syntax -> Go (?P<n>).
|
||||
# Sourced-from-template; not yet exercised against a live client.
|
||||
events:
|
||||
join:
|
||||
pattern: '\[userid:(?P<id>[^\]]+)\] player (?P<name>.+?) connected'
|
||||
kind: join
|
||||
leave:
|
||||
pattern: 'Disconnected from userid:(?P<id>\S+?) with reason'
|
||||
kind: leave
|
||||
|
||||
|
||||
update_providers:
|
||||
- id: stable
|
||||
kind: steamcmd
|
||||
app_id: "1963720"
|
||||
install_path: /game
|
||||
|
||||
# --- Manifest-driven UI metadata (WI-07) --------------------------
|
||||
# Consumed by the CONTROLLER/dashboard only (the controller loads its
|
||||
# own ./modules copy at startup); the agent ignores these at runtime.
|
||||
# ready_pattern is a JavaScript regex (slash-delimited when it needs
|
||||
# flags) moved verbatim from the dashboard's READY_PATTERNS map.
|
||||
# Verified on a live first boot 2026-07-14: the last line before the server
|
||||
# accepts joins is "Started session with info: <ip>;<port>;<key1>;<key2>".
|
||||
ready_pattern: '/Started session with info/i'
|
||||
appearance:
|
||||
emoji: "⛏️"
|
||||
grad: "linear-gradient(135deg,#2e1a47,#6b3fa0)"
|
||||
art: "/game-art/core-keeper.jpg"
|
||||
steam: "1621690"
|
||||
Reference in New Issue
Block a user