Global Configuration
These variables apply to all services:| Variable | Type | Default | Description |
|---|---|---|---|
SERVICE_NAME | string | service name | Service identifier for logging |
HOST | string | 0.0.0.0 | Bind address (0.0.0.0 = all interfaces) |
PORT | int | varies | Service port number |
LOG_LEVEL | string | info | Logging level: debug, info, warn, error |
ENV | string | development | Environment: development, staging, production |
SECRET | string | rpd_pks | Encryption secret key |
Example Global Config
Database Configuration
PostgreSQL
All services connect to PostgreSQL with similar configuration:Connection String Format
Manual connection string:Database Selection
| Service | Database | Purpose |
|---|---|---|
| web-api | web_db | Users, organizations, projects, credentials |
| assistant-api | assistant_db | Assistants, conversations, deployments |
| integration-api | integration_db | Provider credentials, configurations |
| endpoint-api | endpoint_db | Webhooks, endpoints, callbacks |
| document-api | assistant_db | Documents, embeddings, knowledge base |
Connection Pooling for Performance
Redis Configuration
Redis Database Usage
| DB | Purpose |
|---|---|
| 0 | General cache |
| 1 | Session cache |
| 2 | Rate limiting |
| 3+ | Reserved for extensions |
Redis Performance Tuning
OpenSearch Configuration
OpenSearch Indices
| Index Name | Purpose |
|---|---|
| assistant-conversations | Conversation transcripts |
| logs-* | Service and application logs |
| documents-* | Knowledge base documents |
OpenSearch Index Configuration
Service-Specific Configuration
Web API (.web.env)
Assistant API (.assistant.env)
Integration API (.integration.env)
Endpoint API (.endpoint.env)
Document API (config.yaml)
Logging Configuration
Log Levels
| Level | Use Case |
|---|---|
debug | Development - very verbose |
info | Production - standard info logs |
warn | Production - warnings only |
error | Production - errors only |
Changing Log Level
Storage Configuration
Local Storage
- Writable directory at path
- Sufficient disk space
- Proper permissions
S3 Storage (AWS)
Azure Blob Storage
Security Configuration
JWT Authentication
Credential Encryption
TLS/SSL
CORS Configuration
Performance Tuning
High-Traffic Configuration
Low-Resource Configuration
Multi-Environment Setup
Development
Staging
Production
Feature Flags
Some services support feature flags:Configuration Validation
Checking Configuration
Health Checks
Configuration Best Practices
- Never commit secrets - Use
.env.exampletemplates - Environment parity - Keep dev/staging/prod similar
- Document changes - Keep track of configuration changes
- Use strong secrets - Min 32 characters for encryption keys
- Monitor configuration - Log configuration changes
- Regular rotation - Rotate secrets periodically
- Principle of least privilege - Only grant needed permissions
- Infrastructure as Code - Store configs in version control (without secrets)
Updating Configuration
With Docker
Without Docker
Configuration Secrets Management
Using Environment Variables
Using Secret Management Tools
AWS Secrets Manager:Troubleshooting Configuration
Service Won’t Connect to Database
Cache Not Working
Search Not Working
Next Steps
- Getting Started - Build your first assistant
- Docker Setup - Using Docker
- Manual Setup - Without Docker