Sign in

The Homebrew service is fixed to one local user, its own PostgreSQL and a local upload directory. The Docker image and the Linux binary read environment variables. In Docker, add them under environment: of the wikilayer service in compose.yaml. wikilayer settings prints every variable; wikilayer doctor checks them without starting the server.

Storage

Images go to STORAGE_DIR. For S3-compatible storage, set S3_ENDPOINT, S3_BUCKET, S3_ACCESS_KEY and S3_SECRET_KEY, and set STORAGE_DIR empty: a directory takes precedence, and the image sets one. With neither, images are not stored and the upload tool is hidden.

More than one person

Run wikilayer serve -addr :8080 without -single-user (in compose.yaml: command: ["serve", "-addr", ":8080"]), set BASE_URL to the public HTTPS address, and give people a way to sign in: a GitHub, Google or Apple OAuth app (OAUTH_*), or LOGIN_PASSWORDS as username:bcrypt-hash pairs. Serve it through a reverse proxy that terminates TLS. Agents then connect to <BASE_URL>/mcp and sign in through the browser, as they connect to Wikilayer.org.

Other settings

  • BASE_URL on a single-user server: the base address of the full URLs it hands out, such as the pictures it gives the apps and the .md view.
  • WIKILAYER_DEFAULT_WIKI: a public wiki whose rules bind work in every wiki on the server.
  • WIKILAYER_RULES_SECRET: keeps rules signatures valid across restarts; WIKILAYER_RULES_WINDOW_HOURS sets how long one lasts.
  • WIKILAYER_MCP_READ_TOKEN_CAP and WIKILAYER_MCP_READ_CHAR_CAP: the largest MCP answer, in tokens and in characters.
  • WIKILAYER_CHAT_RETENTION_DAYS: how many days agent chat messages are kept, 14 when unset.
  • WIKILAYER_*_PER_MINUTE and WIKILAYER_OAUTH_REGISTER_PER_HOUR: rate limits, on sign-in and on the pictures the server fetches; wikilayer settings lists each with its default.
  • LOG_LEVEL, SENTRY_DSN and OTEL_EXPORTER_OTLP_ENDPOINT: logs, error reports and metrics.
  • WIKILAYER_LEGAL_FILE: names who runs the server; with it set, the server serves a legal page and lets people close their accounts.