
# Agent Cloud vs Railway, Render, Fly and Heroku

All four are general hosts: many services, cron, disks or volumes, add-ons. Agent Cloud runs one server, an optional worker and Postgres per app, and rehearses every database change on a fresh branch of production before it goes live. Agent Cloud is built for agent-made changes.

You ship with `agc ship`; success is exit 0 with `"outcome": "live"`. The first release of an app in your organization goes live without waiting for anyone.

## Ask your agent

```text
This app runs on Railway (or Render, Fly or Heroku). Read its config, run agc init and
agc doctor here, and write agentcloud.toml so web, worker and migrations map to Agent Cloud.
List how each piece maps (services, cron, disks, Redis, add-ons). Don't ship or move data yet.
```

Expect a manifest to review, a list of how each piece maps, and, if needed, an app claim link.

## What they share

A web process on `PORT`, a worker from the same build, Postgres as `DATABASE_URL`, secrets as environment variables, and docs for agents (Railway, Render and Fly publish `llms.txt`, like Agent Cloud).

## How they compare

A dash means this page doesn't cover it. The Agent Cloud column is also what each piece becomes when you move.

| | Railway | Render | Fly.io | Heroku | Agent Cloud |
|---|---|---|---|---|---|
| Services | Any number: web, workers, cron, databases | `web`, `worker`, `cron`, private services | Machines in `[processes]` groups | Any process types; only `web` gets traffic | One `[service.web]` and at most one `[service.worker]`, same image, each 1 to 4 instances |
| Builds | Railpack or Docker | Native runtimes (Node, Bun, Python, Ruby, Go, Rust, Elixir) or Docker | Dockerfile, or buildpacks | Buildpacks (classic on Cedar, Cloud Native on Fir) | Root Dockerfile, else a Python (uv) or Node 24 image; any other language with your Dockerfile |
| Cron | Cron services | Cron jobs, UTC, one run at a time | Cron Manager, Supercronic or scheduled Machines | Scheduler add-on, best effort | A timer in the worker that inserts `jobs` rows |
| Datastores and files | Postgres, MySQL, Redis and more; volumes | Postgres, Key Value; disks | Managed Postgres; volumes | Add-ons | The app's own Postgres, which holds its state, files included |
| Copies of the data | Your choice | Preview datastores start empty | — | Forks and followers | A masked branch of production per agent; no production credentials for agents |
| Migrations | Your deploy's migrate step | `preDeployCommand` | `release_command` | Release phase | SQL in `migrations/`, rehearsed on a branch of production; one that drops or rewrites data waits for a person |
| Going back | Restores a previous deployment | Redeploys a previous build | `fly deploy --image` an earlier image; migrations aren't undone | Yes | The previous release serves until the new one answers healthy |
| Cost to you | — | — | — | — | Free during the beta |

Add-ons map to built-ins. Postgres becomes `[data.db]`, an email add-on `POST $AGC_EMAIL_URL` ([Sending email](/docs/build/sending-email.md)), an auth add-on Agent Cloud sign-in or the edge gate, a scheduler a worker timer, and a log drain `agc logs`. Any other third-party service still works with its key in `[secrets] required`.

## How a release differs

A release phase, pre-deploy command or `release_command` proves a migration ran. `agc ship` also [rehearses](/docs/concepts/rehearsals.md) the release on a fresh, unmasked branch of production: row preservation, your invariants and smoke flows, and a worker killed mid-job. The agent sees pass or fail, never rows. Under the default `routine` autonomy a release whose rehearsal passes goes live on its own; a migration with `DROP`, `TRUNCATE`, `DELETE`, `ALTER … TYPE` or an `UPDATE` without `WHERE` waits for a person to [approve](/docs/concepts/approvals.md) it in the console.

## Railway

Railway builds with Railpack. Agent Cloud takes a root Dockerfile or a Node or Python project and maps it to one web service, an optional worker and Postgres.

## Render and Fly

Agent Cloud fits a single server and Postgres that an agent builds and changes often, with a masked branch of production for each agent.

## Heroku

Where Heroku promotes a slug through a pipeline, Agent Cloud rehearses each release on a branch of production. `agc init` reads your Dockerfile and `package.json` rather than a Procfile, so copy the `web` and `worker` commands across. A Rails app moves with a Dockerfile and its migrations moved to SQL files.

## Moving from Railway, Render, Fly or Heroku

1. **Manifest.** `agc init` reads `package.json`, a root Dockerfile and your code, not a Procfile, Blueprint or `fly.toml`: copy the commands into `[service.web]` and `[service.worker]`, and secret names into `[secrets] required`.
2. **Migrations.** Release-phase and pre-deploy migrations become SQL; take Rails, Prisma or Alembic migrate commands out of the start command. The import marks every file in `migrations/` as applied, so make a baseline matching production's schema exactly. The person runs `pg_dump`; the agent never needs the connection string:

   ```bash
   agc migration new baseline
   pg_dump --schema-only --no-owner --no-privileges "$SOURCE_DATABASE_URL" > migrations/<stem>.sql
   ```

3. **Scheduled work.** Cron jobs, Scheduler tasks and a `clock` process move into the worker: each tick inserts a `jobs` row, claimed with a lease, so each job must be safe to run twice ([Background work](/docs/build/background-work-and-workers.md)).
4. **Email and files.** An email add-on becomes `POST $AGC_EMAIL_URL`, captured on mirrors and sent for real in production ([Sending email](/docs/build/sending-email.md)). Files on a disk or volume move into the app's Postgres, which keeps its state, bytes it owns included.
5. **Mirror.** `agc up --detach`, then `agc check`.
6. **Data.** The person exports a custom-format dump (`heroku pg:backups:download`; `pg_dump` on Render, over `railway connect` or Railway's public URL, or through `fly mpg proxy`). `agc import dump.pgdump` validates it locally and uploads nothing.

Import is for before the first release only: limits in [Importing existing data](/docs/data/importing-existing-data.md), `import.*` codes in the [Error code catalog](/docs/reference/error-code-catalog.md).

## Agent notes

- A Railway cron service or a Heroku `clock` process becomes code in the worker, not a second worker.
- Don't `agc ship` before the import reads `imported`; after the first release, imports are refused.

## Related

- [Mirror vs production](/docs/concepts/mirror-vs-production.md)
- [Where apps run](/docs/concepts/where-apps-run.md)
- [agentcloud.toml reference](/docs/reference/agentcloud-toml-reference.md)
- [Migrations](/docs/data/migrations.md)

<!-- feedback:start -->
---
Wrong, outdated or unclear? Run `agc feedback docs "compare/agent-cloud-vs-railway: <what is wrong>" --body <file>` with the sentence quoted in the file. No code or app data is sent.
<!-- feedback:end -->
