Basedash Charts Environment Configuration

Generated .env file with secure random values

Copied!
# =============================================================================
# Basedash Charts - Self-Hosted Configuration
# =============================================================================
# Copy this file to .env and fill in the values for your deployment

# =============================================================================
# DATABASE CONFIGURATION
# =============================================================================
# Discrete `postgres` connection variables
POSTGRES_DB=basedash_charts
POSTGRES_USER=basedash
# Generate with: openssl rand -base64 32
POSTGRES_PASSWORD=qQQr4K+FVOU3upqvDA6KzO+j/GS3fF2M6rlM01k5b3U=
POSTGRES_PORT=5432
# Main database connection string
DATABASE_URL=postgresql://${POSTGRES_USER:-basedash}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-basedash_charts}

# =============================================================================
# ENCRYPTION KEYS
# =============================================================================
# CRYPTO_KEY - Used for encrypting configuration overrides stored in database
# Must be exactly 32 bytes (64 hex characters)
# Generate with: openssl rand -hex 32
CRYPTO_KEY=0af12212f23f0cb133af6fa9a2cdd1ae243ee87c145799ce55a66eb6c44686d2

# PRISMA_FIELD_ENCRYPTION_KEY - Used for encrypting sensitive database fields
# Format: k1.aesgcm256.[base64-string]
# Generate with: npx @47ng/cloak generate
PRISMA_FIELD_ENCRYPTION_KEY=k1.aesgcm256.1ylxzAq6d4lzUUj6CbZSiozPm96qm3A+P2afqPNt2SI=

# =============================================================================
# ELECTRIC SQL CONFIGURATION (Real-time sync)
# =============================================================================
# Secret key for ElectricSQL authentication
# Generate with: uuidgen (or openssl rand -hex 16)
ELECTRIC_SECRET=fbbe691a-97be-4d5c-9f3a-cfc51dc6c68c

# =============================================================================
# PORT and URL CONFIGURATION
# =============================================================================
# Port for the main application
APP_PORT=3000
BASE_URL=http://localhost:3000

# =============================================================================
# LOGGING CONFIGURATION
# =============================================================================
# Log level controls verbosity of application logs
# Available levels (from most to least severe): fatal, error, warn, info, debug, trace
# Default: warn (minimal logging - only warnings and errors)
# Recommended for production: info
# For troubleshooting: debug or trace
LOG_LEVEL=warn

# =============================================================================
# TRANSACTIONAL EMAIL
# =============================================================================

# Email configuration for transactional emails (login codes, etc.)
EMAIL_PROVIDER=smtp
SMTP_HOST=
SMTP_PORT=1025
SMTP_USER=
SMTP_PASSWORD=
SMTP_SECURE=true
SMTP_FROM_EMAIL=noreply@example.com

Setup Instructions

  1. Click "Copy to Clipboard" above
  2. Save the content to a file named .env in your Basedash Charts installation directory
  3. Review and customize any values as needed (database name, ports, etc.)
  4. Run your application