Browse Source

docs: improve environment documentation

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/8618/head
Pranav C 1 month ago
parent
commit
171ddf2cab
  1. 14
      packages/noco-docs/docs/020.getting-started/050.self-hosted/020.environment-variables.md

14
packages/noco-docs/docs/020.getting-started/050.self-hosted/020.environment-variables.md

@ -6,12 +6,14 @@ tags: ['Open Source']
keywords : ['NocoDB environment variables', 'NocoDB env variables', 'NocoDB envs', 'NocoDB env']
---
For production use cases, it is **recommended** to set at least:
For **production** use cases, it is recommended to set at least the following environment variables:
- `NC_DB`
- `NC_AUTH_JWT_SECRET`
- `NC_PUBLIC_URL`
- `NC_REDIS_URL`
- `NC_DB`: Specifies the connection string for your database. See our example database URLs [here](https://github.com/nocodb/nocodb#docker).
- `NC_AUTH_JWT_SECRET`: Defines the secret key used for signing JSON Web Tokens (JWTs). This is crucial for ensuring the security and integrity of authentication tokens.
- `NC_PUBLIC_URL`: Sets the base URL used for constructing URLs in email templates, generating the Swagger documentation URL, and handling backend URL needs. By default, it infers the URL from the incoming request on the backend. If the server is behind a proxy, this may result in incorrect URLs. Setting this explicitly ensures consistency across the application.
- `NC_REDIS_URL`: Provides the connection string for your Redis server. Redis is used for caching and improving performance, so setting this variable ensures NocoDB can connect to your Redis instance.
The following table lists all the environment variables that can be set to configure NocoDB:
| Variable | Description | If absent |
| -------- | ----------- |-----------------------------------------------------------------------------------------------------|
@ -21,6 +23,7 @@ For production use cases, it is **recommended** to set at least:
| `DATABASE_URL` | Can be used instead of `NC_DB` and value should be a JDBC URL string. | |
| `DATABASE_URL_FILE` | Can be used instead of `NC_DB` and value should be a valid path to a JDBC URL file. | |
| `NC_AUTH_JWT_SECRET` | JWT secret used for auth and storing other secrets. | A random secret is generated. |
| `NC_PUBLIC_URL` | is the base URL for constructing URLs in email templates, generating the Swagger documentation URL, and handling backend URL requirements. Set it to your public-facing NocoDB URL for consistency across the application. | By default, it infers the URL from the incoming request on the backend. If the server is behind a proxy, this may result in incorrect URLs.|
| `NC_ADMIN_EMAIL` | Super admin e-mail address. | |
| `NC_ADMIN_PASSWORD` | Super admin password. The password should have at least 8 letters with one uppercase, one number and one special letter. Allowed special characters include `$&+,:;=?@#\|'.^*()%!_-"`. | |
| `PORT` | Network port NocoDB runs on. | Defaults to `8080`. |
@ -30,7 +33,6 @@ For production use cases, it is **recommended** to set at least:
| `DB_QUERY_LIMIT_MAX` | Maximum allowed pagination limit. | Defaults to `1000`. |
| `DB_QUERY_LIMIT_MIN` | Minimum allowed pagination limit. | Defaults to `1`. |
| `NC_TOOL_DIR` | App directory to keep metadata and app related files in. | Defaults to the current working directory. In docker, maps to `/usr/app/data/` for mounting volume. |
| `NC_PUBLIC_URL` | Used for sending E-mail invitations. | Best guess from HTTP request params. |
| `NC_JWT_EXPIRES_IN` | JWT token expiry time | Defaults to `10h`. |
| `NC_CONNECT_TO_EXTERNAL_DB_DISABLED` | Disable base creation on external databases. | |
| `NC_MINIMAL_DBS` | Create a new SQLite file for each base. All the SQLite database files are stored in the `nc_minimal_dbs` folder in the current working directory. Enabling this option automatically sets `NC_CONNECT_TO_EXTERNAL_DB_DISABLED`, i.e. disables base creation on external databases. | |

Loading…
Cancel
Save