marimo run
Run one or more marimo notebooks as read-only web applications. Perfect for sharing interactive dashboards and apps.Usage
Arguments
NAME - Path to notebook file(s) or directory(ies) to run (required)- Can specify multiple files or directories
- If a directory is provided, all marimo notebooks in it will be available
- Supports URLs for remote notebooks
- When multiple paths are provided, creates a gallery view
--)
- All arguments after
--are passed to the notebook’ssys.argv
Options
Server Configuration
-p, —port PORT - Port to attach to- Type: Integer
- Default: Auto-assigned
- Type: String
- Default:
127.0.0.1
- Type: String
/)
- Type: String
- Default:
""
Browser & UI
—headless - Don’t launch a browser- Type: Flag
- Default:
False
- Type: Flag
- Default:
False - When enabled, users can view the source code
Authentication
—token / —no-token - Use token for authentication- Type: Flag
- Default:
False
- Type: String
- for stdin
- Type: String
Security & CORS
—allow-origins ORIGIN - Allowed origins for CORS- Type: String (can be repeated)
- If
--untrusted, runs marimo in a Docker container
Development Features
—watch - Watch files for changes and reload the app- Type: Flag
- Default:
False - Uses
watchdogif installed, otherwise polls every 1 second
- Type: Flag
- Default:
True
Console & Debugging
—redirect-console-to-browser - Redirect console logs to browser console- Type: Flag
- Default:
False
Validation
—check / —no-check - Perform static check of notebook before running- Type: Flag
- Default:
True - Validates notebook for errors before starting
Sandbox & Isolation
—sandbox / —no-sandbox - Run in an isolated virtual environment- Type: Flag
- For multiple files/directories, uses IPC kernels with per-notebook sandboxed environments
- Requires
uvandpyzmq
Session Management
—session-ttl SECONDS - Seconds to wait before closing a session on websocket disconnect- Type: Integer
- Default:
120
Examples
Basic Usage
Custom Server Configuration
Including Code
Authentication
Development Workflow
Remote Notebooks
Passing Arguments to Notebook
Gallery Mode
Sandbox Mode
Production Deployment
CORS Configuration
Console Output
Tips
- Use
--watchduring development to see changes immediately - Enable
--include-codefor educational or open-source apps - Use
--sandboxfor untrusted notebooks or to isolate dependencies - For production, combine
--headless,--host 0.0.0.0, and--token - Gallery mode is great for creating dashboards or app collections
Related Commands
- marimo edit - Edit notebooks interactively
- marimo export - Export notebooks to static formats