MindsDB Authentication
MindsDB does not require authentication by default. If you want to enable authentication, you can set theMINDSDB_USERNAME and MINDSDB_PASSWORD environment variables.
Example
MindsDB Authentication Type
Users can define the authentication type by setting theMINDSDB_HTTP_AUTH_TYPE environment variable to one of the following values:
-
session_or_tokenis 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. -
sessionsets the session cookie when a user logs in. The session lifetime can be set with thehttp_permanent_session_lifetimeparameter. -
tokenreturns the token in the response, which is valid indefinitely.
Example
MindsDB Configuration File
In order to start MindsDB with a custom configuration file, theMINDSDB_CONFIG_PATH environment variable should store the file path.
Example
MindsDB Storage
By default, MindsDB stores the configuration files by determining appropriate platform-specific directories, e.g. a “user data dir”:- On Linux
~/.local/share/mindsdb/var - On MacOS
~/Library/Application Support/mindsdb/var - On Windows
C:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\mindsdb\var
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.
Example
MindsDB Configuration Storage
MindsDB usessqlite 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.
Example
MindsDB Logs
This environment variable defines the level of logging generated by MindsDB. You can choose one of the values defined here. TheINFO level is used by default.
Example
MINDSDB_CONSOLE_LOG_LEVEL
- Type: String (
DEBUG,INFO,WARNING,ERROR) - Description: Sets console log level
- Default:
INFO - Example:
MINDSDB_CONSOLE_LOG_LEVEL=DEBUG
MINDSDB_FILE_LOG_LEVEL
- Type: String (
DEBUG,INFO,WARNING,ERROR) - Description: Sets file log level and enables file logging
- Default:
INFO(disabled by default) - Example:
MINDSDB_FILE_LOG_LEVEL=DEBUG
MindsDB Default Project
By default, MindsDB creates a project namedmindsdb 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.
Example
MINDSDB_DEFAULT_LLM_API_KEY
- Type: String
- Description: API key for default LLM (Large Language Model)
- Default: None
- Example:
MINDSDB_DEFAULT_LLM_API_KEY=sk-...
MINDSDB_DEFAULT_EMBEDDING_MODEL_API_KEY
- Type: String
- Description: API key for default embedding model
- Default: None
- Example:
MINDSDB_DEFAULT_EMBEDDING_MODEL_API_KEY=sk-...
MINDSDB_DEFAULT_RERANKING_MODEL_API_KEY
- Type: String
- Description: API key for default reranking model
- Default: None
- Example:
MINDSDB_DEFAULT_RERANKING_MODEL_API_KEY=sk-...
MindsDB’s PID File
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 theUSE_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.
Example
MindsDB GUI Updates
In order to disable automatic GUI updates, theMINDSDB_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).
Example
MindsDB GUI Startup and Updates
In order to not open the MindsDB GUI automatically when starting the instance (and to disable automatic GUI updates), theMINDSDB_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.
Example
ML Task Queue
MINDSDB_ML_QUEUE_TYPE
- Type: String (
local,redis) - Description: Type of ML task queue to use
- Default:
local - Example:
MINDSDB_ML_QUEUE_TYPE=redis
MINDSDB_ML_QUEUE_HOST
- Type: String (hostname)
- Description: Redis host for ML task queue (only when
MINDSDB_ML_QUEUE_TYPE=redis) - Default:
localhost - Example:
MINDSDB_ML_QUEUE_HOST=redis.example.com
MINDSDB_ML_QUEUE_PORT
- Type: Integer
- Description: Redis port for ML task queue
- Default:
6379 - Example:
MINDSDB_ML_QUEUE_PORT=6380
MINDSDB_ML_QUEUE_DB
- Type: Integer
- Description: Redis database number for ML task queue
- Default:
0 - Example:
MINDSDB_ML_QUEUE_DB=1
MINDSDB_ML_QUEUE_USERNAME
- Type: String
- Description: Redis username for ML task queue
- Default: None
- Example:
MINDSDB_ML_QUEUE_USERNAME=redis_user
MINDSDB_ML_QUEUE_PASSWORD
- Type: String
- Description: Redis password for ML task queue
- Default: None
- Example:
MINDSDB_ML_QUEUE_PASSWORD=redis_pass
Reranker Configuration
MINDSDB_RERANKER_N
- Type: Integer
- Description: Number of results to rerank
- Default: None
- Example:
MINDSDB_RERANKER_N=10
MINDSDB_RERANKER_LOGPROBS
- Type: Boolean (
true,false,1,0,yes,no) - Description: Enable log probabilities in reranker
- Default: None
- Example:
MINDSDB_RERANKER_LOGPROBS=true
MINDSDB_RERANKER_TOP_LOGPROBS
- Type: Integer
- Description: Number of top log probabilities to return
- Default: None
- Example:
MINDSDB_RERANKER_TOP_LOGPROBS=5
MINDSDB_RERANKER_MAX_TOKENS
- Type: Integer
- Description: Maximum tokens for reranker
- Default: None
- Example:
MINDSDB_RERANKER_MAX_TOKENS=512
MINDSDB_RERANKER_VALID_CLASS_TOKENS
- Type: String (comma-separated list)
- Description: Valid class tokens for reranker
- Default: None
- Example:
MINDSDB_RERANKER_VALID_CLASS_TOKENS=token1,token2,token3
Features
MINDSDB_DATA_CATALOG_ENABLED
- Type: Boolean (
1,true) - Description: Enables the data catalog feature
- Default:
false - Example:
MINDSDB_DATA_CATALOG_ENABLED=1
Runtime
MINDSDB_DOCKER_ENV
- Type: Any value (presence check)
- Description: Indicates MindsDB is running in Docker environment (changes default API host to
0.0.0.0) - Default: Not set
- Example:
MINDSDB_DOCKER_ENV=1
MINDSDB_RUNTIME
- Type: String (
1) - Description: Indicates MindsDB runtime environment
- Default: Not set
- Example:
MINDSDB_RUNTIME=1