Sandboxes for AI agents

Run SFCrew and your agents' computers on Railway

Updated November 4, 2026.

Railway is a cloud platform for deploying apps and databases without managing servers. It also runs sandboxes: short-lived Linux machines that a program can create through Railway's API.

SFCrew is an open source app for AI teammates that do real work. You talk to each bot in chat, and each bot gets its own computer with a desktop, a browser and files. You can watch its screen and take over at any time. On Railway, one template runs the SFCrew app, its Postgres database and those bot computers, all in your own Railway account. You don't need a Docker host or a separate sandbox provider.

Bug TriageComputer on Railway
triage what came in over the weekend
on it. reproducing each report on my computer before i touch the issues.
ComputerDone

Reproducing reports in Sentry.

What is Railway?

Railway deploys services from a repository or image and gives them HTTPS domains, volumes and managed databases. Usage is billed to your Railway workspace. Its sandboxes are separate machines created on demand, which SFCrew uses as bot computers.

Because the app and the computers live in the same account, you manage one set of credentials and one bill for hosting. Your model provider is still billed separately.

The Railway homepage, headed Ship software peacefully.
Railway homepage, November 4, 2026.

What a bot can do on a Railway computer

Each Railway sandbox becomes a Linux bot computer. You see it in the computer panel next to the chat, and you can step in when a bot asks for help.

  • Use a Linux desktop and browser, with each bot on its own screen when several bots share one computer.
  • Run shell commands and read and write files.
  • Watch the screen live and take over, for example to finish a login.
  • Keep its workspace between sessions. SFCrew saves the workspace before a computer stops and restores it on the next start.

When to choose Railway

Choose Railway when you want a personal SFCrew with nothing to run yourself and only one account to manage. It suits bots that browse, research and edit files, where a restart from saved files is fine.

If bots need to come back to the same open programs, Novita and E2B pause computers with their memory instead. Boat, which SFCrew Cloud uses, keeps each computer's disk and a Chrome profile per bot. If you'd rather use a server you already have, Docker is the default when you self-host. The sandbox comparison covers every option.

Limits

  • No pause. Stopping deletes the sandbox, and the next start restores the bot's saved workspace. Open programs and anything outside the workspace are lost.
  • There is no terminal you can open yourself, and a command's output arrives when it finishes rather than while it runs.
  • The desktop installs the first time a computer is used, which can take a few minutes.
  • On Railway's Trial and Free plans, the short idle timeout can delete a computer before its work is saved.
  • Each workspace file SFCrew saves is capped at 64 MiB by default (RAILWAY_MAX_WORKSPACE_FILE_BYTES).

How to set it up

Whoever owns the Railway account does this. The Railway template is the quickest path and gives you a personal, self-hosted SFCrew.

  1. Create a Railway API token that can create environments and sandboxes. A dedicated Railway workspace is safest.
  2. Deploy the SFCrew template on Railway. Enter your email in OWNER_EMAIL and the token in RAILWAY_API_TOKEN.
  3. Wait for SFCrew to become healthy, then open its generated HTTPS domain.
  4. Sign in with your email and the generated OWNER_PASSWORD from the SFCrew service's Variables tab, then change the password.
  5. Connect your model account in SFCrew and send a bot a message. Its computer starts the first time it needs one.

Using Railway computers with an existing SFCrew

If SFCrew already runs somewhere else, its admin can still put the computers on Railway. Set SANDBOX_PROVIDER=railway, RAILWAY_API_TOKEN and RAILWAY_ENVIRONMENT_ID on the API and worker, and optionally RAILWAY_SANDBOX_REGION. Or choose Railway in Settings → Computer and fill in the same values. The computer providers guide lists every option.

FAQ

Can I host SFCrew on Railway?

Yes. The SFCrew template deploys the app, a Postgres database and its bot computers into your Railway account. It's meant for a personal deployment: public registration stays closed and you sign in as the owner.

Do I need E2B or another sandbox provider on Railway?

No. Railway's own sandboxes run the bot computers. You only need a Railway API token and a model account.

Can Railway bot computers reach my database?

With the template, no. Computers run in a separate, empty Railway environment, so they can't reach the app's private database network. Don't put trusted services or secrets in that environment.

Why choose Railway over E2B or Novita?

Everything runs in one account, from one template. If your bots need to keep programs running between sessions, E2B or Novita pause computers instead of rebuilding them.

More sandboxes for AI agents

Compare all sandboxes

Sources