Envault
Configuration

Environment Variables

Configuring the Envault server

Server Configuration

These environment variables are required to run the Envault server (Next.js app).

Required Variables

VariableDescriptionExample
NEXT_PUBLIC_SUPABASE_URLThe URL of your Supabase project.https://xyz.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEYThe anonymous public key for Supabase.eyJhbGcis...
SUPABASE_SERVICE_ROLE_KEYThe secret service role key. Critical Security.eyJhbGcis...
ENCRYPTION_KEY32-byte hex string used as the Master Key.a1b2c3d4...
NEXT_PUBLIC_APP_URLPublic app URL used in links/callbacks/emails.https://envault.tech
VariableDescriptionExample
UPSTASH_REDIS_REST_URLUpstash Redis REST URL for cache-backed permission and metadata lookups.https://...upstash.io
UPSTASH_REDIS_REST_TOKENUpstash Redis REST token paired with the URL above.AXXXXXXXXX
NEXT_PUBLIC_API_SIGNATURE_SALTHMAC secret used to verify mutation request signatures (x-signature, x-timestamp).change-this-in-production
ENVAULT_AGENT_SECRETJWT signing secret for delegated agent tokens (envault_agt_...).super-random-agent-jwt-secret
ENVAULT_SESSION_KEY_SECRETBackend verifier key for approval signature checks.super-random-session-signing-secret
ENVAULT_SDK_MIN_SUPPORTED_VERSIONMinimum SDK version accepted by server compatibility checks.1.0.0
GOOGLE_GENERATIVE_AI_API_KEYAPI key for /api/agent/chat model orchestration.AIza...
ENVAULT_AGENT_MODELAI model name used by /api/agent/chat.gemini-1.5-flash
CRON_SECRETBearer token expected by /api/cron/digest for authenticated digest email jobs.super-long-random-secret

Optional Variables

VariableDescriptionDefault
RESEND_API_KEYResend API key for sending application emails.Not set
EMAIL_DOMAINSender domain for system emails (team@..., security@..., etc.).mail.envault.tech
PORTRuntime port for local/server process startup.Platform default
NODE_ENVRuntime mode for framework behavior and development-only fallbacks.development

GitHub Integration Variables (Optional)

If you enable GitHub integration, add the following:

VariableDescriptionExample
NEXT_PUBLIC_GITHUB_APP_NAMEGitHub App slug nameenvault
ENVAULT_GITHUB_APP_CLIENT_IDGitHub App client IDIv1.xxxxx
ENVAULT_GITHUB_APP_PRIVATE_KEYGitHub App private key (single-line, \n escaped)"-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----"
ENVAULT_GITHUB_WEBHOOK_SECRETSecret to verify GitHub webhook signatureswhsec_xxxxx

Supabase Edge Function Variables (If You Use Scheduled Jobs)

These are used by Supabase Edge Functions and should be configured in the Supabase project environment, not just the Next.js app:

VariableDescription
ACCOUNT_DELETION_CRON_SECRETSecret checked by process-account-deletions Edge Function (x-cron-secret header).
ROTATE_KEYS_CRON_SECRETSecret checked by rotate-keys Edge Function (x-cron-secret header).

Generating Keys

To generate a secure ENCRYPTION_KEY, use:

openssl rand -hex 32
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"