Skip to main content
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.

MindsDB Authentication

MindsDB does not require authentication by default. If you want to enable authentication, you can set the MINDSDB_USERNAME and MINDSDB_PASSWORD environment variables.

Example

docker run --name mindsdb_container -e MINDSDB_USERNAME='mindsdb_user' -e MINDSDB_PASSWORD='mindsdb_password' -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

MindsDB Configuration File

In order to start MindsDB with a custom configuration file, the MINDSDB_CONFIG_PATH environment variable should store the file path.

Example

docker run --name mindsdb_container -e MINDSDB_CONFIG_PATH=/Users/username/path/config.json -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

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
In 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.

Example

docker run --name mindsdb_container -e MINDSDB_STORAGE_DIR='~/home/mindsdb/var' -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

MindsDB Configuration Storage

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.

Example

docker run --name mindsdb_container -e MINDSDB_DB_CON='postgresql://user:secret@localhost' -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

MindsDB APIs

The MINDSDB_APIS environment variable lets users define which APIs to start. Learn more about the available APIs here.

Example

docker run --name mindsdb_container -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

MindsDB Logs

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.

Example

docker run --name mindsdb_container -e MINDSDB_LOG_LEVEL='DEBUG' -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

MindsDB Default Project

By 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.

Example

docker run --name mindsdb_container -e MINDSDB_DEFAULT_PROJECT='my_project' -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

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 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.

Example

docker run --name mindsdb_container -e USE_PIDFILE=1 -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

MindsDB GUI Updates

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).

Example

docker run --name mindsdb_container -e MINDSDB_GUI_AUTOUPDATE=false -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

MindsDB GUI Startup and Updates

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.

Example

docker run --name mindsdb_container -e MINDSDB_NO_STUDIO=true -e MINDSDB_APIS=http,mysql -p 47334:47334 -p 47335:47335 mindsdb/mindsdb
I