Skip to content

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.

Deploy to Render   Deploy to DigitalOcean

What each button creates ​

RenderDigitalOcean App Platform
Defined inrender.yaml.do/deploy.template.yaml
Studiol2m, a web service on the free instance type, at https://<name>.onrender.comweb, the smallest instance size, at the app's https://<name>.ondigitalocean.app address
APIl2m-api, a private service (2 GB, no public address); the studio forwards to itapi (1 GB); the app's router sends the API routes to it
Databasel2m-db, Render Postgres (smallest paid type), private network onlydb, a Dev Database (PostgreSQL)
Master key and admin passwordGenerated by RenderYou set them before creating the app
Pricingrender.com/pricingdigitalocean.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 ​

  1. Click Deploy to Render and sign in. Render shows the three resources from render.yaml.
  2. 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.
  3. Read the admin password: l2m-api → Environment → BOOTSTRAP_ADMIN_PASSWORD.
  4. Open the l2m service's https://…onrender.com address and sign in as admin@l2m.local with that password.

DigitalOcean App Platform ​

  1. Click Deploy to DigitalOcean and sign in.

  2. On the api component, edit the environment variables before you create the app:

    • SECRET_MASTER_KEY_BASE64: 32 random bytes, base64. Run openssl rand -base64 32 and 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.

  3. Create the app. The first deploy takes a few minutes.

  4. Open the app's https://…ondigitalocean.app address and sign in as admin@l2m.local with 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_KEY or GEMINI_API_KEY on the API service. The starter templates on Home run without any.
  • Render only: set APP_PUBLIC_URL and WEB_ORIGIN on l2m-api to the studio's address (for example https://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 /v1 addresses 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_BASE64 apart 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_dump copies 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.

This website (not the L2M product) counts page views with GoatCounter, without cookies.