ClouisleClouisle

Environment Variables Reference

Look up Clouisle deployment environment variables, defaults, precedence, and secret requirements

The following values follow the root-level deploy/.env.example and the backend Settings. Compose internal addresses use api, db, redis, and qdrant; source development usually uses localhost.

Configuration has three layers: environment variables control startup-level configuration (connections, secrets, queues, sandbox, etc.); the database SiteSetting manages runtime settings (SMTP, SSO, session timeout, upload limits, etc.); LLM provider keys and base URLs are stored in the database, not environment variables.

Application and Network

VariableDefault/ExampleDescription
PROJECT_NAMEClouisleSite/application name
SECRET_KEYExample placeholderJWT signing and some internal signatures; must change in production
TIMEZONEAsia/ShanghaiTimezone
ALGORITHMHS256JWT signing algorithm; HS256/HS384/HS512
ACCESS_TOKEN_EXPIRE_MINUTES11520 (8 days)JWT fallback token lifetime; active sessions default to the session_timeout_days site setting (30 days)
API_BASE_URLCompose http://api:8000Server-side API address
PUBLIC_API_URLEmptyUse when an absolute public URL is required
FRONTEND_URLhttp://localhost:3000Public frontend/SSO callback base URL
BACKEND_CORS_ORIGINS["http://localhost:3000"]Allowed frontend Origins; accepts a JSON array or a comma-separated list
NEXT_PUBLIC_API_URLCompose /api/v1Browser API base path
BACKEND_INTERNAL_URLhttp://localhost:8000Frontend server-side access to API; http://api:8000 inside Compose

Data Dependencies

VariableCompose DefaultDescription
POSTGRES_SERVERdbPostgreSQL host
POSTGRES_PORT5432PostgreSQL port
POSTGRES_USER / POSTGRES_PASSWORD / POSTGRES_DBpostgres / empty / clouisleDatabase credentials; config default password is password; Compose fails to start when POSTGRES_PASSWORD is unset (required)
DATABASE_URLAuto-builtTakes precedence over the individual fields when set
REDIS_HOST / REDIS_PORTredis / 6379Redis connection
REDIS_PASSWORDEmptyRecommended in production

The Celery broker and result backend are derived from REDIS_* (broker redis://…/0, backend redis://…/1); there are no separate REDIS_URL/CELERY_BROKER_URL/CELERY_RESULT_BACKEND variables. | QDRANT_URL | http://qdrant:6333 | Vector store address | | QDRANT_API_KEY | Empty | Recommended in production | | VECTOR_BACKEND | qdrant | Vector backend | | QDRANT_COLLECTION_PREFIX | kb_dim | Collection name prefix | | QDRANT_DISTANCE | Cosine | Distance function |

Internal Gateway and Sandbox

VariableDefaultDescription
INTERNAL_API_TOKENEmpty (required in Compose/K8s)Worker accesses the API file gateway; must be shared with the API
INTERNAL_API_TOKEN_FILEEmptyRead the internal Token from a file
API_INTERNAL_BASE_URLEmptyWorker gateway access for UPLOAD_STORAGE_MODE=remote; Compose sets http://api:8000
UPLOAD_STORAGE_MODElocallocal/remote; Compose/K8s Worker and Sandbox Worker use remote without mounting the uploads volume
SANDBOX_ARTIFACT_UPLOAD_BASE_URLCompose http://api:8000Sandbox artifact upload address
SANDBOX_ARTIFACT_UPLOAD_API_KEYEmptyCan replace the default internal signing
SANDBOX_RUNTIME_ENABLEDtrueEnable the sandbox
SANDBOX_LEGACY_FALLBACK_ENABLEDtrueFall back to the legacy code execution path when the sandbox runtime is unavailable
SANDBOX_FILESYSTEM_ISOLATION_ENABLEDCompose trueEnable filesystem isolation
SANDBOX_FILESYSTEM_ISOLATION_BINARYCompose /usr/bin/bwrapBubblewrap executable path
SANDBOX_WORKER_CONCURRENCY1Number of concurrent sandbox worker slots
SANDBOX_WORKSPACE_ROOT/tmp/clouisle-sandbox/jobsHost-side root for job and session directories
SANDBOX_MAX_DISK_MB8192Maximum sandbox disk
SANDBOX_SESSION_TTL_HOURS24Session retention
SANDBOX_SESSION_CLEANUP_BATCH_SIZE100Session cleanup batch size
SANDBOX_DEFAULT_PYTHON_BINARIES/usr/local/bin/python3, /usr/bin/python3, /bin/python3Candidate sandbox Python interpreter paths
SANDBOX_RESULT_TTL_SECONDS86400Result retention
SANDBOX_ARTIFACT_MAX_FILE_SIZE_MB10Per-artifact limit
SANDBOX_ARTIFACT_MAX_TOTAL_SIZE_MB10Total artifacts limit

With filesystem isolation enabled (SANDBOX_FILESYSTEM_ISOLATION_ENABLED=true), the supplied deployments run the sandbox worker as root with CAP_SYS_ADMIN, so user namespace creation is privileged — no host sysctl changes are required. Only custom deployments that keep the worker non-root depend on the host kernel permitting unprivileged user namespaces, otherwise every sandbox job fails with bwrap: No permissions to create new namespace: on Ubuntu 23.10+ run sysctl -w kernel.apparmor_restrict_unprivileged_userns=0; on Debian run sysctl -w kernel.unprivileged_userns_clone=1 (host/node-level settings; in Kubernetes they must be applied to every node). Full details: Code Sandbox → Host Kernel Requirements.

Retrieval and External Services

VariableDefaultDescription
RETRIEVAL_HYBRID_KILL_SWITCHfalseForce vector retrieval in emergencies
RETRIEVAL_SHADOW_ENABLEDfalseShadow-run hybrid retrieval
RAG_QUERY_CONTEXTUALIZATION_ENABLEDfalseQuery contextualization rewrite
RAG_QUERY_CONTEXTUALIZATION_TIMEOUT_SECONDS2.0Query rewrite timeout (seconds)
TAVILY_API_KEYEmptyWeb search built-in tool

Streaming Timeouts

VariableDefaultDescription
STREAM_GLOBAL_TIMEOUT3600Global streaming timeout (seconds)
STREAM_GLOBAL_TIMEOUT_WITH_TOOLS5400Global timeout with tools (seconds)
STREAM_HEARTBEAT_INTERVAL15Heartbeat interval (seconds)
STREAM_IDLE_TIMEOUT180Idle timeout (seconds)
STREAM_HTTP_CONNECT_TIMEOUT10Upstream connect timeout (seconds)
STREAM_HTTP_READ_TIMEOUT200Upstream read timeout (seconds)
STREAM_HTTP_REASONING_READ_TIMEOUT300Reasoning content read timeout (seconds)
STREAM_HTTP_WRITE_TIMEOUT10Upstream write timeout (seconds)
STREAM_TOOL_TIMEOUT_HTTP30HTTP tool timeout (seconds)
STREAM_TOOL_TIMEOUT_CODE60Code tool timeout (seconds)
STREAM_TOOL_TIMEOUT_MCP60MCP tool timeout (seconds)
STREAM_TOOL_TIMEOUT_DOWNLOAD60Download tool timeout (seconds)

Celery and Background Tasks

VariableDefaultDescription
CELERY_VISIBILITY_TIMEOUT_SECONDS3600Celery task visibility timeout (seconds)
KB_PROCESSING_RECOVERY_AFTER_SECONDS600Wait before recovering a stuck Knowledge Base processing task (seconds)

Frontend Build-time

VariableDefaultDescription
NEXT_PUBLIC_APP_VERSION0.0.0-devApp version shown in the frontend (build-time ARG)
NEXT_PUBLIC_BUILD_DATEunknownBuild time shown in the frontend
DEV_ALLOWED_ORIGINSEmptyDev-server LAN origins; ignored in production builds

GitHub Discussions Feedback

The feedback form at the bottom of each docs page aggregates feedback for the same page into GitHub Discussions on clouisle/clouisle-docs. The repository must have Discussions enabled and a category named Docs Feedback.

VariableDefaultDescription
GITHUB_APP_IDEmptyThe GitHub App's App ID. The App must be installed on clouisle/clouisle-docs with read/write access to Discussions.
GITHUB_APP_PRIVATE_KEYEmptyThe GitHub App's private key. A multi-line key can be provided directly, or line breaks written as \\n. Configure this server-side only; never use a NEXT_PUBLIC_ prefix.

The feedback action validates the page origin, path, and message length; submissions fail without GitHub credentials rather than being silently dropped.

Restart the corresponding service after modifying server-side environment variables. NEXT_PUBLIC_* variables are injected at frontend build time; rebuild the frontend after changing them.

How is this guide?

On this page