{"slug": "sandscale-vs-railway-sandboxes-vms-next-to-your-services-or-a-governed-box-per", "title": "Sandscale vs Railway Sandboxes: VMs next to your services, or a governed box per agent run", "summary": "A comparison of Railway's new on-demand sandboxes and Sandscale's agent sandbox service finds both use VM-level isolation but differ on network defaults, secret handling and state persistence. Railway sandboxes are isolated Linux VMs scoped to a Railway environment, defaulting to outbound-only internet with an opt-in private-network mode, while Sandscale runs each agent run in its own Firecracker microVM that starts with networking off and opens only to an egress allowlist. The comparison notes Railway bakes secrets into the sandbox environment for its lifetime, whereas Sandscale's Vault injects secrets in memory and expires them when the run ends.", "body_md": "Railway added sandboxes to its platform: isolated Linux VMs you create on demand, run commands in and destroy, each scoped to a Railway environment so it can sit on the same private network as your services and databases. Sandscale is a standalone sandbox service for agent code. If your app already runs on Railway, its sandboxes are the closest thing to hand. This post compares them on the points that decide the choice.\n\nRailway facts come from its [Sandboxes docs](https://docs.railway.com/sandboxes), read in November 2026. Sandscale facts come from sandscale.dev.\n\n**Railway** describes each sandbox as \"a programmatically controllable, fully isolated virtual machine\". The page we read does not name the VMM. The standard image is Ubuntu with git, Node and common coding agents preinstalled.\n\n**Sandscale** runs each agent run in its own Firecracker microVM with its own kernel; nothing is shared with the run next to it.\n\nBoth are VM boundaries.\n\n**Railway:** \"Every sandbox has outbound internet access through a NAT gateway.\" The default mode, `ISOLATED`, means outbound internet only: the sandbox cannot reach other services in the environment over private networking. A `PRIVATE` mode joins the environment's private network. Public domains can be configured at creation for previews and webhooks.\n\n**Sandscale:** sandboxes start with network mode `none`. With `allowlist`, a sandbox can reach only your organization's egress allowlist and the package registry presets you turn on (npm, PyPI, Go, crates).\n\nFor agent code this matters. Open outbound internet means a prompt-injected run can send whatever it can read to any host. On Railway you would add that control yourself, for example with a proxy. On Sandscale, closed is the default and opening is a policy decision. Our post on [egress allowlist design](https://sandscale.dev/blog/egress-allowlist-design-for-agent-sandboxes) covers why.\n\nThe flip side: if your agent must talk to a database or service on Railway's private network, Railway's `PRIVATE` mode makes that one option. On Sandscale you would expose that service to an allowlisted host.\n\n**Railway:** `env` at create time \"bakes environment variables into the sandbox, available to every command over both `exec` and SSH for the sandbox's lifetime\", and the docs say this includes secrets. Values can reference other Railway variables.\n\n**Sandscale:** Vault hands secrets to the sandbox in memory as environment variables, keeps the values out of prompts, logs, the API's answer and the audit log (the audit entry names the variables, not the values), and ends them with the run.\n\nIn both cases code in the box can read its environment. The difference is lifetime and records: a Vault secret stops working when the run ends, and its use is in the audit log.\n\n**Railway** destroys a sandbox after its idle timeout. On Hobby and Pro the default is 30 minutes, settable from 1 to 120, or disabled with `idleTimeoutMinutes: 0`; Trial and Free default to 5 minutes. Running commands, an active SSH session and `sandbox.heartbeat()` reset the timer. For reuse, **checkpoints** save a sandbox's disk by name and **forks** clone a running sandbox's filesystem into a new one. In both cases \"files are preserved, running processes are not\".\n\n**Sandscale** gives each sandbox a lifetime (`timeoutSeconds`, server default one hour), hibernates an idle sandbox between calls and wakes it on the next call, and offers pause, which keeps memory and files, on every plan. Snapshots let new sandboxes start from a saved `/workspace`.\n\nIf your agent's state is mostly files, Railway's checkpoints and forks cover it, and forking a prepared box to try several attempts in parallel is a pattern Railway documents well. If you need processes and memory to survive a wait, Sandscale's pause does that.\n\n**Railway** bills sandboxes \"at VM rates, metered per second, for CPU used, memory in use, and outbound traffic\". As of November 2026: $50 per vCPU per month for CPU actually used, $50 per GB per month for memory in use (including the operating system and file system cache), and $0.05 per GB of egress. The docs are explicit that \"waiting on a model or user may reduce CPU use, but memory, background CPU use, and outbound traffic remain billable\". Sandbox usage draws from your plan's included usage.\n\n**Sandscale** bills awake vCPU-hours with memory included at 4 GiB per vCPU. Paused time and idle time between tool calls do not count. Plans include 100 hours on Free, 1,500 on Pro ($25 a month billed monthly) and 2,000 per member pooled on Team ($48 per member a month billed monthly); beyond that, $0.05 per awake vCPU-hour if you turn it on, or a 500-hour pack for $10. See [pricing](https://sandscale.dev/pricing).\n\nRailway's meter is close to \"pay for what the box actually consumes\", which suits light, short tasks. Sandscale's meter counts whole vCPUs while awake and skips idle gaps. Model both against your own run shape.\n\n|  | Railway (Free / Hobby / Pro) | Sandscale (Free / Pro / Team) | \n|---|---|---|\n| Running at once | 10 / 50 / 100 per environment | 3 / 30 / 30, more on request | \n| Largest box | 2 vCPU, 2 GB / 8 vCPU, 8 GB / 24 vCPU, 24 GB | 2 / 16 / 16 vCPU (32 on request), 4 GiB per vCPU | \n| Default region | US West ( `us-west2` ), others selectable | US (N. Virginia); Europe (Frankfurt) announced, not open yet | \n\nRailway's sandboxes inherit its project and environment model and project tokens scoped to one environment, which Railway recommends as least access. Sandscale adds agent-specific controls on every plan: human approvals with a named approver, a hash-chained audit log, DLP on prompts and MCP tool calls, and agent policy where Claude Code runs under your rules through its hooks. Team adds SSO, roles and audit export.\n\nPick **Railway** if your app and data already live on Railway, your agent needs the environment's private network, you want forks and checkpoints for parallel attempts, or you want a meter that follows actual CPU and memory use.\n\nPick **Sandscale** if you want the network closed by default with an allowlist, secrets that end with the run, pause with memory kept, and approvals and audit built in. Our [service levels page](https://sandscale.dev/legal/service-levels) says there is no availability commitment or service credit yet; weigh that too.\n\n*Originally published on the [Sandscale blog](https://sandscale.dev/blog/sandscale-vs-railway-sandboxes).*", "url": "https://wpnews.pro/news/sandscale-vs-railway-sandboxes-vms-next-to-your-services-or-a-governed-box-per", "canonical_source": "https://dev.to/sandscale/sandscale-vs-railway-sandboxes-vms-next-to-your-services-or-a-governed-box-per-agent-run-2l8l", "published_at": "2026-11-26 05:12:09+00:00", "updated_at": "2026-11-26 05:15:59.206934+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "ai-safety", "ai-tools"], "entities": ["Railway", "Sandscale", "Firecracker", "Ubuntu", "npm", "PyPI"], "also_reported_by": [], "takeaway": "Railway sandboxes default to outbound internet with secrets baked into the environment for the sandbox's lifetime, while Sandscale microVMs start with networking off and expire Vault-injected secrets when the run ends.", "recommendation": {"advice": "Default agent sandboxes to no egress and open only allowlisted hosts, and inject secrets in memory that expire with the run rather than baking them into the environment.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/sandscale-vs-railway-sandboxes-vms-next-to-your-services-or-a-governed-box-per", "markdown": "https://wpnews.pro/news/sandscale-vs-railway-sandboxes-vms-next-to-your-services-or-a-governed-box-per.md", "text": "https://wpnews.pro/news/sandscale-vs-railway-sandboxes-vms-next-to-your-services-or-a-governed-box-per.txt", "jsonld": "https://wpnews.pro/news/sandscale-vs-railway-sandboxes-vms-next-to-your-services-or-a-governed-box-per.jsonld"}}