Deploy as Interactive App
Deploy your marimo notebooks as read-only web applications that users can interact with. When running as an app, notebooks are presented in a clean interface optimized for end-users, with optional code visibility and built-in authentication.Running as an App
Usemarimo run to launch your notebook as an interactive web application:
http://localhost:2718 by default (or your specified port).
App Mode Features
Read-Only Interface
In app mode, users can:- Interact with UI elements (sliders, dropdowns, buttons, etc.)
- View outputs and visualizations that update reactively
- Navigate between cells and sections
- Download outputs and data when enabled
- Edit or add cells
- Modify code
- Access the notebook source (unless
--include-codeis used)
Code Visibility
By default, code is hidden in app mode. Control code visibility with the--include-code flag:
Live Reload
Enable automatic reload when notebook files change:--watch, the app automatically refreshes when you save changes to the notebook file. Great for development!
Authentication and Access Control
Token Authentication
Protect your app with password authentication:With
--token, marimo generates a random password and displays it in the terminal. The app URL will include an access token for convenience.Authentication Methods
Users can authenticate in three ways:- Login Page: Browser users are redirected to a login page
- Query Parameter:
http://localhost:2718?access_token=your-password - HTTP Basic Auth: For programmatic access
Custom Authentication
For production deployments, implement custom authentication using ASGI middleware:Configuration Options
Network Configuration
1
Host and Port
Specify where the app listens:
2
Reverse Proxy
Configure for deployment behind a proxy:
3
Base URL
Mount app at a subpath:
4
CORS
Allow specific origins:
Session Management
Advanced Options
Gallery Mode
Serve multiple notebooks from a single server:Command-Line Arguments
Pass arguments to your notebook at runtime:Health and Status Endpoints
monitor your deployed app:- Load balancer health checks
- Monitoring and alerting
- Automated deployment verification
Best Practices
Examples
Public Dashboard
Internal Tool with Auth
Development Server
Next Steps
Deploy to Platforms
Deploy your app to cloud platforms and services
Run as Script
Execute notebooks as Python scripts
WASM Deployment
Deploy browser-based notebooks with WebAssembly
Authentication
Advanced authentication and security