Deployment¶
Production Readiness¶
- Run only with explicit config artifacts (do not commit secrets into
pali.yaml). - Put Pali behind TLS-terminating reverse proxy (Nginx/Caddy/Envoy).
- Run with a process supervisor and restart policy.
- Persist the SQLite DB file and back it up on a schedule.
- Validate startup using
pali initin release checks. - Add readiness checks against
/healthand monitor startup logs.
Install¶
Release binary install is the fastest native path:
macOS/Linux:
Windows PowerShell:
Then initialize and run:
Build¶
Optional install to PATH:
User-local PATH install (no sudo):
make install PREFIX="$HOME/.local"
export PATH="$HOME/.local/bin:$PATH"
pali serve -config pali.yaml
Configure¶
- Bootstrap the config file you want to run:
- Edit
/etc/pali/pali.yamlfor your environment. - Full reference:
docs/configuration.md - Multi-tenant/auth model:
docs/multitenancy.md - Required secrets can come from env fallbacks:
OPENROUTER_API_KEYNEO4J_PASSWORD
- Containerized deployments can also use explicit
PALI_*environment overrides, for example:PALI_SERVER_HOSTPALI_DATABASE_SQLITE_DSNPALI_VECTOR_BACKENDPALI_QDRANT_BASE_URLPALI_NEO4J_PASSWORDPALI_AUTH_JWT_SECRET
- All other sensitive values should come from your deployment secret management strategy (config templating, Vault, SSM, etc.).
Recommended production layout:
Health checks:
Run API¶
For local/dev:
Run MCP¶
For local/dev:
Deployment Patterns¶
Docker¶
Base image build:
Run the base zero-dependency profile:
The image default command is:
The baked container config:
- binds to
0.0.0.0:8080 - persists SQLite at
/var/lib/pali/pali.db - points optional services at
qdrant,neo4j, andollama
Override settings with:
- a mounted config file at
/etc/pali/pali.yaml - explicit
PALI_*environment variables
Compose stacks:
docker compose -f deploy/docker/compose.yaml up --build
docker compose -f deploy/docker/compose.yaml -f deploy/docker/compose.qdrant.yaml up --build
docker compose -f deploy/docker/compose.yaml -f deploy/docker/compose.neo4j.yaml up --build
docker compose -f deploy/docker/compose.yaml -f deploy/docker/compose.ollama.yaml up --build
Notes:
compose.qdrant.yamlswitchesvector_backendtoqdrantcompose.neo4j.yamlswitchesentity_fact_backendtoneo4jcompose.ollama.yamlstarts Ollama and points the Ollama URLs at that service, but you still need to pull the model before enabling Ollama-backed embedding/parser/scorer- Docker health checks are wired to
/health, Qdrant/healthz, Neo4jcypher-shell, andollama list
For Compose secrets and port overrides, start from deploy/docker/.env.example.
systemd¶
- Set
ExecStartwith absolute binary/config paths. - Set
Restart=alwaysandRestartSec=2s. - Restrict file permissions on config and DB.
- Keep logs on the host journal or stdout capture.
Before starting the service, run:
to validate provider prerequisites and ensure the target config file exists.
For a full production runbook (health checks, rollback, backup/recovery, incident checklist), use operations.md and treat it as the post-deploy/on-call reference.
Operator note:
- the dashboard is useful for inspecting tenants and memories, but it is not currently protected by the /v1 JWT middleware
- if you expose Pali outside a trusted network, put dashboard access behind your reverse proxy or another auth layer