Skip to main content

Configuration

Environment Variables​

VariableDescriptionRequired
DATABASE_URLPostgreSQL connection string✅
POSTGRES_PASSWORDPostgreSQL password✅
AUTH_SECRETNextAuth encryption secret✅
NEXT_PUBLIC_BASE_URLYour srvly domain URL✅
NEXT_PUBLIC_APP_URLSame as BASE_URL✅
NEXTAUTH_URLSame as BASE_URL✅
AUTH_TRUST_HOSTSet to true for production✅
GITHUB_CLIENT_IDGitHub OAuth App client ID✅
GITHUB_CLIENT_SECRETGitHub OAuth App client secret✅
SSH_KEY_PATHPath for generated SSH keys✅
REDIS_URLRedis connection for BullMQ job queue❌ (recommended)
SSH_ENCRYPTION_KEYAES-256-GCM key for SSH encryption (fallback: AUTH_SECRET)❌

GitHub OAuth Setup​

  1. Go to GitHub Developer Settings
  2. Create a new OAuth App:
    • Application name: srvly
    • Homepage URL: https://YOUR_DOMAIN
    • Authorization callback URL: https://YOUR_DOMAIN/api/auth/callback/github
  3. Copy the Client ID and generate a Client Secret
  4. Add them to your .env file