Loading...
FastStaq needs PostgreSQL for data and Redis for queues, websockets, and caching. This guide wires both and runs your migrations.
Set the connection string in server/.env:
DATABASE_URL=postgres://user:pass@host:port/db?sslmode=require
Notes:
sslmode=require for managed databases. For a local Postgres without TLS, you can drop it.DATABASE_POOL_MAX (API) and DATABASE_POOL_MAX_WORKER (worker) control connection pool sizes. Budget them so instances * pool size stays under your provider's connection limit.ACTIVE_DB (render or supabase) with an optional SUPABASE_DATABASE_URL.Apply the schema with Prisma:
pnpm --filter @faststaq/server db:migrate:deploy
For local schema development, use pnpm --filter @faststaq/server db:migrate to create and apply new migrations.
Provide a single URL (recommended) or a host/port/password triplet:
REDIS_URL=redis://localhost:6379
# or
# REDIS_HOST=
# REDIS_PORT=
# REDIS_PASSWORD=
Important:
REDIS_PASSWORD (or include credentials in the URL) or every BullMQ connection fails with NOAUTH Authentication required.rediss:// for TLS. If your provider ships a CA bundle, point REDIS_TLS_CA_PATH at it.pnpm dev and watch the logs for successful database and Redis connections./health, /health/db, and /health/redis on the API.Open a support ticket with the exact connection error.
Sign in to leave feedback on this article.