OpenInvoice uses environment variables for configuration. Copy env.example.txt to .env.local and configure the following variables.
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
# Redirect URLs
NEXT_PUBLIC_CLERK_SIGN_IN_URL="/auth/sign-in"
NEXT_PUBLIC_CLERK_SIGN_UP_URL="/auth/sign-up"
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL="/dashboard/overview"
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL="/dashboard/overview"
DATABASE_URL=postgresql://user:password@localhost:5432/openinvoice
WEBHOOK_SECRET=whsec_...
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXT_PUBLIC_APP_URL=http://localhost:3000
STRIPE_DEFAULT_COUNTRY=US
STRIPE_PLATFORM_FEE_PERCENTAGE=
RESEND_API_KEY=re_...
RESEND_FROM_EMAIL=noreply@yourdomain.com
RESEND_FROM_NAME=OpenInvoice
RESEND_WEBHOOK_KEY=whsec_...
TAXJAR_API_KEY=...
TAXJAR_USE_SANDBOX=true
NEXT_PUBLIC_SENTRY_DSN=https://...@...ingest.sentry.io/...
NEXT_PUBLIC_SENTRY_ORG=your-org
NEXT_PUBLIC_SENTRY_PROJECT=openinvoice
SENTRY_AUTH_TOKEN=sntrys_...
NEXT_PUBLIC_SENTRY_DISABLED=false
COINGECKO_API_KEY=...
COINGECKO_API_URL=https://api.coingecko.com/api/v3
CRYPTO_TEST_MODE=false
CRYPTO_USE_TESTNET=false
CRON_SECRET=...
DO_SPACES_ENDPOINT=...
DO_SPACES_BUCKET=...
DO_SPACES_KEY=...
DO_SPACES_SECRET=...
Use test/development keys:
Use production keys:
.env.local in .gitignore