Chunkr uses environment variables to configure services, database connections, authentication, and storage. All variables should be set in yourDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/lumina-ai-inc/chunkr/llms.txt
Use this file to discover all available pages before exploring further.
.env file.
Quick Setup
For local development with Docker Compose, the default values in
.env.example work out of the box.Authentication Configuration
Keycloak Settings
Keycloak handles authentication and authorization for Chunkr.- Description: Internal URL for backend services to communicate with Keycloak
- Default:
http://keycloak:8080 - Production: Use your Keycloak instance URL (e.g.,
https://auth.yourdomain.com)
Frontend Keycloak Configuration
These variables configure the web UI’s connection to Keycloak:| Variable | Description | Default |
|---|---|---|
| VITE_KEYCLOAK_URL | Public-facing Keycloak URL accessible from browser | http://localhost:8080 |
| VITE_KEYCLOAK_REALM | Keycloak realm name | chunkr |
| VITE_KEYCLOAK_CLIENT_ID | OAuth client ID | chunkr |
| VITE_KEYCLOAK_REDIRECT_URI | OAuth callback URL after login | http://localhost:5173 |
| VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URI | Redirect URL after logout | http://localhost:5173 |
Storage Configuration (AWS/MinIO)
Chunkr uses S3-compatible storage for document files. By default, it uses MinIO for local storage.AWS/MinIO Variables
AWS__ACCESS_KEY- Description: S3/MinIO access key ID
- Default:
minioadmin(MinIO default) - Production: Use IAM credentials for AWS S3 or custom MinIO credentials
- Description: S3/MinIO secret access key
- Default:
minioadmin(MinIO default) - Production: Use secure credentials, rotate regularly
- Description: AWS region for S3 bucket
- Default:
us-east-1 - Production: Set to your S3 bucket’s region
- Description: Internal S3/MinIO endpoint for backend services
- Default:
http://minio:9000(Docker service name) - Production: Remove for AWS S3, or set to your MinIO URL
- Description: Public-facing endpoint for generating presigned URLs
- Default:
http://localhost:9000 - Production: Set to your public MinIO/S3 URL (e.g.,
https://storage.yourdomain.com)
When using AWS S3 in production, you can omit
AWS__ENDPOINT to use the default S3 endpoints.Database Configuration
PostgreSQL
- Description: PostgreSQL connection string
- Format:
postgresql://[user]:[password]@[host]:[port]/[database] - Default:
postgresql://postgres:postgres@postgres:5432/chunkr - Production: Use strong passwords and consider connection pooling
- User:
postgres(default) - Password:
postgres(default) - Host:
postgres(Docker service name) - Port:
5432 - Database:
chunkr
Cache and Queue Configuration
Redis
- Description: Redis connection string for task queue and caching
- Format:
redis://[host]:[port] - Default:
redis://redis:6379 - Production: Consider Redis Cluster or managed Redis for high availability
Worker Configuration
These variables configure internal service communication:Worker Variables
WORKER__GENERAL_OCR_URL- Description: Internal URL for OCR service
- Default:
http://ocr:8000 - Notes: Uses nginx load balancer in front of OCR workers
- Description: Internal URL for document segmentation service
- Default:
http://segmentation:8000 - Notes: Uses nginx load balancer in front of segmentation workers
- Description: URL for task workers to communicate with main server
- Default:
http://localhost:8000 - Production: Set to your API server URL
LLM Configuration
- Description: Path to the models configuration file
- Default:
./models.yaml - Notes: Defines which LLM models to use for document processing
- Important: This file must exist before starting services
The
models.yaml file is mounted as a read-only volume in the Docker containers.Frontend API Configuration
- Description: API endpoint URL for the web frontend
- Default:
http://localhost:8000 - Production: Set to your API server’s public URL (e.g.,
https://api.yourdomain.com)
Production Configuration Example
Here’s a complete example for production deployment:HTTPS Configuration
When deploying with HTTPS:- Update all
http://localhostURLs to your domain withhttps:// - Configure reverse proxy (nginx, Traefik, etc.) for SSL termination
- Update Keycloak redirect URIs to use HTTPS
- Ensure presigned URL endpoints use HTTPS
Environment Variable Validation
Chunkr validates required environment variables on startup. Missing or invalid variables will prevent services from starting with clear error messages.Common Validation Errors
Missing PG__URL:Security Best Practices
- Never commit
.envto version control - Add to.gitignore - Use strong passwords - Especially for database and storage
- Rotate credentials regularly - Update access keys and secrets periodically
- Limit network exposure - Use internal Docker networks where possible
- Enable HTTPS in production - Never use HTTP for production deployments
- Use secret management - Consider HashiCorp Vault or AWS Secrets Manager for production
Debugging Configuration Issues
View current configuration
Test database connection
Test Redis connection
Verify storage access
Next Steps
- Complete your Docker Compose Deployment
- Configure GPU Setup for acceleration
- Learn about Scaling for production workloads