💽Self Hosting

Prerequisites

  • Node.js 20+

  • pnpm 9+

  • PostgreSQL (or Supabase free tier)

  • RPC key for Base (Infura, Alchemy, or QuickNode)

Install

git clone https://github.com/BasedGd/BasePass.git
cd basepass
pnpm install

Environment Variables

Create .env in the project root:

DATABASE_URL=postgresql://user:pass@host:5432/basepass
BASE_RPC_URL=https://base-mainnet.infura.io/v3/KEY
CONTRACT_ADDRESS=0x0Fa3F2656074285a2cb8506D3a18479C4ABb73b2
USDC_ADDRESS=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
DEPLOY_BLOCK=26500000
NETWORK=mainnet
JWT_SECRET=random-32-char-minimum-secret
PORT=4821
NEXT_PUBLIC_API_URL=http://localhost:4821
NEXT_PUBLIC_CONTRACT_ADDRESS=0x0Fa3F2656074285a2cb8506D3a18479C4ABb73b2
NEXT_PUBLIC_USDC_ADDRESS=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
NEXT_PUBLIC_CHAIN_ID=8453

Run Locally

Production Build

Deployment Architecture

Component
Recommended
Why

Frontend

Vercel

Zero-config Next.js, free tier

Backend

Railway / Fly.io

Persistent process for indexer

Discord Bot

Railway / VPS

24/7 uptime needed

Telegram Bot

Railway / VPS

24/7 uptime needed

Database

Supabase

Managed PostgreSQL, free tier

Uploads

Cloudflare R2

Free egress, cheap storage

circle-exclamation

Last updated

Was this helpful?