Self-Hosting
Run AuthProof on your own infrastructure with Docker Compose.
Prerequisites
- Node.js 20+
- pnpm 10+
- Docker + Docker Compose (for local Postgres and Redis)
1. Clone and install
bash
git clone https://github.com/your-org/authproof
cd authproof
pnpm install2. Configure environment variables
bash
cp .env.example .envMinimum required values:
bash
DATABASE_URL=postgresql://authproof:password@localhost:5432/authproof
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=change-me-32-chars-minimum-random
SIWE_DOMAIN=localhost:3000
SIWE_URI=http://localhost:3000
APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_BASE_SEPOLIA_RPC_URL=https://base-sepolia.g.alchemy.com/v2/YOUR_KEY3. Start the database and Redis
bash
docker compose up -d4. Run migrations and seed
bash
pnpm db:migrate
pnpm db:seed5. Start the dev server
bash
pnpm devThe app is available at http://localhost:3000.
Production deployment
| Service | Recommended provider | Notes |
|---|---|---|
| Web app | Vercel | Deploy apps/web. Set all env vars in project settings. |
| Database | Supabase Postgres | Set both DATABASE_URL (pooled) and DIRECT_URL (direct). |
| Cache / nonces | Upstash Redis | Required in production. Set REDIS_URL and UPSTASH_REDIS_REST_TOKEN. |
| RPC | Alchemy or QuickNode | One URL per chain you want to support. |
Redis is mandatory in production. Without it, nonce replay protection is not distributed across instances and can be bypassed. The app will refuse to start with NODE_ENV=production and no REDIS_URL.