Skip to content

Self-hosting

Configuration

Settings live in zerowidth.json, written by `zerowidth init`. Command-line options override it.

View as Markdown

zerowidth init writes zerowidth.json in the folder you run ZeroWidth from. Command-line options override it, and paths in it are relative to its folder.

zerowidth.json names where keys are, never a key. Keep keys in environment variables.

Settings

SettingWhat the setting does
storeThe record's file, such as team.db
labelThe record's name in the console
userWho "user" is in a Claude Code transcript
portThe port serve uses, 4380 unless set
hostThe address serve listens on. Anything but this computer asks for a token.
tokenEnvThe environment variable that holds the team token
modelThe AI model: name, endpoint, keyEnv and embed. AI models and costs
deciderThe id of a model that judges whether two decisions are the same, which zerowidth duplicates and the dream use. None unless you name one, and nothing is sent to one until you do
zdrAlways true: ZeroWidth uses only model hosts that keep nothing
readingsWhere the numbers are kept, when not beside the record
metricsSettings for linking metrics to decisions, such as rejected for proposed links you turned down
dreamWhen a dream is due. serve never dreams on a timer: run zerowidth dream --if-due from a scheduler, or Dream now in the console. Dreaming
importWhat to read: sources, and holdBack
sourcesWhere to pull numbers from. Metrics

Settings files from elsewhere

A zerowidth.json in a folder you did not make, such as a cloned repository or an unpacked archive, can ask for things that send your model key and the text being read to another address, or run a program. Until you approve that file, ZeroWidth reads it without its model endpoint, its key names and its sources, and says so. Run zerowidth trust in the folder to approve the file as it is now. If the file changes, it asks again. For a container or pipeline that writes its own file, set ZEROWIDTH_TRUST_SETTINGS=1.

Example

zerowidth.json
{
  "store": "team.db",
  "label": "Acme",
  "model": { "name": "anthropic/claude-haiku-5.5", "keyEnv": "OPENROUTER_API_KEY" },
  "dream": { "everyHours": 24, "scope": "changed" }
}