Self-hosting overview
This page is a short map. The operations documents live in the Altar repository and are the source of truth for commands and settings.
The parts of an instance
Section titled “The parts of an instance”| Part | What it does |
|---|---|
| Backend | The HTTP API (/api/v1). |
| Collectors | Read each chain and store finalized deposits. |
| Pricing and points workers | Price deposits and calculate points versions. |
| Database | PostgreSQL. It holds campaigns, deposits, prices, and points. |
| Web server | Caddy. It serves the app and proxies /api. |
| Registry indexer | Mirrors the onchain registry contract (packages/rpc-indexer). |
The stack is Node.js 22, Express, Drizzle with PostgreSQL, a React app, Docker Compose, and Ansible.
Where to read next
Section titled “Where to read next”All paths are in the repository:
ops/README.md: deployment, environment files, migrations, and backups.ops/ansible/README.md: the Ansible playbooks.docs/cycle-operations.md: the campaign cycle runbook (commands, schedule, kill switch).docs/staging-environment.md: the staging site, which previews a user-interface build of any git ref.docs/runbooks/first-campaign-creation.md: creating the first campaign.docs/registry-verification.md: how the registry contract source was verified.
Deployments use blue and green
Section titled “Deployments use blue and green”The main deployment starts the new backend next to the old one, checks it, and then switches the web server over. It rolls back on its own if the switch fails. Read ops/README.md before you deploy.
This documentation site
Section titled “This documentation site”These docs are a static site built from the packages/docs package: yarn docs:build writes packages/docs/dist. The OpenAPI file is generated from the server code during that build. The hosting setup is in docs/docs-site.md.