This template provides a basic setup for deploying a marimo app to fly.io.
- Python 3.12 or higher
- uv package manager
- fly.io account
-
Install uv
-
Create a virtual environment and install dependencies:
uv sync- Run locally:
uv run marimo edit-
Install the fly.io CLI
-
Login to fly.io:
fly auth login- Create a new app (first time only):
fly launch- Deploy:
fly deploy --remote-only
# REQUIRED! You must scale to 1 container
# because marimo is stateful.
fly scale count 1To enable automatic deployments via GitHub Actions:
- Create a fly.io API token:
fly auth token-
Add the token as a GitHub secret named
FLY_API_TOKEN -
Push to the main branch to trigger deployment
- Edit
src/app.pyto modify your marimo app - The app runs on port 2718 by default
- fly.io will automatically assign a public URL
For development, you can use uv's pip commands:
# Install a new package
uv add package-name
# Update dependencies
uv sync