Auto-hébergement
Ivy ships as one Helm chart that installs on any conformant Kubernetes cluster. The chart’s README lists every setting.
The API on your cluster
A self-hosted Ivy serves the same API as Ivy’s hosted service, at /api on the app host you configure: https://<your app host>/api/v1/…. Everything in these docs applies; only the base URL changes.
The API reference on this site describes the latest release. Each release also attaches its openapi.json, so you can read the document for the exact version you run.
Releases and upgrades
Each release tag vX.Y.Z publishes the chart as version X.Y.Z to oci://ghcr.io/spacivapp/charts/ivy, with the Ivy images tagged the same:
helm install ivy oci://ghcr.io/spacivapp/charts/ivy --version <x.y.z> -n ivy --create-namespace -f my-values.yaml
On helm upgrade:
- A
pre-upgradehook Job runsivy-api migratewith the new image before any pod is replaced. If it fails, the upgrade fails and the old pods keep serving;--atomicrolls the release back automatically. - A
post-upgradehook Job then runs the code migrations listed inmigrate.rerunCodeagain (ivy-api migrate --rerun-code <n>), to copy rows the previous release wrote during the rollout. The default[5]is the backfill from accounts to organisations;[]turns the Job off. - Schema changes are additive, so the previous release keeps working during a rolling update.
helm rollbackrolls back the workloads, not the schema. api.config.bootstrapAdminAccountSlugis deprecated: usebootstrapAdminOrganisationSlug.
Authentication
The chart’s auth.mode decides which OpenID Connect issuer Ivy trusts:
zitadel(the default) deploys Zitadel with Ivy.externaluses your organisation’s identity provider, such as Microsoft Entra ID or Okta.OIDC_API_AUDIENCEsets the audience of the access tokens Ivy accepts from it.
Service identities and API keys work the same in both modes: Ivy issues and checks the keys itself, as described in Authentication.
api.config.bootstrapAdminEmail and api.config.bootstrapAdminOrganisationSlug (BOOTSTRAP_ADMIN_EMAIL, BOOTSTRAP_ORGANISATION_SLUG) create the first organisation and its admin. With external, the organisation that your issuer’s claim or auth.external.singleOrgSlug names must already exist in Ivy, so this is how you create the first one.
Files and object storage
File features need S3-compatible object storage (objectStorage.mode). With none, the default, the file endpoints answer 503.
s3: AWS S3 or any S3 API (objectStorage.s3.*:bucket,region,endpoint,forcePathStyle). Give the API and the jobs worker separate keys:existingSecretfor the API,jobsExistingSecretfor the worker. The API needs read and write onorgs/*and read onexports/*. The worker needs read and delete onorgs/*, and read, write and delete onquarantine/*andexports/*. With connected drives, both also need read, write and delete oncache/*, plusListBucketVersionson the bucket forcache/andDeleteObjectVersiononcache/*, because revocation deletes every version of a cached copy. Both needListBucket. Without static keys, the pods use your cloud’s workload identity (api.serviceAccount.annotations,jobs.serviceAccount.annotations).minio: the bundled single-node MinIO, for demos and evaluation. A Job creates the bucket (ivy-files), one key for the API and one for the worker, each limited to those prefixes, and the lifecycle rules:quarantine/expires after 30 days,exports/one day afterfiles.dataExportTtlDays(8 days by default),cache/(scanned copies from connected drives) after 1 day. MinIO has no redundancy, so back up its volume.
On your own S3 bucket, set the same lifecycle rules (quarantine/ after 30 days, exports/ one day after files.dataExportTtlDays, cache/ after 1 day), abort incomplete multipart uploads after 1 day, and turn on default server-side encryption (SSE), as Ivy’s hosted service does. The chart doesn’t configure your bucket.
These values set file limits and retention for the API and the worker:
| Value | Env | Default |
|---|---|---|
objectStorage.maxUploadBytes |
FILE_MAX_UPLOAD_BYTES |
104857600 (100 MiB) |
files.storageLimitBytes |
STORAGE_LIMIT_BYTES |
0 (unlimited) |
files.trashRetentionDays |
TRASH_RETENTION_DAYS |
30 |
files.versionRetention |
FILE_VERSION_RETENTION |
0 (all versions) |
files.dataExportTtlDays |
DATA_EXPORT_TTL_DAYS |
7 |
The storage limit applies per organisation. The web app’s upload limit and the scanner’s limits follow maxUploadBytes; let request bodies of that size through your ingress too.
Malware scanning
Every uploaded file version is scanned with ClamAV before anyone can download it. Scanning is on by default (scanner.enabled, scanner.mode: clamd), and with object storage on, the chart refuses to render without it.
- Resources:
scanner.replicas(default2) clamd pods. Each needs about 1.2 GiB of memory once the signature database is loaded; the chart requests 1.5 GiB (1536Mi) and limits it to 3 GiB. - Signature updates: a freshclam sidecar checks
scanner.signatures.checksPerDaytimes a day (default12; keep it at 12 or below, because the public mirror rate-limits busy addresses). The pods need HTTPS egress to the mirror (networkPolicy.clamavInternetEgress). - Private mirror: set
scanner.signatures.mirrorto your own mirror, for example one served by cvdupdate. Without internet access, setscanner.signatures.updates: falseand use the image’s database or a pre-seeded volume (scanner.signatures.existingPvc). - Results: only files found clean can be downloaded. Encrypted archives and archives over the scan limits are marked as not scannable, never as clean. While no scanner is reachable, new files wait and appear once it is back.
scanner.mode: fakeruns no ClamAV and marks every file clean unless it contains the EICAR test string. Use it only to evaluate Ivy or in development, never in production.
Connected drives
Connected drives need your own Microsoft Entra app or Google service account, set in the chart’s connectors values, as well as object storage and the scanner, because Ivy scans every file it serves from a drive and keeps the scanned copy under cache/ (expire it after 1 day on your own bucket). See Connected drives on your own installation.
Slack and Teams
Ivy in Slack and Microsoft Teams needs your own Slack app and Azure Bot, set in the chart’s integrations values, and public HTTPS for /api/v1/integrations/, where Slack and Microsoft deliver messages. See Slack and Teams on your own installation.
Code sandbox
Code runs (sandbox.*) are off by default. With sandbox.enabled: true, the chart deploys ivy-sandbox, which runs code only in gVisor pods in their own namespace (ivy-sandbox, with Pod Security restricted). The cluster needs:
- Kubernetes 1.30 or later.
- Sandbox nodes with gVisor (
runsc) and a RuntimeClass for it (sandbox.runtimeClassName, defaultgvisor;sandbox.createRuntimeClass: truecreates one with the handlerrunsc). Label and taint the nodesivy.spaciv.app/pool=sandbox, set the kubelet’spodPidsLimitand turn swap off. - A CNI that enforces egress NetworkPolicy, including traffic from a pod to its own node (Calico does, kindnet doesn’t). Amazon VPC CNI on EKS enforces the policy everywhere except to the pod’s own node, so add a rule on the sandbox nodes that drops connections from pods to the node (VPC CNI’s pod interfaces are named
eni*) and keeps replies to the node’s own connections, as Ivy’s AWS platform does. The chart’s README has the rule.
ivy-sandbox probes these requirements when it starts and every sandbox.probe.intervalSeconds (default 10 minutes). While one is missing, code runs stay off, and the reason is reported at /capability on its admin port 8081. Code never runs outside the sandbox.
By default (sandbox.limits.*), a sandbox without a command is removed after 15 minutes (idleTimeoutSeconds: 900), and none lives longer than 4 hours (maxLifetimeSeconds: 14400). A command times out after 2 minutes unless it asks for more, up to 10 minutes. CPU, memory and workspace size come from sandbox.tiers, and sandbox.quota.* caps all sandboxes together.
Run sizes and node sizing
Code runs come in three sizes: s (1 vCPU, 1 GiB), m (2 vCPU, 4 GiB) and l (4 vCPU, 8 GiB). sandbox.enabledTiers lists the ones your installation offers, all three by default. A run that names no size gets the smallest one you offer, and a request for a size you left out is refused with sandbox_tier_unavailable before any pod is created, so you only need sandbox nodes for the largest size you list:
sandbox.enabledTiers |
A sandbox node needs at least | It then fits at once |
|---|---|---|
[s] |
2 vCPU, 4 GiB | 1 s run |
[s, m] |
4 vCPU, 8 GiB | 3 s runs, or 1 m and 1 s |
[s, m, l] |
8 vCPU, 16 GiB | 7 s runs, 3 m runs, or 1 l and 1 m |
Each row leaves room for two assistant sessions (a quarter of a vCPU and 512 MiB each) and for what the kubelet and the node’s system pods reserve. Agents your platform or cloud account runs on every node, such as runtime security monitoring, take their share of the sandbox nodes too, tainted or not: subtract their requests. Set sandbox.worker.runConcurrency and sandbox.worker.sessionConcurrency to what your nodes fit, so further runs wait their turn instead of failing; a session beyond the limit fails after two minutes. Plans that include none of the sizes you offer get no code runs: Free includes s only. The chart’s README has the pod requests behind these numbers.
Sizes are data: sandbox.tiers declares each one with a rank (the smallest is the lowest), its CPU, memory and workspace, and the pool it runs on. Every size you offer needs a price in your pricing configuration.
Node pools
Every sandbox runs on a node pool. shared holds every size that names no other pool: its nodes are the ones labelled and tainted for the RuntimeClass. Add a pool in sandbox.pools for sizes that need bigger nodes, so the shared nodes keep their size and the big ones can stay at zero while no one uses them:
sandbox:
enabledTiers: [s, xl]
pools:
large:
nodeSelector: { ivy.spaciv.app/sandbox-pool: large }
tolerations:
[{ key: ivy.spaciv.app/sandbox-pool, operator: Equal, value: large, effect: NoSchedule }]
tiers: { xl: { pool: large } }
Label and taint those nodes ivy.spaciv.app/sandbox-pool=large as well as ivy.spaciv.app/pool=sandbox. The smallest size you offer must stay on shared, because the isolation probe and the assistant’s sessions run at it. With sandbox.prePull.enabled, each pool gets its own DaemonSet that keeps its environments’ images on its nodes.
A fourth size, xl (8 vCPU, 32 GiB, a 40 GiB workspace), is meant for coding sessions that build a repository, together with the dev environment (Rust, Node and pnpm, protoc, git and git-lfs; sandbox.environments.builtin.dev). Both are off until you list xl in sandbox.enabledTiers and set the image’s repository. Give xl a pool of its own as above (nodes of at least 16 vCPU and 64 GiB) and set pools: [large] on dev, so only those nodes keep its several GB. Only Enterprise includes xl. A coding session reaches the internet only through the space’s network access list: for example github.com, *.githubusercontent.com, index.crates.io, static.crates.io and registry.npmjs.org.
Environments
The images sandboxes start from are environments. sandbox.environments.builtin declares the installation’s own (shell, python, node, duckdb, r and dev): each has an image, a description and run rules that say which files it runs and with which command. You can replace, remove or add any of them; leave a repository empty to turn one off. Pin images by digest: the admission policy admits only these exact references. sandbox.runnerImages still works for this release; move its entries to sandbox.environments.builtin.<name>.image.
Organisations can add environments of their own, from an image they built anywhere or from a Dockerfile in a space folder, once you give Ivy a registry for them:
sandbox:
environments:
organisation:
enabled: true
registry: registry.example.com/ivy
repositoryPrefix: ivy-env
mode: generic
platform: linux/arm64 # your sandbox nodes’
pushSecret: { existingSecret: ivy-env-push }
pullSecret: { existingSecret: ivy-env-pull }
pushSecretis akubernetes.io/dockerconfigjsonSecret in Ivy’s namespace with push and delete rights on<registry>/<repositoryPrefix>/*; onlyivy-sandboxuses it.pullSecretis akubernetes.io/dockerconfigjsonSecret you create in the sandbox namespace, read-only on the registry. Sandbox pods may use no other pull secret.- On Amazon ECR use
mode: ecrinstead:ivy-sandboxpushes with its workload identity and the nodes pull with theirs. Give its role ECR push and delete on the prefix and create repositories on push with a repository creation template. - If the registry is private, list its addresses in
registryEgress.cidrs.
Each version is stored as <registry>/<repositoryPrefix>/<organisation id>/<name> and runs only by digest; the admission policy admits an organisation’s images only in that organisation’s sandboxes. maxImageBytes (4 GiB) and maxLayers (100) cap each image.
Dockerfile builds are off by default (organisation.build.enabled). They need the egress proxy (sandbox.egressProxy.enabled) and run rootless BuildKit in gVisor pods in their own namespace (build.namespace, default ivy-sandbox-build, with Pod Security baseline). An admission policy there admits only the builder image (build.image; pin it by digest), as a non-root user without added capabilities, without a service-account token or host access, and within build.maxSeconds. Builds reach the internet only through the egress proxy, so base images and package indexes must be reachable over HTTPS. build.quota.* caps all builds together.
Limits
Request limits are part of your deployment. API_KEY_RATE_LIMIT_PER_MINUTE sets how many requests each API key can make a minute (600 by default); JOBS_RETENTION_DAYS sets how long run records, and with them the idempotency IDs, are kept (30 by default). Configure other limits in your ingress or web application firewall if you use one. See Rate limits.