Config
The config file is a small JSON file on your own machine. It is the one file the client needs: it names your server, the token that reaches it, the folder of games you author, and where the tools pages are built.
{
"gamehoster-config-serverAddress": "203.0.113.5",
"gamehoster-config-apiToken": "the token the installer printed",
"gamehoster-config-contentRoot": "/home/you/gamehoster/games",
"gamehoster-config-tools": "/home/you/gamehoster/games/_tools"
}
--config option.Contents
Four keys: your server, its token, the folder of games you author, and where the tools pages are built.
| Name | Type | Description |
|---|---|---|
gamehoster-config-serverAddress | address | The IP address of your game server. The client reaches the API there over HTTPS. |
gamehoster-config-apiToken | string | The token the server installer printed. It authorises the client to push game definitions and pull logs. |
gamehoster-config-contentRoot | path | The absolute path of your games folder. Each top-level folder is one game. |
gamehoster-config-tools | path | The absolute path where the client builds the tools pages: the game, web and server browsers. |
gamehoster-config-serverAddress
The IP address of your server, e.g. 203.0.113.5, a raw
address with no scheme. The client reaches the API there over HTTPS, which Caddy terminates before
proxying to the server. Reaching a bare IP over HTTPS can only be a self-signed certificate, so the
client skips certificate checks for an IP host; point a hostname you own at the box to get full
verification.
gamehoster-config-apiToken
The token the server installer printed. The client sends it as a bearer header on every call; it is the box's one secret, so keep the config file private.
gamehoster-config-contentRoot
An absolute path to your games folder. Each top-level folder is one game, built into an authoritative server and a generated client. An absolute path means a run does the same thing from any working directory.
gamehoster-config-tools
An absolute path to where the client builds the tools pages: the game, web and server browsers.
It is usually _tools inside your games folder. It is only needed when you run a
browser tool.