Skip to content

Calagopus ​

Opening a game console in a browser and joining the same game as a player take different paths. The browser reaches the Calagopus Panel over HTTPS. The Panel passes console traffic to Wings, the host service that controls the Docker game containers. A player's game client connects directly to the allocated game port. This split lets the Panel run in K3s without giving the public web application the host's Docker socket.

The Panel has no Docker socket, hostPath, privileged container, host network, host port, or NodePort. Browser consoles and file transfers use the Panel-mediated Wings Proxy, so Wings TCP/8080 remains private.

From AMP to Calagopus ​

The migration separated public management, privileged Docker control, and player traffic into independently validated boundaries.

ConcernAMP deploymentCalagopus deployment
Public managementHost AMP service behind CaddyPanel in K3s behind Traefik
Privileged game controlAMP managed instances from the hostHost Wings service manages Docker containers
Game definitionAMP application and instance workflowEgg repository, node allocation, then server creation
Public game trafficPer-instance game portsPer-server allocations with matching firewall and router rules
Security separationManagement and game control shared the host servicePanel is isolated from Docker; Wings is isolated from unrelated Pods
MaintenanceOne AMP-specific lifecyclePanel and Wings have separate update and validation paths

Calagopus requires separate K3s policy, proxy trust, and host-firewall reconciliation. AMP kept those concerns inside one host service. The maintenance workflow connects the separate Panel and Wings lifecycles with recovery evidence and checks after a change.

Security boundaries ​

A Kubernetes NetworkPolicy restricts incoming Pod traffic to the Panel. Traefik Pods can reach it, and traffic from its own node still reaches it for health probes and Wings callbacks. This policy covers Panel ingress. Traffic from Pods to Wings crosses a different boundary at the host firewall.

Before hardening, an unrelated Pod could get an HTTP response from Wings even though Wings required authentication. The firewall now admits Ready Panel endpoints to the Wings API and rejects other Pods from the trusted cluster ranges. A reconciler follows Kubernetes EndpointSlices, the records identifying the Pods ready to serve the Panel. In a replacement test it added the new Panel address and removed the old one. Wings still authenticates the Panel's requests.

The Panel uses forwarded headers to identify the client behind Traefik. Trusting the single-node Pod address range survives proxy Pod replacement, but would let an unrelated Pod claim a false identity if it could reach the Panel directly. The NetworkPolicy closes that path. On the allowed path, a forged-header test showed that Traefik replaced untrusted X-Forwarded-For and X-Real-IP values with the actual source address. External requests also retained the real client address through Traefik.

Public HTTPS uses the same TCP 443-only Traefik path as the other web applications. Traefik access logs feed the existing CrowdSec acquisition and native nftables enforcement path. Wings, Docker, the Kubernetes API, SSH, and NoMachine remain outside the public application route.

Validation ​

BoundaryObserved result
Panel isolationTraefik and node-origin traffic remained healthy; an unrelated Pod could not connect to the Panel endpoint.
Wings isolationAn unrelated Pod could reach Wings before hardening and could not connect afterward; the Panel remained healthy.
Pod replacementReplacing the Panel Pod automatically updated the firewalld IP set and removed the old endpoint.
Proxy identityForged forwarding headers were sanitized, and the public Panel recorded the real external client address.
Public ingressHTTPS returned HTTP 200 with a valid certificate, TCP 80 remained absent, and existing public routes stayed healthy.
Browser pathExternal console and control worked through Wings Proxy; an upload larger than 95 MiB and a ZIP download succeeded.
AuthenticationPassword login and TOTP remained functional, and passkey enrollment succeeded on the final HTTPS origin.
CrowdSecThe Panel uses the unchanged Traefik log and native nftables boundary already validated by a controlled decision test.

Game hosting conventions ​

Game servers use the explicit shared hostname play.darrela.dev. DNS identifies the host; destination port and protocol identify the game. Each server receives only the allocations it requires.

Default game ports are preferred when clients and upstream documentation expect them. A custom port is reserved for a conflict, another instance, or a game-specific requirement. Adding a game means selecting its server definition (called an egg), assigning the ports it requires, and allowing the same ports and protocols through firewalld and the router. Creating an allocation in Calagopus does not open either network boundary.

Explicit DNS records replace wildcard DNS. Unknown or mistyped names fail in DNS, so they do not reach Traefik's default route or certificate.

Limits ​

The isolation and replacement tests exercised a running installation. They establish that the firewall followed a replacement Pod. Recovering the Panel's data and game workloads after loss of the host requires separate restore evidence. Panel and Wings also have separate update paths, so maintenance needs to check their compatibility.

Built with VitePress.