TravelSwallow Docs

Docs / Self-hosting

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:3000

Environment variables

VariableRequiredPurpose
DATABASE_URLyesSQLite path, e.g. file:./dev.db
AUTH_SECRETin prodHMAC secret for session & unlock cookies
ENCRYPTION_SECREToptionalKey for encrypting account API keys (fallback: AUTH_SECRET)
ANTHROPIC_API_KEYoptionalShared server key, in case users shouldn’t bring their own
ANTHROPIC_MODELoptionalOverride the model (default: claude-sonnet-4-5)
NEXT_PUBLIC_SITE_URLoptionalCanonical URL for SEO/sitemap

Docker

docker compose up --build -d   # runs on :3000, data in a volume

The 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.