---
title: "Provision compose file update"
method: POST
path: "/api/v1/cvms/{cvm_id}/compose_file/provision"
tags: ["CVMs"]
---

# Provision compose file update

`POST /api/v1/cvms/{cvm_id}/compose_file/provision`

Validates new compose file and returns compose_hash for on-chain registration. Cache expires after 14 days.

## Path parameters

- `cvm_id` string, required

## Request body

- ProvisionComposeFileUpdateRequest — Request model for provisioning compose file updates.
  - `allowed_envs` string[]
  - `bash_script` string, nullable
  - `default_gateway_domain` string, nullable
  - `docker_compose_file` string, nullable
  - `init_script` string, nullable
  - `kms_enabled` boolean
  - `local_key_provider_enabled` boolean
  - `manifest_version` integer
  - `name` string, required
  - `no_instance_id` boolean
  - `pre_launch_script` string, nullable
  - `public_logs` boolean
  - `public_sysinfo` boolean
  - `public_tcbinfo` boolean
  - `runner` string
  - `gateway_enabled` boolean
  - `features` string[]
  - `salt` string, nullable
  - `secure_time` boolean
  - `storage_fs` union
    - 'ext4'
    - 'zfs'
  - `tproxy_enabled` boolean
  - `update_env_vars` boolean, nullable — Whether to also update allowed_envs

## Response `200`

Provision response with compose_hash and KMS info

- ComposeFileProvisionResponse — API response model for compose file provision
  - `app_id` string, required
  - `device_id` string, nullable
  - `compose_hash` string, required
  - `kms_info` KMSInfo — KMS instance information.
    - `id` string, hashid, required — Hashed KMS identifier (kms_xxxxx)
    - `slug` string, nullable — Human-readable KMS name
    - `url` string, required — KMS endpoint URL
    - `version` string, required — KMS software version
    - `chain_id` integer, nullable — Blockchain chain ID if onchain
    - `kms_contract_address` string, nullable — Smart contract address if onchain
    - `gateway_app_id` string, nullable — Gateway application ID
  - `compose_hash_registered` boolean

## Other responses

- `400` — Empty Docker Compose file or invalid CVM
- `401` — Authentication required
- `403` — CVM not in workspace
- `404` — CVM not found
- `422` — Invalid Docker Compose syntax

---

[API](https://skmtc.dev/phala/apis/phala-cloud-api.md) · [All operations](https://skmtc.dev/phala/apis/phala-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/phala/phala-cloud-api/revisions/83c6ae62e860/schema)
