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

VariableDefaultWhat it does
PORT3000Listen port.
VITRUS_DB./vitrus-cloud.dbDatabase file.
VITRUS_BASE_URLlocalhostPublic origin. OAuth callback URLs derive from this.
VITRUS_APP_URLBASE_URL/appWhere the landing page's login links point.
VITRUS_SECURE1 marks cookies Secure (required behind HTTPS).
VITRUS_EMAIL_KEYProvider API key for digest email.
VITRUS_EMAIL_FROMSender address.
VITRUS_TRACK_SITELet the landing page measure itself (dogfood).
GOOGLE_CLIENT_ID / _SECRETSign in with Google.
GITHUB_CLIENT_ID / _SECRETSign in with GitHub.
OLLAMA_URLLocal 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'"