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

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