Infrastructure you control


Fill these in once

Everything on this page, every snippet and the generated configuration file, rewrites itself from these, so nothing has to be adapted by hand while you paste.

01

Register a GitHub App

Yours, not ours, so webhooks reach your host and tokens never leave it. Open github.com/settings/apps/new and use these four values, then paste what it gives you back below.

Webhook URL
https://docparity-api.example.com/webhooks/github
Webhook secret
any random string, you will paste it below
Repository permissions
Contents, Pull requests, Checks (read & write), Metadata (read)
Subscribe to events
Pull request, Issue comment

Generate a private key on the same page, then turn it into one line:

base64 -w0 your-app.private-key.pem
02

Take your configuration

This is your whole configuration file, filled in from what you typed. The session secret was generated in your browser and has never been sent anywhere, including to us.

apps/api/.env

# DocParity - generated at docparity.vercel.app/self-hosting
# Save as apps/api/.env, then:
#   docker compose -f docker-compose.selfhost.yml up -d --build

ENV=production
FRONTEND_URL=https://docparity.example.com
PUBLIC_API_URL=https://docparity-api.example.com
CORS_ORIGINS=["https://docparity.example.com"]
SESSION_SECRET=<click generate below>
DASHBOARD_ALLOWED_USERS=your-github-login

# GitHub App - github.com/settings/apps/new
GITHUB_APP_ID=<app id>
GITHUB_PRIVATE_KEY_B64=<base64 -w0 your-app.private-key.pem>
GITHUB_WEBHOOK_SECRET=<the webhook secret you set>

# Dashboard sign-in - github.com/settings/developers
# callback: https://docparity-api.example.com/auth/callback
GITHUB_OAUTH_CLIENT_ID=
GITHUB_OAUTH_CLIENT_SECRET=

# Optional. Unset means the deterministic engine runs without drafting.
LLM_API_KEY=
LLM_MODEL=claude-opus-4-8

save it as apps/api/.env in the cloned repository · downloading generates the secret if you have not already

03

Bring it up

One command for all five pieces: database, queue, API, worker and web app. Migrations apply themselves on boot.

git clone https://github.com/adityachotaliya9299-jpg/docparity.git
cd docparity
# save the downloaded file as apps/api/.env
docker compose -f docker-compose.selfhost.yml up -d --build

Then check it answered, and open a pull request on a repository you installed the App on. Nothing appears until a pull request exists, so an empty dashboard on day one is expected.

curl https://docparity-api.example.com/health

Want GitLab or Bitbucket, single sign-on, SCIM, or billing on top? They are all optional environment variables. covers each one.