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"
}
A config file. Point the client at it with the --config option.

Contents

Four keys: your server, its token, the folder of games you author, and where the tools pages are built.

NameTypeDescription
gamehoster-config-serverAddressaddressThe IP address of your game server. The client reaches the API there over HTTPS.
gamehoster-config-apiTokenstringThe token the server installer printed. It authorises the client to push game definitions and pull logs.
gamehoster-config-contentRootpathThe absolute path of your games folder. Each top-level folder is one game.
gamehoster-config-toolspathThe 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.