Skip to Content
Docs

skiff.toml reference

Every setting an app deployed with skiff deploy can have.

skiff deploy reads skiff.toml from the folder you run it in. Only name is required.

skiff.toml
name = "shop-api"
replicas = 2

[server]
host = "root@203.0.113.10"

[build]
port = 3000

[deploy]
release = "npm run migrate"
health_path = "/healthz"

[resources]
memory = "512m"
cpu = "0.5"

[env]
LOG_LEVEL = "info"

[secrets]
STRIPE_KEY = "sk_live_..."

[[volumes]]
name = "uploads"
path = "/app/uploads"

[[workers]]
name = "queue"
command = "node queue.js"
replicas = 2

[[jobs]]
name = "report"
schedule = "0 3 * * *"
command = "node report.js"

Top level

KeyDefaultWhat it does
namerequiredThe app's name, and its address: <name>.<your domain>.
replicas1How many copies of the app run. Each must pass its health check before the old version stops.

[server]

KeyDefaultWhat it does
hostnoneThe server to deploy to over SSH, like root@203.0.113.10. Leave [server] out to deploy to Docker on this machine.

[build]

KeyDefaultWhat it does
dockerfileDockerfileThe Dockerfile to build from.
targetthe last stageThe Dockerfile stage to build, like runtime.
argsnoneBuild arguments for the Dockerfile's ARG lines, like args = { MODE = "prod" }. They end up in the image's history, so keep secrets in [secrets].
port8080The port the app listens on. With image set and no port, the port the image exposes is used.
imagenoneA prebuilt image to deploy instead of building, like ghcr.io/you/api:1.4. See Prebuilt images.
base, install, build, start, staticnoneBuild steps for an app with no Dockerfile. Setting start or static skips detection and builds from these instead.

[deploy]

KeyDefaultWhat it does
releasenoneA command run once before the new version goes live, such as migrations. If it fails, the deploy stops and the old version keeps serving.
health_pathnoneA path that must answer 2xx or 3xx before the new version takes traffic, like /healthz. Without it, any reply at / counts.
health_timeout30Seconds the new version has to become healthy, from 5 to 1800. A model server loading a large model may need minutes.
health_modeHTTPtcp accepts any open port, for services that don't speak HTTP. none skips the check, for a service with no port.
drain_timeout300Seconds the replaced version may keep finishing open requests, up to 3600. 0 stops it straight away.
networkskiffThe Docker network the app joins to reach databases by name.
aliasesnoneExtra names other services on the network can reach the app by.
commandthe image'sA list that replaces the image's default command, like ["node", "server.js"].
udp_portnoneA UDP port the app listens on, published so the router can forward it. Open it to the internet as a Public UDP port in the project's Settings.
isolationstandard"strong" runs the app under gVisor's sandbox, for code you don't fully trust. See isolation.
egress, egress_allowanywhereWhere the app may connect: "private" for the team's own services only, or "list" with egress_allow = ["api.openai.com"]. See outbound network.
cap_add, devices, sysctls, privileged, host_network, new_privilegesnoneMachine permissions, like cap_add = ["NET_ADMIN"] and devices = ["/dev/net/tun"]. See machine permissions.

[resources]

KeyDefaultWhat it does
memory75% of the serverMemory each replica may use, like 512m or 2g, at least 16m.
cpuno limitCPU cores each replica may use, like 0.5 or 2.
gpusnoneHow many of the server's NVIDIA GPUs the app gets, up to 16. See GPUs.

Workers, scheduled jobs and the release command run with the same limits as the app.

[env] and [secrets]

[env] sets environment variables at build time and when the app runs. [secrets] sets them only when the app runs, so they never end up in the image. A .env file beside skiff.toml is read too, and [env] wins where both set a variable.

If you're signed in with skiff login, variables set in the dashboard are added wherever skiff.toml doesn't set them.

[[volumes]]

Directories that keep their files across deploys, up to 5 per app. See Persistent volumes.

KeyWhat it does
name1 to 32 lowercase letters, digits or dashes.
pathWhere it's mounted, an absolute path like /data.
alsoMore paths to mount the same volume at, like ["/var/cache"]. They share its files.

[[workers]]

Long-running processes from the app's build, such as a queue consumer. Each deploy restarts them on the new version.

KeyWhat it does
name1 to 32 lowercase letters, digits or dashes.
commandWhat it runs, through sh -c.
replicasHow many copies run, from 1 to 10. The default is 1.

[[jobs]]

Commands from the app's build that run on a schedule. The dashboard runs them, so they need Skiff's dashboard on the server.

KeyWhat it does
name1 to 32 lowercase letters, digits or dashes.
scheduleCron syntax in the server's time zone, like 0 3 * * * for 3am every day.
commandWhat it runs, through sh -c.
timeoutHow long a run may take, from 1m to 168h (a week). Default 30m. A run past it is stopped.
retriesHow many more times a failed run is tried, up to 10. Default 0.
catch_up"skip" drops runs missed while Skiff wasn't running. Left out, a missed job runs once when Skiff is back.
webhooktrue gives the job an address that starts it when a signed request arrives. The dashboard shows the address and its secret.
bucketOne of your team's buckets. Each new file in it starts a run.
prefixOnly new files under this folder of the bucket, like incoming/.
stepsA pipeline instead of command: [[jobs.steps]] tables with name, command and after, a list of the steps it waits for. See steps.

A job needs at least one of schedule, webhook or bucket, and either command or steps.

For an app deployed this way, skiff.toml decides its workers and jobs, so the dashboard and the API can't change them. Running a job now still works.

On this page