fix(builder): SteamCMD is the only option for Linux Steam servers; settings must reach the server
This commit is contained in:
1 parent
1fcf05cc27
commit
010d7a57a1
3 files changed
+70
-10
No files matched your search
@@ -39,10 +39,26 @@ Know this before writing anything:
|
||||
- No real credentials, tokens or IDs anywhere in this repo. A value a server can't start without (a
|
||||
player ID, a license token) goes in `test.yaml` under `secrets`, mapped to a CI secret name.
|
||||
|
||||
### The image: SteamCMD first
|
||||
- If the game's dedicated server is on Steam and ships a Linux build, the template is
|
||||
`defaultDockerImage: cm2network/steamcmd` with `installMethod: STEAMCMD` and the **server's** app id
|
||||
(not the game's). Never a community image of that server (`wolveix/...`, `lloesche/...` and the like):
|
||||
they keep game files and saves in their own folders (`/config`, `/home/<user>`), outside `/server`, so
|
||||
everything is lost on the next start, and no setting can move them.
|
||||
- Community images are only for servers that aren't on Steam for Linux: Windows-only servers that need
|
||||
Proton or Wine, and games not on Steam.
|
||||
- Many Linux servers save under `$HOME` (Unreal Engine games: `~/.config/Epic/<Game>/Saved`). In
|
||||
`cm2network/steamcmd`, `$HOME` is `/home/steam`, outside the volume. Start the command with
|
||||
`export HOME=/server;` so those saves land in the volume, and list them in `backupPaths` relative to
|
||||
`/server` (e.g. `.config/Epic/<Game>/Saved/SaveGames`).
|
||||
|
||||
### Ports
|
||||
- `defaultPorts` lists **only what players connect to** (game and query ports). RCON, REST and admin
|
||||
ports are **never** published.
|
||||
- Use `"7777/udp"` or `"8211:8211/udp"`. Every port needs its protocol.
|
||||
- A port the game uses over both protocols is listed twice: `"7777/udp"` and `"7777/tcp"`.
|
||||
- A game that tells players a second port (a reliable-messaging or query port it announces) needs it as
|
||||
`{PUBLIC_PORT_<port>}` passed to the game's "external port" option, since nodes may publish it elsewhere.
|
||||
- Nodes always publish these container ports (only the host side moves when servers share a node).
|
||||
So the game's own port is **not a setting**: write it into the startup command or config file. A
|
||||
game that must announce the port players use gets `{PUBLIC_PORT_<port>}`.
|
||||
@@ -77,6 +93,20 @@ Know this before writing anything:
|
||||
- Take keys and default values from what the server really writes: run
|
||||
`gbrgames first-boot -game <id>` and read the settings in its report.
|
||||
- Every key in `defaultConfig` has a `configSchema` property, and the other way round.
|
||||
- **Every setting must reach the server.** Settings only arrive as environment variables (and in
|
||||
`configFilePath`, if set). A server that doesn't read environment variables (most official servers,
|
||||
every Unreal Engine server) ignores a setting unless the template delivers it: in `configFilePath`, as a
|
||||
launch option the startup command builds from the variable, or written into the server's own config
|
||||
file by the startup command before it starts. A setting that nothing reads looks editable in the panel
|
||||
and does nothing: leave it out instead.
|
||||
- `configFilePath` writes **every** setting into **one** file. When a server reads its settings from
|
||||
several files (Unreal: `Game.ini`, `Engine.ini`, `GameUserSettings.ini` under
|
||||
`<Game>/Saved/Config/LinuxServer/`), leave `configFilePath` out and write each file from the startup
|
||||
command before the server starts:
|
||||
`printf '[/Script/Engine.GameSession]\nMaxPlayers=%s\n' "${MAX_PLAYERS:-4}" > "$cfg/Game.ini";`.
|
||||
The server may rewrite these files when it stops; writing them on every start keeps the panel in charge.
|
||||
- Never carry over a community image's variable names (`MAXPLAYERS`, `AUTOSAVENUM`, `PUID`, `SKIPUPDATE`...)
|
||||
into a SteamCMD template: only that image's own scripts read them. Use the game's real setting names.
|
||||
- Every property has a `title`, a short `description` for a player, a `type`, a `default` equal to the
|
||||
`defaultConfig` value, and a `category`: one of `Security & Access`, `Gameplay & Rules`,
|
||||
`World & Environment`, `System & General`. Mark the few that matter when deploying with
|
||||
|
||||
Reference in new issue
Block a user