Skip to main content

Prerequisites

  • Docker and Docker Compose
  • A MySQL 8 instance
  • A Redis 7 instance
  • An AI provider API key (e.g. Anthropic)

Environment variables

All environment variables are required with no fallback values. See the environment variables reference for the full list. At minimum, set:
JWT_SECRET=<min 32 chars, generate with: openssl rand -hex 32>
PORT=3001
CORS_ORIGINS=https://your-dashboard.com
DB_HOST=your-mysql-host
DB_PORT=3306
DB_USER=supaproxy
DB_PASSWORD=<strong password>
DB_NAME=supaproxy
REDIS_HOST=your-redis-host
REDIS_PORT=6379
NODE_ENV=production
DASHBOARD_URL=https://your-dashboard.com

Docker

The server runs as a standalone Node.js application. Build and run with Docker:
FROM node:22-alpine
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && pnpm install --frozen-lockfile --prod
COPY . .
RUN pnpm build
EXPOSE 3001
CMD ["node", "dist/index.js"]

Database

MySQL 8 is required. The server runs migrations automatically on startup, so no manual schema setup is needed. For production, ensure:
  • The database user has CREATE, ALTER, INSERT, UPDATE, DELETE, SELECT permissions
  • Connection pooling is configured appropriately
  • Backups are scheduled

Security checklist

Review this checklist before going live.
  • JWT_SECRET is at least 32 characters and randomly generated
  • NODE_ENV=production (enables secure cookies)
  • CORS_ORIGINS is set to your dashboard URL only (not *)
  • Database password is strong and unique
  • AI provider API key is stored in org settings (runtime), not in .env
  • Slack tokens are stored in org settings (runtime), not in .env
  • HTTPS is enforced (cookies are secure: true in production)
  • No .env files are committed to version control

Scaling

  • The server is stateless. Scale horizontally behind a load balancer.
  • BullMQ workers (lifecycle, cold messages, stats) run in the same process but can be separated
  • Redis is used for job queues only (no session state)
  • MySQL handles all persistent state