logo
Custom Server Environment

Environment Variables

Environment Variables

Create a .env file in your project root directory and add the following environment variables:

Pay close attention to the URL formats below. Some variables require https://, some do not, and some require a trailing slash. Incorrect URL formatting is one of the most common causes of issues.

# ===========================================
# ProShot - Environment Variables
# ===========================================

# -------------------------------------------
# Supabase Configuration
# -------------------------------------------
# If using Supabase Cloud: https://abcdefghij.supabase.co
# If self-hosting Supabase: http://your-server-ip:8000
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your-supabase-publishable-key
SUPABASE_SECRET_KEY=your-supabase-secret-key

# -------------------------------------------
# App Configuration
# -------------------------------------------
# Full URL with https:// and no trailing slash
# For example: https://your-domain.com
NEXT_PUBLIC_APP_URL=https://your-domain.com

# -------------------------------------------
# Stripe Configuration
# -------------------------------------------
NEXT_PUBLIC_STRIPE_IS_ENABLED=true
STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key
STRIPE_SECRET_KEY=your-stripe-secret-key
STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret

# -------------------------------------------
# PayPal Configuration
# -------------------------------------------
# Production: https://api-m.paypal.com | Sandbox: https://api-m.sandbox.paypal.com
# Must include https:// and no trailing slash
PAYPAL_API_URL=https://api-m.paypal.com
NEXT_PUBLIC_PAYPAL_CLIENT_ID=your-paypal-client-id
PAYPAL_CLIENT_SECRET=your-paypal-client-secret

# -------------------------------------------
# Razorpay Configuration
# -------------------------------------------
NEXT_PUBLIC_RAZORPAY_KEY_ID=your-razorpay-key-id
RAZORPAY_KEY_SECRET=your-razorpay-key-secret

# -------------------------------------------
# Flutterwave Configuration
# -------------------------------------------
NEXT_PUBLIC_FLUTTERWAVE_PUBLIC_KEY=your-flutterwave-public-key
FLUTTERWAVE_SECRET_KEY=your-flutterwave-secret-key
FLUTTERWAVE_ENCRYPTION_KEY=your-flutterwave-encryption-key

# -------------------------------------------
# Astria AI Configuration
# -------------------------------------------
ASTRIA_API_KEY=your-astria-api-key
# Domain only, no https:// and no trailing slash
# For example: your-domain.com
ASTRIA_WEBHOOK_URL=your-domain.com

# -------------------------------------------
# Gemini AI Configuration (Magic Editor)
# -------------------------------------------
GEMINI_API_KEY=your-gemini-api-key

# -------------------------------------------
# Resend Email Configuration
# -------------------------------------------
RESEND_API_KEY=your-resend-api-key
RESEND_SENDER_EMAIL=Your App <noreply@yourdomain.com>

# -------------------------------------------
# Google Analytics
# -------------------------------------------
# Full script URL including https://
# For example: https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID_VALUE=G-XXXXXXXXXX

Each variable is explained in detail in the relevant section of the documentation (Astria, Resend, Payment Gateways, etc.). For now, just make sure this file exists in your project root.

If you are self hosting Supabase via Docker on the same server, your NEXT_PUBLIC_SUPABASE_URL will be something like http://your-server-ip:8000. If you are using Supabase Cloud, it will be your project URL (e.g. https://abcdefghij.supabase.co).