Docs · Self-hosting

Self-hosting Docket

Docket is open source, the CLI and the server alike. Run it on your own machine with no setup, serve it to a team from infrastructure you control, or let Docket Cloud run it for you.

Open source

The CLI, the server core and the multi-tenant Docket server are in one repository, chrisjowen/docket, under two licences. Each package states its own.

WhatLicence
The multi-tenant Docket server in platform/: accounts and dockets, sign-in and OAuth, the web app and its API, MCP, the worker, projections, enrichment and the canonical store.AGPL-3.0-only
The docket CLI, the reusable server core (@chrisjowen/docket-server), the local UI, the contracts, the adapter SDK and the adapters, and the Claude Code plugin.Apache-2.0

Running the server unmodified, or privately, adds no obligation beyond the licence's usual terms. If you run a modified version for users over a network, the AGPL asks you to offer them its source. LICENSING.md has the details.

On your machine: docket open

With docket installed (Run it yourself), docket open needs no configuration. In a repository with a .docket.yaml, it serves the web UI, its API and an MCP server on one port, on this machine only. No database, no account, no network.

shell
cd your-repo                  # a repository with a .docket.yaml
docket open                   # the UI, its API and the MCP server, on http://127.0.0.1:4380
shell
docket open --init            # a fresh folder: start a docket here first, then open it

It takes 4380, or any free port when that one is taken: use the address it prints. Its MCP server, at /mcp on the same address, offers the same eleven tools as Docket Cloud, reads and writes, over the project's own files. Point any agent on this machine at it:

shell
docket open --no-open --port 4380
claude mcp add --transport http docket-local http://127.0.0.1:4380/mcp

Want your local agents to see a team's knowledge too? Link the repository to a Cloud workspace (docket cloud link): docket_search then includes the workspace's answers beside your own.

A server for your team: docket serve

docket serve runs a single-tenant Docket server that people and agents reach over MCP from wherever they work, with the same tools as Docket Cloud. By default it needs no database: each workspace is a project's own docket, its Markdown files. Postgres is an opt-in. Every caller holds a static bearer token with a role: viewer, editor, admin or owner.

shell
npm install -g @chrisjowen/docket @chrisjowen/docket-server
npm install -g pg     # only for a Postgres database
shell
docket serve token create ada --role owner      # shown once; only its hash is kept
docket serve token create ci-bot --role editor
docket serve                                    # http://127.0.0.1:4390, this machine only
shell
claude mcp add --transport http docket https://docket.example.com/mcp/platform \
  --header "Authorization: Bearer dks_…"

It reads docket-server.yaml from --config, $DOCKET_SERVE_CONFIG or the working directory, with the environment over the file and the command line over both:

docket-server.yaml
# docket-server.yaml: read from --config, $DOCKET_SERVE_CONFIG, or this directory
listen: { host: 0.0.0.0, port: 4390 }
publicUrl: https://docket.example.com      # behind your TLS proxy
dataDir: ./state                           # tokens and the audit log
workspaces:
  - slug: platform                         # /mcp/platform
    path: /srv/platform
# database: { url: postgres://docket:…@db:5432/docket }   # leave out for no database

To reach it from other machines, listen on every interface behind a reverse proxy that terminates TLS, and set publicUrl. docs/self-hosting.md covers tokens, roles, the Postgres store and the endpoints.

The full Docket server: --config

The same two commands run the multi-tenant Docket server, the one Docket Cloud runs: accounts with their dockets and members, sign-in, OAuth for MCP clients and the CLI's device sign-in, per-account encryption keys, the hash-chained audit log, AI budgets, enrichment, repository sync and the web app. A docket-server.yaml with version: 1 and mode: multi-tenant selects it:

shell
docket open  --config docket-server.yaml          # a local preview: development, and opens the browser
docket serve --config docket-server.yaml          # an install: production unless the file says otherwise
docket serve --config docket-server.yaml --no-ui  # headless: the API, MCP, OAuth and sign-in
docket serve worker --config docket-server.yaml   # the worker alone, as a separate process

One process serves the API, MCP (/mcp/{account}/{docket}), OAuth, sign-in and the web app on one port, and runs the worker beside them. Every source is named and typed, and every secret is a reference to a mounted file or a named environment variable, never the value itself:

docket-server.yaml
version: 1
mode: multi-tenant
listen: { host: 0.0.0.0, port: 4390 }
publicUrl: https://docket.example.com
ui: { enabled: true }
worker: { mode: inline }
sources:
  pg:
    type: postgres
    provisioning: external
    url: { file: /run/secrets/docket/pg-app-url }
    migrationUrl: { file: /run/secrets/docket/pg-admin-url }
    encryptionKey: { file: /run/secrets/docket/kek }
  graph:
    type: neo4j
    provisioning: managed
    driver: kubernetes
    kubernetes: { namespace: docket, storageClass: standard }
  vectors: { type: qdrant, provisioning: bundled, url: https://qdrant:6333, apiKey: { file: /run/secrets/docket/qdrant-key } }
  embed: { type: embedder, provider: ollama, url: https://embedder:11434, model: nomic-embed-text, dimensions: 768 }
auth:
  github: { clientId: Iv1.example, clientSecret: { file: /run/secrets/docket/github-client-secret } }

Postgres is required: the server migrates its own schema and makes each account's schema, role and data key. Neo4j, Qdrant, an Ollama embedder, a reranker and cognee are sources you run (external), your installer runs (bundled), or, for Neo4j on Kubernetes, the server makes per account (managed). Without an AI provider, AI is off and search still works. The whole file is checked before anything starts. The multi-tenant server documents every setting.

Sign-in

The multi-tenant server signs people in with GitHub, any OpenID Connect provider, or a password you give them, in any combination. Each way leads to the same users, roles, tokens and audit log.

  • GitHub: a GitHub OAuth App of your own, called back at <publicUrl>/auth/github/callback.
  • OpenID Connect: any provider with a discovery document, such as Okta, Entra ID, Google, Keycloak, Authentik or Dex, called back at <publicUrl>/auth/oidc/<name>/callback.
  • Passwords for the people the config lists. The server keeps only a salted hash, and there is no self-service sign-up.
docket-server.yaml
auth:
  github: { clientId: Iv1.example, clientSecret: { file: /run/secrets/docket/github-client-secret } }
  oidc:
    sso:                           # any OpenID Connect provider; the name is in its callback URL
      issuer: https://identity.example.com
      clientId: docket
      clientSecret: { file: /run/secrets/docket/oidc-client-secret }
      label: Example SSO           # "Continue with Example SSO"
  password:
    users:                         # people you give a password; the list is the config's
      - { login: ops.admin, email: ops@example.com, password: { file: /run/secrets/docket/ops-admin-password } }
  access:
    allow: ['@example.com']        # who may sign in and create accounts, besides members and invitees
    admins: [ops.admin]

auth.access says who may sign in and create accounts besides members and invitees. The single-tenant docket serve has no sign-in service: access is by its static tokens.

Docker Compose and Helm

The server ships as an image, ghcr.io/chrisjowen/docket, with a Docker Compose stack in deploy/compose and a Helm chart in deploy/helm/docket. Postgres, Neo4j, Qdrant, an Ollama embedder and cognee are opt-ins. You need no Docket Cloud account.

Docker Compose

The single-tenant stack: one container, serving a docket kept as files on a volume.

shell
cd deploy/compose
cp .env.example .env                     # then edit it; .env is never committed
docker compose pull --policy missing     # the only step that pulls images
docker compose up -d
docker compose run --rm docket serve token create ada --role owner

The multi-tenant profile runs docket serve --config with Postgres, Neo4j, Qdrant and an Ollama embedder bundled, for one account with many dockets. Use an image built from a checkout, or a release that includes the multi-tenant platform. From the repository root, build the image and make the config, .env and a KEK:

shell
docker build -f deploy/image/Dockerfile -t docket:local .
cd deploy/compose
cp .env.multi-tenant.example .env
cp docket-server.example.yaml docket-server.yaml
mkdir -p secrets
(umask 077; openssl rand -base64 32 > secrets/kek)

Set DOCKET_IMAGE=docket:local in .env and fill in its database, Neo4j and Qdrant credentials. Register a GitHub OAuth App with callback http://127.0.0.1:4390/auth/github/callback, put its secret in .env, then replace the example client ID and sign-in allowlist in docket-server.yaml. Then start it:

shell
docker compose -f compose.multi-tenant.yaml pull --policy missing
docker compose -f compose.multi-tenant.yaml up -d --wait

Helm

shell
helm install docket deploy/helm/docket -n docket --create-namespace \
  --set publicUrl=https://docket.example.com \
  --set ingress.enabled=true --set ingress.host=docket.example.com \
  --set ingress.tls.secretName=docket-tls
kubectl exec -n docket deploy/docket -- docket serve token create ada --role owner

For the multi-tenant server, give the chart your docket-server.yaml and a Secret holding its KEK and sign-in secrets. A worker of its own and a Neo4j per account are values away:

shell
helm upgrade --install docket deploy/helm/docket -n docket \
  -f deploy/helm/multi-tenant-values.yaml \
  --set-file multiTenant.config=./docket-server.yaml \
  --set multiTenant.existingSecret=docket-platform

docs/deploy.md walks through both installers: secrets, profiles, where the state lives, upgrades and backups.

Or let us run it: Docket Cloud

A self-hosted server is yours to operate: backups and restore drills, upgrades, monitoring, high availability and on-call. Docket Cloud is the same Docket, run for you.

  • Backups, on encrypted disks, with each organisation's documents under a data key of its own.
  • Upgrades applied for you.
  • Support from the people who build Docket.
  • Nothing to set up: the databases, the ontology tooling and an MCP endpoint per docket, with sign-in.

Your records stay docket Markdown and your ontology exports as YAML, so you can move between Cloud and your own server either way. Docket Cloud is free to start: Getting started shows the way in.

Not yet

  • The UI as its own deployment. --no-ui turns the product's pages off, but a separately deployed UI follows once the public API covers every page.
  • Linking identities. A person who signs in with a second provider is a second user until they can be linked.
  • Password changes happen in the config: there is no reset by email yet.
  • Per-space stores and models. Every account uses the stores and models in the config.