| Environment Variable | Description | Default Value | Required | Example |
|---|---|---|---|---|
| Core Configuration | ||||
| PUBLIC_ORIGIN | Public origin for generating complete URLs, must be set to your app’s access address | - | Yes | https://app.teable.ai |
| SECRET_KEY | Instance root secret. Login JWTs and sessions use it by default, and the encryption keys for personal access tokens, unsubscribe links, local-storage attachment links, database tenant connection strings, app environment variables, AI configuration and third-party credentials are derived from it. Don’t change it in place once set; see Secrets and rotation | - | Yes | openssl rand -base64 32 |
| BACKEND_JWT_SECRET | Signs auth, share, and plugin JWTs, App Builder app tokens among them, and encrypts the app tokens Teable stores. Falls back to SECRET_KEY; usually no need to set it | SECRET_KEY | - | - |
| BACKEND_SESSION_SECRET | Signs login session cookies. Falls back to SECRET_KEY. Setting it is not recommended; a later version may stop reading it | SECRET_KEY | - | - |
| BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET | Optional root for the credentials encrypted in the database: app environment variables, AI configuration, third-party credentials and database tenant connection strings. Falls back to SECRET_KEY; usually no need to set it. Supersedes the deprecated BACKEND_ENV_VARIABLE_SECRET, BACKEND_AI_CONFIG_ENCRYPTION_SECRET, BACKEND_THIRD_PARTY_CREDENTIAL_ENCRYPTION_SECRET and BACKEND_DATA_DB_URL_ENCRYPTION_SECRET; see A separate root for stored credentials | SECRET_KEY | - | - |
| BACKEND_STORAGE_ENCRYPTION_KEY | Encrypts local-storage attachment links; used only when BACKEND_STORAGE_PROVIDER is local. Derived from SECRET_KEY when unset; setting it is not recommended | Derived from SECRET_KEY | - | - |
| BACKEND_STORAGE_ENCRYPTION_IV | Encryption IV paired with BACKEND_STORAGE_ENCRYPTION_KEY. Set both or neither; setting only one stops the app from starting | Derived from SECRET_KEY | - | - |
| BACKEND_ACCESS_TOKEN_ENCRYPTION_KEY | Encrypts personal access tokens. Derived from SECRET_KEY when unset; setting it is not recommended | Derived from SECRET_KEY | - | - |
| BACKEND_ACCESS_TOKEN_ENCRYPTION_IV | Encryption IV paired with BACKEND_ACCESS_TOKEN_ENCRYPTION_KEY. Set both or neither; setting only one stops the app from starting | Derived from SECRET_KEY | - | - |
| PORT | Port on which the application runs | 3000 | - | 3000 |
| LOG_LEVEL | Log level, options: fatal, error, warn, info, debug, trace | info | - | debug |
| Storage Configuration | ||||
| BACKEND_STORAGE_PROVIDER | Storage provider, options: local, minio, s3, aliyun | local | - | s3 |
| BACKEND_STORAGE_LOCAL_PATH | Local storage path | .assets/uploads | - | .assets/uploads |
| BACKEND_STORAGE_PUBLIC_BUCKET | Public bucket name | public | - | teable-public |
| BACKEND_STORAGE_PRIVATE_BUCKET | Private bucket name for attachments, app files, archived data, and other protected content | private | - | teable-private |
| BACKEND_STORAGE_PUBLIC_URL | Public URL override for public bucket (optional) | - | - | https://cdn.example.com |
| BACKEND_STORAGE_PRIVATE_BUCKET_ENDPOINT | Private bucket endpoint override (optional) | - | - | https://private-bucket.endpoint |
| BACKEND_STORAGE_S3_REGION | S3 storage region, required when BACKEND_STORAGE_PROVIDER is s3 | - | - | us-east-2 |
| BACKEND_STORAGE_S3_ENDPOINT | S3 storage endpoint, required when BACKEND_STORAGE_PROVIDER is s3 | - | - | https://s3.us-east-2.amazonaws.com |
| BACKEND_STORAGE_S3_INTERNAL_ENDPOINT | S3 internal endpoint (optional) | - | - | http://s3.internal |
| BACKEND_STORAGE_S3_FORCE_PATH_STYLE | Use path-style URLs (endpoint/bucket/key) for browser-facing S3 requests. Enable this when the public endpoint cannot serve bucket subdomains. Cannot be combined with BACKEND_STORAGE_PRIVATE_BUCKET_ENDPOINT | false | - | true |
| BACKEND_STORAGE_S3_INTERNAL_FORCE_PATH_STYLE | Override path-style addressing for internal S3 requests. When unset, it inherits the public setting if both clients share an endpoint; a separate internal endpoint keeps virtual-hosted addressing | - | - | true |
| BACKEND_STORAGE_S3_ACCESS_KEY | S3 storage access key, required when BACKEND_STORAGE_PROVIDER is s3 | - | - | your_access_key |
| BACKEND_STORAGE_S3_SECRET_KEY | S3 storage secret key, required when BACKEND_STORAGE_PROVIDER is s3 | - | - | your_secret_key |
| BACKEND_STORAGE_S3_MAX_SOCKETS | S3 max sockets (optional) | 100 | - | 100 |
| BACKEND_STORAGE_MINIO_ENDPOINT | MinIO storage endpoint | - | - | minio.example.com |
| BACKEND_STORAGE_MINIO_PORT | MinIO port | 9000 | - | 443 |
| BACKEND_STORAGE_MINIO_USE_SSL | Whether MinIO uses SSL | false | - | true |
| BACKEND_STORAGE_MINIO_ACCESS_KEY | MinIO access key | - | - | access-key |
| BACKEND_STORAGE_MINIO_SECRET_KEY | MinIO secret key | - | - | secret-key |
| BACKEND_STORAGE_MINIO_INTERNAL_ENDPOINT | MinIO internal endpoint (optional, no HTTPS) | - | - | minio.internal |
| BACKEND_STORAGE_MINIO_INTERNAL_PORT | MinIO internal port (optional) | 9000 | - | 9000 |
| BACKEND_STORAGE_MINIO_REGION | MinIO region (optional) | - | - | us-east-1 |
| BACKEND_STORAGE_UPLOAD_METHOD | Upload method | put | - | put |
| STORAGE_PREFIX | Storage prefix, defaults to PUBLIC_ORIGIN | PUBLIC_ORIGIN | - | http://localhost:3000 |
| Cache Configuration | ||||
| BACKEND_CACHE_REDIS_URI | Redis connection URI. Required: the cache, job queues and realtime collaboration all run on Redis | - | Yes | redis://default:teable@127.0.0.1:6379/0 |
| Performance Cache Configuration | ||||
| BACKEND_PERFORMANCE_CACHE | Performance cache Redis URL for query result caching, improves multi-user collaboration efficiency. Recommended to use separate Redis instance from BACKEND_CACHE_REDIS_URI | - | - | redis://default:teable@127.0.0.1:6379/0 |
| Authentication Configuration | ||||
| SOCIAL_AUTH_PROVIDERS | List of social auth providers, comma-separated | - | - | github,google,oidc |
| BACKEND_GITHUB_CLIENT_ID | GitHub OAuth client ID | - | - | github_client_id |
| BACKEND_GITHUB_CLIENT_SECRET | GitHub OAuth client secret | - | - | github_client_secret |
| BACKEND_GOOGLE_CLIENT_ID | Google OAuth client ID | - | - | google_client_id |
| BACKEND_GOOGLE_CLIENT_SECRET | Google OAuth client secret | - | - | google_client_secret |
| BACKEND_OIDC_CLIENT_ID | OIDC client ID | - | - | google_client_id |
| BACKEND_OIDC_CLIENT_SECRET | OIDC client secret | - | - | google_client_secret |
| BACKEND_OIDC_CALLBACK_URL | OIDC callback URL | - | - | https://app.teable.ai/api/auth/oidc/callback |
| BACKEND_SIGNIN_VERIFICATION_EXPIRES_IN | Sign-in verification code lifetime. Falls back to BACKEND_EMAIL_CODE_EXPIRES_IN when unset | 10m | - | 10m |
| BACKEND_SIGNIN_VERIFICATION_MAX_ATTEMPTS | Wrong guesses allowed per sign-in code; beyond that the code is discarded and a new one must be requested | 5 | - | 5 |
| Security & Verification | ||||
| TURNSTILE_SITE_KEY | Cloudflare Turnstile site key for authentication verification | - | - | 1x00000000000000000000AA |
| TURNSTILE_SECRET_KEY | Cloudflare Turnstile secret key for authentication verification | - | - | 1x0000000000000000000000000000000AA |
| TEABLE_SSRF_PROTECTION_DISABLED | Disable protection that blocks outbound requests to loopback, private, link-local, and other reserved network addresses. Set to true only in trusted self-hosted deployments that must access internal endpoints | false | - | true |
| BACKEND_SIGNUP_VERIFICATION_CODE_RATE_LIMIT_SECONDS | Rate limit interval (seconds) for sending signup verification emails | - | - | 30 |
| BACKEND_TRUST_PROXY | Reverse proxy trust setting used to resolve the client IP behind a proxy. Affects audit logs and related security records. Accepts true, false, a hop count, or an IP/CIDR/preset list. Empty trusts private-network proxies | loopback, linklocal, uniquelocal | - | loopback, linklocal, uniquelocal |
| Email Configuration (Deprecated - Use System Admin > Instance settings > Email) | ||||
| BACKEND_MAIL_HOST | Default mail server address. We recommend configuring Notify email and Automation email visually in System Admin > Instance settings > Email | smtp.teable.ai | - | smtp.gmail.com |
| BACKEND_MAIL_PORT | Default mail server port | 465 | - | 465 |
| BACKEND_MAIL_SECURE | Whether the default mail service uses SSL/TLS | true | - | true |
| BACKEND_MAIL_SENDER | Default sender address | noreply.teable.ai | - | noreply@company.com |
| BACKEND_MAIL_SENDER_NAME | Default sender name | Teable | - | Teable |
| BACKEND_MAIL_AUTH_USER | Default mail server authentication username | - | - | username |
| BACKEND_MAIL_AUTH_PASS | Default mail server authentication password | - | - | usertoken |
| BACKEND_MAIL_INVITE_USER_NAME_MAX_LENGTH | Maximum inviter name length in invitation email subjects. Empty or 0 disables truncation | - | - | 32 |
| BACKEND_MAIL_INVITE_SPACE_NAME_MAX_LENGTH | Maximum space or Project name length in invitation email subjects. Empty or 0 disables truncation | - | - | 32 |
| Session/JWT Configuration | ||||
| BACKEND_SESSION_EXPIRES_IN | Session expiration time | 7d | - | 7d |
| BACKEND_SESSION_COOKIE_SECURE | Whether to secure session cookie | false | - | true |
| BACKEND_SESSION_ORIGIN_CHECK_ENABLED | Enable Origin and Fetch Metadata checks for unsafe browser session-cookie API requests. Enable only when your reverse proxy or CDN preserves these headers | false | - | false |
| BACKEND_JWT_EXPIRES_IN | JWT expiration time | 20d | - | 20d |
| BACKEND_RESET_PASSWORD_EMAIL_EXPIRES_IN | Reset password email expiration time | 30m | - | 30m |
| Resource Limits | ||||
| MAX_COPY_CELLS | Maximum number of cells to copy in a single request | - | - | 50000 |
| MAX_READ_ROWS | Maximum number of rows to read in a single request | - | - | 10000 |
| MAX_ATTACHMENT_UPLOAD_SIZE | Maximum attachment upload size (bytes) | - | - | 2147483648 |
| TASK_MAX_FIELDS_PER_BATCH | Maximum number of AI fields sent to the model in one batch request. Values are clamped from 1 to 20 | 5 | - | 5 |
| TASK_MAX_CONCURRENCY | Maximum pending AI field task runs dispatched in one scheduling cycle. Values are clamped from 1 to 20 | 5 | - | 5 |
| TABLE_LIMIT_FIELD_OPTIONS_MAX_BYTES | Maximum serialized field option bytes | 262144 | - | 262144 |
| TABLE_LIMIT_SELECT_CHOICES_MAX | Maximum select choices per select field | 1000 | - | 1000 |
| TABLE_LIMIT_SELECT_CHOICE_NAME_MAX_LENGTH | Maximum select choice name length | 1000 | - | 1000 |
| TABLE_LIMIT_SELECT_DEFAULT_VALUES_MAX | Maximum select default values | 100 | - | 100 |
| TABLE_LIMIT_CELL_VALUE_MAX_BYTES | Maximum cell value bytes | 262144 | - | 262144 |
| TABLE_LIMIT_RECORD_FIELDS_MAX_BYTES | Maximum serialized record fields bytes | 1048576 | - | 1048576 |
| TABLE_LIMIT_RECORDS_PER_MUTATION_MAX | Maximum records per mutation | 20000 | - | 20000 |
| TABLE_LIMIT_COMPUTED_CELL_VALUE_MAX_BYTES | Maximum computed cell value bytes | 262144 | - | 262144 |
| TABLE_LIMIT_FORMULA_MAX_LENGTH | Maximum formula length | 8192 | - | 8192 |
| TABLE_LIMIT_TABLES_PER_BASE_MAX | Maximum tables per project | 1000 | - | 1000 |
| TABLE_LIMIT_FIELDS_PER_TABLE_MAX | Maximum fields per table | 500 | - | 500 |
| TABLE_LIMIT_VIEWS_PER_TABLE_MAX | Maximum views per table | 100 | - | 100 |
| TABLE_LIMIT_CREATE_TABLE_FIELDS_MAX | Maximum fields accepted when creating a table | 1000 | - | 1000 |
| TABLE_LIMIT_CREATE_TABLE_VIEWS_MAX | Maximum views accepted when creating a table | 20 | - | 20 |
| TABLE_LIMIT_CREATE_TABLE_RECORDS_MAX | Maximum records accepted when creating a table | 20000 | - | 20000 |
| TABLE_LIMIT_RECORDS_PER_TABLE_MAX | Maximum rows per table. Empty means no instance-level row limit | - | - | 1000000 |
| TABLE_LIMIT_VIEW_FILTER_ITEMS_MAX | Maximum filter items in a view | 100 | - | 100 |
| TABLE_LIMIT_VIEW_FILTER_DEPTH_MAX | Maximum nested filter depth in a view | 5 | - | 5 |
| TABLE_LIMIT_VIEW_SORT_ITEMS_MAX | Maximum sort items in a view | 20 | - | 20 |
| TABLE_LIMIT_VIEW_GROUP_ITEMS_MAX | Maximum group items in a view | 3 | - | 3 |
| TABLE_LIMIT_VIEW_OPTIONS_MAX_BYTES | Maximum serialized view option bytes | 262144 | - | 262144 |
| TABLE_LIMIT_NAME_MAX_LENGTH | Maximum display name length for supported table objects | 100 | - | 100 |
| TABLE_LIMIT_DESCRIPTION_MAX_LENGTH | Maximum description length for supported table objects | 2000 | - | 2000 |
| AUTOMATION_MIN_SCHEDULED_MINUTES_INTERVAL | Shortest interval (minutes) a scheduled trigger may use with the Minutes frequency. Set above 60 to disable minute-level schedules | 10 | - | 15 |
| AUTOMATION_MIN_EMAIL_POLL_INTERVAL_MINUTES | Shortest mailbox poll interval (minutes) an email trigger may use | 10 | - | 15 |
| AI & App Builder (runtime plane connection) | ||||
| SANDBOX_PROVIDER | Sandbox provider for AI sessions; opensandbox connects to a self-hosted runtime plane | - | - | opensandbox |
| TEABLE_INFRA_API_URL | Runtime plane entry URL — must be the public entry (it routes /v1 to the sandbox engine), not an internal service address | - | - | https://infra.teable.example.com |
| TEABLE_INFRA_API_KEY | API key shared with the runtime plane | - | - | your-infra-api-key |
| TEABLE_INFRA_BUCKET | Bucket for the AI workspace data plane | teable-agent | - | teable-agent |
| SANDBOX_OPENSANDBOX_IMAGE | Sandbox agent image prefix without a tag — Teable appends its own release tag so the agent always matches the app version. China deployments use the Aliyun mirror prefix | - | - | ghcr.io/teableio/teable-sandbox-agent |
| SANDBOX_OPENSANDBOX_RUNTIME | Sandbox engine runtime type: kubernetes or docker. Must be docker on Docker deployments | kubernetes | - | docker |
| SANDBOX_OPENSANDBOX_USE_SERVER_PROXY | Route sandbox endpoints through the engine’s path-based proxy instead of per-port subdomains (used by Docker local mode) | false | - | true |
| APP_DEPLOY_PROVIDER | App Builder deployment backend; full-featured self-host uses docker-runtime | vercel | - | docker-runtime |
| SANDBOX_JWT_SECRET | Secret signing sandbox sessions. Generate a random value per host, and use the same value in the sandbox service | - | Yes | random string |
| SANDBOX_CPU | vCPUs per sandbox (System Admin settings take precedence) | 2 | - | 2 |
| SANDBOX_MEMORY | Memory (GiB) per sandbox (System Admin settings take precedence) | 4 | - | 4 |
| SANDBOX_DISK | Ephemeral disk (GiB) per sandbox (System Admin settings take precedence) | 15 | - | 15 |
| Feature Toggles | ||||
| RECORD_HISTORY_DISABLED | Whether to disable record history, defaults to false | false | - | true |
| BACKEND_STORAGE_COLD_ARCHIVE_DISABLED | Whether to stop scheduled archiving of historical data. Already-archived data stays readable | false | - | true |
| PASSWORD_LOGIN_DISABLED | Whether to disable password login (OAuth and OIDC still available) | false | - | true |
| V2_TABLE_QUERY_OPS_ENABLED | Collect query observations for diagnosing slow queries under Table operations → Search & indexes in System Admin; restart after changing this value | false | - | true |
| Analytics & Monitoring | ||||
| OTEL_EXPORTER_OTLP_ENDPOINT | OpenTelemetry OTLP endpoint | - | - | http://jaeger:4317 |
| TELEMETRY_REPORT_DISABLED | Disable self-hosted telemetry reporting, including license compliance reports from connected instances | false | - | true |
| Database Configuration | ||||
| PRISMA_DATABASE_URL | Database connection URL, must be configured | - | Yes | postgresql://teable:teable@127.0.0.1:5432/teable |
| PRISMA_TRANSACTION_TIMEOUT | Maximum time (ms) a transaction can run before timing out. Increase for long-running transactions (e.g., bulk updates with many foreign keys) | 5000 | - | 60000 |
| PRISMA_TRANSACTION_MAX_WAIT | Maximum time (ms) to wait to acquire a transaction from the pool | 2000 | - | 5000 |
| BIG_TRANSACTION_TIMEOUT | Timeout (ms) for large internal transactions, such as exporting large projects | 600000 | - | 1200000 |
Secrets and rotation
The app needs two secrets of its own:SECRET_KEY, and SANDBOX_JWT_SECRET when it runs the sandbox. Every other secret (JWTs, sessions, the various encryption keys) uses SECRET_KEY directly, or a key derived from it, when it has no variable of its own. You don’t need to set them, and it is not recommended: a later version may stop reading most of these dedicated variables.
The server checks its secrets once at startup, but a missing secret never blocks startup: Teable falls back to the default built into older versions, logs the missing variables, and starts. Those built-in values are public, so anyone can forge tokens or decrypt data protected by them. That is fine for a quick local try-out and unsafe for anything else.
A later version will refuse to start while
SECRET_KEY is unset or still its public default. If your instance runs that way, switch to your own SECRET_KEY before upgrading to that version.openssl rand -base64 32
SECRET_KEY together with the database. Encrypted data can only be decrypted with the key it was written with.
Existing deployment. Do not add or change SECRET_KEY in place. The secrets that follow it change with it, so existing sessions and tokens stop working and the data already encrypted in the database can no longer be decrypted. Follow Secret convergence instead. The Key rotation page in System Admin lists the dedicated variables an instance still sets.
The startup log also warns when a secret is explicitly set to a publicly known
former default. The instance keeps running so your data stays reachable, but
anyone can forge tokens or decrypt data protected by that value. Rotate it.

