# Conan Exiles — panel-native module

Panel-native Conan Exiles dedicated server. **Enhanced (UE5)** runs as a native Linux binary; **Legacy (UE4, `conan-exiles-legacy` beta)** still runs under Wine + Xvfb. Both editions share one debian:12-slim image — the entrypoint picks launch mode from the `EDITION` config_value.

- **Image:** `panel-conan-exiles:latest` — built from `./Dockerfile`.
- **Game files:** downloaded by the panel's SteamCMD updater sidecar (app 443030) into the `panel-<id>-game` named volume. Edition matrix: **Enhanced = native Linux depot** (443032, ~4.27 GiB; `platform: linux` in `module.yaml`). **Legacy = Windows-only depot** under Wine (`platform: windows`, `beta: conan-exiles-legacy`).
- **Saves:** `panel-<id>-saves` at `/game-saves`; entrypoint moves `ConanSandbox/Saved/` from the game install into the save volume on first boot and symlinks back, so SteamCMD validate can't clobber world data.
- **Config:** Enhanced uses `ConanSandbox/Saved/Config/LinuxServer/`; Legacy uses `ConanSandbox/Saved/Config/WindowsServer/`. On the first native boot after Wine, the entrypoint auto-copies `ServerSettings.ini` / `Engine.ini` / `Game.ini` from `WindowsServer/` to `LinuxServer/` so operator-tuned values survive the cut-over. Edit via Files tab.
- **Mods:** drop Workshop pak files + `modlist.txt` into `ConanSandbox/Mods/` via the Files tab.
- **RCON:** real Source-RCON on `25575/tcp` (internal). Password `panel_rcon` (default) — editable in `module.yaml` `env.RCON_PASSWORD`. Tracker dials on start; our agent redials on EOF/broken-pipe automatically.

## Ports

| Port | Proto | Purpose |
|------|-------|---------|
| 7777 | TCP+UDP | Game traffic + client mod downloads |
| 7778 | UDP | Pinger (server-browser probe; `game + 1`) |
| 27015 | UDP | Steam query |
| 25575 | TCP | RCON (internal) |

## RCON commands wired

- `list` → `listplayers`
- `broadcast {msg}` → `broadcast {msg}`
- `kick {player}` → `kickplayer {player}`
- `ban {player}` → `banplayer {player}`
- `save` → `saveworld`
- `shutdown` → `shutdown`

## Log events captured

- **Join:** `LogNet: Join succeeded: <name>#<discriminator>`
- **Leave:** `LogNet: Player disconnected: <name>#<discriminator>`
- **Chat:** `ChatWindow: Character <name> said: <message>`

## Environment vars

| Var | Default | Notes |
|-----|---------|-------|
| `SERVER_NAME` | `panel Conan Exiles` | Displayed in server browser |
| `MAX_PLAYERS` | `40` | Hard cap (AMP also defaults 40) |
| `RCON_PASSWORD` | `panel_rcon` | Source RCON auth |
| `SERVER_MAP` | `/Game/Maps/ConanSandbox/ConanSandbox` | Exiled Lands. For Isle of Siptah: `/Game/DLC_EXT/DLC_Siptah/Maps/DLC_Isle_of_Siptah` |
| `STEAM_APP_ID` | `440900` | Steamworks client init context — required for Steam master-server listing. Exported as both `STEAM_APP_ID` and `SteamAppId` for cross-build compat. |

## Known gotchas

- Edition split: Enhanced (UE5) ships a real Linux depot since 2026-05-05 and runs native (no Wine). Legacy (UE4, `conan-exiles-legacy` beta) is Windows-only and stays on Wine.
- Wine under Xvfb (Legacy only) adds ~30 s to first boot (prefix init) and ~15 s to subsequent boots (X server + Wine cold start). Native Enhanced has no Wine overhead.
- Workshop mod downloads happen to `ConanSandbox/Mods/` — both the pak files AND `modlist.txt` need to be there for mods to load.
- Ready signal: `LogGameState: Match State Changed from WaitingToStart to InProgress`. Expect 1–3 min between docker-start and this line while UE4 loads the world.

## Reference

AMP template (CubeCoders): https://github.com/CubeCoders/AMPTemplates — `conan-exiles.kvp`, `conan-exilesports.json`, `conan-exilesupdates.json`, `conan-exilesconfig.json`, `conan-exilesmetaconfig.json`.
