Configuration reference
Every setting the code reads, with its default.
Where settings come from
MLStudio reads settings from four places. Pick the one that matches what you want to change.
config/mlstudio_config.json, read at start. Used for secrets, database, folders and upload size.- Environment variables, and a
.envfile in the project folder, which is loaded at start. - The database Settings table, edited on the App Settings page or through the Settings API.
- Launcher flags.
Some older text in the Overview and the main documentation page shows a .env file with SECRET_KEY, DATABASE_URI, FLASK_ENV, FLASK_DEBUG, LOG_LEVEL, DATABASE_URL, MAX_UPLOAD_SIZE and UPLOAD_FOLDER. The application code does not read those variables. The launcher writes some of them to .env, but changing them has no effect. Use the file keys below instead.
Launcher flags
| Flag | Meaning |
|---|---|
| --industry <name> | Lock to one industry mode. |
| --port <number> | Port. Default 5001. |
| --host <address> | Bind address. |
| --debug | Debug mode. |
| --no-browser | Do not open the browser. |
The launchers check for Python 3.8 or later.
Environment variables
| Variable | Default | Meaning |
|---|---|---|
| HOST | 127.0.0.1 | Bind address. |
| PORT | 5001 | Port. |
| DEBUG | true | Development mode. The code default is on, so set DEBUG=false for real use. |
| OPEN_BROWSER, MLSTUDIO_NO_BROWSER | Control whether a browser opens at start. | |
| MLSTUDIO_FORCED_INDUSTRY | Lock to one industry mode. | |
| MLSTUDIO_EMBEDDED_PYTHON | Set to 1 to use an embedded Python. | |
| DB_FILE | mlstudio.db | Name of the SQLite file. |
| AUTH_MODE | local | local or identity_server. |
| IDENTITY_SERVER_URL, IDENTITY_SERVER_CLIENT_ID, IDENTITY_SERVER_CLIENT_SECRET | Identity Server connection. | |
| COMMUNITY_URL | http://127.0.0.1:5002 | Community server. |
| COMMUNITY_API_KEY | Community key. | |
| KAGGLE_USERNAME, KAGGLE_API_KEY | Used when the administrator has not stored Kaggle credentials in the database. | |
| ENCRYPTION_KEY | A Fernet key for encrypted settings. See below. | |
| *_ALLOW_PRIVATE_NETWORK | off | Six switches listed on the Connecting to other systems page. Values 1, true, yes, on. |
Encryption key
Encrypted values (Kaggle keys, credential vault, the Host Admin key) use a Fernet key. The application looks for it in this order: the Settings row encryption_key in category security, then ENCRYPTION_KEY, and otherwise it derives one from the application secret and saves it to Settings. Back it up. Losing it makes stored secrets unreadable. The dataset marketplace admin page can show the key status and generate a new key.
config/mlstudio_config.json
| Key | Default | Meaning |
|---|---|---|
| secret_key | a built-in development value | Flask session secret. Set your own before real use. |
| jwt_secret_key | JWT signing secret. | |
| jwt_access_token_expires | 3600 | Seconds. |
| database_uri | written on first run | SQLite file named mlstudio.db unless DB_FILE is set. Changed by the setup wizard. |
| upload_folder | data | Upload folder. |
| projects_folder | projects | Project folder. |
| max_upload_size | 104857600 | Bytes (100 MB). |
Settings table defaults
These rows are created with these values. View and edit them on App Settings, or through the Settings API.
| Key | Default |
|---|---|
| app_name | Beep ML Studio |
| company_name | TheTechIdea |
| app_version | 1.0.0 |
| debug_mode | false |
| log_level | INFO |
| base_path | . |
| projects_folder | projects |
| data_folder | data |
| models_folder | models |
| providers_folder | providers |
| python_embedded_path | python-embedded |
| environment_manager_type | local |
| host_admin_url | http://127.0.0.1:5000 |
| host_admin_api_key | empty, stored encrypted |
| default_python_version | 3.11 |
| auto_create_environments | true |
| default_framework | scikit-learn |
| max_upload_size_mb | 100 |
| default_train_test_split | 0.2 |
| default_random_state | 42 |
| auto_save_models | true |
| items_per_page | 20 |
| auto_refresh_interval | 30 |
| show_advanced_options | false |
A search of the code found no reader for default_python_version, auto_create_environments, default_train_test_split, default_random_state, auto_save_models, items_per_page, auto_refresh_interval, show_advanced_options and app_version. They are stored and shown, but changing them does not change behaviour today.
Other keys read when present
| Key | Default | Used for |
|---|---|---|
| ml_server_url | http://127.0.0.1:6000 | MLServer address. |
| ml_server_api_key | MLServer Bearer token. | |
| community_url, community_api_key, community_connected | Community connection. | |
| kaggle_username, kaggle_api_key | Kaggle (category dataset_marketplace). |
Security page values
The page at /admin/settings stores these starting values: smtp_port 587, smtp_use_tls true, from_name Beep ML Studio, mfa_code_expiry_minutes 10, captcha_on_register true, session_timeout_minutes 60, max_login_attempts 5, lockout_duration_minutes 15, password_min_length 8, password_require_uppercase true, password_require_number true, password_require_special false, and fields for Google, Microsoft, GitHub and Facebook sign in. As noted on the Setup and accounts page, nothing in the code reads them yet.
Settings API
| Route | What it does |
|---|---|
| GET /api/v1/settings | List. Optional category. |
| GET /api/v1/settings/categories | Categories. |
| GET, PUT, DELETE /api/v1/settings/<key> | Read, change, delete. |
| POST /api/v1/settings | Create. Body key (required), category, value_type, description, is_encrypted, value. |
| POST /api/v1/settings/reset | Reset to the defaults above. |
The handlers for these routes do not check that the caller is signed in. Keep MLStudio off networks you do not trust.