Skip to Content
For DevelopersConfiguration

Configuration

Auktiva is configured through environment variables in a .env file. This page documents all available options.

Environment File

Create a .env file in the project root by copying the example:

cp .env.example .env

Required Variables

Database

# SQLite (local file) DATABASE_URL="file:./data/auktiva.db" # OR Turso (cloud database) DATABASE_URL="libsql://your-database.turso.io" DATABASE_AUTH_TOKEN="your-turso-auth-token"

See Database Configuration for detailed setup instructions.

Authentication

# Secret key for encrypting sessions (generate with: openssl rand -base64 32) AUTH_SECRET="your-secret-key-here" # Base URL of your application AUTH_URL="http://localhost:3000"

Always generate a unique AUTH_SECRET for production. Never use the example value.

Storage Configuration

Local Storage (Default)

STORAGE_PROVIDER="local"

Local storage uses ./public/uploads automatically (served at /uploads). No additional configuration needed.

S3-Compatible Storage

STORAGE_PROVIDER="s3" S3_BUCKET="your-bucket-name" S3_REGION="us-east-1" S3_ACCESS_KEY_ID="your-access-key" S3_SECRET_ACCESS_KEY="your-secret-key" # Optional: Custom endpoint for S3-compatible services (MinIO, Cloudflare R2, etc.) S3_ENDPOINT="https://your-endpoint.com" # Optional: Custom public URL for serving files S3_PUBLIC_URL="https://cdn.yourdomain.com"

See Storage Configuration for detailed setup instructions.

Email Configuration (Optional)

Auktiva supports two email providers: Brevo (cloud service) and SMTP (any SMTP server).

Common Settings

# Provider selection: "brevo" or "smtp" EMAIL_PROVIDER="brevo" # Sender email and name MAIL_FROM="noreply@yourdomain.com" MAIL_FROM_NAME="Auktiva" # App URL for links in emails NEXT_PUBLIC_APP_URL="https://yourdomain.com" # Secret for securing the email retry cron endpoint CRON_SECRET="generate-with-openssl-rand-base64-32"

Option 1: Brevo

Brevo  (formerly Sendinblue) offers a free tier with 300 emails/day.

EMAIL_PROVIDER="brevo" BREVO_API_KEY="your-brevo-api-key" # Get from https://app.brevo.com/settings/keys/api

Option 2: SMTP

Use any SMTP server (Gmail, Mailgun, Amazon SES, self-hosted, etc.).

EMAIL_PROVIDER="smtp" SMTP_HOST="smtp.example.com" SMTP_PORT="587" SMTP_SECURE="false" # true for port 465 (implicit TLS), false for STARTTLS SMTP_USER="your-username" # Optional, omit for no authentication SMTP_PASSWORD="your-password" # Optional

Common SMTP configurations:

ProviderHostPortSecure
Gmailsmtp.gmail.com587false
Mailgunsmtp.mailgun.org587false
Amazon SESemail-smtp.us-east-1.amazonaws.com587false
SendGridsmtp.sendgrid.net587false
Local (Mailpit)localhost1025false

For local development, you can use Mailpit  or similar tools to capture emails without authentication.

Email Types

When configured, Auktiva sends:

  • Welcome emails - On user registration
  • Auction invites - When users are invited to auctions
  • New item notifications - When items are added (user can disable)
  • Outbid notifications - When someone outbids a user (user can disable)

Email Retry System

Failed emails are logged to the database and automatically retried via a cron job at /api/cron/retry-emails. On Vercel, this runs every 15 minutes. The system retries up to 5 times before abandoning.

Email is optional. If EMAIL_PROVIDER is not set, no emails will be sent and the app will function normally.

Google OAuth (Optional)

Enable Google sign-in for your users. See Authentication for detailed setup instructions.

# Google OAuth credentials (from Google Cloud Console) GOOGLE_CLIENT_ID="your-client-id.apps.googleusercontent.com" GOOGLE_CLIENT_SECRET="your-client-secret"

Google OAuth is optional. If not configured, users can still register and login with email/password. The Google sign-in button only appears when these variables are set.

Microsoft OAuth (Optional)

Enable Microsoft sign-in for your users. See Authentication for detailed setup instructions.

# Microsoft OAuth credentials (from Azure Portal) MICROSOFT_CLIENT_ID="your-application-client-id" MICROSOFT_CLIENT_SECRET="your-client-secret-value"

Microsoft OAuth is optional. If not configured, users can still register and login with email/password. The Microsoft sign-in button only appears when these variables are set.

Feature Flags

# Allow users to create open (public) auctions ALLOW_OPEN_AUCTIONS="true"

All Environment Variables

VariableRequiredDefaultDescription
DATABASE_URLYes-Database connection string
DATABASE_AUTH_TOKENTurso only-Turso authentication token
AUTH_SECRETYes-Session encryption secret
AUTH_URLYes-Application base URL
GOOGLE_CLIENT_IDNo-Google OAuth client ID
GOOGLE_CLIENT_SECRETNo-Google OAuth client secret
MICROSOFT_CLIENT_IDNo-Microsoft OAuth client ID
MICROSOFT_CLIENT_SECRETNo-Microsoft OAuth client secret
STORAGE_PROVIDERNolocalStorage provider (local or s3)
S3_BUCKETS3 only-S3 bucket name
S3_REGIONS3 only-S3 region
S3_ACCESS_KEY_IDS3 only-S3 access key
S3_SECRET_ACCESS_KEYS3 only-S3 secret key
S3_ENDPOINTNo-Custom S3 endpoint
S3_PUBLIC_URLNo-Custom public URL for files
EMAIL_PROVIDERNo-Email provider (brevo or smtp)
BREVO_API_KEYBrevo only-Brevo API key for emails
SMTP_HOSTSMTP only-SMTP server hostname
SMTP_PORTSMTP only587SMTP server port
SMTP_SECURESMTP onlyfalseUse implicit TLS (port 465)
SMTP_USERNo-SMTP username (optional)
SMTP_PASSWORDNo-SMTP password (optional)
MAIL_FROMNonoreply@auktiva.orgSender email address
MAIL_FROM_NAMENoAuktiva.orgSender display name
NEXT_PUBLIC_APP_URLNo-App URL for email links
CRON_SECRETNo-Secret for cron endpoint auth
ALLOW_OPEN_AUCTIONSNofalseEnable open auction creation

Example Configurations

Development (SQLite + Local Storage)

DATABASE_URL="file:./data/dev.db" AUTH_SECRET="dev-secret-change-in-production" AUTH_URL="http://localhost:3000" STORAGE_PROVIDER="local" ALLOW_OPEN_AUCTIONS="true"

Production (Turso + S3)

DATABASE_URL="libsql://myapp-myorg.turso.io" DATABASE_AUTH_TOKEN="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9..." AUTH_SECRET="generated-with-openssl-rand-base64-32" AUTH_URL="https://auctions.mydomain.com" STORAGE_PROVIDER="s3" S3_BUCKET="myapp-uploads" S3_REGION="us-east-1" S3_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" S3_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" ALLOW_OPEN_AUCTIONS="false"

Generating Secrets

Generate a secure AUTH_SECRET:

openssl rand -base64 32

Or using Node.js:

node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
Last updated on