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 install

2. Configure environment variables

bash
cp .env.example .env

Minimum 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_KEY

3. Start the database and Redis

bash
docker compose up -d

4. Run migrations and seed

bash
pnpm db:migrate
pnpm db:seed

5. Start the dev server

bash
pnpm dev

The app is available at http://localhost:3000.

Production deployment

ServiceRecommended providerNotes
Web appVercelDeploy apps/web. Set all env vars in project settings.
DatabaseSupabase PostgresSet both DATABASE_URL (pooled) and DIRECT_URL (direct).
Cache / noncesUpstash RedisRequired in production. Set REDIS_URL and UPSTASH_REDIS_REST_TOKEN.
RPCAlchemy or QuickNodeOne 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.