Application YAML (v3)
The canonical Application format used by edgible stack deploy. One YAML document describes one application; multiple documents in a single file are separated by ---.
The schema is enforced by the control plane and the agent. Unknown keys are rejected.
Top level
Section titled “Top level”apiVersion: v3kind: Applicationmetadata: { ... }spec: { ... }| Field | Required | Type | Notes |
|---|---|---|---|
apiVersion | yes | v3 | The only supported value today. |
kind | yes | Application | The only supported value today. |
metadata | yes | object | See Metadata. |
spec | yes | object | See Spec. |
Metadata
Section titled “Metadata”metadata: name: my-app organization: <org-id> description: Public API for the mobile app environment: prod labels: team: platform annotations: owner: platform-team dependsOn: [other-app-name]| Field | Required | Type | Notes |
|---|---|---|---|
name | yes | string | Unique within the organization. Lowercase letters, digits and hyphens only, 1–63 characters, starting and ending with a letter or digit — it becomes the left-most label of the application’s generated hostname. Device names follow the same rule. |
organization | yes | string | Your organization ID. Find with edgible config list. |
description | no | string | Up to 500 characters. |
environment | no | enum | One of development, staging, prod. |
labels | no | map | Key/value strings that tag applications so you can filter them. Up to 32 entries. Keys: lowercase letters, digits, ., _, - and /, starting and ending with a letter or digit, up to 63 characters. Values: letters, digits, ., _ and -, up to 63 characters, and may be empty. Not used for device selection — that is placement.deviceSelector.labels. See Labels. |
annotations | no | map | Free-form key/value strings. Not interpreted by the platform, except edgible.com/application-id — see Application ID annotation. |
dependsOn | no | string[] | Names of other applications that must be deployed before this one. |
Labels
Section titled “Labels”Use labels to tag applications and find them again:
# Applications that carry both labelsedgible application list --tag team=platform --tag tier=api
# Add or remove a label on an existing applicationedgible application update --app <app> --tag team=platformedgible application update --app <app> --untag team--tag is repeatable on list, and every tag must match.
Application ID annotation
Section titled “Application ID annotation”edgible application export writes the annotation edgible.com/application-id with the
application’s ID:
metadata: name: my-app annotations: edgible.com/application-id: <application-id>- Applying the document to a different application is refused with
409 APPLICATION_ID_MISMATCH. edgible stack deploymatches an existing application by this ID first and by name second. So renamingmetadata.namein the file renames the application instead of creating a second one.stack diff,stack statusandstack teardownmatch the same way, so a renamed file shows as an update of the existing application rather than a new one.- The annotation is identity, not configuration:
stack diffandstack deployignore it when they compare the file with what is running. - To use an exported file as a template for a new application, remove the annotation.
spec: placement: { ... } workloads: [ ... ] storage: [ ... ] # optional access: [ ... ] # optional but typical cloud: { ... } # optional, only valid when placement.strategy is cloud or automaticspec.workloads is the only required field. At least one workload must be declared.
spec.cloud (sleep/wake behavior, minActive, service classes) is accepted by the schema only
alongside the cloud placement strategies, which are not available in beta — see
placement.
spec.placement
Section titled “spec.placement”Where the application runs — a specific device you own, chosen by selector.
# Run on a specific device you ownplacement: strategy: serving-device deviceSelector: deviceName: my-first migrationPolicy: manual| Field | Required | Type | Notes |
|---|---|---|---|
strategy | yes | enum | serving-device. The schema also accepts cloud and automatic, but those are not available in beta — see the note below. |
deviceSelector | required for serving-device | object | See below. |
gateway | no | object | Pin the application to a specific gateway. See placement.gateway. |
region | required for cloud | string | Only meaningful with the cloud strategies — not available in beta. |
migrationPolicy | no | enum | manual (default), allowed, or automatic. Governs whether the application can be moved between devices. See Migrate between devices. |
placement.deviceSelector
Section titled “placement.deviceSelector”At least one selector field is required.
| Field | Type | Notes |
|---|---|---|
deviceName | string | Pin to a device by name. Matched exactly and case-sensitively, so it must be the device’s name as stored — device names take the same shape as application names (lowercase letters, digits and hyphens, 1–63 characters, starting and ending with a letter or digit). |
deviceId | string | Pin to a device by ID. |
labels | map | Match devices that carry these labels. |
region | string | Match devices in this region. |
capabilities | string[] | Match devices that report these capabilities (e.g., gpu, kvm). |
placement.gateway
Section titled “placement.gateway”Optionally pin the application to a specific gateway device in your organization instead of letting the platform assign one from the managed pool. Useful when you run your own gateway.
placement: strategy: serving-device deviceSelector: { deviceName: my-first } gateway: { deviceName: my-gateway }| Field | Type | Notes |
|---|---|---|
deviceId | string | Pin to a gateway by device ID. |
deviceName | string | Pin to a gateway by device name. |
At least one of deviceId / deviceName is required when the block is present. When gateway
is unset, managed-gateway auto-assignment applies as usual.
spec.workloads[]
Section titled “spec.workloads[]”A list of one or more workloads. Common fields apply to every type:
workloads: - name: api type: compose | docker | managed-process | vm | pre-existing ports: [ ... ] storage: [ ... ] # optional env: { ... } # optional envFrom: [ ... ] # optional healthChecks: [ ... ] # optional resources: { ... } # optional restartPolicy: always # optional dependsOn: [ ... ] # optional, names of other workloads| Field | Required | Type | Notes |
|---|---|---|---|
name | yes | string | Unique within the application. |
type | yes | enum | One of compose, docker, managed-process, vm, pre-existing. |
ports | usually | array | Ports the workload listens on. Required if access[] references this workload. |
storage | no | array | Volumes from spec.storage[] to mount. |
env | no | map | String-to-string environment variables. |
envFrom | no | array | Environment from secret references. See envFrom. |
healthChecks | no | array | See Health checks. |
resources | no | object | CPU/memory requests and limits. See Resources. |
restartPolicy | no | enum | always, on-failure, or never. |
dependsOn | no | string[] | Names of other workloads in this application that must start first. |
type: compose
Section titled “type: compose”- name: api type: compose composeFile: ./api.compose.yml projectName: api # optional| Field | Required | Type | Notes |
|---|---|---|---|
composeFile | one of | string | Path to a Docker Compose file relative to the application YAML, OR base64:<encoded yaml> (the agent decodes it before invoking compose). Exactly one of composeFile / composeArtifact. |
composeArtifact.digest | one of | string | A sha256:<64 hex> digest naming a published catalog compose bundle; the device fetches it into its content store when it is missing (used by catalog deploys). Exactly one of composeFile / composeArtifact. |
projectName | no | string | Override the compose project name. Defaults to the workload name. |
build.mode | no | enum | local (default) or remote. Where images declared with build: in the compose file are built — see below. |
hostAccess.devices | no | enum[] | Host device classes the workload may use: video-transcode, gpu. Default: none. |
hostAccess.hostNetwork | no | bool | Run the workload on the host network. Default false. |
code[].name | with code | string | Name of a code archive attached to this workload. Lowercase alphanumeric with hyphens, 1–63 chars; unique within the workload. Exposed to the compose file as ${EDGIBLE_CODE_<NAME>}. |
code[].path | with code | string | Directory the CLI packs into the archive, relative to the stack file (or absolute). Must exist and be a directory. |
code[].artifact.digest | no | string | A sha256:<64 hex> digest, stamped by the deploy tooling — you set only name and path. Required on a cut release. |
Built images ship with the deploy. Compose services that declare build: in the compose
file don’t need a registry. With build.mode: local (the default), the images are built on
your machine, exported with docker save, and streamed to each serving device over the
deploy’s ingest session — the deploy preflight checks they exist in your local Docker daemon
first. With build.mode: remote, the build context directory is packed into a
content-addressed tar (excluding .git), shipped the same way, and the device runs
docker compose build itself. build.contextArtifact is stamped by the deploy tooling — you
set only mode. Pullable services (no build: in the compose file) are pulled by the device
as usual.
hostAccess grants elevated host access the agent’s host-access gate enforces at deploy time;
omit it entirely for the default of no elevated access.
Code archives ride the release too. code[] attaches source or asset directories to the
release without rebuilding the image. Each entry is packed into a byte-deterministic,
content-addressed tar at deploy, shipped to the serving devices, pinned into the release, and
extracted on the device into a per-digest directory the agent exposes to your compose file as
${EDGIBLE_CODE_<NAME>} — mount it read-only in volumes:. A digest change changes the path,
so compose recreates the services that mount it; an unchanged tree re-digests identically and
ships nothing. code[] is only valid on compose workloads and requires agent 1.2.14 or
newer on every targeted device (the control plane refuses the deploy with AGENT_VERSION_TOO_OLD
otherwise). See Ship code without rebuilding the image.
- name: web type: compose composeFile: ./compose.yaml code: - name: app path: ./srcservices: web: image: myapp-runtime:1 volumes: - ${EDGIBLE_CODE_APP}:/app:rotype: docker
Section titled “type: docker”A single image, no compose file.
- name: redis type: docker image: redis:7-alpine command: ["redis-server"] args: ["--appendonly", "yes"]| Field | Required | Type | Notes |
|---|---|---|---|
image | yes | string | A pullable image reference, e.g. redis:7-alpine or ghcr.io/org/app:latest. Resolved to a concrete digest at deploy time — see the note below. |
command | no | string[] | Override the image’s ENTRYPOINT. |
args | no | string[] | Override the image’s CMD. |
Image tags are resolved to digests at deploy time. Whatever a tag (
:latest,:7-alpine, …) points to at the moment you deploy is resolved to a concretesha256:…digest and pinned into the immutable release that the deploy cuts. The device realizes that exact digest, and the running container is tracked by digest — not by tag. Two consequences: (1) rebuilding and re-pushing the same tag with new bytes mints a new release and reaches the device (no silent-stale), and (2)edgible application rollbackreproduces the exact bytes a release was cut with, whereas re-deploying old YAML re-resolves its tags fresh. The same resolution applies to every image named in acomposeworkload’scomposeFile.
type: managed-process
Section titled “type: managed-process”A long-running native process supervised by the agent.
- name: worker type: managed-process command: "./bin/worker --queue jobs" workingDir: /opt/app logFile: /var/log/edgible/worker.log| Field | Required | Type | Notes |
|---|---|---|---|
command | yes | string | A single shell command line, run through /bin/sh -c — quoting, $VAR expansion and && all work. |
workingDir | no | string | CWD for the process. Defaults to the agent’s working directory. |
logFile | no | string | Where stdout/stderr are written. |
type: vm
Section titled “type: vm”A virtual machine. The disk can be declared inline (legacy) or via a storage[] mount (recommended; required for migration).
# Recommended: storage-backed disk- name: legacy type: vm vmBackend: qemu memory: 2048 cpus: 2 storage: - { name: vm-disk, mountPath: /disk }# Legacy: inline disk image path on the host- name: legacy type: vm vmBackend: qemu diskImage: /var/lib/edgible/vms/legacy.qcow2 memory: 2048 cpus: 2| Field | Required | Type | Notes |
|---|---|---|---|
vmBackend | yes | enum | qemu, wsl, or firecracker. |
memory | yes | number | MiB. |
cpus | yes | number | Virtual CPUs. |
diskImage | one of | string | Host path to a disk image. Mutually exclusive with a storage[] disk. |
storage[] | one of | array | A storage mount referencing spec.storage[]. The first mount is the disk. |
vmArch | no | enum | x86_64 or aarch64. |
sshPort | no | number | SSH port to expose to the agent. |
sshPublicKey | no | string | Public key to inject. |
vmExtraArgs | no | string[] | Extra args passed to the backend. |
type: pre-existing
Section titled “type: pre-existing”Tells Edgible to forward to a process or service that’s already running on the device — useful for adopting an existing service without changing how it runs.
- name: legacy-svc type: pre-existing hostPort: 8080 hostAddress: 127.0.0.1 # optional, defaults to localhost| Field | Required | Type | Notes |
|---|---|---|---|
hostPort | no | number | A port already listening on the device. Required unless the workload only declares ports[] for access targeting. |
hostAddress | no | string | Address the existing service listens on. Defaults to 127.0.0.1. |
spec.workloads[].ports[]
Section titled “spec.workloads[].ports[]”ports: - { name: http, containerPort: 8080, protocol: tcp } - { name: dns, containerPort: 53, protocol: udp }| Field | Required | Type | Notes |
|---|---|---|---|
name | yes | string | Used by access entries and health checks to reference this port. |
containerPort | yes | number | The port number the workload listens on. |
protocol | no | enum | tcp (default) or udp. |
spec.workloads[].storage[]
Section titled “spec.workloads[].storage[]”Mounts a volume declared in spec.storage[].
storage: - { name: pgdata, mountPath: /var/lib/postgresql/data } - { name: cache, mountPath: /tmp/cache, readOnly: false }| Field | Required | Type | Notes |
|---|---|---|---|
name | yes | string | Must match a spec.storage[].name. |
mountPath | yes | string | Absolute path inside the workload. |
readOnly | no | bool | Mount read-only. |
Health checks
Section titled “Health checks”healthChecks: - { type: http, port: http, path: /healthz, intervalSeconds: 10 } - { type: tcp, port: db, intervalSeconds: 30 } - { type: exec, command: ["pg_isready"], intervalSeconds: 60 }| Field | Required | Type | Notes |
|---|---|---|---|
type | yes | enum | http, tcp, or exec. |
port | http/tcp | string | Port name from ports[]. |
path | http | string | URL path to GET. |
command | exec | string[] | Command to run inside the workload. |
intervalSeconds | no | number | How often to probe. |
timeoutSeconds | no | number | Probe timeout. |
failureThreshold | no | number | Consecutive failures before the workload is marked unhealthy. |
startupGraceSeconds | no | number | Grace window after a (re)deploy during which failing probes don’t degrade the app — covers first-boot installers and model downloads. |
When a health check fails a deploy
Section titled “When a health check fails a deploy”When a workload starts but never passes its declared http health check, the deploy fails with HEALTH_CHECK_FAILED — and that failure now carries the probe evidence, not just an opaque status. edgible application get (and the webapp application view) show the last probe under the failing device:
health: GET /healthz:8080 → HTTP 502 after 24 attempts (120s)body: upstream connect error or disconnect/reset before headersThe health: line is the final attempt — the HTTP status the probe got (or a transport error when nothing answered), the attempt count, and the elapsed time. The body: line is a capped snippet of the response body, captured only from failing responses, so a 500 that returns a stack trace or an error message tells you why it failed. edgible application doctor surfaces the same evidence in its Deployment verdict and points you at edgible application logs --priority debug for the workload’s own output.
Resources
Section titled “Resources”resources: requests: cpu: "500m" memory: 512Mi limits: cpu: "2" memory: 2Gi| Field | Type | Notes |
|---|---|---|
requests.cpu / limits.cpu | string | Cores or millicores (e.g., 2, 500m). |
requests.memory / limits.memory | string | Size string (e.g., 512Mi, 2Gi). |
Honored by compose, docker, and vm workloads where the backend supports it.
envFrom
Section titled “envFrom”Inject environment variables from a secret stored in the platform.
envFrom: - name: DATABASE_URL secretRef: { secret: prod-db, key: url } - name: API_TOKEN secretRef: { secret: prod-api, key: token }| Field | Required | Type | Notes |
|---|---|---|---|
name | yes | string | Env var name to set inside the workload. |
secretRef.secret | yes | string | Secret identifier in the platform. |
secretRef.key | yes | string | Key within the secret. |
envFrom is delivered only to docker, compose and managed-process workloads. On vm or
pre-existing workloads it is refused at apply time with 400 SECRETS_NOT_DELIVERABLE. A
secretRef without a key is also refused at apply time.
Edgible can only put a secret into a process it starts. A pre-existing workload is a service you
start yourself, so it cannot receive secrets. Switch it to managed-process and Edgible starts the
same command itself, with the secrets in its environment:
# Before: you start the service, Edgible forwards to it.- name: api type: pre-existing hostPort: 8080# After: Edgible starts the service and injects the secret.- name: api type: managed-process command: /opt/api/bin/api --listen 127.0.0.1:8080 workingDir: /opt/api ports: - { name: http, containerPort: 8080, protocol: tcp } envFrom: - name: DATABASE_URL secretRef: { secret: prod-db, key: url }Stop the old copy of the service first (for example systemctl disable --now api), or the two
fight over the port. See Deploy a managed process.
A vm has no channel for secrets at all. Either give the service inside the VM its secrets by
your own means, or move that service out of the VM into a managed-process, docker or compose
workload.
A new secret value reaches a running application when you run
edgible application redeploy, or when you rotate the secret with
edgible secret set <name> ... --redeploy, which redeploys every application that uses it.
spec.storage[]
Section titled “spec.storage[]”Application-level storage volumes. Each entry is a logical volume that one or more workloads can mount.
storage: - name: pgdata type: persistent size: 20Gi mobility: movable| Field | Required | Type | Notes |
|---|---|---|---|
name | yes | string | Referenced by workloads[].storage[].name. |
type | yes | enum | persistent or ephemeral. |
size | required for persistent | string | Size like 20Gi, 500Mi. |
driver | no | string | Storage driver hint. Most users leave unset. |
mobility | no | enum | immovable (default), movable, replicated, or cloud-only. See below. |
backup | no | object | { enabled, scheduleCron, retainCount }. Not yet supported — rejected at apply (see below). |
encryption | no | object | { enabled, keyRef }. Not yet supported — rejected at apply (see below). |
On-demand snapshots of persistent storage are available today without any backup block:
edgible application storage snapshot copies the volumes on the device and
edgible application storage restore puts a copy back. See
Snapshots and backups.
Mobility values:
immovable— bound to the device it was created on; cannot migrate.movable— the volume can be quiesced, snapshotted, transferred, and restored on another device. Required for Migrate between devices.replicated— the volume is kept consistent on more than one device.cloud-only— only valid withplacement.strategy: cloudorautomatic, and rejected onserving-device. Accepted by the schema but not available in beta — cloud hosting is out of beta scope (see placement).
spec.access[]
Section titled “spec.access[]”Public-facing entry points. Each entry exposes a workload port through Edgible’s edge.
access: # HTTPS with a generated hostname — the primary (bare <app>.<org>.edgible.app) - name: public type: https primary: true # optional; defaults to the first https entry target: { workload: web, port: http } hostname: { generated: true } tls: { managedBy: edgible } publish: true policies: auth: { modes: [none] }
# HTTPS with a custom domain — additive, rides alongside the generated name - name: api type: https target: { workload: api, port: http } hostname: { custom: api.example.com } # single FQDN; generated name stays live tls: { managedBy: edgible } policies: auth: { modes: [api-key] } ipRules: allow: ["10.0.0.0/8", "192.168.0.0/16"] rateLimit: requestsPerMinute: 600 burst: 100
# HTTPS with path routing — different paths to different workloads - name: site type: https hostname: { generated: true } tls: { managedBy: edgible } routes: - path: /api/* target: { workload: api, port: http } stripPrefix: false # default: workload receives /api/health unchanged policies: { auth: { modes: [api-key] } } - path: /* target: { workload: web, port: http } policies: { auth: { modes: [none] } }
# Raw TCP — public port must be in the allowed L4 range 20000-29999 - name: postgres type: tcp target: { workload: db, port: pg } listenPort: 25432
# Raw UDP — same L4 range applies - name: dns type: udp target: { workload: dns, port: dns } listenPort: 20053| Field | Required | Type | Notes |
|---|---|---|---|
name | yes | string | Unique within the application. Becomes the hostname prefix for non-primary https accesses. |
type | yes | enum | https, tcp, or udp. |
primary | no | bool | https only. Marks the access whose generated hostname is the bare <app>.<org>.edgible.app. At most one per app (MULTIPLE_PRIMARY_ACCESS otherwise). Defaults to the first https entry. |
target.workload | https: one of | string | A name from spec.workloads[]. Shorthand for a single /* route. Give either target or routes, not both (ACCESS_TARGET_OR_ROUTES). |
target.port | with target | string | A port name from that workload. |
routes | https: one of | array | Per-path routing table. See routes. |
hostname | https only | object | { generated: true } and/or { custom: <fqdn> }. The generated hostname always exists; custom is a single FQDN, additive (never replaces the generated name). Two accesses with the same custom → DUPLICATE_CUSTOM_HOSTNAME. |
hostname.proxied | no | bool | Declares that the custom hostname sits behind a proxy you run (a service that answers your visitors and forwards to Edgible). Requires hostname.custom, and requires tls: { managedBy: provided } — Edgible cannot validate a domain it does not answer. Visitor addresses and ipRules on a proxied access apply to the proxy, not to visitors. See Using a proxy in front of your domain. |
tls | https only | object | { managedBy: edgible } (default, platform-issued cert), { managedBy: provided } (you upload a certificate from your proxy provider; Edgible stores, delivers and reports it but never renews it), or { managedBy: device, certPath, keyPath } (the agent serves your own cert from those on-device paths). { managedBy: passthrough } is not supported yet: apply rejects it. |
listenPort | tcp/udp only | number | Public port the platform listens on. Must be in 20000–29999 — the range the shared gateway opens. Ports below 1024 (including 80/443) and the WireGuard range 51820–52819 are rejected; each tcp/udp access needs a distinct listenPort. |
publish | no | bool | Defaults to true. If false, the route is configured but not exposed publicly. |
policies | no | object | Access-level policies. See Policies. With routes, a route’s own policies replace the access-level ones for that path. |
routes
Section titled “routes”An https access may replace its single target with a routes[] table that sends different paths to different workloads. Exactly one of target/routes per access.
routes: - path: /api/* target: { workload: api, port: http } stripPrefix: false policies: { auth: { modes: [api-key] } } - path: /* target: { workload: web, port: http } policies: { auth: { modes: [none] } }| Field | Required | Type | Notes |
|---|---|---|---|
path | yes | string | /x (exact) or /x/* (prefix). Matching is longest-prefix, exact beats wildcard, order-independent. Duplicate paths → DUPLICATE_ROUTE_PATH. |
target.workload | yes | string | Workload this route proxies to. |
target.port | yes | string | Port name on that workload. |
stripPrefix | no | bool | Default false — the path passes through untouched (/api/health → workload sees /api/health). true strips the matched prefix (/api/health → /health). |
policies | no | object | Per-route auth (and other policies). |
A missing /* route is legal (API-only apps); edgible stack validate warns but does not fail. Requests matching no route return the platform no-route page — HTTP 404 with header X-Edgible-Route: none — distinguishing a platform 404 from a workload 404.
The legacy policies.auth.pathPolicies (path-scoped auth only) is deprecated in favour of routes[] but still accepted; declaring both on one access is rejected with ROUTES_PATHPOLICIES_CONFLICT.
Login on certain paths only
Section titled “Login on certain paths only”To require Edgible login on part of a site and leave the rest as it is, put edgible-login on
the routes you want to protect. A route without its own policies uses the access-level
policies.auth, and when the access declares none it is public. A route’s own policies.auth
replaces the access-level one for that path.
routes: - path: /admin target: { workload: app, port: http } policies: { auth: { modes: [edgible-login] } } - path: /admin/* target: { workload: app, port: http } policies: { auth: { modes: [edgible-login] } } - path: /* target: { workload: app, port: http }List both /admin (exact) and /admin/* (everything below it): the wildcard does not match the
bare /admin. Only the listed paths are protected, so add any other path that reaches the same
pages. Adding the routes reloads edge routing for the access and does not restart the workload;
later changes to a route’s policies are applied live. See
Login on certain paths only.
Supplied certificates (managedBy: provided). The PEM material never appears in the YAML — it is uploaded out of band, bound to the hostname, with edgible certs upload <hostname> --app <id> (--cert, --key and an optional --chain, each a PEM file) or the webapp’s Upload certificate dialog. Three rules are enforced at validate/apply time:
tls: { managedBy: provided }on an access with nohostname.customis rejected — a supplied certificate is bound to a custom hostname (generated names are always platform-issued).hostname.proxied: trueis rejected withouthostname.custom, and rejected unlesstls.managedByisprovided— a proxied domain needs a supplied certificate.certPath/keyPathalongsidemanagedBy: providedis rejected; on-device paths belong tomanagedBy: deviceonly.
Until the first upload the serving device presents a placeholder certificate on the custom hostname and the deploy is not held up (the generated hostname still gates it). Uploads replace the stored certificate wholesale; edgible certs shows the hostname in state Supplied with its expiry, and a lapsed one flips to expired and falls back to the placeholder. See Using a proxy in front of your domain.
Changing hostnames. An apply that removes a live hostname (renaming/deleting an access, reassigning primary, or removing a custom domain) is refused with 409 CONFIRMATION_REQUIRED listing what would change. Re-run edgible stack deploy … --allow-hostname-removal to confirm (on edgible application update, use --confirm). Additions are never guarded.
Policies
Section titled “Policies”Available on every access type, with tcp/udp supporting only ipRules and rateLimit.
| Field | Type | Notes |
|---|---|---|
auth.modes | string[] | One or more of none, edgible-login, api-key, short-code, oauth. OR-combined — a request satisfying any listed mode is served (e.g. [edgible-login, api-key] lets browsers log in while API keys bypass the redirect). none is exclusive and cannot be combined. oauth (AI assistant sign-in) combines only with api-key, is refused on cloud and automatic placement, and needs agent 1.4.40+ on the serving device. A sixth mode, app-native (pass-through; the app’s own login is the control), is exclusive and valid only per-route, never at the access root. See Authentication modes. |
auth.allowedOrganizations | string[] | When modes includes edgible-login or oauth, the organizations whose members get in. Absent: the application’s own organization. |
ipRules.allow | string[] | Source IP allow-list (IPv4/IPv6 addresses or CIDR blocks). Enforced at the gateway. When set, only listed sources reach the app; every other source is rejected (default-deny). |
ipRules.deny | string[] | Source IP deny-list (IPv4/IPv6 addresses or CIDR blocks). Enforced at the gateway. Listed sources are dropped. Deny wins: a source that matches both lists is denied. |
ipRules.private | bool | tcp/udp only (rejected on https with IP_RULES_PRIVATE_HTTPS). Default false. When true, only allow sources connect, and an empty or IPv6-only allow list means nobody (the gateway’s TCP/UDP path is IPv4); without it an empty list means everyone. A live change (no restart). Needs agent 1.4.14+ on the app’s gateway, else the apply fails with AGENT_VERSION_TOO_OLD. See Private TCP and UDP access. |
rateLimit.requestsPerMinute | number | Per-source budget. Enforced for tcp/udp accesses as new connections per minute; accepted but not enforced for https accesses yet. |
rateLimit.burst | number | Allowed burst above the steady rate (tcp/udp only today). |
waf.enabled | bool | Accepted by the schema; not enforced yet. |
waf.mode | enum | enforce or log-only. Accepted by the schema; not enforced yet. |
cors | object | https only. How the edge treats browser preflight requests. See policies.cors. |
policies.cors
Section titled “policies.cors”Browsers send a “preflight” before cross-origin calls such as fetch with an Authorization or
X-API-Key header. A preflight is an OPTIONS request with an Origin header and an
Access-Control-Request-Method header. It never carries credentials, so without this setting the
auth gate rejects it and browser apps cannot call protected applications. Any other OPTIONS
request is authenticated like any other request.
Preflights are not authentication events: they are not checked against keys and do not count toward failed-login alarms.
access: - name: api type: https target: { workload: api, port: http } policies: auth: { modes: [api-key] } cors: { mode: passthrough } policies: auth: { modes: [api-key] } cors: mode: managed allowOrigins: [https://app.example.com] allowHeaders: [Authorization, X-API-Key, Content-Type] allowCredentials: false maxAge: 600| Field | Type | Notes |
|---|---|---|
mode | enum | off (default when cors is absent), passthrough, or managed. |
allowOrigins | string[] | managed only; required. 1–32 entries. Each is exactly scheme://host[:port] with no path, or *. |
allowMethods | string[] | managed only. Default: GET, POST, PUT, PATCH, DELETE, OPTIONS. |
allowHeaders | string[] | managed only. Default: echo the browser’s Access-Control-Request-Headers. |
exposeHeaders | string[] | managed only. Response headers the browser may read. |
allowCredentials | bool | managed only. Default false. * in allowOrigins cannot be combined with true. |
maxAge | number | managed only. Seconds the browser may cache the answer, 0–86400. Default 600. |
Modes:
off— the edge refuses preflights itself with403and no CORS headers. Nothing reaches your application. Other requests are unchanged.passthrough— genuine preflights are forwarded to your application without authentication, so your application’s own CORS code answers them. Real (non-preflight) requests are still authenticated. Use this when your application already handles CORS; it trusts your application to answer preflights safely.managed— the edge answers preflights from the policy. An allowed origin gets204withAccess-Control-Allow-Origin(the origin echoed),Vary: Origin,Access-Control-Allow-Methods,Access-Control-Allow-Headers,Access-Control-Max-Age, andAccess-Control-Allow-Credentials: truewhen enabled. A disallowed origin gets403. For allowed origins the edge also addsAccess-Control-Allow-Origin,Vary: Origin, credentials and expose headers to real responses, including the edge’s own401and403responses. It removes anyAccess-Control-*headers your application sets — managed replaces, it never merges.
The managed fields are rejected with any other mode.
Requirements and limits:
- Needs agent 1.4.14 or later on the serving device. Applying a document with
corsto an application whose device runs an older agent is refused with a message naming the minimum version. - With
edgible-login, the policy applies, but cross-site browser calls that carry the login session are not supported (the session cookie is host-only andSameSite=Lax). passthroughcan also be set from the CLI:edgible application update --app <app> --cors passthrough(andedgible application create ... --cors passthrough).managedis YAML-only for now. The web app has a CORS select (off / passthrough) on the access and auth panel.
Multi-document files
Section titled “Multi-document files”You can put several Applications in one file, separated by ---:
apiVersion: v3kind: Applicationmetadata: name: db organization: <org-id>spec: { ... }---apiVersion: v3kind: Applicationmetadata: name: api organization: <org-id> dependsOn: [db]spec: { ... }edgible stack deploy -f all.yml deploys both, in dependsOn order. See Stack with dependencies for the full pattern.
Changing an application in place
Section titled “Changing an application in place”Every change to an application’s configuration creates a new version and a
release that you can roll back to. Preview any change with
--dry-run, or edit the whole document in your editor with edgible application edit --app <app>.
Some changes interrupt traffic, so they need your confirmation: removing a hostname, unpublishing,
renaming the application or an access, and changing an access type or public listen port. The
platform lists the impact and refuses until you confirm (--confirm on the CLI).
Two things cannot be changed in place: spec.placement.deviceSelector and a workload’s type.
Move the application to another device with edgible application move --app <app> --to <device>,
or recreate it.
To go back, run edgible application rollback <version> --app <app>. It applies that release’s
document as a new version, so history stays linear. DNS, routes and certificates follow.