runtime environment & limits
Firecracker runtime, mounted disk images, persistence, and resource limits
SPX deploys your backend inside a Firecracker microVM.
Each deployment gets its own isolated VM with a small Linux root filesystem, project code, dependency environment, and optional persistent project storage.
Compute limits
Each microVM is currently configured with:
| Resource | Limit |
|---|---|
| CPU | 1 vCPU |
| RAM | 256 MiB |
Disk images
Inside the microVM, SPX mounts several disk images:
| Image | Guest path | Limit | Persistence |
|---|---|---|---|
| Root filesystem | / | shared platform image | read-only, managed by SPX |
| App data image | /data | 64 MiB | replaced on each deploy |
| App code | /data/app | part of /data | replaced on each deploy |
| Dependency environment | /data/venv | 256 MiB | read-only in the microVM; rebuilt or reused by SPX based on dependencies |
| Persistent local filesystem | /data/local-fs | 1024 MiB | persists across deploys for the same project |
What persists
Files under /data/local-fs persist across spx run deployments for the same project.
Files under /data/app are replaced on every deploy. Treat the rest of /data as deployment runtime state unless it is explicitly documented as persistent.
The dependency environment at /data/venv is mounted read-only inside the microVM. It is managed by SPX from your dependency configuration, not by writes from your running app.
The root filesystem is shared, read-only platform infrastructure. Do not store app state outside /data/local-fs if you need it to survive redeploys.
Persistent storage path
SPX also sets an environment variable for the persistent filesystem:
SPX_LOCAL_FS=/data/local-fsPrefer this environment variable in app code instead of hard-coding the path.
import os
from pathlib import Path
local_fs = Path(os.environ["SPX_LOCAL_FS"])
uploads = local_fs / "uploads"
uploads.mkdir(parents=True, exist_ok=True)For more details, see persistent filesystem.