Skip to main content
DocsReferenceConfiguration & Environment
Back to docs

Configuration & Environment

Environment variables, feature flags, and deployment settings

reference
configuration

Configuration Reference

Complete reference for all environment variables, Docker services, and configuration options in the Creatiq platform.

Environment Variables

App

VariableDescriptionDefaultRequired
NODE_ENVRuntime environment (development, production)productionNo
PORTHTTP port the app listens on17000No
CORS_ORIGINComma-separated allowed origins for CORS--Yes (production)
INTERNAL_API_KEYShared secret for service-to-service calls--No
E2E_TEST_CODEWhen set, relaxes rate limits for E2E testing--No

URLs (NEXT_PUBLIC_*)

VariableDescriptionDefaultRequired
NEXT_PUBLIC_APP_URLPublic-facing URL (OAuth redirects, Stripe callbacks, email links)http://localhost:17000No
NEXT_PUBLIC_API_URLAPI base URL (same host in monolithic setup)--No
NEXT_PUBLIC_BASE_PATHBase path prefix when running behind a reverse proxy (e.g. /creatiq)"" (empty)No
NEXT_PUBLIC_ASSET_PREFIXAsset prefix for CDN or sub-path deployment"" (empty)No
NEXT_PUBLIC_DASHBOARD_URLURL of the EduAgentic dashboard--No

Database (PostgreSQL)

VariableDescriptionDefaultRequired
DATABASE_URLPostgreSQL connection string--Yes
POSTGRES_USERPostgreSQL user (used by Docker db service)--Yes (Docker)
POSTGRES_PASSWORDPostgreSQL password (used by Docker db service)--Yes (Docker)
POSTGRES_DBPostgreSQL database name (used by Docker db service)--Yes (Docker)

Redis

VariableDescriptionDefaultRequired
REDIS_HOSTRedis hostname--No
REDIS_PORTRedis port6379No
REDIS_PASSWORDRedis password (only if Redis requires authentication)--No
REDIS_URLAlternative to REDIS_HOST + REDIS_PORT (full Redis URL)--No

Auth / Keycloak

VariableDescriptionDefaultRequired
JWT_SECRETSecret key for signing JWT tokens. Generate with openssl rand -base64 32--Yes
KEYCLOAK_BASE_URLKeycloak server URL (internal, for backend calls)http://eduagentic-pass:8080Yes
KEYCLOAK_REALMKeycloak realm nameeduagenticNo
KEYCLOAK_CLIENT_IDKeycloak client ID for CreatiqcreatiqNo
KEYCLOAK_CLIENT_SECRETKeycloak client secret--Yes
KEYCLOAK_EXTERNAL_URLPublic-facing Keycloak URL (for browser redirects)--No

AI Providers

VariableDescriptionDefaultRequired
GEMINI_API_KEYGoogle Gemini API key (primary provider)--No
GEMINI_MODELGemini model namegemini-2.0-flashNo
AI_DEFAULT_PROVIDERDefault AI provider (gemini, anthropic, openai)geminiNo
AI_MAX_TOKENSMaximum tokens for AI generation4096No
ANTHROPIC_API_KEYAnthropic Claude API key (secondary provider)--No
OPENAI_API_KEYOpenAI API key (fallback provider)--No
PEXELS_API_KEYPexels API key for stock image search--No

Stripe (Payments)

VariableDescriptionDefaultRequired
STRIPE_SECRET_KEYStripe secret API key--No
STRIPE_WEBHOOK_SECRETStripe webhook endpoint signing secret--No
STRIPE_PRO_PRICE_IDStripe Price ID for the Pro plan--No
STRIPE_PREMIUM_PRICE_IDStripe Price ID for the Premium plan--No

H5P

H5P configuration is defined in code (server/config/h5p.ts) rather than environment variables. Key settings:

SettingValue
H5P base directory<project>/h5p/
Libraries directory<project>/h5p/libraries/
Content directory<project>/h5p/content/
Temp directory<project>/h5p/temp/
Core API version1.27
Max file size100 MB
Max total size500 MB
Content HubEnabled
Hub registration endpointhttps://api.h5p.org/v1/sites
Hub content types endpointhttps://api.h5p.org/v1/content-types/

LTI 1.3

VariableDescriptionDefaultRequired
LTI_ENCRYPTION_KEYEncryption key for LTI 1.3 data--Yes (if using LTI)
LTI_PLATFORM_URLLTI platform issuer URL--No
LTI_CLIENT_IDLTI client ID assigned by the platform--No
LTI_AUTH_ENDPOINTLTI authorization endpoint--No
LTI_TOKEN_ENDPOINTLTI token endpoint--No
LTI_AUTH_SERVERLTI authorization server URL--No
LTI_PLATFORM_NAMEHuman-readable name for the LTI platformLMS PlatformNo
LTI_KEY_IDKey ID for LTI JWT signing--No
LTI_PRIVATE_KEYPrivate key (PEM) for LTI JWT signing--No
LTI_PLATFORM_ISSUERPlatform issuer identifier--No
LTI_PLATFORM_AUTH_URLPlatform authentication URL--No
LTI_PLATFORM_TOKEN_URLPlatform token URL--No
LTI_PLATFORM_JWKS_URLPlatform JWKS URL--No

LTI is automatically disabled at startup when LTI_ENCRYPTION_KEY is missing. The LTI provider exposes these routes (relative to NEXT_PUBLIC_APP_URL):

RoutePurpose
/lti/loginOIDC login initiation
/lti/launchResource launch
/lti/jwksJSON Web Key Set
/lti/deep-linkDeep Linking response

xAPI / LRS

VariableDescriptionDefaultRequired
LRS_ENDPOINTLRS xAPI endpoint URL--No
LRS_AUTHLRS authorization header (e.g. Basic <token>)--No

When not set, xAPI statements are stored locally.

i18n

Internationalization is configured in code (server/config/i18n.ts). No environment variables are required.

SettingValue
Supported languagesen, fr, es, tr, ar
Fallback languageen
RTL languagesar
Language detection orderQuery string (lang) > Accept-Language header > Cookie (lang)
Debug loggingEnabled when NODE_ENV=development and DEBUG_I18N=true
VariableDescriptionDefaultRequired
DEBUG_I18NEnable i18n debug logging (development only)--No

Security / Helmet

VariableDescriptionDefaultRequired
ALLOWED_FRAME_ORIGINSComma-separated origins allowed to embed Creatiq in iframes (CSP frame-ancestors)'self', http://localhost:9100, http://localhost:3000No
NGINX_DOMAINDomain name for nginx; when set, enables upgrade-insecure-requests CSP directive--No

CSP policy highlights (from server/config/security.ts):

  • script-src: 'self' 'unsafe-eval' 'unsafe-inline' (required by H5P content rendering)
  • style-src: 'self' 'unsafe-inline'
  • img-src: 'self' data: blob: https:
  • object-src: 'none'

Tenant / Whitelabeling

VariableDescriptionDefaultRequired
BASE_DOMAINBase domain for tenant resolution in multi-tenant mode--No

Central Curriculum API

VariableDescriptionDefaultRequired
CENTRAL_CURRICULUM_API_URLURL of the EduAgentic Central Curriculum API--No

Docker Compose Services

Default Profile (Local / Development)

Started with docker compose up -d (production) or docker compose -f docker-compose.dev.yml up -d (development).

ServiceImageContainer NameInternal PortExternal PortPurpose
eduagentic-creatiq-appCustom (Dockerfile)eduagentic-creatiq-app17000${APP_PORT:-17000}Next.js application + Express API
eduagentic-creatiq-dbpostgres:16-alpineeduagentic-creatiq-db5432${DB_PORT:-17432}PostgreSQL database
eduagentic-creatiq-redisredis:7-alpineeduagentic-creatiq-redis6379${REDIS_EXTERNAL_PORT:-17379}Redis cache

Production Profile

Started with docker compose --profile production up -d. Includes all default services plus:

ServiceImageContainer NameExternal PortsPurpose
eduagentic-creatiq-nginxnginx:1.27-alpineeduagentic-creatiq-nginx80, 443Reverse proxy with SSL termination

Docker Port Override Variables

VariableDescriptionDefault
APP_PORTHost port mapped to the app container17000
DB_PORTHost port mapped to PostgreSQL17432
REDIS_EXTERNAL_PORTHost port mapped to Redis17379

Docker Volumes

VolumeMount PointPurpose
eduagentic-creatiq-db-data/var/lib/postgresql/dataPostgreSQL persistent data
eduagentic-creatiq-redis-data/dataRedis persistent data
eduagentic-creatiq-libraries/app/h5p/librariesH5P library files
eduagentic-creatiq-content/app/h5p/contentH5P content files
eduagentic-creatiq-temp/app/h5p/tempH5P temporary files

Docker Network

All services join the external network eduagentic-network. Create it before starting:

docker network create eduagentic-network

Resource Limits (Production)

ServiceMemoryCPUs
App2 GB2.0
PostgreSQL512 MB--
Redis256 MB--

Next.js Configuration

Defined in next.config.mjs:

SettingValue
outputstandalone
basePathNEXT_PUBLIC_BASE_PATH or ""
assetPrefixNEXT_PUBLIC_ASSET_PREFIX or ""
reactStrictModetrue
transpilePackages@creatiq/ui-sdk
Remote image domains**.h5p.org (HTTPS)

Environment Validation

At startup, server/lib/env.ts validates environment variables:

Required (app will not start without these):

  • DATABASE_URL
  • JWT_SECRET
  • KEYCLOAK_BASE_URL
  • KEYCLOAK_CLIENT_SECRET

Optional (warning logged if missing, related feature may be disabled):

  • KEYCLOAK_REALM
  • KEYCLOAK_CLIENT_ID
  • GEMINI_API_KEY
  • PEXELS_API_KEY
  • STRIPE_SECRET_KEY
  • STRIPE_WEBHOOK_SECRET
  • NEXT_PUBLIC_APP_URL
  • LTI_PLATFORM_URL
  • LTI_CLIENT_ID
Back to docsdocs/product/reference/configuration.md