izcode.toml

izcode.toml tells a cloud workspace which language runtimes to install, how to set up and build your project, which services to run, and what a release does before it takes traffic. This page lists every key, its type, its default and its limits.

Where the file lives#

Put izcode.toml at the root of the cloud workspace folder, /workspace/izcode.toml. The workspace reads it when it starts and checks it again every few seconds, so a saved change applies without a restart:

  • A new service starts, a removed service stops and a service whose definition changed restarts.
  • A file that is not valid TOML, is larger than 256 KiB, declares more than 16 services or has an unknown version is rejected as a whole. The services that were running stay as they were.
  • Any other problem affects only its own section. An invalid service is not started (state Invalid) and the others run. An invalid [runtime] or [setup] keeps the workspace's services from starting until you fix it, and an invalid [runtime], [build] or [release] fails a release.

To start a file, run Cloud: Create izcode.toml from the Command Palette. It detects your project and writes a version 2 file; see Framework guides.

Version 1 and version 2#

Version 1Version 2
How to choose itNo version key, or version = 1version = 2 at the top
Sections[setup], [services.*]Also [runtime], [build], [release], [cron.*], [env.dev], [env.prod]
Service keyscommand, cwd, port, env, restart, public, healthAlso kind, dir, spa
In a releaseServices start as soon as the release bootsRuntime, build and release steps run first; traffic moves only when the services are healthy

version must be an integer, 1 or 2. Using a version 2 section in a version 1 file is reported as an error, for example `build` needs `version = 2` at the top of izcode.toml. Use version 2 for anything you plan to release.

Annotated example#

izcode.toml
version = 2

[runtime]                    # language versions (installed with mise) and apt packages
python = "3.12"              # versions are strings: 3.10 as a number would become 3.1
node = "22"
packages = ["libpq-dev"]

[setup]                      # workspace only: install dependencies
command = "uv sync --frozen"
watch = ["uv.lock"]          # setup runs again when one of these files changes

[build]                      # release only, before the services
command = "uv run --no-sync python manage.py collectstatic --noinput"
env = { DJANGO_SETTINGS_MODULE = "app.settings" }

[release]                    # release only, once, after the build: migrations
command = "uv run --no-sync python manage.py migrate --noinput"
timeout = "5m"

[services.web]               # kind = "web" is the default: a process that listens on a port
command = "uv run --no-sync gunicorn app.wsgi --bind 0.0.0.0:$PORT"
port = 8000
public = true                # served at the host URL
health = { http = "/healthz", interval = "10s", grace = "60s" }

[services.worker]
kind = "worker"              # no port
command = "uv run --no-sync celery -A app worker"
restart = "on-failure"

[services.docs]
kind = "static"              # a built folder served by the workspace itself
dir = "site/out"
spa = true
port = 8081

[cron.cleanup]               # release only, UTC
schedule = "0 3 * * *"
command = "uv run --no-sync python manage.py clearsessions"

[env.dev]                    # merged over the file in the workspace
services.web.command = "uv run --no-sync python manage.py runserver 0.0.0.0:$PORT"

[env.prod]                   # merged over the file in a release
services.web.env = { DJANGO_DEBUG = "0" }

Top-level keys#

KeyTypeVersionNotes
versioninteger1, 21 when missing
runtimetable2See [runtime]
setuptable1, 2See [setup]
buildtable2See [build]
releasetable2See [release]
servicestable of tables1, 2At most 16 services
crontable of tables2At most 16 jobs
envtable2Only env.dev and env.prod

Any other top-level key is an error.

[runtime]#

Each key except packages is a tool name for mise and its value is the version to install. Packages are installed with apt first, then the tools.

KeyTypeDefaultLimits
<tool>string (a non-negative integer is accepted)noneName: 1–40 characters, lowercase letters, digits, - and _, starting with a letter or digit. Version: 1–64 characters of letters, digits, ., _, +, -, starting with a letter or digit, for example "22", "3.12", "lts", "latest", "temurin-21". Decimal numbers are refused. At most 16 tools.
packagesarray of strings[]At most 64 Debian package names: 2–100 characters of lowercase letters, digits, +, ., -, starting with a letter or digit. No version pins or options.

The runtime step has a 30-minute timeout. In a workspace it runs before [setup] and only again when the section changes; in a release it runs at every boot.

[setup]#

Installs dependencies in the workspace. It does not run in a release, because the release is copied from a workspace where it already ran.

KeyTypeDefaultRequiredLimits
commandstringnoneyesNot empty, at most 4096 bytes
watcharray of strings[]noAt most 32 paths relative to /workspace, without ..; each at most 256 bytes

[setup] has no cwd key: write cd app && npm ci. It runs again when the command or the content of a watched file changes, has a 30-minute timeout, and services wait for it. Run it again by hand with izc restart setup.

[build] and [release]#

Both run once per release boot, [build] first, then [release], then the services. Use [build] to compile and [release] for database migrations. In a workspace, run them by hand with izc build or izc run release.

KeyTypeDefaultRequiredLimits
commandstringnoneyesNot empty, at most 4096 bytes
cwdstring/workspacenoRelative to /workspace, no .., at most 256 bytes
envtable{}noSame rules as a service env
timeoutduration30m for build, 10m for releasenoBuild: 10s to 2h. Release: 10s to 1h.

[cron.<name>]#

A command run on a schedule in a release. Cron jobs never run in the workspace on their own; test one with izc run cron.<name>.

KeyTypeDefaultRequiredLimits
schedulestringnoneyesFive crontab fields in UTC, or @hourly, @daily, @midnight, @weekly, @monthly, @yearly, @annually
commandstringnoneyesNot empty, at most 4096 bytes
cwdstring/workspacenoRelative, no ..
envtable{}noSame rules as a service env
timeoutduration10mno10s to 24h

Job names have 1–32 characters of A-Z a-z 0-9 - _ and start with a letter or digit. At most 16 jobs. The fields are minute (0–59), hour (0–23), day of month (1–31), month (1–12 or jan–dec) and day of week (0–7 or sun–sat, where 0 and 7 are Sunday). Each field is *, a number, a range a-b, any of those with a step /n, or a comma-separated list. When both day fields are restricted, a day matching either one counts. One run of a job happens at a time.

[services.<name>]#

KeyTypeDefaultRequiredLimits
kindstring"web"no"web", "worker" or "static" (version 2)
commandstringnoneyes, except staticNot empty, at most 4096 bytes. A static service must not have one.
cwdstring/workspacenoRelative to /workspace, no .., at most 256 bytes
portintegernone; 8080 for staticfor public and for http/tcp checks1024–65535, not 3000, unique across services. A worker has none.
envtable{}noAt most 64 entries. Names are letters, digits and _, not starting with a digit. Values may be strings, integers, booleans or floats (stored as text), at most 4096 bytes.
restartstring"always"no"always", "on-failure" or "no"
publicbooleanfalsenoAt most one public service. Needs a port. Not for workers.
healthinline tablenonenoSee below
dirstringnoneyes, for staticFolder to serve, relative to /workspace (version 2)
spabooleanfalsenoUnknown paths get index.html (version 2)

Service names have 1–32 characters of A-Z a-z 0-9 - _, start with a letter or digit, and cannot be setup. In version 2 they also cannot be runtime, build or release.

Each service runs as the user dev in a login Bash shell, in its own process group. The PORT environment variable holds the service's port, so write --port $PORT rather than repeating the number. Listen on 0.0.0.0.

A service that exits is restarted after 1 second, doubling up to 60 seconds (reset after 60 seconds of running). Five exits within 10 minutes put it in Crash loop, and it is tried again 5 minutes later. Stopping sends SIGTERM, then SIGKILL after 5 seconds.

dir and spa are ignored when kind is not "static". That lets [env.dev] turn a static site into a dev server by changing kind and adding a command.

Port rules#

  • 1024 to 65535: services do not run as root.
  • Not 3000: the workspace uses it for the IDE connection.
  • No two services on the same port. When two clash, the service whose name sorts later is the one reported.
  • Only one service may be public = true. It is the one served at your host URL.

Reserved environment keys#

HOME, USER, LOGNAME, SHELL, PATH and PORT cannot be set in any env table. Put secrets in Environment secrets instead of the file; see Releases and rollback.

[services.<name>.health]#

Write it inline: health = { http = "/healthz" }. Exactly one of http, tcp or command is required.

KeyTypeDefaultLimits
httpstringnoneA path starting with /, no spaces, at most 1024 characters. GET on the service's port; 2xx and 3xx are healthy. Needs port.
tcpbooleannoneOnly true. A TCP connect to the port. Needs port.
commandstringnoneRun as dev; exit code 0 is healthy
intervalduration10s1s to 1h
timeoutduration2s100ms to 60s, and not longer than interval
thresholdinteger31 to 100 consecutive failures make the service Unhealthy and restart it
graceduration30s0s to 1h. Failures this soon after a start do not count; the first success ends the grace.

[env.dev] and [env.prod]#

These sections override parts of the file. [env.dev] applies in the workspace (and in an agent's fork), [env.prod] in a release. Each may contain only runtime, setup, build, release, services and cron.

Where each part of izcode.toml applies
flowchart TD
  base["Base file"] --> wsx["Workspace and agent forks"]
  base --> relx["Release"]
  dev["env.dev override"] --> wsx
  prod["env.prod override"] --> relx
  wsx --> wsteps["runtime, setup, services"]
  relx --> rsteps["runtime, build, release, services, cron"]

The override is merged table by table: a value or an array replaces what was there and everything else stays. You cannot remove a key, so give the base file the production values and override what differs. Use dotted keys:

izcode.toml
version = 2

[services.web]
kind = "static"
dir = "dist"
spa = true
port = 8080
public = true

[env.dev]
services.web.kind = "web"
services.web.command = "npx --no-install vite --port $PORT --host 0.0.0.0"

The names of both sections are always checked. The values of an override are checked where it applies, so run izc validate, which checks the file with each one.

Durations#

A duration is a string such as "500ms", "10s", "1.5m", "2h", "1h30m" or "1d", or a whole number of seconds (45 or "45"). Units are ms, s, m, h and d. Spaces and negative values are not allowed.

Checking the file#

  • In the editor: when you save izcode.toml, problems appear as errors in the file and in the Problems panel.
  • In the workspace: izc validate prints every problem, one per line, including those that only appear with [env.dev] or [env.prod]. See izc command.
  • In the app: the Services page shows "izcode.toml was not applied" with the reason.

Error messages#

Messages are shown with their section, for example services.web: `port` 80 is out of range (1024-65535: services do not run as root).

MessageFix
izcode.toml is not valid TOML: …Fix the syntax at the line and column given. Nothing in the file was applied.
izcode.toml has version 3; this workspace image understands versions 1 to 2 …Use version = 2, or restart the workspace to get a newer image.
`version` must be an integer, found stringWrite version = 2, not "2".
unknown key `colour` (expected one of: …)Remove or rename the key; the message lists the allowed ones.
`build` needs `version = 2` at the top of izcode.tomlAdd version = 2.
17 services; at most 16 are allowedMerge or remove services.
`command` is required / `command` is emptyGive the section a command.
`port` 80 is out of range (1024-65535: services do not run as root)Use a port from 1024 up.
`port` 3000 is the IDE's own portPick another port, for example 3001.
port 4000 is already used by service `api`Give each service its own port.
only one service may be public, and `web` already isKeep public = true on one service.
a public service needs a `port`Add port.
a worker has no `port`; use `kind = "web"` for a service that listensRemove port, or change the kind.
a worker cannot be public (it has no port)Remove public.
a static service is served by izc itself: it takes `dir` (and `spa`, `port`), not `command`Remove command, set dir.
`dir` is required for a static service …Set dir to the built folder, such as "dist".
`kind` is "job"; expected "web", "worker" or "static"Use one of the three kinds.
`restart` is "sometimes"; expected "always", "on-failure" or "no"Use one of the three policies.
`public` must be true or false, found stringWrite public = true without quotes.
path "../etc" must be relative to /workspace and must not contain `..`Use a path inside the workspace.
`env.PATH` is set by the supervisor and cannot be overriddenRemove the reserved key.
`env` key "A-B" is not a valid variable nameUse letters, digits and _.
service name "my app" is not allowed (1-32 of A-Z a-z 0-9 - _, starting with a letter or digit)Rename the service.
`setup` is reserved for the [setup] section and cannot be a service nameRename the service.
`build` is the name of a step (`izc logs build`) and cannot be a service nameRename the service.
`health`: exactly one of `http`, `tcp` or `command` is requiredKeep one check.
`health`: an `http` or `tcp` check needs the service's `port`Add port, or use a command check.
`health`: `http` "health" must be a path starting with `/`, without spacesWrite "/health".
`health`: `timeout` must not be longer than `interval`Shorten timeout or lengthen interval.
`interval` must be between 1s and 1hStay within the range for that key.
"soon" is not a duration (examples: 500ms, 10s, 5m, 2h, 1h30m)Use a duration string.
`python`: write the version as a string (`python = "3.12"`): a number loses trailing zerosQuote the version.
"Node" is not a tool name …Use lowercase tool names.
`packages`: "curl && sh" is not an apt package nameList plain package names only.
`schedule` is required (e.g. "0 3 * * *", "@hourly"; UTC)Add a schedule.
`schedule`: "61 * * * *": minute: …Fix the field named in the message.
unknown environment `env.staging` (expected `env.dev` or `env.prod`)Only dev and prod exist.
`env.prod.version` cannot be overridden (only runtime, setup, build, release, services, cron)Move the key out of the override.
Last updated: December 1, 2026Was this page helpful?