# NOFX Environment Variables Template # Copy this file to .env and modify the values as needed # =========================================== # Server Configuration # =========================================== # Backend API server port # Bind locally by default. Use an authenticated TLS reverse proxy for remote access. NOFX_BIND_ADDRESS=127.0.0.1 NOFX_BACKEND_PORT=8080 # Native Go server listening address. Compose overrides this inside its private # container network; NOFX_BIND_ADDRESS above controls published host ports. NOFX_API_BIND_ADDRESS=127.0.0.1 # Frontend web interface port NOFX_FRONTEND_PORT=3000 # Optional: exact reverse-proxy IPs/CIDRs, comma-separated. Empty = trust none. # Never trust all IPs or a network containing untrusted clients. Only these # peers may supply X-Forwarded-For / X-Real-IP for login rate limiting. NOFX_TRUSTED_PROXIES= # Timezone NOFX_TIMEZONE=Asia/Shanghai # Independent read-only verification of Claw402 Permit2 settlement receipts. # Prefer a dedicated Base mainnet RPC in production. Never auto-approves tokens. NOFX_X402_RECEIPT_RPC_URL=https://mainnet.base.org # =========================================== # Authentication (Required) # =========================================== # JWT signing secret (any random string, at least 32 characters) # Generate with: openssl rand -base64 32 JWT_SECRET=your-jwt-secret-change-this-in-production # =========================================== # Encryption Keys (Required) # =========================================== # AES-256 data encryption key (Base64 encoded, 32 bytes) # Used for encrypting sensitive data in database (API keys, secrets) # Generate with: openssl rand -base64 32 DATA_ENCRYPTION_KEY=your-base64-encoded-32-byte-key # RSA private key for client-server encryption (PEM format) # Used for end-to-end encryption of sensitive data from browser # Generate with: openssl genrsa 2048 # Note: Replace newlines with \n for single-line format RSA_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\nYOUR_KEY_HERE\n-----END RSA PRIVATE KEY----- # =========================================== # Security Options # =========================================== # Transport encryption for API keys (default: false) # When enabled, browser uses Web Crypto API to encrypt API keys before sending # Requires HTTPS or localhost to work # Set to true for enhanced security (HTTPS required) # This encrypts selected API-key fields only, NOT passwords or session tokens. # It does not replace HTTPS. Keep HTTP loopback-only or use an SSH tunnel. TRANSPORT_ENCRYPTION=false # =========================================== # Optional: External Services # =========================================== DB_TYPE=postgres DB_HOST=10. DB_PORT=5432 DB_USER=nofx_user DB_PASSWORD= DB_NAME=nofx DB_SSLMODE=disable # Database configuration - SQLite (default) DB_TYPE=sqlite DB_PATH=data/data.db