Required Environment Variables
In production, missing these disables some features or causes abnormal behavior.Public URL
| Variable | Required | Use | Example |
|---|---|---|---|
CLOOSPHERE_PUBLIC_URL | ✅ | External access base URL. Used for SR (Service Request), embed widget callbacks, manifest validDomains auto-computation, etc. | https://cloosphere.yourdomain.com |
Database / Redis
| Variable | Required | Use |
|---|---|---|
DATABASE_URL | ✅ | PostgreSQL connection string |
DATABASE_SCHEMA | ⚠️ | Schema separation in multi-tenant (default public) |
REDIS_URL | ⚠️ | Required for multi-worker, optional for single worker |
REDIS_SENTINEL_HOSTS | — | When using Redis Sentinel |
REDIS_SENTINEL_PORT | — | (default 26379) |
Knowledge Graph (AGE)
| Variable | Default | Recommended |
|---|---|---|
AGE_POOL_MIN | 2 | Small 2 / Medium 4 / Large 8 |
AGE_POOL_MAX | 32 | Small 16 / Medium 32 / Large 64+ |
| Scale | Recommended |
|---|---|
| < 10M nodes | AGE_POOL_MIN=2 AGE_POOL_MAX=16 |
| 10M ~ 100M nodes | AGE_POOL_MIN=4 AGE_POOL_MAX=32 (default) |
| > 100M nodes | AGE_POOL_MIN=8 AGE_POOL_MAX=64 |
SSO / OIDC Integration (optional)
To activate OAuth/OIDC SSO, set the following environment variables (Keycloak, Entra ID, Google all use the same interface).| Variable | Use |
|---|---|
OPENID_PROVIDER_URL | OIDC Discovery URL (.well-known/openid-configuration) |
OAUTH_CLIENT_ID | Client ID registered with the IdP |
OAUTH_CLIENT_SECRET | Client secret |
OAUTH_SCOPES | Requested scopes (openid email profile is default) |
OAUTH_PROVIDER_NAME | Provider name shown on the UI sign-in screen |
Keycloak organization sync (since
add35ab42): operates via client_credentials grant flow. When the above env vars are all set, the Keycloak sync option activates in Organization Management.Teams Bot (optional)
To operate a Microsoft Teams bot:Multi-Worker Operations Checklist
| Item | Recommendation | Impact When Missed |
|---|---|---|
REDIS_URL set | Required | PersistentConfig sync failure, session loss |
| Identical env vars across workers | Required | Inconsistent settings → different behavior per user |
| Alembic migrations | Run once only | Concurrent multi-worker conflicts (lock-fixed in latest version) |
| Shared file storage | Required | Workers access different local files → uploaded files missing on another worker |
| Redis Sentinel/Cluster | Recommended | Single Redis failure causes full service downtime |
| Same timezone (TZ) | Required | Schedule/audit log time inconsistency |
Health Endpoints (Monitoring Integration)
Cloosphere provides health endpoints integrable with external monitoring (Prometheus, Datadog, Azure Monitor, etc.).| Endpoint | Use | Auth |
|---|---|---|
GET /health | Basic liveness check | None |
GET /health/db | DB connection state (503 + error detail if down) | None |
GET /health/redis | Redis ping (503 if unavailable) | None |
GET /health/full | DB + Redis + TaskQueue overall state | Admin |
Operations Checklist (Summary)
Pre-deploy verification:Audit log activation
Verify the license includes the
audit_log feature → Audit LogRelated Pages
General Settings
GUI-managed authentication and feature toggles
Teams Bot
Microsoft Teams integration
Notification Settings
Email and webhook notification channels
Troubleshooting
Common issues and solutions in operations
