Deploy to a cloud host
A deploy button creates your own L2M in your own cloud account in a few minutes: the API, the studio and a Postgres database, behind the platform's HTTPS address. Nobody else hosts or sees anything. The platform bills you, not the L2M project, so check its pricing page before you click.
To run L2M on your own machine instead, see Install with Docker.
What each button creates
| Render | DigitalOcean App Platform | |
|---|---|---|
| Defined in | render.yaml | .do/deploy.template.yaml |
| Studio | l2m, a web service on the free instance type, at https://<name>.onrender.com | web, the smallest instance size, at the app's https://<name>.ondigitalocean.app address |
| API | l2m-api, a private service (2 GB, no public address); the studio forwards to it | api (1 GB); the app's router sends the API routes to it |
| Database | l2m-db, Render Postgres (smallest paid type), private network only | db, a Dev Database (PostgreSQL) |
| Master key and admin password | Generated by Render | You set them before creating the app |
| Pricing | render.com/pricing | digitalocean.com/pricing/app-platform |
Both run the release images, ghcr.io/tensorgreed/l2m and ghcr.io/tensorgreed/l2m-web, pinned to the release tag named in the file. Data lives in Postgres because neither platform keeps a container's own files across deploys without extra setup. The API needs about 400 to 500 MB of memory, so it does not fit the smallest instance types.
On Render the studio uses the free instance type, which sleeps after 15 minutes without traffic and takes about a minute to wake (Render's free tier). While it sleeps, webhook and gateway calls wait for it too. Switch the l2m service to a paid instance type in the dashboard to keep it awake. The API and the database run on paid types, since a free database is deleted after a while.
Render
- Click Deploy to Render and sign in. Render shows the three resources from
render.yaml. - Give the Blueprint a name and click Deploy Blueprint. The first deploy takes a few minutes; until the API is up, the studio answers
502. - Read the admin password: l2m-api → Environment →
BOOTSTRAP_ADMIN_PASSWORD. - Open the
l2mservice'shttps://…onrender.comaddress and sign in asadmin@l2m.localwith that password.
DigitalOcean App Platform
Click Deploy to DigitalOcean and sign in.
On the api component, edit the environment variables before you create the app:
SECRET_MASTER_KEY_BASE64: 32 random bytes, base64. Runopenssl rand -base64 32and paste the result. Keep a copy somewhere safe.BOOTSTRAP_ADMIN_PASSWORD: the first admin's password, at least 8 characters.
The placeholders (
CHANGE) are refused, so the API does not start until both are set.Create the app. The first deploy takes a few minutes.
Open the app's
https://…ondigitalocean.appaddress and sign in asadmin@l2m.localwith your password.
After the first sign-in
- Change the admin password under Settings → Security → Password. The
BOOTSTRAP_ADMIN_*values are only used to create the first admin; once it exists you may remove them. - Public sign-up is off. Invite people under Settings → Users.
- Add model keys as secrets in the studio, or set
OPENAI_API_KEY,ANTHROPIC_API_KEYorGEMINI_API_KEYon the API service. The starter templates on Home run without any. - Render only: set
APP_PUBLIC_URLandWEB_ORIGINonl2m-apito the studio's address (for examplehttps://l2m-ab12.onrender.com). Links in approval notifications and connected accounts' sign-in redirects are built from it. On DigitalOcean the template sets both to the app's address. - Webhook, MCP gateway, A2A agent and
/v1addresses all start with the studio's public address. See Environment for every other setting.
Upgrade
Each file pins one release tag for both images. To upgrade, read the changelog, back up the database, then set both images to the new tag:
- Render: each service's Settings → Image, then deploy. If your Blueprint stays linked to the repository, Render may also apply changes to
render.yaml; check your Blueprint's sync setting. - DigitalOcean: Settings → each component → Source, change the tag, and deploy.
Migrations run when the new API starts. Keep the studio and the API on the same release.
Backups
Everything that matters is in Postgres, encrypted secrets included, plus the master key that decrypts them.
- Keep a copy of
SECRET_MASTER_KEY_BASE64apart from the database (on Render, copy it from l2m-api → Environment). A restored database cannot read its secrets with a different key. - Render: paid Postgres instances have point-in-time recovery and exports; see Render Postgres backups.
- DigitalOcean: a Dev Database is meant for light use. For data you care about, take regular
pg_dumpcopies with its connection string, or upgrade it to a managed database (App Platform moves the data for you); see Manage databases.
See Backup and recovery for what to keep and how to restore.
Run the images on another host
The same two images run on any platform that can start containers. The API needs DB_TYPE=postgres and DB_POSTGRESDB_URL (or a persistent disk at /app/apps/api/data for SQLite), SECRET_MASTER_KEY_BASE64, COOKIE_SECURE=true behind HTTPS, and BOOTSTRAP_ADMIN_EMAIL with BOOTSTRAP_ADMIN_PASSWORD for the first admin. The studio forwards the API routes to api:4000; set L2M_API_UPSTREAM=host:port on the studio container when the API has another address. The name is then looked up again every 10 seconds, so a redeployed API is found without restarting the studio. Give a name the platform's DNS answers as written (on Kubernetes, the Service's full name). If the platform's network is IPv6 only, set API_HOST=:: on the API so it listens there too.