Self-hosting
Run TravelSwallow yourself — locally, via Docker, including environment variables.
Running locally
TravelSwallow is open source (AGPL-3.0). You need Node.js and pnpm.
git clone https://github.com/travelswallow/travelswallow.git
cd travelswallow
pnpm install
cp .env.example .env # enter secrets
pnpm prisma migrate dev # create SQLite DB
pnpm dev # http://localhost:3000Environment variables
| Variable | Required | Purpose |
|---|---|---|
DATABASE_URL | yes | SQLite path, e.g. file:./dev.db |
AUTH_SECRET | in prod | HMAC secret for session & unlock cookies |
ENCRYPTION_SECRET | optional | Key for encrypting account API keys (fallback: AUTH_SECRET) |
ANTHROPIC_API_KEY | optional | Shared server key, in case users shouldn’t bring their own |
ANTHROPIC_MODEL | optional | Override the model (default: claude-sonnet-4-5) |
NEXT_PUBLIC_SITE_URL | optional | Canonical URL for SEO/sitemap |
Docker
docker compose up --build -d # runs on :3000, data in a volumeThe image builds better-sqlite3natively, migrates on startup and stores the database & uploads under /data. Details in DEPLOY.md in the repository.
Adjusting the plan limit
The free limit is stored per user as planLimit (default 1). As a self-hoster you can raise it per account in the database or change the default in the Prisma schema.