Self-host
InsightPeopleHQ in your own environment, with your database and your files.
Install
Self-hosted InsightPeopleHQ is one organization on your own machine or cloud, run with Docker Compose. The installer writes a .env with generated database passwords and your organization and administrator, pulls the images and starts the stack.
cd deploy/selfhost
./install.sh # asks for the organization name and administrator email
# or: PEOPLEHQ_ADMIN_EMAIL=you@company.com PEOPLEHQ_ORG_NAME="Acme" ./install.sh -yThe console is on http://<host>:8080. The first start runs the migrations (about a minute). Put a TLS-terminating proxy or your load balancer in front of it for anything beyond a trial, and set PEOPLEHQ_PUBLIC_URL and PEOPLEHQ_CONSOLE_URL to the https address.
Services
| Service | What |
|---|---|
| postgres | Postgres 16 with a volume; the API connects as an ordinary role, peoplehq_app, created on first start so row-level security binds it |
| api | The FastAPI service on :8146: migrations and product roles on every start (idempotent, advisory-locked), the first administrator if absent, then the API |
| ui | nginx serving the console and the public signing page, proxying /api to the API; the only published port |
Environment
| Variable | Meaning |
|---|---|
INSIGHT_DATABASE_URL, INSIGHT_DATABASE_SECRET | Postgres URL without a password, and a secret reference for it (aws-sm://, azure-kv://, gcp-sm://, file://, env://) |
INSIGHT_DATABASE_SCHEMA | The schema, peoplehq by default |
PEOPLEHQ_EDITION | selfhosted for your own install |
PEOPLEHQ_FILE_STORE | Where uploaded files live: file:///data/…, s3://, az://, gs:// |
PEOPLEHQ_PUBLIC_URL, PEOPLEHQ_CONSOLE_URL | The https addresses people use |
PEOPLEHQ_AI, INSIGHT_LLM_PROVIDER, INSIGHT_CHAT_MODEL | Drafting on or off, and the model provider and model |
INSIGHT_JWT_KEY_FILE or INSIGHT_JWT_KEY_REF | The token-signing key: a file on the data volume, or a secret reference |
CORS_ORIGINS, PEOPLEHQ_METRICS_TOKEN, LOG_FORMAT=json | Operations: allowed origins, a token for /api/metrics, structured logs |
Data and backups
Back up the Postgres volume and the data volume. The data volume holds uploaded files (by default) and the token-signing and credential-sealing keys. Letters live in the database as frozen HTML, so a database backup keeps every document and its signature evidence.
Upgrades
Upgradingdocker compose pull && docker compose up -d # migrations run on startRunning from source
API on 8146, console on 5246cd insightpeoplehq-api
PYTHONPATH=. python scripts/init_platform.py --admin you@company.com --password '…' --org acme --name "Acme"
PYTHONPATH=. uvicorn app.main:app --host 127.0.0.1 --port 8146 # API docs at /docs
cd ../insightpeoplehq-ui && npm install
VITE_DEV_API=http://127.0.0.1:8146 npx vite --port 5246 # http://localhost:5246