docs/setup/environment-vars.mdx
Most of the MindsDB functionality can be modified by extending the default configuration, but some of the configuration options can be added as environment variables on the server where MindsDB is deployed. Here is the list of all the available environment variables.
MindsDB does not require authentication by default. If you want to enable authentication, you can set the MINDSDB_USERNAME and MINDSDB_PASSWORD environment variables.
```bash Shell
export MINDSDB_USERNAME='mindsdb_user'
export MINDSDB_PASSWORD='mindsdb_password'
```
Users can define the authentication type by setting the MINDSDB_HTTP_AUTH_TYPE environment variable to one of the following values:
session_or_token is the default value. When a user logs in to MindsDB, the session cookie is set and the token is returned in the response. To use the MindsDB API, users can utilize either one or both of these methods.
session sets the session cookie when a user logs in. The session lifetime can be set with the http_permanent_session_lifetime parameter.
token returns the token in the response, which is valid indefinitely.
```bash Shell
export MINDSDB_HTTP_AUTH_TYPE='session_or_token'
```
In order to start MindsDB with a custom configuration file, the MINDSDB_CONFIG_PATH environment variable should store the file path.
```bash Shell
export MINDSDB_CONFIG_PATH=/Users/username/path/config.json
```
By default, MindsDB stores the configuration files by determining appropriate platform-specific directories, e.g. a "user data dir":
~/.local/share/mindsdb/var~/Library/Application Support/mindsdb/varC:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\mindsdb\varIn the MINDSDB_STORAGE_DIR location, MindsDB stores users' data, models and uploaded data files, the static assets for the frontend application and the
sqlite.db file.
You can change the default storage location using MINDSDB_STORAGE_DIR variable.
```bash Shell
export MINDSDB_STORAGE_DIR='~/home/mindsdb/var'
```
MindsDB uses sqlite database by default to store the required configuration as models, projects, files metadata etc.
The full list of the above schemas can be found here. You can change the
default storage option and use different database by adding the new connection string using MINDSDB_DB_CON variable.
MINDSDB_STORAGE_BACKUP_DISABLED1, true, True)falseMINDSDB_STORAGE_BACKUP_DISABLED=1The MINDSDB_APIS environment variable lets users define which APIs to start. Learn more about the available APIs here.
```bash Shell
export MINDSDB_APIS='http,mysql'
```
This environment variable defines the level of logging generated by MindsDB. You can choose one of the values defined here. The INFO level is used by default.
```bash Shell
export MINDSDB_LOG_LEVEL='DEBUG'
```
MINDSDB_CONSOLE_LOG_LEVELDEBUG, INFO, WARNING, ERROR)INFOMINDSDB_CONSOLE_LOG_LEVEL=DEBUGMINDSDB_FILE_LOG_LEVELDEBUG, INFO, WARNING, ERROR)INFO (disabled by default)MINDSDB_FILE_LOG_LEVEL=DEBUGBy default, MindsDB creates a project named mindsdb where all the models and other objects are stored. You can change the default project name by setting the MINDSDB_DEFAULT_PROJECT environment variable.
If this environment variable is set or modified after MindsDB has started, the default project will be renamed accordingly upon restart. To start using the new default project, a USE statement will also need to be executed.
```bash Shell
export MINDSDB_DEFAULT_PROJECT='my_project'
```
MINDSDB_DEFAULT_LLM_API_KEYMINDSDB_DEFAULT_LLM_API_KEY=sk-...MINDSDB_DEFAULT_EMBEDDING_MODEL_API_KEYMINDSDB_DEFAULT_EMBEDDING_MODEL_API_KEY=sk-...MINDSDB_DEFAULT_RERANKING_MODEL_API_KEYMINDSDB_DEFAULT_RERANKING_MODEL_API_KEY=sk-...When running MindsDB via Docker or Docker Extension, the PID file is not used by default. Users can opt for enabling the PID file by defining the USE_PIDFILE environment variable.
If used, the PID file is stored in the temp directory ($TMPDIR on MacOS and Linux, %TEMP% on Windows) under the mindsdb folder.
```bash Shell
export USE_PIDFILE=1
```
In order to disable automatic GUI updates, the MINDSDB_GUI_AUTOUPDATE environment variable should be set to false (or 0).
By default, the automatic GUI updates are enabled and the MINDSDB_GUI_AUTOUPDATE environment variable is set to true (or 1).
```bash Shell
export MINDSDB_GUI_AUTOUPDATE=false
```
In order to not open the MindsDB GUI automatically when starting the instance (and to disable automatic GUI updates), the MINDSDB_NO_STUDIO environment variable should be set to true (or 1).
By default, the MindsDB GUI starts automatically when starting the instance (and the automatic GUI updates are enabled), that is, the MINDSDB_NO_STUDIO environment variable is set to false (or 0).
Note that the MINDSDB_NO_STUDIO is not recommended for the MindsDB instance running in Docker. Instead, use the MINDSDB_GUI_AUTOUPDATE environment variable to disable automatic GUI updates.
```bash Shell
export MINDSDB_NO_STUDIO=true
```
MINDSDB_ML_QUEUE_TYPElocal, redis)localMINDSDB_ML_QUEUE_TYPE=redisMINDSDB_ML_QUEUE_HOSTMINDSDB_ML_QUEUE_TYPE=redis)localhostMINDSDB_ML_QUEUE_HOST=redis.example.comMINDSDB_ML_QUEUE_PORT6379MINDSDB_ML_QUEUE_PORT=6380MINDSDB_ML_QUEUE_DB0MINDSDB_ML_QUEUE_DB=1MINDSDB_ML_QUEUE_USERNAMEMINDSDB_ML_QUEUE_USERNAME=redis_userMINDSDB_ML_QUEUE_PASSWORDMINDSDB_ML_QUEUE_PASSWORD=redis_passMINDSDB_RERANKER_NMINDSDB_RERANKER_N=10MINDSDB_RERANKER_LOGPROBStrue, false, 1, 0, yes, no)MINDSDB_RERANKER_LOGPROBS=trueMINDSDB_RERANKER_TOP_LOGPROBSMINDSDB_RERANKER_TOP_LOGPROBS=5MINDSDB_RERANKER_MAX_TOKENSMINDSDB_RERANKER_MAX_TOKENS=512MINDSDB_RERANKER_VALID_CLASS_TOKENSMINDSDB_RERANKER_VALID_CLASS_TOKENS=token1,token2,token3MINDSDB_DATA_CATALOG_ENABLED1, true)falseMINDSDB_DATA_CATALOG_ENABLED=1MINDSDB_DOCKER_ENV0.0.0.0)MINDSDB_DOCKER_ENV=1MINDSDB_RUNTIME1)MINDSDB_RUNTIME=1