NocoDB can be configured using environment variables. This page documents all available configuration options extracted from the source code.
Database Configuration
NC_DB
Primary database connection string for metadata storage.
# PostgreSQL
NC_DB="pg://hostname:5432?u=username&p=password&d=database"
# MySQL
NC_DB="mysql2://hostname:3306?u=username&p=password&d=database"
# SQLite (default)
NC_DB="sqlite:///path/to/database.db"
Default: SQLite in NC_TOOL_DIR/noco.db
NC_DB_JSON
Provide database configuration as JSON string:
NC_DB_JSON='{"client":"pg","connection":{"host":"localhost","port":5432,"user":"postgres","password":"password","database":"nocodb"}}'
NC_DB_JSON_FILE
Path to a JSON file containing database configuration:
NC_DB_JSON_FILE="/path/to/db-config.json"
NC_DATABASE_URL / DATABASE_URL
Alternative database URL formats (JDBC-style):
DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
NC_DATABASE_URL_FILE / DATABASE_URL_FILE
Path to file containing database URL:
NC_DATABASE_URL_FILE="/run/secrets/db_url"
NC_DB_POOL_MAX
Maximum database connection pool size.
Default: 10
Authentication & Security
NC_AUTH_JWT_SECRET
Required for production. Secret key for JWT token generation.
NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010"
Generate a secure random string for production. This secret is used for authentication tokens.
NC_REFRESH_TOKEN_EXP_IN_DAYS
Refresh token expiration in days.
NC_REFRESH_TOKEN_EXP_IN_DAYS="30"
Default: 30
NC_ADMIN_EMAIL
Initialize admin user email on first startup:
NC_ADMIN_EMAIL="admin@example.com"
Requires NC_ADMIN_PASSWORD to be set.
NC_ADMIN_PASSWORD
Initialize admin user password:
NC_ADMIN_PASSWORD="SecurePassword123!"
Only used on first startup. Change the password through the UI after initial setup.
NC_CONNECTION_ENCRYPT_KEY
Key for encrypting database connection strings:
NC_CONNECTION_ENCRYPT_KEY="your-encryption-key"
Application Configuration
NC_PORT
Port for NocoDB to listen on.
Default: 8080
NC_PUBLIC_URL
Public URL for NocoDB instance:
NC_PUBLIC_URL="https://nocodb.example.com"
Used for generating links in emails and webhooks.
NC_DASHBOARD_URL
Custom dashboard path:
NC_DASHBOARD_URL="/dashboard"
Default: /dashboard
Directory for NocoDB to store data:
NC_TOOL_DIR="/usr/app/data"
Default: Current working directory
NC_MINIMAL_DBS
When enabled, creates a separate SQLite file for each base:
Default: false
Redis Configuration
NC_REDIS_URL
Redis connection URL for caching:
NC_REDIS_URL="redis://localhost:6379/0"
NC_REDIS_JOB_URL
Separate Redis instance for job queue:
NC_REDIS_JOB_URL="redis://localhost:6379/1"
NC_THROTTLER_REDIS
Redis instance for rate limiting:
NC_THROTTLER_REDIS="redis://localhost:6379/2"
NC_REDIS_TTL
Redis cache TTL in seconds:
NC_REDIS_TTL="259200" # 3 days
Default: 259200 (3 days)
NC_REDIS_GRACE_TTL
Grace period TTL in seconds:
NC_REDIS_GRACE_TTL="86400" # 1 day
Default: 86400 (1 day)
NC_CACHE_PREFIX
Prefix for cache keys:
Storage Configuration
NC_S3_BUCKET_NAME
S3 bucket name for file storage:
NC_S3_BUCKET_NAME="nocodb-files"
NC_S3_REGION
AWS region:
NC_S3_ACCESS_KEY
AWS access key ID:
NC_S3_ACCESS_KEY="AKIAIOSFODNN7EXAMPLE"
NC_S3_ACCESS_SECRET
AWS secret access key:
NC_S3_ACCESS_SECRET="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
NC_SECURE_ATTACHMENTS
Enable secure attachment URLs:
NC_SECURE_ATTACHMENTS="true"
Default: false
NC_ATTACHMENT_FIELD_SIZE
Maximum attachment field size in bytes:
NC_ATTACHMENT_FIELD_SIZE="20971520" # 20 MB
Default: 20971520 (20 MB)
NC_NON_ATTACHMENT_FIELD_SIZE
Maximum size for non-attachment fields:
NC_NON_ATTACHMENT_FIELD_SIZE="10485760" # 10 MB
Default: 10485760 (10 MB)
NC_MAX_ATTACHMENTS_ALLOWED
Maximum number of attachments per field:
NC_MAX_ATTACHMENTS_ALLOWED="10"
Default: 10
NC_MAX_TEXT_LENGTH
Maximum text length for text fields:
NC_MAX_TEXT_LENGTH="100000"
Default: 100000
NC_REQUEST_BODY_SIZE
Maximum request body size:
NC_REQUEST_BODY_SIZE="50mb"
Default: 50mb
NC_DATA_PAYLOAD_LIMIT
Data payload limit for API requests:
NC_DATA_PAYLOAD_LIMIT="100"
Default: 100 (v1/v2), 10 (v3)
NC_THUMBNAIL_MAX_SIZE
Maximum thumbnail size in bytes:
NC_THUMBNAIL_MAX_SIZE="3145728" # 3 MB
Default: 3145728 (3 MB)
Worker & Queue Configuration
NC_WORKER
Run as worker container (no HTTP server):
Default: false
NC_WORKER_CONTAINER
Identify worker container:
NC_WORKER_CONTAINER="true"
Default: false
Feature Flags
NC_DISABLE_TELE
Disable telemetry:
Default: false
NC_ENABLE_AUDIT
Enable audit logging:
Default: false
NC_ALLOW_LOCAL_HOOKS
Allow webhooks to local network:
NC_ALLOW_LOCAL_HOOKS="true"
Default: false
Enabling local hooks can be a security risk. Only enable in trusted environments.
NC_DISABLE_SUPPORT_CHAT
Disable support chat widget:
NC_DISABLE_SUPPORT_CHAT="true"
Default: false
NC_DISABLE_GROUP_BY_LIMIT
Disable group by result limit:
NC_DISABLE_GROUP_BY_LIMIT="true"
Default: false
NC_DISABLE_GROUP_BY_AGG
Disable group by aggregation:
NC_DISABLE_GROUP_BY_AGG="true"
Default: false
Automation & Logging
NC_AUTOMATION_LOG_LEVEL
Automation log level:
NC_AUTOMATION_LOG_LEVEL="ALL" # ALL, ERROR, or OFF
Options: ALL, ERROR
UI Customization
NC_IFRAME_WHITELIST_DOMAINS
Whitelist domains for iframe embedding:
NC_IFRAME_WHITELIST_DOMAINS="example.com,trusted-site.org"
Default: Empty (no whitelisting)
Cloud & License
NC_LICENSE_KEY
Enterprise license key:
NC_LICENSE_KEY="your-license-key"
NC_ONE_CLICK
Mark as one-click installation:
NC_SERVER_UUID
Server UUID for telemetry:
NC_SERVER_UUID="auto-generated-uuid"
Development & Testing
NC_TRY
Run in try mode (in-memory SQLite):
Default: false
NODE_ENV
Node environment:
NODE_ENV="production" # production, development, or test
NODE_TLS_REJECT_UNAUTHORIZED
Disable TLS certificate validation (development only):
NODE_TLS_REJECT_UNAUTHORIZED="0"
Never disable TLS validation in production.
Example Configurations
Minimal Production Setup
NC_DB="pg://postgres:5432?u=nocodb&p=password&d=nocodb"
NC_AUTH_JWT_SECRET="your-very-secure-random-string"
NC_PUBLIC_URL="https://nocodb.example.com"
Production with Redis and S3
NC_DB="pg://postgres.example.com:5432?u=nocodb&p=password&d=nocodb"
NC_AUTH_JWT_SECRET="your-secure-secret"
NC_PUBLIC_URL="https://nocodb.example.com"
NC_REDIS_URL="redis://redis.example.com:6379/0"
NC_S3_BUCKET_NAME="nocodb-attachments"
NC_S3_REGION="us-east-1"
NC_S3_ACCESS_KEY="AKIAIOSFODNN7EXAMPLE"
NC_S3_ACCESS_SECRET="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
NC_DISABLE_TELE="true"
NC_ENABLE_AUDIT="true"
NC_DB="pg://primary-db:5432?u=nocodb&p=password&d=nocodb"
NC_AUTH_JWT_SECRET="your-secret"
NC_REDIS_URL="redis://cache:6379/0"
NC_REDIS_JOB_URL="redis://queue:6379/1"
NC_THROTTLER_REDIS="redis://throttle:6379/2"
NC_DB_POOL_MAX="20"
NC_REQUEST_BODY_SIZE="100mb"
NC_MAX_ATTACHMENTS_ALLOWED="20"
NC_WORKER_CONTAINER="true"
Next Steps