Skip to main content

Environment Variables

Cracker relies on several environment variables to configure connections to its backend services.

Core Variables

These variables are typically set in your .env file or your deployment platform's dashboard.

VariableDescriptionDefault (Local)
DATABASE_URLConnection string for the PostgreSQL database.postgresql://postgres:postgres@localhost:5432/postgres
MONGODB_URIConnection string for the MongoDB instance (used for logs).mongodb://mongo:mongo@localhost:27017
REDIS_URLConnection string for the Redis cache.redis://localhost:6379
NODE_ENVThe current Node.js environment.development

Optional / Feature Flags

VariableDescription
PORTThe port the Next.js server listens on (default: 3000).
NEXT_PUBLIC_ANALYTICS_ID(Example) Public ID for analytics services.

Configuration for Docker

When running with docker-compose, these variables are often injected automatically or defined in the docker-compose.yml file within the /server directory.