DocsDeploymentEnvironment Variables

Environment Variables

Complete reference of all environment variables used by Reqcore, including database, storage, authentication, and optional integrations.

Environment Variables

Reqcore validates all environment variables at startup using Zod schemas in server/utils/env.ts. If a required variable is missing or invalid, the application crashes immediately with a descriptive error.

Required Variables

These must be set for Reqcore to start:

VariableTypeDescription
DATABASE_URLstringPostgreSQL connection string
BETTER_AUTH_SECRETstringSession signing key (minimum 32 characters)
BETTER_AUTH_URLstringPublic URL of the application
S3_ENDPOINTstringS3-compatible storage endpoint URL
S3_ACCESS_KEYstringStorage access key ID
S3_SECRET_KEYstringStorage secret access key
S3_BUCKETstringStorage bucket name
S3_REGIONstringStorage region (e.g., us-east-1)

Optional Variables

Storage

VariableTypeDefaultDescription
S3_FORCE_PATH_STYLEbooleantrueUse path-style URLs. Set true for MinIO, false for AWS S3 / Railway Buckets

Public Site

VariableTypeDefaultDescription
NUXT_PUBLIC_SITE_URLstringhttps://reqcore.comPublic site URL for SEO, sitemaps, and meta tags

Demo Mode

VariableTypeDefaultDescription
DEMO_ORG_SLUGstring(empty)When set, shows a read-only demo banner for this org
LIVE_DEMO_EMAILstringdemo@reqcore.comPrefilled email on sign-in page (demo mode)
LIVE_DEMO_SECRETstringdemo1234Prefilled password on sign-in page (demo mode)

Integrations

VariableTypeDefaultDescription
GOOGLE_CLIENT_IDstring(empty)Google OAuth 2.0 Client ID for Google Calendar integration. See Google Calendar Integration for setup instructions.
GOOGLE_CLIENT_SECRETstring(empty)Google OAuth 2.0 Client Secret for Google Calendar integration.
GITHUB_FEEDBACK_TOKENstring(empty)GitHub Personal Access Token for in-app feedback
GITHUB_FEEDBACK_REPOstring(empty)GitHub repository slug for feedback issues (e.g., reqcore-inc/reqcore)
NUXT_PUBLIC_GISCUS_REPO_IDstring(empty)Giscus GitHub repository node ID for comments
NUXT_PUBLIC_GISCUS_CATEGORY_IDstring(empty)Giscus Discussions category node ID for comments

Railway-Specific

These are set automatically by Railway:

VariableDescription
RAILWAY_ENVIRONMENT_NAMEName of the Railway environment (e.g., production, pr-42)
RAILWAY_PUBLIC_DOMAINPublic domain assigned by Railway
PORTPort assigned by Railway for the service

Local Development (.env)

The setup.sh script generates a .env file with sensible defaults. Example:

# Database
DATABASE_URL=postgresql://reqcore:generated_password@localhost:5432/reqcore

# Authentication
BETTER_AUTH_SECRET=generated_random_string_64_chars
BETTER_AUTH_URL=http://localhost:3000

# Object Storage (MinIO)
S3_ENDPOINT=http://localhost:9000
S3_ACCESS_KEY=minioadmin
S3_SECRET_KEY=generated_password
S3_BUCKET=reqcore
S3_REGION=us-east-1
S3_FORCE_PATH_STYLE=true

# MinIO (Docker Compose)
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=generated_password

# PostgreSQL (Docker Compose)
POSTGRES_USER=reqcore
POSTGRES_PASSWORD=generated_password
POSTGRES_DB=reqcore

Railway Template Variables

When deploying on Railway, use template variables to reference other services:

DATABASE_URL=${{Postgres.DATABASE_URL}}
S3_ENDPOINT=${{Bucket.ENDPOINT}}
S3_ACCESS_KEY=${{Bucket.ACCESS_KEY_ID}}
S3_SECRET_KEY=${{Bucket.SECRET_ACCESS_KEY}}
S3_BUCKET=${{Bucket.BUCKET}}
S3_REGION=${{Bucket.REGION}}

Security Notes

  • Never commit .env files to version control — the .gitignore already excludes them
  • Use setup.sh to generate cryptographically secure secrets
  • In production, use your platform's secret management (Railway variables, Docker secrets, etc.)
  • The env utility in server/utils/env.ts is the only sanctioned way to access environment variables in server code

Next Steps