Deploying¶
You can deploy marimo in three ways:
- via an edit server, which allows you to create and edit notebooks. On
the CLI, this is launched with
marimo edit
, and is similar tojupyter notebook
. - via a run server, which allows you serve marimo notebooks as read-only
web apps. On the CLI, this is launched with
marimo run notebook.py
- programmatically, which allows you serve read-only marimo apps as part of other ASGI applications, for example using FastAPI.
Sharing lightweight notebooks on the web
To share notebooks on the public web, try using our online playground. Our playground runs entirely in the browser -- no backend required, via WASM.
Or, to share notebooks with email-based authorization, you can also try our free community cloud, which is also powered by WASM.
WASM notebooks support most but not all Python features and packages.
Deploying an edit server¶
Here are a few ways to deploy an edit server on a remote instance:
- With ssh-port forwarding, using
marimo edit --headless
. - Via docker and our prebuilt containers.
- Via a deployment service such as Railway.
- Behind JupyterHub.
Deploying as read-only apps¶
These guides help you deploy marimo notebooks as read-only apps.
programmatically | Programmatically run and customize read-only marimo apps |
deploying_docker | Deploy with Docker |
authentication | Authentication and security |
deploying_public_gallery | Deploy to our public gallery |
deploying_hugging_face | Deploy to Hugging Face |
deploying_ploomber | Deploy to Ploomber Cloud |
Health and status endpoints¶
The following endpoints may be useful when deploying your application:
/health
- A health check endpoint that returns a 200 status code if the application is running as expected/healthz
- Same as above, just a different name for easier integration with cloud providers/api/status
- A status endpoint that returns a JSON object with the status of the server
Configuration¶
If you would like to deploy your application at a subpath, you can set the --base-url
flag when running your application.
Including code in your application¶
You can include code in your application by using the --include-code
flag when running your application.