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,36 @@
|
||||
# panel-native Barotrauma runtime image.
|
||||
FROM debian:12-slim
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
TZ=Etc/UTC \
|
||||
LANG=en_US.UTF-8 \
|
||||
LC_ALL=en_US.UTF-8
|
||||
|
||||
RUN dpkg --add-architecture i386 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
locales \
|
||||
tini \
|
||||
lib32gcc-s1 \
|
||||
lib32stdc++6 \
|
||||
libc6:i386 \
|
||||
libicu72 \
|
||||
libssl3 \
|
||||
zlib1g \
|
||||
&& 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 27016/udp
|
||||
|
||||
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
# panel-native Barotrauma entrypoint.
|
||||
set -euo pipefail
|
||||
log() { printf '[panel-barotrauma] %s\n' "$*"; }
|
||||
|
||||
if [[ "$(id -u)" = "0" ]]; then
|
||||
chown -R panel:panel /game /game-saves /home/panel 2>/dev/null || true
|
||||
exec setpriv --reuid=panel --regid=panel --clear-groups \
|
||||
--inh-caps=-all --bounding-set=-all \
|
||||
env HOME=/game-saves PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
||||
/entrypoint.sh "$@"
|
||||
fi
|
||||
|
||||
GAME_DIR=/game
|
||||
SAVE_DIR=/game-saves
|
||||
EXE="${GAME_DIR}/DedicatedServer"
|
||||
|
||||
if [[ ! -f "${EXE}" ]]; then
|
||||
log "ERROR: ${EXE} not found. Run 'Update' in the panel to install Barotrauma via SteamCMD."
|
||||
exit 78
|
||||
fi
|
||||
[[ -x "${EXE}" ]] || chmod +x "${EXE}"
|
||||
|
||||
# ---- panel port wiring ----------------------------------------------------
|
||||
# Barotrauma has no CLI port args; ports live as attributes on the root
|
||||
# <serversettings> element. Seed a minimal file on first boot, then patch
|
||||
# port=/queryport= from the panel-allocated env on EVERY boot so a panel
|
||||
# port change is durable (the server rewrites the full file on exit).
|
||||
GAME_PORT="${GAME_PORT:-27015}"
|
||||
QUERY_PORT="${QUERY_PORT:-27016}"
|
||||
SETTINGS="${SAVE_DIR}/serversettings.xml"
|
||||
if [[ ! -f "${SETTINGS}" ]]; then
|
||||
log "seeding serversettings.xml (name=${SERVER_NAME:-panel Barotrauma}, port=${GAME_PORT}, queryport=${QUERY_PORT})"
|
||||
cat > "${SETTINGS}" <<EOF
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<serversettings name="${SERVER_NAME:-panel Barotrauma}" port="${GAME_PORT}" queryport="${QUERY_PORT}" MaxPlayers="${MAX_PLAYERS:-16}" password="${SERVER_PASSWORD:-}" IsPublic="${IS_PUBLIC:-True}" EnableUPnP="false" />
|
||||
EOF
|
||||
else
|
||||
sed -i -E "s/\bport=\"[0-9]+\"/port=\"${GAME_PORT}\"/; s/\bqueryport=\"[0-9]+\"/queryport=\"${QUERY_PORT}\"/" "${SETTINGS}"
|
||||
log "patched serversettings.xml ports (port=${GAME_PORT}, queryport=${QUERY_PORT})"
|
||||
fi
|
||||
|
||||
# The server resolves config paths relative to the executable dir (/game),
|
||||
# NOT the CWD — confirmed on first boot ("Could not find file
|
||||
# '/game/serversettings.xml'"). Symlink the configs onto the save volume so
|
||||
# they survive reinstalls and are browseable under Saves & Configs.
|
||||
for f in serversettings.xml clientpermissions.xml; do
|
||||
ln -sfn "${SAVE_DIR}/${f}" "${GAME_DIR}/${f}"
|
||||
done
|
||||
|
||||
# Steamworks wants $HOME/.steam/sdk64/steamclient.so. The install ships a
|
||||
# 64-bit copy at linux64/steamclient.so (the top-level one is 32-bit and
|
||||
# fails with ELFCLASS32). Without this the server still boots (Lidgren),
|
||||
# but the A2S query port never answers.
|
||||
mkdir -p "${HOME}/.steam/sdk64"
|
||||
ln -sfn "${GAME_DIR}/linux64/steamclient.so" "${HOME}/.steam/sdk64/steamclient.so"
|
||||
|
||||
# Barotrauma reads/writes serversettings.xml, clientpermissions.xml, saves/
|
||||
# from CWD by default. Point CWD at save volume so nothing lives in /game.
|
||||
cd "${SAVE_DIR}"
|
||||
log "starting Barotrauma dedicated server"
|
||||
|
||||
export LD_LIBRARY_PATH="${GAME_DIR}:${LD_LIBRARY_PATH:-}"
|
||||
exec stdbuf -oL -eL "${EXE}"
|
||||
@@ -0,0 +1,93 @@
|
||||
# Barotrauma — panel-native dedicated server module.
|
||||
#
|
||||
# Native Linux binary from SteamCMD app 1026340. NO RCON of any kind:
|
||||
# verified 2026-07-14 — the server prints "Redirected input is detected but
|
||||
# is not supported by this application. Input will be ignored." on boot, so
|
||||
# even the stdio adapter can never deliver commands. Admin = in-game host
|
||||
# console / clientpermissions.xml only.
|
||||
#
|
||||
# Reference: https://github.com/CubeCoders/AMPTemplates (Barotrauma.kvp)
|
||||
|
||||
id: barotrauma
|
||||
name: "Barotrauma"
|
||||
version: 0.1.0
|
||||
authors:
|
||||
- panel contributors
|
||||
|
||||
supported_modes:
|
||||
- docker
|
||||
|
||||
runtime:
|
||||
docker:
|
||||
image: panel-barotrauma: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: "serversettings.xml + saves/ + clientpermissions.xml"
|
||||
- name: "Game Files"
|
||||
path: /game
|
||||
hint: "Server binaries, Mods/"
|
||||
env:
|
||||
SERVER_NAME: "panel Barotrauma"
|
||||
MAX_PLAYERS: "16"
|
||||
SERVER_PASSWORD: ""
|
||||
# Steam server-browser listing. ALSO gates the Steamworks A2S query
|
||||
# port: with False the required query port never binds (verified).
|
||||
# AMP defaults True too.
|
||||
IS_PUBLIC: "True"
|
||||
# Pre-declared so the agent's resolve.go filter lets panel-allocated
|
||||
# ports flow through to the container env. Barotrauma has no CLI port
|
||||
# args (AMP injects XML attributes too) — the entrypoint seeds/patches
|
||||
# port= / queryport= in serversettings.xml from these on every boot.
|
||||
GAME_PORT: "27015"
|
||||
QUERY_PORT: "27016"
|
||||
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 }
|
||||
- { name: query, proto: udp, default: 27016, required: true, env: QUERY_PORT }
|
||||
|
||||
resources:
|
||||
min_ram_mb: 1024
|
||||
recommended_ram_mb: 2048
|
||||
|
||||
# No rcon block: the dedicated server explicitly ignores redirected stdin
|
||||
# (see header comment), and there is no network RCON in the game.
|
||||
# Log-derived player events. Regexes converted from CubeCoders'
|
||||
# AMPTemplates (barotrauma.kvp) — .NET (?<n>) syntax -> Go (?P<n>).
|
||||
# Sourced-from-template; not yet exercised against a live client.
|
||||
events:
|
||||
join:
|
||||
pattern: '(?P<name>.+?) has joined the server\.$'
|
||||
kind: join
|
||||
leave:
|
||||
pattern: '(?P<name>.+?) has left the server\.$'
|
||||
kind: leave
|
||||
|
||||
|
||||
update_providers:
|
||||
- id: stable
|
||||
kind: steamcmd
|
||||
app_id: "1026340"
|
||||
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.
|
||||
ready_pattern: '/Server started|Listening to \w+ connections/i'
|
||||
appearance:
|
||||
emoji: "🚢"
|
||||
grad: "linear-gradient(135deg,#1e3a5f,#3b6e8c)"
|
||||
art: "/game-art/barotrauma.jpg"
|
||||
steam: "602960"
|
||||
Reference in New Issue
Block a user