SetFork Docs

Self-hosting

Run your own SetFork with Docker Compose.

SetFork self-hosts as a small Docker Compose stack: the Next.js app, PostgreSQL 16 with pgvector, and optionally MinIO (S3) + imgproxy for media.

Quick start

cp .env.example .env        # set AUTH_SECRET: openssl rand -hex 32
npm install
npm run db:up               # Postgres (pgvector) in Docker
npm run db:push             # apply the schema
npm run db:seed             # optional: seed the public library
npm run dev                 # http://localhost:3000

Without any external services the app is fully functional — the login page offers Continue as demo.

Optional integrations

FeatureWhat to configure
AI generation & semantic searchOPENROUTER_API_KEY in .env or in /admin (stored in DB, never sent to the client)
GitHub sign-inOAuth App + GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET; callback …/api/auth/github/callback
Media (avatars, screenshots)S3 + imgproxy in /admin; falls back to local disk
Email notificationsSMTP settings

Administration

The admin panel lives at /admin; access is granted to handles listed in the ADMIN_HANDLES env var. From there you manage AI models and keys, media, search mode (keyword / semantic / hybrid), moderation queue, search reindexing and AI usage dashboards.

Production notes

  • Put the app behind a reverse proxy with TLS (Caddy, Traefik, nginx).
  • Postgres is the only stateful dependency — back it up daily (pg_dump + off-host storage) and test restores.
  • The git layer stores bare repositories on disk; persist that volume alongside the database.

On this page