bramw_baserow/docs/installation/configuration.md

305 lines
104 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Configuring Baserow
> Any questions, problems or suggestions with this guide? Ask a question in our
> [community](https://community.baserow.io/) or contribute the change yourself at
> https://gitlab.com/baserow/baserow/-/tree/develop/docs .
The table below shows all available environment variables supported by Baserow.
Some environment variables have different defaults, are not supported, are optional etc
depending on how you installed Baserow. See the specific installation guides for how
to set these environment variables.
## Environment Variables
The installation methods referred to in the variable descriptions are:
* [The Standalone service images](install-using-standalone-images.md)
* [The baserow/baserow "all in one" image](install-with-docker.md)
* [The Docker compose install](install-with-docker-compose.md)
> Variables marked with *Internal* should only be changed if you know what you are
> doing.
### Access Configuration
| Name | Description | Defaults |
|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| BASEROW\_PUBLIC\_URL | The public URL or IP that will be used to access baserow. Always should start with http:// https:// even if accessing via an IP address. If you are accessing Baserow over a non-standard (80) http port then make sure you append :YOUR\_PORT to this variable.<br><br>Setting this will override PUBLIC\_BACKEND\_URL and PUBLIC\_WEB\_FRONTEND\_URL with BASEROW\_PUBLIC\_URLs value.<br>Set to empty to disable default of http://localhost in the compose to instead set PUBLIC\_X\_URLs. | http://localhost |
| BASEROW\_CADDY\_ADDRESSES | **Not supported by standalone images.** A comma separated list of supported Caddy addresses( [https://caddyserver.com/docs/caddyfile/concepts#addresses](https://caddyserver.com/docs/caddyfile/concepts#addresses)). If a https:// url is provided the Caddy reverse proxy will attempt to [automatically setup HTTPS](https://caddyserver.com/docs/automatic-https) with lets encrypt for you. If you wish your Baserow to still be accessible on localhost and you set this value away from the default of :80 ensure you append “,[http://localhost](http://localhost/)” | :80 |
| PUBLIC\_BACKEND\_URL | Please use BASEROW\_PUBLIC\_URL unless you are using the standalone baserow/backend or baserow/web-frontend images. The publicly accessible URL of the backend. Should include the port if non-standard. Ensure BASEROW\_PUBLIC\_URL is set to an empty value to use this variable in the compose setup. | $BASEROW\_PUBLIC\_URL, http://localhost:8000/ in the standalone images. |
| PUBLIC\_WEB\_FRONTEND\_URL | Please use BASEROW\_PUBLIC\_URL unless you are using the standalone baserow/backend or baserow/web-frontend images. The publicly accessible URL of the web-frontend. Should include the port if non-standard. Ensure BASEROW\_PUBLIC\_URL is set to an empty value to use this variable in the compose setup. | $BASEROW\_PUBLIC\_URL, http://localhost:3000/ in the standalone images. |
| BASEROW\_EMBEDDED\_SHARE\_URL | Optional URL for public sharing and email links that can be used if Baserow is used inside an iframe on a different URL.|$PUBLIC\_WEB\_FRONTEND\_URL|
| WEB\_FRONTEND\_PORT | The HTTP port that is being used to access Baserow using. Only used by the docker-compose files. | Only used by the docker-compose.yml files, defaults to 80 but prior to 1.9 defaulted to 3000. |
| BASEROW\_EXTRA\_ALLOWED\_HOSTS | An optional comma separated list of hostnames which will be added to the Baserow's Django backend [ALLOWED_HOSTS](https://docs.djangoproject.com/en/4.0/ref/settings/#allowed-hosts) setting. In most situations you will not need to set this as the hostnames from BASEROW\_PUBLIC\_URL or PUBLIC\_BACKEND\_URL will be added to the ALLOWED_HOSTS automatically. This is only needed if you need to allow additional different hosts to be able to access your Baserow. | |
| PRIVATE\_BACKEND\_URL | **Only change this with standalone images.** This is the URL used when the web-frontend server directly queries the backend itself when doing server side rendering. As such not only the browser, but also<br>the web-frontend server should be able to make HTTP requests to the backend. The web-frontend nuxt server might not have access to the \`PUBLIC\_BACKEND\_URL\` or there could be a more direct route, (e.g. from container to container instead of via the internet). For example if the web-frontend and backend were containers on the same docker network this could be set to http://backend:8000. | |
| BASEROW\_CADDY\_GLOBAL\_CONF | **Not supported by standalone images.** Will be substituted into the Caddyfiles global config section. Set to “debug” to enable Caddies debug logging. | |
| BASEROW\_MAX\_IMPORT\_FILE\_SIZE\_MB | The maximum file size in mb you can import to create a new table. Default 512Mb. | 512 |
| BASEROW\_PERSONAL\_VIEW\_LOWEST\_ROLE\_ALLOWED | When RBAC is enabled from an enterprise or advanced license this controls what lowest user role is allowed to create personal views on a table. The options are: VIEWER (the default), COMMENTER, EDITOR, BUILDER, ADMIN | VIEWER |
### Backend Configuration
| Name | Description | Defaults |
|-----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SECRET\_KEY | The Secret key used by Django for cryptographic signing such as generating secure password reset links and managing sessions. See [https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-SECRET\_KEY](https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-SECRET_KEY) for more details | Required to be set by you in the docker-compose and standalone installs. Automatically generated by the baserow/baserow image if not provided and stored in /baserow/data/.secret. |
| SECRET\_KEY\_FILE | **Only supported by the `baserow/baserow` image** If set Baserow will attempt to read the above SECRET\_KEY from this file location instead. | |
| BASEROW\_JWT\_SIGNING\_KEY | The signing key that is used to sign the content of generated tokens. For HMAC signing, this should be a random string with at least as many bits of data as is required by the signing protocol. See [https://django-rest-framework-simplejwt.readthedocs.io/en/latest/settings.html#signing-key](https://django-rest-framework-simplejwt.readthedocs.io/en/latest/settings.html#signing-key) for more details | Recommended to be set by you in the docker-compose and standalone installs (default to the SECRET\_KEY). Automatically generated by the baserow/baserow image if not provided and stored in /baserow/data/.jwt_signing_key. |
| BASEROW\_ACCESS\_TOKEN\_LIFETIME\_MINUTES | The number of minutes which specifies how long access tokens are valid. This will be converted in a timedelta value and added to the current UTC time during token generation to obtain the tokens default “exp” claim value. | 10 minutes. |
| BASEROW\_REFRESH\_TOKEN\_LIFETIME\_HOURS | The number of hours which specifies how long refresh tokens are valid. This will be converted in a timedelta value and added to the current UTC time during token generation to obtain the tokens default “exp” claim value. | 168 hours (7 days). |
| BASEROW\_BACKEND\_LOG\_LEVEL | The default log level used by the backend, supports ERROR, WARNING, INFO, DEBUG, TRACE | INFO |
| BASEROW\_BACKEND\_DATABASE\_LOG\_LEVEL | The default log level used for database related logs in the backend. Supports the same values as the normal log level. If you also enable BASEROW\_BACKEND\_DEBUG and set this to DEBUG you will be able to see all SQL queries in the backend logs. | ERROR |
| BASEROW\_BACKEND\_DEBUG | If set to “on” then will enable the non production safe debug mode for the Baserow django backend. Defaults to “off” | |
| BASEROW\_AMOUNT\_OF\_GUNICORN\_WORKERS | The number of concurrent worker processes used by the Baserow backend gunicorn server to process incoming requests | |
| BASEROW\_AIRTABLE\_IMPORT\_SOFT\_TIME\_LIMIT | The maximum amount of seconds an Airtable migration import job can run. | 1800 seconds - 30 minutes |
| INITIAL\_TABLE\_DATA\_LIMIT | The amount of rows that can be imported when creating a table. Defaults to empty which means unlimited rows. | |
| BASEROW\_ROW\_PAGE\_SIZE\_LIMIT | The maximum number of rows that can be requested at once. | 200 |
| BASEROW\_FILE_UPLOAD\_SIZE\_LIMIT\_MB | The max file size in MB allowed to be uploaded by users into a Baserow File Field. | 1048576 (1 TB or 1024*1024) |
| BATCH\_ROWS\_SIZE\_LIMIT | Controls how many rows can be created, deleted or updated at once using the batch endpoints. | 200 |
| BATCH\_ROWS\_SIZE\_LIMIT | Controls how many rows can be created, deleted or updated at once using the batch endpoints. | 200 |
| BASEROW\_MAX\_SNAPSHOTS\_PER\_GROUP | Controls how many application snapshots can be created per group. | -1 (unlimited) |
| BASEROW\_SNAPSHOT\_EXPIRATION\_TIME\_DAYS | Controls when snapshots expire, set in number of days. Expired snapshots will be automatically deleted. | 360 |
| BASEROW_\CELERY_\SEARCH_\UPDATE_\HARD_\TIME_\LIMIT | How long the Postgres full-text search Celery tasks can run for being killed. | 1800 |
| BASEROW\_USE\_PG\_FULLTEXT\_SEARCH | By default, Baserow will use Postgres full-text as its search backend. If the product is installed on a system with limited disk space, and less accurate results / degraded search performance is acceptable, then switch this setting off by setting it to false. | true |
| BASEROW\_AUTO\_VACUUM | Whether Baserow should perform a `VACUUM` on a table in a background task after one or more fields changed in the table when full text search is enabled. | true |
### Backend Database Configuration
| Name | Description | Defaults |
|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| DATABASE\_HOST | The hostname of the postgres database Baserow will use to store its data in. | Defaults to db in the standalone and compose installs. If not provided in the \`baserow/baserow\` install then the embedded Postgres will be setup and used. |
| DATABASE\_USER | The username of the database user Baserow will use to connect to the database at DATABASE\_HOST | baserow |
| | | |
| DATABASE\_PORT | The port Baserow will use when trying to connect to the postgres database at DATABASE\_HOST | 5432 |
| DATABASE\_NAME | The database name Baserow will use to store data in. | baserow |
| DATABASE\_PASSWORD | The password of DATABASE\_USER on the postgres server at DATABASE\_HOST | Required to be set by you in the docker-compose and standalone installs. Automatically generated by the baserow/baserow image if not provided and stored in /baserow/data/.pgpass. |
| DATABASE\_PASSWORD\_FILE | **Only supported by the `baserow/baserow` image** If set Baserow will attempt to read the above DATABASE\_PASSWORD from this file location instead. | |
| DATABASE\_OPTIONS | Optional extra options as a JSON formatted string to use when connecting to the database, see [this documentation](https://docs.djangoproject.com/en/3.2/ref/settings/#std-setting-OPTIONS) for more details. | |
| DATABASE\_URL | Alternatively to setting the individual DATABASE\_ parameters above instead you can provide one standard postgres connection string in the format of: postgresql://\[user\[:password\]@\]\[netloc\]\[:port\]\[/dbname\]\[?param1=value1&…\]. Please note this will completely override all other DATABASE_* settings and ignore them. | |
| | | |
| MIGRATE\_ON\_STARTUP | If set to “true” when the Baserow backend service starts up it will automatically apply database migrations. Set to any other value to disable. If you disable this then you must remember to manually apply the database migrations when upgrading Baserow to a new version. | true |
| BASEROW\_TRIGGER\_SYNC\_TEMPLATES\_AFTER\_MIGRATION | If set to “true” when after a migration Baserow will automatically sync all builtin Baserow templates in the background. If you are using a postgres database which is constrained to fewer than 10000 rows then we recommend you disable this as the Baserow templates will go over that row limit. To disable this set to any other value than “true” | true |
| BASEROW\_SYNC\_TEMPLATES\_TIME\_LIMIT | The number of seconds before the background sync templates job will timeout if not yet completed. | 1800 |
| SYNC\_TEMPLATES\_ON\_STARTUP | **Deprecated please use BASEROW\_TRIGGER\_SYNC\_TEMPLATES\_AFTER\_MIGRATION** If provided has the same effect of BASEROW\_TRIGGER\_SYNC\_TEMPLATES\_AFTER\_MIGRATION for backwards compatibility reasons. If BASEROW\_TRIGGER\_SYNC\_TEMPLATES\_AFTER\_MIGRATION is set it will override this value. | true |
| DONT\_UPDATE\_FORMULAS\_AFTER\_MIGRATION | Baserows formulas have an internal version number. When upgrading Baserow if the formula language has also changed then after the database migration has run Baserow will also automatically recalculate all formulas if they have a different version. Set this to any non empty value to disable this automatic update if you would prefer to run the update\_formulas management command manually yourself. Formulas might break if you forget to do so after an upgrade of Baserow until and so it is recommended to leave this empty. | |
| POSTGRES\_STARTUP\_CHECK\_ATTEMPTS | When Baserow's Backend service starts up it first checks to see if the postgres database is available. It checks 5 times by default, after which if it still has not connected it will crash. | 5 |
### Redis Configuration
| Name | Description | Defaults |
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| REDIS\_HOST | The hostname of the redis database Baserow will use for caching and real time collaboration. | Defaults to redis in the standalone and compose installs. If not provided in the \`baserow/baserow\` install then the embedded Redis will be setup and used. |
| REDIS\_PORT | The port Baserow will use when trying to connect to the redis database at REDIS\_HOST | 6379 |
| REDIS\_USER | The username of the redis user Baserow will use to connect to the redis at REDIS\_HOST | |
| REDIS\_PASSWORD | The password of REDIS\_USER on the redis server at REDIS\_HOST | Required to be set by you in the docker-compose and standalone installs. Automatically generated by the baserow/baserow image if not provided and stored in /baserow/data/.redispass. |
| REDIS\_PASSWORD\_FILE | **Only supported by the `baserow/baserow` image** If set Baserow will attempt to read the above REDIS\_PASSWORD from this file location instead. | |
| REDIS\_PROTOCOL | The redis protocol used when connecting to the redis at REDIS\_HOST Can either be redis or rediss. | redis |
| | | |
| REDIS\_URL | Alternatively to setting the individual REDIS\_ parameters above instead you can provide one standard redis connection string in the format of: redis://:\[password\]@\[redishost\]:\[redisport\] | |
### Celery Configuration
| Name | Description | Defaults |
|---------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| BASEROW\_CELERY\_BEAT\_STARTUP\_DELAY | The number of seconds the celery beat worker sleeps before starting up. | 15 |
| BASEROW\_CELERY\_BEAT\_DEBUG\_LEVEL | The logging level for the celery beat service. | INFO |
| BASEROW\_AMOUNT\_OF\_WORKERS | The number of concurrent celery worker processes used to process asynchronous tasks. If not set will default to the number of available cores. Each celery process uses memory, to reduce Baserow's memory footprint consider setting and reducing this variable. | 1 for the All-in-one, Heroku and Cloudron images. Defaults to empty and hence the number of available cores in the standalone images. |
| BASEROW\_RUN\_MINIMAL | When BASEROW\_AMOUNT\_OF\_WORKERS is 1 and this is set to a non empty value Baserow will not run the export-worker but instead run both the celery export and normal tasks on the normal celery worker. Set this to lower the memory usage of Baserow in expense of performance. | |
### Webhook Configuration
| Name | Description | Defaults |
|--------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
| BASEROW\_WEBHOOKS\_ALLOW\_PRIVATE\_ADDRESS | If set to any non empty value allows webhooks to access all addresses. Enabling this flag is a security risk as it will allow users to send webhook requests to internal addresses on your network. Instead consider using the three variables below first to allow access to only some internal network hostnames or IPs. | |
| BASEROW\_WEBHOOKS\_URL\_REGEX\_BLACKLIST | **Disabled if BASEROW\_WEBHOOKS\_ALLOW\_PRIVATE\_ADDRESS is set.** List of comma seperated regexes used to validate user configured webhook URLs, will show the user an error if any regexes match their webhook URL and prevent it from running. Applied before and so supersedes BASEROW\_WEBHOOKS\_IP\_WHITELIST and BASEROW\_WEBHOOKS\_IP\_BLACKLIST. Do not include any schema like `http://`, `https://` as regexes will only be run against the hostname/IP of the user configured URL. For example set this to `^(?!(www\.)?allowedhost\.com).*` to block all hostnames and IPs other than `allowedhost.com` or `www.allowedhost.com`. | |
| BASEROW\_WEBHOOKS\_IP\_WHITELIST | **Disabled if BASEROW\_WEBHOOKS\_ALLOW\_PRIVATE\_ADDRESS is set.** List of comma seperated IP addresses or ranges that webhooks will be **allowed** to use after the webhook URL has been resolved to an IP using DNS. Only checked if the URL passes the BASEROW\_WEBHOOKS\_URL\_REGEX\_BLACKLIST. Takes precedence over BASEROW\_WEBHOOKS\_IP\_BLACKLIST meaning that a whitelisted IP will always be let through regardless of the ranges in BASEROW\_WEBHOOKS\_IP\_BLACKLIST. So use BASEROW\_WEBHOOKS\_IP\_WHITELIST to punch holes the ranges in BASEROW\_WEBHOOKS\_IP\_BLACKLIST, and not the other way around. Accepts a string in the format: "127.0.0.1/32,192.168.1.1/32" | |
| BASEROW\_WEBHOOKS\_IP\_BLACKLIST | **Disabled if BASEROW\_WEBHOOKS\_ALLOW\_PRIVATE\_ADDRESS is set.** List of comma seperated IP addresses or ranges that webhooks will be **denied** from using after the URL has been resolved to an IP using DNS. Only checked if the URL passes the BASEROW\_WEBHOOKS\_URL\_REGEX\_BLACKLIST. BASEROW\_WEBHOOKS\_IP\_WHITELIST supersedes any ranges specified in this variable. Accepts a string in the format: "127.0.0.1/32,192.168.1.1/32" | |
| BASEROW\_WEBHOOKS\_URL\_CHECK\_TIMEOUT\_SECS | **Disabled if BASEROW\_WEBHOOKS\_ALLOW\_PRIVATE\_ADDRESS is set.** How long to wait before timing out and returning an error when checking if an url can be accessed for a webhook. | 10 seconds |
| BASEROW\_WEBHOOKS\_MAX\_CONSECUTIVE\_TRIGGER\_FAILURES | The number of consecutive trigger failures that can occur before a webhook is disabled. | 8 |
| BASEROW\_WEBHOOKS\_MAX\_RETRIES\_PER\_CALL | The max number of retries per webhook call. | 8 |
| BASEROW\_WEBHOOKS\_MAX\_PER\_TABLE | The max number of webhooks per Baserow table. | 20 |
| BASEROW\_WEBHOOKS\_MAX\_CALL\_LOG\_ENTRIES | The maximum number of call log entries stored per webhook. | 10 |
| BASEROW\_WEBHOOKS\_REQUEST\_TIMEOUT\_SECONDS | How long to wait on making the webhook request before timing out. | 5 |
### Generative AI configuration
| Name | Description | Defaults |
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| BASEROW\_OPENAI\_API\_KEY | Provide an OpenAI API key to allow using OpenAI for the generative AI features like the AI field. (https://platform.openai.com/api-keys) | |
| BASEROW\_OPENAI\_ORGANIZATION | Optionally provide an OpenAI organization name that will be used when making an API connection. | |
| BASEROW\_OPENAI\_MODELS | Provide a comma separated list of OpenAI models (https://platform.openai.com/docs/models/overview) that you would like to enable in the instance (e.g. `gpt-3.5-turbo,gpt-4-turbo-preview`). Note that this only works if an OpenAI API key is set. If this variable is not provided, the user won't be able to choose a model. | |
| BASEROW\_OLLAMA\_HOST | Provide an OLLAMA host to allow using OLLAMA for generative AI features like the AI field. | |
| BASEROW\_OLLAMA\_MODELS | Provide a comma separated list of Ollama models (https://ollama.com/library) that you would like to enable in the instance (e.g. `llama2`). Note that this only works if an Ollama host is set. If this variable is not provided, the user won't be able to choose a model. | |
### Backend Misc Configuration
| Name | Description | Defaults |
|----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|
| BASEROW\_ENABLE\_SECURE\_PROXY\_SSL\_HEADER | Set to any non-empty value to ensure Baserow generates https:// next links provided by paginated API endpoints. Baserow will still work correctly if not enabled, this is purely for giving the correct https url for clients of the API. If you have setup Baserow to use Caddy's auto HTTPS or you have put Baserow behind<br>a reverse proxy which:<br>* Handles HTTPS<br>* Strips the X-Forwarded-Proto header from all incoming requests.<br>* Sets the X-Forwarded-Proto header and sends it to Baserow.<br>Then you can safely set BASEROW\_ENABLE\_SECURE\_PROXY\_SSL\_HEADER=yes to ensure Baserow<br>generates https links for pagination correctly.<br> | |
| ADDITIONAL\_APPS | A comma separated list of additional django applications to add to the INSTALLED\_APPS django setting | |
| HOURS\_UNTIL\_TRASH\_PERMANENTLY\_DELETED | Items from the trash will be permanently deleted after this number of hours. | |
| DISABLE\_ANONYMOUS\_PUBLIC\_VIEW\_WS\_CONNECTIONS | When sharing views publicly a websocket connection is opened to provide realtime updates to viewers of the public link. To disable this set any non empty value. When disabled publicly shared links will need to be refreshed to see any updates to the view. | |
| BASEROW\_WAIT\_INSTEAD\_OF\_409\_CONFLICT\_ERROR | When updating or creating various resources in Baserow if another concurrent operation is ongoing (like a snapshot, duplication, import etc) which would be affected by your modification a 409 HTTP error will be returned. If you instead would prefer Baserow to not return a 409 and just block waiting until the operation finishes and then to perform the requested operation set this flag to any non-empty value. | |
| BASEROW\_JOB\_CLEANUP\_INTERVAL\_MINUTES | How often the job cleanup task will run. | 5 |
| BASEROW\_JOB\_EXPIRATION\_TIME\_LIMIT | How long before a Baserow job will be kept before being cleaned up. | 30 * 24 * 60 (24 days) |
| BASEROW\_JOB\_SOFT\_TIME\_LIMIT | The number of seconds a Baserow job can run before being terminated. | 1800 |
| BASEROW\_MAX\_FILE\_IMPORT\_ERROR\_COUNT | The max number of per row errors than can occur in a file import before an overall failure is declared | 30 |
| MINUTES\_UNTIL\_ACTION\_CLEANED\_UP | How long before actions are cleaned up, actions are used to let you undo/redo so this is effectively the max length of time you can undo/redo can action. | 120 |
| BASEROW\_DISABLE\_MODEL\_CACHE | When set to any non empty value the model cache used to speed up Baserow will be disabled. Useful to enable when debugging Baserow errors if they are possibly caused by the model cache itself. | | |
| BASEROW\_STORAGE\_USAGE\_JOB\_CRONTAB | The crontab controlling when the file usage job runs when enabled in the settings page | 0 0 * * * |
| BASEROW\_ROW\_COUNT\_JOB\_CRONTAB | The crontab controlling when the row counting job runs when enabled in the settings page | 0 3 * * * |
| | | |
| DJANGO\_SETTINGS\_MODULE | **INTERNAL** The settings python module to load when starting up the Backend django server. You shouldnt need to set this yourself unless you are customizing the settings manually. | |
| | | |
| BASEROW\_BACKEND\_BIND\_ADDRESS | **INTERNAL** The address that Baserows backend service will bind to. | |
| BASEROW\_BACKEND\_PORT | **INTERNAL** Controls which port the Baserow backend service binds to. | |
| BASEROW\_WEBFRONTEND\_BIND\_ADDRESS | **INTERNAL** The address that Baserows web-frontend service will bind to. | |
| BASEROW\_INITIAL\_CREATE\_SYNC\_TABLE\_DATA\_LIMIT | The maximum number of rows you can import in a synchronous way | 5000 |
| BASEROW\_MAX\_ROW\_REPORT\_ERROR\_COUNT | The maximum row error count tolerated before a file import fails. Before this max error count the import will continue and the non failing rows will be imported and after it, no rows are imported at all. | 30 |
| BASEROW\_ROW\_HISTORY\_CLEANUP\_INTERVAL\_MINUTES | Sets the interval for periodic clean up check of the row edit history in minutes. | 30 |
| BASEROW\_ROW\_HISTORY\_RETENTION\_DAYS | The number of days that the row edit history will be kept. | 180 |
| BASEROW\_ENTERPRISE\_AUDIT\_LOG\_CLEANUP\_INTERVAL_MINUTES | Sets the interval for periodic clean up check of the enterprise audit log in minutes. | 30 |
| BASEROW\_ENTERPRISE\_AUDIT\_LOG\_RETENTION\_DAYS | The number of days that the enterprise audit log will be kept. | 365 |
### Backend Application Builder Configuration
| Name | Description | Defaults |
|---------------------------|--------------------------------------------------------------------------------------------------------------------------|------------------------|
| BASEROW\_BUILDER\_DOMAINS | A comma separated list of domain names that can be used as the domains to create sub domains in the application builder. | |
### Misc Configuration
| Name | Description | Defaults |
|---------------------------|-----------------------------------------------------------------------------------------------------------|------------------------|
| SENTRY\_DSN | If provided, will instantiate Sentry SDK for error monitoring for both Frontend and Backend. | "" (empty string) |
| SENTRY\_BACKEND\_DSN | If provided, will instantiate Sentry SDK for the backend with this DSN. It will override SENTRY\_DSN | "" (empty string) |
### User file upload Configuration
Baserow needs somewhere to store the following types of files:
* Files uploaded by users in Baserow Table's using the File Field type
* User triggered exports of tables and views
#### Filesystem Default
By default, Baserow will store these files on the file system at the location set by
the MEDIA_ROOT environment variable, which is `/baserow/media` in our `baserow/backend`
image or `$DATA_DIR/media` for the `baserow/baserow` all-in-one image.
> Warning: If Baserow is storing user files on the file system and MEDIA_ROOT is not part
> of a persistent volume, then all uploaded user files will be lost if
> you remove the container. Our default docker commands and docker compose
> files ensure this location will be mounted to a persistent docker volume for you if
> you are using them.
>
#### Serving User Files when stored on the file system
Any uploaded files need to be served back to the user when they visit Baserow in the
browser. Our `baserow/baserow` image and some of our `docker-compose.yml` templates
come with a [Caddy](https://caddy.io) reverse proxy which is configured to serve
back any user uploaded files which are stored in the data/media volume.
If you do not wish to use our default Caddy see the following guides on configuring
an Apache, NGinx or Traefik to serve user files for you:
* [Apache](./install-behind-apache.md)
* [Nginx](./install-behind-nginx.md)
* [Traefik](./install-with-traefik.md)
#### File Service alternatives
You can alternatively configure Baserow to store files by uploading them to an external service.
This is highly recommended if you wish to horizontally scale Baserow or deploy it in
a distributed manner.
We support the following types of file storage service. Follow each link to documentation showing
all available UPPER_CASE settings that you can set as environment variables to set up the
desired provider.
* [AWS S3, or any S3 compatible service such as Backblaze or Digital Ocean spaces](https://django-storages.readthedocs.io/en/1.13.2/backends/amazon-S3.html#settings)
* When using AWS S3 we recommend you set the `DOWNLOAD_FILE_VIA_XHR=1` environment variable.
* [Google Cloud Storage](https://django-storages.readthedocs.io/en/1.13.2/backends/gcloud.html#settings)
* [Azure Cloud Storage](https://django-storages.readthedocs.io/en/1.13.2/backends/azure.html#settings)
Our default docker compose files do not by default include all available user file environment
variables to reduce their size. When using these docker compose files make sure that any
`AWS_`, `GS_` or `AZURE_` env vars you wish to use have been added to the
`x-backend-variables` section.
#### CORS Issues
When using a 3rd party file storage service which is serving files from another
domain than your Baserow, you need to make sure CORS is configured correctly.
#### User File Variables Table
| Name | Description | Defaults |
|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
| MEDIA\_URL | **INTERNAL** The URL at which user uploaded media files will be made available | $PUBLIC\_BACKEND\_URL/media/ |
| MEDIA\_ROOT | **INTERNAL** The folder in which the backend will store user uploaded files | /baserow/media or $DATA_DIR/media for the `baserow/baserow` all-in-one image |
| **<br>** | | |
| AWS\_ACCESS\_KEY\_ID | The access key for your AWS account. When set to anything other than empty will switch Baserow to use a S3 compatible bucket for storing user file uploads. | |
| AWS\_SECRET\_ACCESS\_KEY | The access secret key for your AWS account. | |
| AWS\_SECRET\_ACCESS\_KEY\_FILE\_PATH | **Optional** The path to a file containing access secret key for your AWS account. | |
| AWS\_STORAGE\_BUCKET\_NAME | Your Amazon Web Services storage bucket name. | |
| AWS\_S3\_REGION\_NAME | **Optional** Name of the AWS S3 region to use (eg. eu-west-1) | |
| AWS\_S3\_ENDPOINT\_URL | **Optional** Custom S3 URL to use when connecting to S3, including scheme. | |
| AWS\_S3\_CUSTOM\_DOMAIN | **Optional** Your custom domain where the files can be downloaded from. | |
| AWS\_* | **Optional** All other AWS\_ prefixed settings mentioned [here](https://django-storages.readthedocs.io/en/1.13.2/backends/amazon-S3.html#settings) are also supported. | |
| **<br>** | | |
| GC\_* | All GC\_ prefixed settings mentioned [here](https://django-storages.readthedocs.io/en/1.13.2/backends/gcloud.html#settings) are also supported. | |
| GS\_CREDENTIALS\_FILE\_PATH | **Optional** The path to a Google service account file for credentials. | |
| **<br>** | | |
| AZURE\_* | All AZURE\_ prefixed settings mentioned [here](https://django-storages.readthedocs.io/en/1.13.2/backends/azure.html#settings) are also supported. | |
| AZURE\_ACCOUNT\_KEY\_FILE\_PATH | **Optional** The path to a file containing your Azure account key. | |
### Email Configuration
| Name | Description | Defaults |
|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| FROM\_EMAIL | The email address Baserow will send emails from. | |
| EMAIL\_SMTP | If set to any non empty value then Baserow will start sending emails using the configuration options below. If not set then Baserow will not send emails and just log them to the Celery worker logs instead. | |
| EMAIL\_SMTP\_USE\_TLS | If set to any non empty value then Baserow will attempt to send emails using TLS.Whether to use a TLS (secure) connection when talking to the SMTP server. This is used for explicit TLS connections, generally on port 587. If you are experiencing hanging connections, see the implicit TLS setting EMAIL\_SMTP\_USE\_SSL. | |
| EMAIL\_SMTP\_USE\_SSL | If set to any non empty value then an implicit TLS (secure) connection will be used when talking to the SMTP server. In most email documentation this type of TLS connection is referred to as SSL. It is generally used on port 465. If you are experiencing problems, see the explicit TLS setting EMAIL\_SMTP\_USE\_TLS. Note that EMAIL\_SMTP\_USE\_TLS/EMAIL\_SMTP\_USE\_SSL are mutually exclusive, so only set one of those settings to True. | |
| EMAIL\_SMTP\_HOST | The host of the external SMTP server that Baserow should use to send emails. | |
| EMAIL\_SMTP\_PORT | The port used to connect to $EMAIL\_SMTP\_HOST on. | |
| EMAIL\_SMTP\_USER | The username to authenticate with $EMAIL\_SMTP\_HOST when sending emails. | |
| EMAIL\_SMTP\_PASSWORD | The password to authenticate with $EMAIL\_SMTP\_HOST when sending emails. | |
| EMAIL\_SMTP\_SSL\_CERTFILE\_PATH | If EMAIL\_SMTP\_USE\_SSL or EMAIL\_SMTP\_USE\_TLS is set, you can optionally specify the path to a PEM-formatted certificate chain file to use for the SSL connection. If using docker then you will need to mount in this file into all the Baserow backend containers. | |
| EMAIL\_SMTP\_SSL\_KEYFILE\_PATH | EMAIL\_SMTP\_USE\_SSL or EMAIL\_SMTP\_USE\_TLS is set, you can optionally specify the path to a PEM-formatted private key file to use for the SSL connection. If using docker then you will need to mount in this file into all the Baserow backend containers. Note that setting EMAIL\_SMTP\_SSL\_CERTFILE\_PATH and EMAIL\_SMTP\_SSL\_KEYFILE\_PATH doesnt result in any certificate checking. Theyre passed to the underlying SSL connection. Please refer to the documentation of Pythons ssl.wrap_socket() function for details on how the certificate chain file and private key file are handled. | |
### Web-frontend Configuration
| Name | Description | Defaults |
|-----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
| DOWNLOAD\_FILE\_VIA\_XHR | Set to \`1\` to force download links to download files via XHR query to bypass \`Content-Disposition: inline\` that can't be overridden in another way. If your files are stored under another origin, you also must add CORS headers to your server. | 0 |
| BASEROW\_DISABLE\_PUBLIC\_URL\_CHECK | When opening the Baserow login page a check is run to ensure the PUBLIC\_BACKEND\_URL/BASEROW\_PUBLIC\_URL variables are set correctly and your browser can correctly connect to the backend. If misconfigured an error is shown. If you wish to disable this check and warning set this to any non empty value. | |
| ADDITIONAL\_MODULES | **Internal** A list of file paths to Nuxt module.js files to load as additional Nuxt modules into Baserow on startup. | |
| BASEROW\_DISABLE\_GOOGLE\_DOCS\_FILE\_PREVIEW | Set to \`true\` or \`1\` to disable Google docs file preview. | |
| BASEROW_MAX_SNAPSHOTS_PER_GROUP | Controls how many application snapshots can be created per workspace. | -1 (unlimited) |
| BASEROW\_USE\_PG\_FULLTEXT\_SEARCH | By default, Baserow will use Postgres full-text as its search backend. If the product is installed on a system with limited disk space, and less accurate results / degraded search performance is acceptable, then switch this setting off by setting it to false. | true |
| BASEROW\_UNIQUE\_ROW\_VALUES\_SIZE\_LIMIT | Sets the limit for the automatic detection of multiselect options when converting a text field to a multiselect field. Increase the value to detect more options automatically, but consider performance implications. | 100 |
| BASEROW\_BUILDER\_DOMAINS | A comma separated list of domain names that can be used as the domains to create sub domains in the application builder. | |
| BASEROW\_FRONTEND\_SAME\_SITE\_COOKIE | String value indicating what the sameSite value of the created cookies should be. | lax |
### SSO Configuration
| Name | Description | Defaults |
|--------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| BASEROW\_ALLOW\_MULTIPLE\_SSO\_PROVIDERS\_FOR\_SAME\_ACCOUNT | By default Baserow will show a "please use the provider that you originally signed up with" error if you attempt to login to an email which has been already registered in your Baserow server with a different SSO provider/authentication method. This is to increase the security of your Baserow server. However, if you wish to allow a user who for example signed up initially using email and password to now login using a new SSO provider, and are comfortable with the increased risk of allowing this, then set this environment variable to any non empty value to disable this check. When turned on this environment variable will allow a Baserow account to be logged into by any available authentication method and not just the first one that particular user signed up with. If you later turn off this environment variable by removing it, users who have previously logged into their account with multiple different providers will be able to continue to use all of those providers to login, however any new users will be forced to use the first provider they signed up with. | |
### `baserow/baserow` Image only Configuration
| Name | Description | Defaults |
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| NO\_COLOR | Set this to any non empty value to disable colored logging in the all-in-one baserow image. | |
| DATA\_DIR | For the all-in-one image only, this controls where Baserow will store all data that needs to be persisted. Inside this folder Baserow will store<br>\- Its postgres database<br>\- Redis database<br>\- Any autogenerated secrets like the django SECRET\_KEY, the postgresql database user password and the redis user password<br>\- Caddy will store its state + any certificates and keys it uses during auto https | |
| DISABLE\_VOLUME\_CHECK | For the all-in-one image only setting this to any non empty value will disable the check it runs on startup that the “/baserow/data/” directory is mounted to a volume. | |
### Plugin Configuration
| Name | Description | Defaults |
|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| BASEROW\_PLUGIN\_GIT\_REPOS | A comma separated list of plugin git repos to install on startup. | |
| BASEROW\_PLUGIN\_URLS | A comma separated list of plugin urls to install on startup. | |
| BASEROW\_DISABLE\_PLUGIN\_INSTALL\_ON\_STARTUP | When set to any non-empty values no automatic startup check and/or install of plugins will be run. Disables the above two env variables. |
| BASEROW\_PLUGIN\_DIR | **INTERNAL** Sets the folder where the Baserow plugin scripts look for plugins. | In the all-in-one image `/baserow/data/plugins`, otherwise `/baserow/plugins` |
### Posthog configuration
| Name | Description | Defaults |
|----------------------------|-----------------------------------------------------------------|-------------------------------------------------------------------------------|
| POSTHOG\_PROJECT\_API\_KEY | Set this to your Posthog project API key for product analytics. | |
| POSTHOG\_HOST | Set this to your Posthog host for product analytics. | |