Self-hosting marimo the easy way

Self-hosting marimo the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
5 min

marimo is an open-source reactive notebook for Python. Unlike traditional Jupyter notebooks, marimo notebooks are reproducible, git-friendly, and can be executed as scripts or shared as interactive apps. It also comes with built-in SQL support, making it a great choice for data analysis and exploration.

Sliplane lets you deploy marimo in minutes with a one-click preset. No server setup, no reverse proxy, no infrastructure headaches. Just click deploy and start writing Python notebooks in your browser.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy marimo >
  1. Click the deploy button above
  2. Select a project
  3. Select a server (If you just signed up you get a 48-hour free trial server)
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's marimo preset. Here's what it includes:

  • The SQL variant of the marimo Docker image (ghcr.io/marimo-team/marimo), which ships with built-in SQL support for querying databases directly from your notebooks
  • Specific version tag for stability
  • Persistent storage mounted to /app, so your notebooks survive redeployments
  • A randomly generated token password for authentication
  • Pre-configured to listen on all network interfaces and port 8080

Next steps

Once marimo is running, open the domain Sliplane assigned (e.g. marimo-xxxx.sliplane.app) in your browser.

Logging in

You'll be prompted for an access token. Find your TOKEN_PASSWORD value in the service's environment variables on Sliplane and enter it to log in.

Creating notebooks

After logging in, you'll see the marimo file browser. Click Create to start a new notebook. marimo notebooks are stored as plain .py files in the /app volume, so they're easy to version control and share.

Key features to explore

  • Reactive execution: Change a cell and all dependent cells update automatically
  • SQL cells: Query databases directly in your notebook using the built-in SQL editor
  • App mode: Share notebooks as interactive web apps with marimo run instead of marimo edit
  • Package management: marimo can auto-detect and install missing packages

Environment variables

You can customize these environment variables in your Sliplane service settings:

VariableDescription
TOKEN_PASSWORDThe password used to access the marimo editor
PORTThe port marimo listens on (default: 8080)

Troubleshooting

If you can't access the marimo UI, check the service logs in Sliplane's built-in log viewer. Common issues include:

  • Connection refused: Make sure the service has finished deploying and the health check is passing
  • Authentication errors: Double-check your TOKEN_PASSWORD environment variable

For general Docker log tips, check out our post on how to use Docker logs.

Cost comparison

You can also self-host marimo with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB40 GB€9 (~$10.65)Flat rate, 1 TB bandwidth, SSL included
Fly.io22 GB40 GB~$18Disk and bandwidth billed separately
Render12 GB40 GB~$35100 GB bandwidth, Disk billed separately
Railway22 GB40 GB~$67 + $20 planPro plan floor, usage-based, bandwidth billed separately
Click here to see how these numbers were calculated.

(Assuming an always-on instance running 730 hrs/month)

  • Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
  • Fly.io: shared-cpu-2x 2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU).
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
  • Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

FAQ

What can I use marimo for?

marimo is great for data exploration, prototyping, building internal tools, and creating reproducible analyses. Its reactive execution model means you always see up-to-date results, and the built-in SQL support lets you query databases without leaving the notebook.

How do I connect marimo to a database?

marimo's SQL variant supports connecting to databases like PostgreSQL, MySQL, and SQLite. If your database runs on the same Sliplane server, use the internal service name as the host. You can also install additional Python packages by adding them in your notebook code.

How do I update marimo?

Change the image tag in your Sliplane service settings to a newer version and redeploy. Check the marimo GitHub releases for the latest stable version.

Can I run marimo notebooks as standalone apps?

Yes. marimo supports an "app mode" where notebooks run as interactive web applications. To switch from edit mode to app mode, change the command in your service settings from marimo edit to marimo run. In app mode, users can interact with the notebook outputs without seeing or editing the code.

What's the difference between marimo and Jupyter?

marimo notebooks are stored as pure Python files (not JSON like Jupyter), making them easy to version control with git. The reactive execution model ensures cells always reflect the current state, eliminating the common Jupyter problem of out-of-order execution. marimo also has a built-in package manager and SQL support.

Self-host marimo now - It's easy!

Sliplane gives you a reactive Python notebook with SQL support in just a few clicks.