Getting started
Configuration
Swifbit is configured through environment variables. Every value has a working default for local development; production requires you to set the secrets.
Environment variables
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL 16 connection string (with pgvector available). |
SWIFBIT_SECRET | Yes | Session signing secret. Change in production. |
SWIFBIT_ENCRYPTION_KEY | Yes | Stable key for encrypting AI and connector credentials. Do not rotate without re-entering stored credentials. |
PORT | No | HTTP port for the kernel. Defaults to 4000. |
SWIFBIT_DATA_DIR | No | Writable directory for connector package files and generated assets. |
SWIFBIT_SECRET and SWIFBIT_ENCRYPTION_KEY must be set to strong, unique values in production. Generate them independently and store them in your secret manager — never commit them.Example .env
.env
DATABASE_URL=postgres://swifbit:swifbit@localhost:5433/swifbit
SWIFBIT_SECRET=replace-with-a-long-random-value
SWIFBIT_ENCRYPTION_KEY=replace-with-a-different-long-random-value
PORT=4000
# SWIFBIT_DATA_DIR=/var/lib/swifbitAI provider
The AI provider is configured in-app under Settings → Intelligence, not via environment variables. Swifbit supports local Ollama, any OpenAI-compatible endpoint, and Vertex AI. Provider API keys entered here are stored encrypted at rest.
Migrations
Schema migrations run automatically on startup under a database advisory lock, so it is safe to start multiple instances against the same database. No manual migration step is required.