Team Knowledge Base

Run a shared Demarkus server for a team — version-controlled docs, per-person or per-role write tokens, and open internal read access.

What you’ll have

Architecture

Team server (mark://docs.internal.example.com)
├── /runbooks/          — ops runbooks
├── /decisions/         — architecture decision records
├── /onboarding/        — getting started guides
└── /projects/<name>/   — per-project docs

Each team member gets a personal publish token scoped to paths they own. A team lead token covers everything.

Setup

1. Install the server

On a Linux host (VPS or internal):

sudo curl -fsSL https://raw.githubusercontent.com/latebit-io/demarkus/main/install.sh | \
  bash -s -- --domain docs.internal.example.com --root /srv/team-docs

Or with your own certificates:

sudo curl -fsSL https://raw.githubusercontent.com/latebit-io/demarkus/main/install.sh | \
  bash -s -- --tls-cert /path/cert.pem --tls-key /path/key.pem

2. Create initial structure

sudo mkdir -p /srv/team-docs/{runbooks,decisions,onboarding}
demarkus-publish -root /srv/team-docs -path /index.md -body "# Team Docs"
demarkus-publish -root /srv/team-docs -path /runbooks/index.md -body "# Runbooks"

3. Generate tokens

Team lead token (full access):

sudo demarkus-token generate \
  -paths "/*" \
  -ops publish,archive \
  -tokens /etc/demarkus/tokens.toml \
  -label "team-lead"

Developer token (scoped to their project folder):

sudo demarkus-token generate \
  -paths "/projects/myproject/*" \
  -ops publish \
  -tokens /etc/demarkus/tokens.toml \
  -label "dev-alice"

Read-only token (if you want to restrict reads too):

Omit -ops — by default the server is read-open. To restrict reads, use the token without publish ops.

After generating tokens, reload:

sudo systemctl restart demarkus

4. Team members install client

Each team member runs:

curl -fsSL https://raw.githubusercontent.com/latebit-io/demarkus/main/install.sh | \
  bash -s -- --client-only

5. Team members browse and publish

Browse:

demarkus-tui mark://docs.internal.example.com/index.md

Edit a document (opens $EDITOR, publishes on save):

demarkus edit -auth <token> mark://docs.internal.example.com/runbooks/deploy.md

Publish directly:

demarkus -X PUBLISH -auth <token> \
  mark://docs.internal.example.com/decisions/001-use-demarkus.md \
  -body "# ADR 001: Use Demarkus for team docs"

6. View version history

demarkus -X VERSIONS mark://docs.internal.example.com/runbooks/deploy.md

Fetch a specific version:

demarkus mark://docs.internal.example.com/runbooks/deploy.md/v3

Tips