Back to Marimo

Deploy notebook servers or apps

docs/guides/deploying/index.md

0.23.52.8 KB
Original Source

Deploy notebook servers or apps

marimo can be deployed as an "edit" server for creating, running, and editing notebooks, or an app server for serving read-only web apps. For convenience, you can use our pre-built containers.

!!! tip "Sharing notebooks on the public web" To share notebooks on the public web without managing infrastructure, try molab, our free cloud-hosted notebook environment

Notebook servers

Deploy an edit server (marimo edit) to let users create and edit notebooks on a remote instance.

GuideDescription
JupyterHubRun marimo inside JupyterHub with our JupyterLab extension
KubernetesDeploy on Kubernetes
SkyPilotDeploy on cloud VMs with SkyPilot
SlurmRun on HPC clusters with Slurm

You can also deploy an edit server with ssh port forwarding using marimo edit --headless.

Apps

Deploy notebooks as read-only web apps (marimo run) or embed them in other applications.

GuideDescription
FastAPIProgrammatically run marimo apps as part of ASGI applications
AuthenticationAuthentication and security
DockerDeploy with Docker
HuggingFaceDeploy to Hugging Face Spaces
RailwayDeploy to Railway
nginxDeploy behind nginx

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.

bash
marimo run app.py --base-url /subpath

Including code in your application

You can include code in your application by using the --include-code flag when running your application.

bash
marimo run app.py --include-code

Redirecting standard output to the browser

By default, Marimo doesn't send standard output (stdout) to the browser, but for debugging purposes you can enable this with --redirect-console-to-browser:

bash
marimo run app.py --redirect-console-to-browser

Showing error tracebacks in the browser

By default, Marimo redacts error tracebacks in the browser for security reasons, but you can enable showing full tracebacks with --show-tracebacks:

bash
marimo run app.py --show-tracebacks