Managed dedicatedPalworld
A KBVE-baked Palworld dedicated-server image built to run as an Agones GameServer on the production Kubernetes cluster — a thin layer over the thijsvanloef/palworld-server-docker base with a REST-poll prestop shim for clean shutdowns.
REST-poll prestop shim
shim/agones-shim-prestop.sh polls the base image's REST API and issues a graceful shutdown request before the pod terminates, so a Kubernetes-initiated shutdown gets a clean autosave instead of a SIGTERM truncation.
- REST-native — no custom Ready/Health loop, defers to the base image's REST API.
- Local-friendly — prestop hook only fires from the Kubernetes lifecycle, so plain docker run works standalone.
What it gives you
Features
REST-poll prestop
Polls the base image's REST API and requests a graceful shutdown from the Kubernetes preStop hook before SIGTERM lands.
REST API surface
Ports 8211 (UDP game), 8212 (REST API), and 25575 (RCON) exposed for the sidecar relay to poll info/metrics/players and issue admin actions.
Agones GameServer
Runs as a two-container Agones GameServer pod — game container plus agones-palworld-relay sidecar bridging REST polling to the Agones SDK.
Persistent saves
Save directory mounted from a PVC so world state survives pod restarts and rotations.
How it fits together
Overview
KBVE-baked Palworld dedicated-server image, designed to run as an Agones GameServer on the production Kubernetes cluster (issue #14503).
The image is a thin layer on top of thijsvanloef/palworld-server-docker:latest:
- REST-poll prestop shim —
shim/agones-shim-prestop.shruns from the KubernetespreStoplifecycle hook, polls the base image’s REST API, and issues a graceful shutdown request so an Agones-initiated pod termination gets a clean autosave instead of a raw SIGTERM. - No custom Ready/Health loop — unlike the Factorio image, Palworld’s Agones readiness and health are driven entirely by the sidecar relay polling the REST API and forwarding state to the Agones SDK; the game container stays close to stock apart from the UE4SS chat layer below.
- Native-Linux UE4SS chat layer — the image bakes in a pinned RE-UE4SS-Linux runtime (
libUE4SS.so,LD_PRELOAD-injected into the ELFPalServer-Linux-Shipping, no Proton) plus aPalChatRelayLua mod that hooks the chat function and appends messages to a shared log the relay tails into IRC. The runtime is sha256-pinned; the mod is the only enabled UE4SS mod. - REST API surface — the base image ships a REST API on
8212(info/metrics/players/announce/shutdown), which both the prestop hook and theagones-palworld-relaysidecar use instead of log-tailing or RCON for day-to-day polling. - RCON kept, gated — RCON on
25575remains available for admin actions the REST API doesn’t cover, gated behind the relay.
Roadmap
Phasing
| Phase | Scope |
|---|---|
| 0 | Custom image + REST-poll prestop shim (this entry) |
| 1 | apps/kube/agones/palworld/ GameServer + UDP/TCP exposure |
| 2 | agones-palworld-relay sidecar (apps/agones/palworld/relay/, Rust) — REST poller + Agones health/ready + ClickHouse gameops telemetry + one-way IRC |
| 3 | PVC-backed saves + SealedSecret-driven credentials + RCON password |
| 4 | CI publish — Docker build/push for both containers (this task, #14503) |
Configuration
Container & runtime knobs
kbve/agones-palworld (local) / ghcr.io/kbve/agones-palworld (production), built via the standard nx container target:
./kbve.sh -nx agones-palworld:container| Env | Default | Notes |
|---|---|---|
PORT | 8211 | UDP game listen port |
PLAYERS | (base image default) | Max player count |
SERVER_NAME | (base image default) | Displayed server name |
ADMIN_PASSWORD | (required) | Base image admin password, also used by the REST API |
RCON_ENABLED | true | Enables RCON on 25575 |
REST_API_ENABLED | true | Enables the base image’s REST API on 8212 |
REST_API_PORT | 8212 | REST API listen port, polled by the prestop shim and the relay sidecar |
MULTITHREADING | true | Base image multithreading flag |
References — Issue #14503 (Palworld Agones integration) · thijsvanloef/palworld-server-docker (upstream base image) · Agones GameServer CRD.
Questions
Frequently asked
What is the Agones Palworld image?
A KBVE-baked Palworld dedicated-server OCI image built to run as an Agones GameServer on the production Kubernetes cluster, layered on the thijsvanloef/palworld-server-docker base with its built-in REST API.
How does the Agones lifecycle shim work?
The shim relies on the base image's own REST-API readiness (no custom Ready/Health loop) and adds a prestop hook that polls the Palworld REST API and issues a graceful shutdown before Agones tears the pod down, so a SIGTERM never truncates an in-progress save.
Can the image run locally without Agones?
Yes. The prestop hook only fires from the Kubernetes preStop lifecycle hook, so a plain docker run works without an Agones controller.
