_DEV suffix are no longer supported. Before upgrading, follow the v6 migration guide. Keep separate values for development, test, and production.
| Variable | Default value | Description |
|---|---|---|
CB_DB_NAME required | chartbrew | The name of the database |
CB_DB_USERNAME required | No default | The username of the user that has access to the database |
| CB_DB_PASSWORD | No default | The password associated with the database user |
CB_DB_HOST required | localhost | The host address where the database is located |
| CB_DB_PORT | 3306 | The port of the hosting address |
CB_DB_DIALECT required | mysql | Which database to use between mysql and postgres |
| CB_DB_CERT | No default | If your DB requires an SSL connection, use this variable to provide the string value of the certificate |
CB_ENCRYPTION_KEY required | A key will be generate for you during the first run | A secure 32 bytes string which is used to encrypt the data in the database. Click here to see how you can generate a key. |
CB_BULLMQ_USERNAME required | chartbrew | The username used for HTTP Basic Auth on the BullMQ admin dashboard at /apps/queues |
CB_BULLMQ_PASSWORD required | A password will be generated for you during the first run | The password used for HTTP Basic Auth on the BullMQ admin dashboard at /apps/queues. Set this explicitly when running Chartbrew with Docker or another environment-based deployment |
| CB_OPENAI_API_KEY | No default | The API key for the OpenAI API |
| CB_OPENAI_MODEL | gpt-5.4-mini | The model to use for the OpenAI API |
| CB_REDIS_HOST | localhost | The host address where the Redis server is located |
| CB_REDIS_PORT | 6379 | The port of the Redis server |
| CB_REDIS_PASSWORD | No default | The password for the Redis server, if required |
| CB_REDIS_DB | 0 | The Redis database number to use |
| CB_REDIS_CA | No default | The string value of the certificate |
| CB_REDIS_CLUSTER_NODES | No default | The list of Redis cluster nodes. Format: host:port,host:port,host:port |
| CB_RUNTIME_REDIS_HOST | No default | Optional dedicated Redis host for the runtime chart and dataset cache. If not set, Chartbrew falls back to CB_REDIS_HOST |
| CB_RUNTIME_REDIS_PORT | No default | Optional dedicated Redis port for the runtime chart and dataset cache. If not set, Chartbrew falls back to CB_REDIS_PORT |
| CB_RUNTIME_REDIS_PASSWORD | No default | Optional dedicated Redis password for the runtime chart and dataset cache. If not set, Chartbrew falls back to CB_REDIS_PASSWORD |
| CB_RUNTIME_REDIS_DB | No default | Optional dedicated Redis database number for the runtime chart and dataset cache. If not set, Chartbrew falls back to CB_REDIS_DB |
| CB_RUNTIME_REDIS_CA | No default | Optional CA certificate string for the runtime chart and dataset cache Redis connection. If not set, Chartbrew falls back to CB_REDIS_CA |
| CB_RUNTIME_REDIS_CLUSTER_NODES | No default | Optional list of Redis cluster nodes for the runtime chart and dataset cache. Format: host:port,host:port,host:port. If not set, Chartbrew falls back to CB_REDIS_CLUSTER_NODES |
| CB_RUNTIME_CACHE_DEBUG | false | Enables debug logging for the runtime chart and dataset cache, including cache hits, misses, and key selection |
| CB_DATA_API_ENABLED | true | Set to false to disable all versioned Data API routes |
| CB_DATA_API_RATE_LIMIT_MAX | 60 | Requests allowed per API key each minute |
| CB_DATA_API_AUTH_RATE_LIMIT_MAX | 30 | Failed authentication attempts allowed per IP each minute |
| CB_DATA_API_MAX_REQUEST_BYTES | 65536 | Largest accepted Data API request body, in bytes |
| CB_DATA_API_MAX_RESPONSE_BYTES | 5242880 | Largest complete Data API response, in bytes |
| CB_DATA_API_MAX_EXECUTION_MS | 30000 | Maximum Data API execution time, in milliseconds |
| CB_DATA_API_MAX_FILTERS | 50 | Maximum filters in one request |
| CB_DATA_API_MAX_VARIABLES | 100 | Maximum variables in one request |
| CB_DATA_API_MAX_VALUE_DEPTH | 10 | Maximum nesting depth for variable and filter values |
| CB_DATA_API_MAX_STRING_BYTES | 8192 | Maximum size of one input string, in bytes |
CB_API_HOST required | localhost | The address where the server app is running from. This variable is used internally by the server app. This value is overwritten by the PORT variable (if set) |
CB_API_PORT required | 4019 | The port where the server app is running from. This variable is used internally by the server app |
VITE_APP_CLIENT_HOST required | http://localhost:4018 | The full address where the client app is running from. This variable is used in the client app and it’s populated during the building process.Note The app needs to be restarted/rebuilt when this value is changed. |
VITE_APP_CLIENT_PORT required | 4018 | The port where the client app is running from. This variable is used in the client app and it’s populated during the building process.Note The app needs to be restarted/rebuilt when this value is changed. |
VITE_APP_API_HOST required | http://localhost:4019 | The full address where the server app is running. This variable is used by the client app.Note The app needs to be restarted/rebuilt when this value is changed. |
| CB_MAIL_HOST | smtp.gmail.com | The server host of the email provider |
| CB_MAIL_USER | No default | The username used to log in on the email server |
| CB_MAIL_PASS | No deafult | The password used to log in on the email server |
| CB_MAIL_PORT | 465 | The port used to connect to the email server |
| CB_MAIL_SECURE | true | true - Use SSL to connect to the email server false - Use TLS to connect to the email server |
| CB_ADMIN_MAIL | [email protected] | The email address used to send the emails from |
| CB_RESTRICT_TEAMS | 0 | 0 - New users will have their own team created on sign-up. 1 - New users don’t have a team on signup and can’t create their own. |
| CB_RESTRICT_SIGNUP | 0 | 0 - Anyone can create accounts from the signup page 1 - New users can only sign up using invite links |
| CB_GOOGLE_CLIENT_ID | No default | Google app Client ID generated from the Console (Needed for Google integrations) |
| CB_GOOGLE_CLIENT_SECRET | No default | Google app Client Secret generated from the Console (Needed for Google integrations) |
| CB_BACKEND_WORKERS | 4 | Some background tasks in Chartbrew will use workers to spread work on multiple threads. Still testing, but for best performance, set this to the number of threads your CPU has |
| CB_OPENAI_API_KEY | No default | The API key for the OpenAI API |
| CB_OPENAI_MODEL | gpt-5.4-mini | The model to use for the OpenAI API |
| VITE_APP_SLACK_CLIENT_ID | No default | The client ID of the Slack app is used in both server and client apps |
| CB_SLACK_CLIENT_SECRET | No default | The client secret of the Slack app is used in both server and client apps |
| CB_SLACK_SIGNING_SECRET | No default | The Slack app signing secret, used only by the server app. Copy it exactly from Basic Information → App Credentials in Slack. It is typically a 32-character hexadecimal string; do not add a v0= prefix, hash it, or Base64-encode it. |
| CB_ALLOW_PRIVATE_NETWORK_CALLS | false | false - API calls to private networks are not allowed true - Allow calls to private networks |
Generate the encryption key
You will need a 32 bytes AES encryption key for theCB_ENCRYPTION_KEY variable. Chartbrew generates CB_ENCRYPTION_KEY for you during the first run, but if you wish to have control over the value, you can generate it yourself.
Run the following command to generate a valid key:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"