This guide covers deploying the Openlane Console to production, including environment variable configuration, build optimization, and deployment best practices.
Never commit environment files (.env, .env.local, etc.) to version control. Use secure secret management services in production.
# Node environmentNODE_ENV=production# API ConfigurationAPI_REST_URL=https://api.yourdomain.comNEXT_PUBLIC_OPENLANE_URL=https://console.yourdomain.comNEXT_PUBLIC_API_GQL_URL=https://api.yourdomain.com/graphql
Variables prefixed with NEXT_PUBLIC_ are exposed to the browser. Keep sensitive values in server-side variables only.
# GitHub OAuthAUTH_GITHUB_ID=your_github_client_idAUTH_GITHUB_SECRET=your_github_client_secret# Google OAuthAUTH_GOOGLE_ID=your_google_client_id.apps.googleusercontent.comAUTH_GOOGLE_SECRET=your_google_client_secret
# Session cookie name (optional, defaults to next-auth.session-token)SESSION_COOKIE_NAME=openlane-session# Cookie domain for subdomain sharing (optional)SESSION_COOKIE_DOMAIN=.yourdomain.com# Session max age in seconds (optional, defaults to 30 days)SESSION_NEXAUTH_MAX_AGE=2592000
Cookie Domain Configuration
Set SESSION_COOKIE_DOMAIN to share sessions across subdomains:
SESSION_COOKIE_DOMAIN=.yourdomain.com - Shares cookies with:
console.yourdomain.com
api.yourdomain.com
trust.yourdomain.com
Leave unset for single domain deployment
# Restrict signups to specific email domains (optional)NEXT_PUBLIC_ALLOWED_LOGIN_DOMAINS=yourcompany.com,partner.com
Comma-separated list of allowed email domains. If set, users can only sign up with emails from these domains.
# Google reCAPTCHA v3 secret key (optional but recommended)RECAPTCHA_SECRET_KEY=your_recaptcha_v3_secret_key
# Enable AI-powered suggestionsNEXT_PUBLIC_AI_SUGGESTIONS_ENABLED=true# Google AI ConfigurationGOOGLE_AI_PROJECT_ID=your-gcp-project-idGOOGLE_AI_REGION=us-central1GOOGLE_AI_MODEL_NAME=gemini-proGOOGLE_GENERATIVE_AI_API_KEY=your-api-key# Service account for Vertex AI (base64 encoded JSON)GOOGLE_SERVICE_ACCOUNT_KEY_B64=base64_encoded_service_account_json# RAG Corpus for enhanced contextGOOGLE_RAG_CORPUS_ID=your-corpus-id# GCS bucket for AI logsGCS_LOG_BUCKET=your-logs-bucket
Setup Service Account:
# Encode service account JSON to base64cat service-account.json | base64 -w 0 > service-account-b64.txt
# AWS region for Bedrock (optional, for development/testing)AWS_REGION=us-east-1
The Console includes Amazon Bedrock SDK (@ai-sdk/amazon-bedrock) but it’s primarily used for development/testing. Production uses Google Vertex AI.
# Enable subscription plan features (optional)NEXT_PUBLIC_ENABLE_PLAN=true# Google Maps API for location features (optional)NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your-google-maps-api-key# Custom domain CNAME value for trust center (optional)NEXT_PUBLIC_CUSTOMDOMAIN_CNAME=trust.yourdomain.com.cdn.cloudflare.net