Request a demo
Docs

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.

Installing
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 -y

The 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

ServiceWhat
postgresPostgres 16 with a volume; the API connects as an ordinary role, peoplehq_app, created on first start so row-level security binds it
apiThe FastAPI service on :8146: migrations and product roles on every start (idempotent, advisory-locked), the first administrator if absent, then the API
uinginx serving the console and the public signing page, proxying /api to the API; the only published port

Environment

VariableMeaning
INSIGHT_DATABASE_URL, INSIGHT_DATABASE_SECRETPostgres URL without a password, and a secret reference for it (aws-sm://, azure-kv://, gcp-sm://, file://, env://)
INSIGHT_DATABASE_SCHEMAThe schema, peoplehq by default
PEOPLEHQ_EDITIONselfhosted for your own install
PEOPLEHQ_FILE_STOREWhere uploaded files live: file:///data/…, s3://, az://, gs://
PEOPLEHQ_PUBLIC_URL, PEOPLEHQ_CONSOLE_URLThe https addresses people use
PEOPLEHQ_AI, INSIGHT_LLM_PROVIDER, INSIGHT_CHAT_MODELDrafting on or off, and the model provider and model
INSIGHT_JWT_KEY_FILE or INSIGHT_JWT_KEY_REFThe token-signing key: a file on the data volume, or a secret reference
CORS_ORIGINS, PEOPLEHQ_METRICS_TOKEN, LOG_FORMAT=jsonOperations: 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

Upgrading
docker compose pull && docker compose up -d     # migrations run on start

Running from source

API on 8146, console on 5246
cd 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

Want a hand setting it up?

Tell us your countries, entities and the letters you send; we will set up the templates and checklists with you.

Talk to us