Required Environment Variables
These environment variables must be set for the service to run:Optional Environment Variables
Service Configuration
Service Configuration
Security Configuration
Security Configuration
When both
SSL_CERT_PATH and SSL_KEY_PATH are provided and the files exist, the service automatically enables HTTPS.Database Configuration (Advanced)
Database Configuration (Advanced)
These variables provide granular control over database connections. If not set, they fall back to the main database configuration:
Database Table Names
Database Table Names
These variables allow you to customize the table/collection names used by the service:
Performance Tuning
Performance Tuning
These variables allow you to optimize performance based on your hardware and workload:
System Configuration
System Configuration
These variables control system-level settings:
Connection Formats
PostgreSQL Connection String
PostgreSQL Connection String
Use the standard PostgreSQL connection string format:Parameters:
host- Database server hostnameport- Database server port (default: 5432)dbname- Database nameuser- Database usernamepassword- Database password
Redis Connection String
Redis Connection String
Use a comma-separated format for Redis connections:Parameters:
host- Redis server hostnameport- Redis server port (default: 6379)db- Redis database number (default: 0)password- Redis password (optional)
Configuration Examples
Development Configuration
Development Configuration
Production Configuration
Production Configuration
Mixed Database Configuration
Mixed Database Configuration
Docker Configuration
When using Docker, you can pass environment variables using the-e flag:
Environment Variable Priority
Environment variables are loaded in the following order (later sources override earlier ones):- Default values - Set in the application code
.envfile - Local environment file in the working directory- System environment variables - Set via
exportor container environment - Command line arguments - Passed directly to the application
Validation and Error Handling
The CyborgDB service performs automatic validation of environment variables on startup:- Missing required variables - Service will exit with error messages
- Invalid database types - Only
postgresandredisare supported - Connection testing - Database connections are tested on startup
- SSL certificate validation - Certificate files are checked for existence
Troubleshooting
Missing API Key
Missing API Key
- Ensure
CYBORGDB_API_KEYis set - Check for typos in the variable name
- Verify the API key format starts with
cyborg_
Database Connection Issues
Database Connection Issues
- Verify database is running and accessible
- Check connection string format
- Test database connectivity manually
- Ensure firewall allows connections
SSL Certificate Errors
SSL Certificate Errors
- Verify certificate files exist at specified paths
- Check file permissions (service must be able to read certificates)
- Ensure certificate and key files match
- Use absolute paths for certificate locations