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 site folders you author, and where the tools pages are built.

{
  "sitehoster-config-serverAddress": "203.0.113.5",
  "sitehoster-config-apiToken": "the token the installer printed",
  "sitehoster-config-contentRoot": "/home/you/sitehoster/sites",
  "sitehoster-config-tools": "/home/you/sitehoster/sites/_tools"
}
A config file. Point the client at it with the --config option.

Contents

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

NameTypeDescription
sitehoster-config-serverAddressaddressThe IP address of your server. The client reaches the API there over HTTPS.
sitehoster-config-apiTokenstringThe token the server installer printed. It authorises the client to push files and pull logs.
sitehoster-config-contentRootpathThe absolute path of your folder of site folders. Each top-level folder named for a domain is one site.
sitehoster-config-toolspathThe absolute path where the client builds the tools pages: the web, server and automation browsers.

sitehoster-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 localhost API. 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.

sitehoster-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.

sitehoster-config-contentRoot

An absolute path to your folder of site folders. A folder named example.com becomes the site at example.com; the sync uploads it and the automation keeps its shared blocks in step. The client also mirrors the server's logs into _logs here. An absolute path means a run does the same thing from any working directory; a relative path is rejected. See Domains.

sitehoster-config-tools

An absolute path to where the client builds the tools pages: the web logs, server stats and automation browsers. It is usually _tools inside your content root. It is only needed when you run a browser tool.