Enclavely Docs
Getting Started

Configuration

enclavely.yaml reference and project configuration options.

The enclavely.yaml file lives at the root of your service directory. It defines runtime, deploy defaults, and service contract settings.

Full example

name: payments-service
runtime:
  dockerfile: Dockerfile
  enclave_entrypoint: ./bin/server
deploy:
  cpu_count: 2
  memory_mib: 4096
  healthcheck_path: /healthz
service_contract:
  contract_version: v1
  transport: http1-vsock
  enclave:
    cid: 16
    port: 8080
    healthcheck_path: /healthz
    readiness_path: /readyz
    attestation_required: true
    capabilities: [decrypt]
attestation:
  pcrs:
    "0": "<expected-hash>"
    "1": "<expected-hash>"
secrets:
  - STRIPE_API_KEY
  - DB_URL

Reference

name

Project name. Match this to the project you created in Enclavely.

FieldTypeRequiredDescription
namestringYesUnique project identifier (e.g. payments-service). Must match the name used when running enclavely project create.

runtime

Defines build inputs and entrypoint.

FieldTypeRequiredDescription
dockerfilestringYesPath to the Dockerfile used to build the enclave image, relative to the project root.
enclave_entrypointstringYesBinary/script that starts your service process.
runtime:
  dockerfile: Dockerfile
  enclave_entrypoint: ./bin/server

deploy

Controls deploy defaults for your service.

FieldTypeRequiredDefaultDescription
cpu_countintegerYes--Requested CPU allocation.
memory_mibintegerYes--Requested memory (MiB).
healthcheck_pathstringNo/healthzHealth endpoint path.
deploy:
  cpu_count: 2
  memory_mib: 4096
  healthcheck_path: /healthz

service_contract

Defines the runtime contract Enclavely enforces during deploy and health checks.

FieldTypeRequiredDescription
contract_versionstringYesContract schema version. Currently must be v1.
transportstringYesTransport protocol used to communicate with the enclave. Supported value: http1-vsock.
enclaveobjectYesEnclave connection and behavior configuration. See below.

service_contract.enclave

FieldTypeRequiredDefaultDescription
cidintegerYes--vsock CID (typically 16).
portintegerYes--The vsock port the enclave listens on.
healthcheck_pathstringYes/healthzHealth endpoint path inside enclave transport.
readiness_pathstringYes/readyzReadiness endpoint path.
attestation_requiredbooleanYestrueEnforce attestation before routing traffic.
capabilitiesstring[]Yes[decrypt]Supported values: sign, decrypt.
service_contract:
  contract_version: v1
  transport: http1-vsock
  enclave:
    cid: 16
    port: 8080
    healthcheck_path: /healthz
    readiness_path: /readyz
    attestation_required: true
    capabilities: [decrypt]

attestation

Expected PCR measurements for attestation.

FieldTypeRequiredDescription
pcrsmap[string, string]NoA map of PCR index to expected SHA-384 hash. Common indices are "0" (enclave image) and "1" (Linux kernel).
attestation:
  pcrs:
    "0": "abc123..."
    "1": "def456..."

secrets

A list of secret names your service expects at runtime.

FieldTypeRequiredDescription
secretsstring[]NoList of environment variable names the enclave expects to receive as encrypted secrets.
secrets:
  - STRIPE_API_KEY
  - DB_URL

The secrets list declares names only. Do not store secret values in this file.

Never put secret values in enclavely.yaml.

Generating a configuration

Run enclavely init in your project directory to generate an enclavely.yaml interactively:

enclavely init

The wizard writes a valid starting config.

Validating your configuration

Use build as a config validator:

enclavely build --config enclavely.yaml

If validation fails, the CLI prints the exact field error.

Next steps

On this page