Run it

PlatformCommand
Windowsrun.bat
Linux./run.sh
macOS./run.command
Anypython run_mlstudio.py

Flags are on the Configuration page. A first run opens the setup wizard. The default address is http://127.0.0.1:5001.

run.py reads DEBUG with a default of true, so it starts in development mode and runs Flask's development server (socketio.run with allow_unsafe_werkzeug). Set DEBUG=false in the environment. The repository also contains wsgi.py, which exposes app = create_app() for a WSGI server. Socket.IO runs in threading mode.

What to change before real use

  1. Set your own secret_key and jwt_secret_key in config/mlstudio_config.json. The built-in secret key is for development only.
  2. Set DEBUG=false.
  3. Bind to 127.0.0.1 and put a reverse proxy with HTTPS in front, or restrict the network. CORS and Socket.IO origins are open (any origin) in the code.
  4. Create the administrator through the setup wizard and use strong passwords. There is no default account.
  5. Decide how people sign in: local accounts, or an Identity Server.
  6. Back up your encryption key (see Configuration).
  7. Remember that several API groups show no sign in check in code (see the REST API reference).

Where data lives

  • The database. SQLite by default, in the file named by DB_FILE (default mlstudio.db). Other databases are chosen in the setup wizard.
  • config/mlstudio_config.json.
  • instance/setup_complete.json, the setup state.
  • The folders named by upload_folder (default data) and projects_folder (default projects).
  • Python environments for projects, managed by the application. Deleting a project does not delete its virtual environment.

Back up the database, the config file, the encryption key and the project folders together.

Database changes

GET /api/v1/database/status shows the state of the schema and POST /api/v1/database/migrate applies the migration. Move to another database type with the setup wizard.

Health check

GET /api/v1/health returns success, status healthy and embedded_python_available. Use it for a load balancer probe.

Running MLServer

MLServer is deployed separately. See the Beep AI MLServer page. For production use gunicorn with gunicorn.conf.py, set MLSERVER_ENV=production, and set MLSERVER_SECRET_KEY. In production, secrets in the files without that variable stop the server from starting.

Scheduled workflows

Schedules run inside the MLStudio process through APScheduler. The application must be running at the scheduled time, and APScheduler must be installed.