> ## Documentation Index
> Fetch the complete documentation index at: https://help.teable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment Variables

> Here are all available environment variables in Teable and their explanations

<Callout type="warning">
  For production deployments, Teable is strongly recommended to use **S3-compatible object storage** (`s3` / `minio`) with **public/private dual buckets**.\
  Also ensure the public bucket is configured with **public-read + CORS**. See: [Object Storage (S3-compatible)](/en/deploy/storage).
</Callout>

| 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](https://app.teable.ai)                                               |
| SECRET\_KEY                                                                        | Key for JWT, sessions, and sharing, use a strong password                                                                                                                      | defaultSecretKey  | Yes      | yourStrongSecretKey                                                                          |
| PORT                                                                               | Port on which the application runs                                                                                                                                             | 3000              | -        | 3000                                                                                         |
| LOG\_LEVEL                                                                         | Log level, options: fatal, error, warn, info, debug, trace                                                                                                                     | info              | -        | debug                                                                                        |
| NEXT\_ENV\_IMAGES\_ALL\_REMOTE                                                     | Whether to allow loading third-party images                                                                                                                                    | false             | -        | true                                                                                         |
| **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                                                                                                                                                            | private           | -        | teable-private                                                                               |
| BACKEND\_STORAGE\_PUBLIC\_URL                                                      | Public URL override for public bucket (optional)                                                                                                                               | -                 | -        | [https://cdn.example.com](https://cdn.example.com)                                           |
| BACKEND\_STORAGE\_PRIVATE\_BUCKET\_ENDPOINT                                        | Private bucket endpoint override (optional)                                                                                                                                    | -                 | -        | [https://private-bucket.endpoint](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](https://s3.us-east-2.amazonaws.com)                     |
| BACKEND\_STORAGE\_S3\_INTERNAL\_ENDPOINT                                           | S3 internal endpoint (optional)                                                                                                                                                | -                 | -        | [http://s3.internal](http://s3.internal)                                                     |
| 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](http://localhost:3000)                                               |
| **Cache Configuration**                                                            |                                                                                                                                                                                |                   |          |                                                                                              |
| BACKEND\_CACHE\_PROVIDER                                                           | Cache provider, options: sqlite, memory, redis                                                                                                                                 | sqlite            | -        | redis                                                                                        |
| BACKEND\_CACHE\_REDIS\_URI                                                         | Redis cache connection URI, required when BACKEND\_CACHE\_PROVIDER is redis                                                                                                    | -                 | -        | 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](https://app.teable.ai/api/auth/oidc/callback) |
| **Security & Verification**                                                        |                                                                                                                                                                                |                   |          |                                                                                              |
| TURNSTILE\_SITE\_KEY                                                               | Cloudflare Turnstile site key for authentication verification                                                                                                                  | -                 | -        | 1x00000000000000000000AA                                                                     |
| TURNSTILE\_SECRET\_KEY                                                             | Cloudflare Turnstile secret key for authentication verification                                                                                                                | -                 | -        | 1x0000000000000000000000000000000AA                                                          |
| BACKEND\_SIGNUP\_VERIFICATION\_CODE\_RATE\_LIMIT\_SECONDS                          | Rate limit interval (seconds) for sending signup verification emails                                                                                                           | -                 | -        | 30                                                                                           |
| **Email Configuration (Deprecated - Use Admin Panel > Instance settings > Email)** |                                                                                                                                                                                |                   |          |                                                                                              |
| BACKEND\_MAIL\_HOST                                                                | Default mail server address. We recommend configuring Notify email and Automation email visually in Admin Panel > 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](mailto: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                                                                                    |
| **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                                                                                   |
| MAX\_SPACE\_OWNER\_COUNT                                                           | Maximum number of spaces a user can own                                                                                                                                        | 10                | -        | 10                                                                                           |
| 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 base                                                                                                                                                        | 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                                                                                         |
| **Feature Toggles**                                                                |                                                                                                                                                                                |                   |          |                                                                                              |
| RECORD\_HISTORY\_DISABLED                                                          | Whether to disable record history, defaults to false                                                                                                                           | false             | -        | true                                                                                         |
| PASSWORD\_LOGIN\_DISABLED                                                          | Whether to disable password login (OAuth and OIDC still available)                                                                                                             | false             | -        | true                                                                                         |
| **Analytics & Monitoring**                                                         |                                                                                                                                                                                |                   |          |                                                                                              |
| MICROSOFT\_CLARITY\_ID                                                             | Microsoft Clarity metrics ID, for enabling Microsoft Clarity analytics                                                                                                         | -                 | -        | your-metrics-id                                                                              |
| OTEL\_EXPORTER\_OTLP\_ENDPOINT                                                     | OpenTelemetry OTLP endpoint                                                                                                                                                    | -                 | -        | [http://jaeger:4317](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                                                                                         |
