Install & operate
Self-hosting
What you need
Bun. Nothing else — the database is embedded and there is no second service to install.
git clone <repo> /opt/vitrus && cd /opt/vitrus bun install bun run build:tracker bun run cloud
Environment variables
| Variable | Default | What it does |
|---|---|---|
PORT | 3000 | Listen port. |
VITRUS_DB | ./vitrus-cloud.db | Database file. |
VITRUS_BASE_URL | localhost | Public origin. OAuth callback URLs derive from this. |
VITRUS_APP_URL | BASE_URL/app | Where the landing page's login links point. |
VITRUS_SECURE | — | 1 marks cookies Secure (required behind HTTPS). |
VITRUS_EMAIL_KEY | — | Provider API key for digest email. |
VITRUS_EMAIL_FROM | — | Sender address. |
VITRUS_TRACK_SITE | — | Let the landing page measure itself (dogfood). |
GOOGLE_CLIENT_ID / _SECRET | — | Sign in with Google. |
GITHUB_CLIENT_ID / _SECRET | — | Sign in with GitHub. |
OLLAMA_URL | — | Local LLM for digest phrasing. |
If a provider key is absent, that sign-in button is not rendered at all — you never meet a button that does nothing.
Reverse proxy and country data
The country breakdown is read only from your proxy's header. We do not bundle a GeoIP
database — a 60+ MB file with a monthly update cycle would break the one-command install on its
own. Supported headers: Cloudflare (CF-IPCountry), Vercel, Fly,
CloudFront, Netlify. With none of them the country table stays empty and the dashboard says why.
Backups
WAL mode means three files; do not copy them while the process is running:
sqlite3 /var/lib/vitrus/vitrus.db ".backup '/backup/vitrus.db'"