spx

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:

ResourceLimit
CPU1 vCPU
RAM256 MiB

Disk images

Inside the microVM, SPX mounts several disk images:

ImageGuest pathLimitPersistence
Root filesystem/shared platform imageread-only, managed by SPX
App data image/data64 MiBreplaced on each deploy
App code/data/apppart of /datareplaced on each deploy
Dependency environment/data/venv256 MiBread-only in the microVM; rebuilt or reused by SPX based on dependencies
Persistent local filesystem/data/local-fs1024 MiBpersists 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-fs

Prefer 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.

On this page