Overview
All configuration for Tesslate Studio is managed through environment variables, typically stored in a.env file in the project root. This page documents every available variable, organized by category, with clear labels for which are required and which are optional.
To get started, copy the example file:
.env with your preferred text editor.
After changing any environment variable, restart the affected service for the change to take effect:
Required Variables
These variables must be set for Tesslate Studio to start. Without them, the orchestrator will fail on boot.Application Secrets
Used for JWT token signing, session encryption, and Fernet encryption of stored credentials (GitHub tokens, deployment OAuth tokens). Must be a long, random string. Never reuse this across environments.
AI / LLM Configuration
The base URL of your LiteLLM proxy or compatible API endpoint. This is where the orchestrator sends all LLM requests.
Authentication key for the LiteLLM proxy. Used by the backend to authorize requests.
Using direct provider API keys instead of a LiteLLM proxy?
Using direct provider API keys instead of a LiteLLM proxy?
If you are running a LiteLLM proxy that routes to provider APIs, configure the provider keys on the proxy itself. Tesslate Studio communicates only with the LiteLLM endpoint; it does not send keys directly to OpenAI or Anthropic.If you run the built-in LiteLLM instance (included in some deployment configurations), you can set provider keys as environment variables on that service:
Database Configuration
PostgreSQL connection string using the
asyncpg driver. For Docker Compose, the default value connects to the bundled PostgreSQL container. For production, point this at a managed database (Amazon RDS, Supabase, etc.).Password for the PostgreSQL container (Docker Compose only). This value is used both to initialize the database and in the
DATABASE_URL.PostgreSQL username (Docker Compose only).
PostgreSQL database name (Docker Compose only).
- Docker Compose (local)
- External / Managed Database
- AWS RDS
Authentication & Security
The domain where Tesslate Studio is hosted, without protocol. Used for CORS configuration, cookie scoping, and generating project URLs.
Domain for setting authentication cookies. Leave empty for localhost. For production, prefix with a dot to cover subdomains (e.g.,
.studio.yourcompany.com).Set to
true when using HTTPS in production. This ensures cookies are only sent over secure connections.Comma-separated list of allowed origins for CORS. The orchestrator also dynamically allows
APP_DOMAIN and its subdomains.CSRF Protection
Tesslate Studio uses a double-submit cookie pattern for CSRF protection. This is handled automatically; no configuration is needed. The CSRF token is set in a JavaScript-readable cookie, and the frontend sends it back in theX-CSRF-Token header.
Encryption
Optional Fernet key for encrypting deployment provider credentials (Vercel, Netlify, Cloudflare OAuth tokens). If not set, derived from
SECRET_KEY.OAuth Providers (Social Login)
Configure OAuth for GitHub and Google login. Without these, only email/password authentication is available.- GitHub
- Google
GitHub OAuth application client ID.
GitHub OAuth application client secret.
Callback URL registered in your GitHub OAuth app settings.
Create a GitHub OAuth app at github.com/settings/developers. Set the Authorization callback URL to match
GITHUB_OAUTH_REDIRECT_URI.AI / LLM Settings
Comma-separated list of model identifiers to offer users in the model selector. These must match models configured on your LiteLLM proxy.
| Provider | Example Models |
|---|---|
| OpenAI | gpt-4, gpt-3.5-turbo, gpt-4o-mini |
| Anthropic | claude-3-5-sonnet-20241022, claude-3-opus-20240229 |
| Custom / Self-hosted | qwen-3-235b-a22b-thinking-2507 |
Deployment Mode
Controls which container orchestration backend the orchestrator uses. Options:
docker or kubernetes.The orchestrator automatically adapts its behavior based on this value. No code changes are needed to switch between modes. See the Deployment Guide for details.
Container Runtime (Docker Mode)
These settings apply whenDEPLOYMENT_MODE=docker.
Base URL used for routing to user project containers in Docker mode.
Host port for Traefik (HTTP).
Host port for the backend API.
Host port for the Vite dev server.
Container Runtime (Kubernetes Mode)
These settings apply whenDEPLOYMENT_MODE=kubernetes.
Core Kubernetes Settings
Docker image used for user project containers. For Minikube, use a local image name. For AWS EKS, use a full ECR URL.
Name of the Kubernetes image pull secret for private registries. Leave empty for local images (Minikube with
imagePullPolicy: Never).Kubernetes StorageClass for user project PVCs.
Size of the PersistentVolumeClaim created for each user project.
- Minikube (local testing)
- AWS EKS (production)
Snapshot / Hibernation Settings
These control the EBS VolumeSnapshot-based persistence system used in Kubernetes mode for hibernating and restoring user projects.VolumeSnapshotClass name for creating EBS snapshots.
Number of days to retain soft-deleted snapshots before permanent deletion.
Maximum number of snapshots kept per project (for the Timeline UI).
Maximum time (in seconds) to wait for a VolumeSnapshot to become ready.
Minutes of inactivity before a project is automatically hibernated (snapshot taken, namespace deleted).
Networking and Ingress
Ingress class for user project Ingress resources.
Name of the Kubernetes TLS secret containing the wildcard certificate. Leave empty for HTTP-only (Minikube).
When enabled, all containers in a multi-container project are scheduled on the same node. Required for sharing ReadWriteOnce PVCs.
When enabled, creates NetworkPolicy resources that enforce zero cross-project communication.
S3 / Object Storage
Used in Kubernetes mode for legacy project storage. The current primary persistence mechanism uses EBS VolumeSnapshots, but S3 configuration is still relevant for asset storage.S3 bucket name for project storage.
S3 endpoint URL. Leave empty for native AWS S3. Set to a MinIO URL for local development or a DigitalOcean Spaces URL for DO deployments.
AWS region for S3 signature calculation.
S3 access key. Not needed on AWS EKS when using IRSA (IAM Roles for Service Accounts).
S3 secret key. Not needed on AWS EKS when using IRSA.
- AWS S3 (with IRSA)
- MinIO (Minikube local)
- DigitalOcean Spaces
Billing (Stripe)
Optional. Configure Stripe for subscription billing, credit purchases, and marketplace creator payouts.Stripe API secret key (starts with
sk_test_ or sk_live_).Stripe publishable key for the frontend (starts with
pk_test_ or pk_live_).Webhook signing secret for validating Stripe event payloads (starts with
whsec_).Email / SMTP
Optional. Configure SMTP for email-based two-factor authentication and password reset flows.SMTP server hostname.
SMTP server port.
SMTP authentication username.
SMTP authentication password.
The “From” address for outgoing emails.
Enable email-based two-factor authentication for user logins.
Analytics
PostHog project API key for frontend analytics.
PostHog instance URL.
Logging
Application logging level. Options:
DEBUG, INFO, WARNING, ERROR, CRITICAL.%(asctime)s - %(name)s - %(levelname)s - %(message)s
Key loggers include app.main, app.services.orchestration.kubernetes_orchestrator, app.agent.stream_agent, and app.routers.*.
Configuration Profiles
Here are complete example configurations for common scenarios:Environment Comparison Table
| Setting | Docker (Local) | Kubernetes (Minikube) | Kubernetes (AWS EKS) |
|---|---|---|---|
DEPLOYMENT_MODE | docker | kubernetes | kubernetes |
K8S_DEVSERVER_IMAGE | N/A | tesslate-devserver:latest | <ECR_URL>/tesslate-devserver:latest |
K8S_IMAGE_PULL_SECRET | N/A | (empty) | ecr-credentials |
K8S_STORAGE_CLASS | N/A | standard | tesslate-block-storage |
K8S_WILDCARD_TLS_SECRET | N/A | (empty, HTTP only) | tesslate-wildcard-tls |
APP_DOMAIN | localhost | localhost | studio.yourcompany.com |
COOKIE_DOMAIN | (empty) | (empty) | .studio.yourcompany.com |
COOKIE_SECURE | false | false | true |
Troubleshooting
Invalid or missing SECRET_KEY
Invalid or missing SECRET_KEY
Symptom: The orchestrator crashes on startup with a key-related error.Fix: Generate a new key and update Then restart:
.env:docker compose restart orchestratorDatabase connection failed
Database connection failed
Symptom: Errors about PostgreSQL not being accessible.Fix:Verify that
DATABASE_URL in .env matches the actual database credentials.AI models not appearing or returning errors
AI models not appearing or returning errors
Symptom: The model selector is empty, or chat returns “API key not found.”Fix:
- Verify
LITELLM_API_BASEpoints to a running LiteLLM instance. - Verify
LITELLM_MASTER_KEYis correct. - Check that
LITELLM_DEFAULT_MODELSlists valid model names. - Restart the orchestrator:
docker compose restart orchestrator
OAuth redirect errors
OAuth redirect errors
Symptom: After clicking “Login with GitHub/Google,” you see a redirect error.Fix: Ensure the callback URL registered with the OAuth provider matches
GITHUB_OAUTH_REDIRECT_URI or GOOGLE_OAUTH_REDIRECT_URI exactly, including the protocol (http vs https) and path.Next Steps
Deployment Guide
Deploy to production with Docker Compose, Kubernetes, or AWS EKS
Architecture Overview
Understand how the components fit together
Quickstart
Get up and running locally in minutes
API Documentation
Explore the REST API reference