Cloud in a Bottle Manifest Spec

Apps declare how they should be deployed on Cloud in a Bottle by placing a cloudinabottle.toml file at the root of their git repository. This file defines the spec of the manifest in detail; for a more general walkthrough of creating an app, see Creating an App.

Basic Example

[app]
name = "my-app"
version = "0.1.0"
description = "A simple web app"

[runtime.container]
image = "Dockerfile"
port = 8080

[resources]
memory_mb = 128
cpu_cores = 0.1

[data]
sqlite = ["main"]

Field Reference

[app] (required)

FieldTypeRequiredDescription
namestringyesUnique app identifier (lowercase, hyphens ok)
versionstringyesVersion string. Conventionally semver, but only checked for non-emptiness (not validated as semver).
descriptionstringnoShort description
authorsstring[]noList of author names
release_tag_formatstringnoHow the repo tags its releases. Only "semver" (tags like v1.2.3) is supported; any other value fails validation, so a format a newer version adds is never misread. When set and the app tracks its repo's default branch (no ref pinned), it is installed and updated to the newest release on that branch rather than its head. See Releases and prebuilt images.

[runtime.container] (required)

FieldTypeRequiredDefaultDescription
imagestringyes-Path to Dockerfile relative to repo root
portintegeryes-Port the app responds to HTTP on
prebuilt_imagestringno-An image reference without tag or digest (e.g. registry.cloudinabottle.org/my-app). Requires [app].release_tag_format. When the app follows releases, each release runs <prebuilt_image>:<that commit's sha>, pulled instead of built (or built locally if it can't be pulled). See Releases and prebuilt images.
commandstringno-Override container CMD
capabilitiesstring[]no[]Additional Linux capabilities to grant inside the container, on top of the Docker-default baseline (CHOWN, DAC_OVERRIDE, FOWNER, FSETID, KILL, NET_BIND_SERVICE, SETFCAP, SETGID, SETPCAP, SETUID, SYS_CHROOT, NET_RAW, MKNOD, AUDIT_WRITE) that every container receives automatically. Restricted to a rootless-safe allowlist (see compute_space.core.manifest.SAFE_CAPABILITIES); disallowed entries like "SYS_ADMIN" are rejected at parse time. Accepts names with or without the CAP_ prefix.
devicesstring[]no[]Host devices to pass through (e.g., "/dev/net/tun"). Restricted to a rootless-safe allowlist (see compute_space.core.manifest.SAFE_DEVICE_PATHS); disallowed paths like /dev/mem, /dev/kvm, or raw block devices are rejected at parse time.

[[ports]] (optional, repeatable)

Declares additional port mappings for the container. Each entry binds a container port to a host port (TCP+UDP on 0.0.0.0). Set host_port = 0 for auto-assignment from the 9000-9999 range.

For normal HTTP/HTTPS routing, this section is not necessary. Traffic will enter the app through through the router proxy - requests to https://{app_name}.{zone_domain}/ will be routed to the app container at port runtime.container.port.

Specifying additional ports in this section is only necessary if the app requires a non-HTTP protocols (e.g. SMTP on 25). We prefer to write apps that only use HTTP-compatible protocols whenever possible.

Only host ports >= 25 can be bound. Ports 80 and 443 are reserved by the router and therefore can't be bound by apps.

Multiple apps requesting the same host port can't be installed at the same time, therefore prefer auto-assigning (host_port = 0) when possible to avoid conflicts.

FieldTypeRequiredDefaultDescription
labelstringyes-Unique label for this port mapping (e.g., "metrics")
container_portintegeryes-Port inside the container
host_portintegerno0Port on the host (0 = auto-assign)

[routing] (optional)

FieldTypeRequiredDefaultDescription
health_checkstringno-Health check path. Used to determine when the app has finished booting up.
public_pathsstring[]no[]Route prefixes accessible without authentication

A convenience feature to display additional links to the instance owner on the app detail page. By default we just link to your app's root at {app_name}.{zone_url}. This feature allows additional links to be displayed, eg to an admin console at /_openhost/admin. The path is taken at face value and is not verified in any way.

In general it's better to expose these links from within your app; this is mainly a convenience feature for supporting existing apps where we want to add a Cloud in a Bottle specific admin page that isn't exposed in the upstream app. This feature may be removed in the future.

FieldTypeRequiredDefaultDescription
namestringyes-Display name for the link (e.g., "admin")
pathstringyes-Path on the app's URL (e.g., "/_openhost/admin")

[resources] (optional)

FieldTypeRequiredDefaultDescription
memory_mbintegerno128Max container memory in MB
build_memory_mbintegernomemory_mbMemory limit (MB) for the image build step. Defaults to the app's memory_mb; a build that needs more must set this explicitly.
cpu_coresfloatno0.1CPU allocation in cores (1.0 = 1 core)

[data] (optional)

FieldTypeRequiredDefaultDescription
app_databooleannotrueProvision a directory for this app on the instance's file system, intended for persistent app state. Exposed to the app via BOTTLE_APP_DATA_DIR.
app_temp_databooleannofalseProvision a directory for this app on the instance's file system, intended for ephemeral app data. This data persists between container or instance boots. Exposed to the app via BOTTLE_APP_TEMP_DIR.
app_archivebooleannofalseProvision a directory for this app in the instance's "archive storage", intended for persistent but bulky content. Archive storage is backed by local disk by default, but can be configured by the owner to be served by remote S3 backend to enable larger and more reliable storage than the instance's local disk. Exposed to the app via BOTTLE_APP_ARCHIVE_DIR.
sqlitestring[]no[]SQLite databases to provision. Each entry provisions app_data/sqlite/{name}.db, exposed to the app as BOTTLE_SQLITE_<NAME>. Enabling implicitly enables app_data.
access_all_app_databooleannofalseMount the parent dirs for all apps' permanent, temporary, and archive data (rw). For admin, file browser, and backup apps. Mounted under /data in the container.

The configured bundled backup app includes permanent and temporary app data, excluding its own permanent-data directory. Its direct migration copies permanent data for selected apps; temporary and archive data are not migrated. Archive data is also excluded from these backups. See Data for archive recovery requirements.

The retired access_all_data and access_all_archive fields are deprecated aliases for access_all_app_data. Manifests using either receive the full permanent, temporary, and archive data permission and emit a deprecation warning.

Releases and prebuilt images

An app that tags its releases can be installed and updated to them rather than to the head of its default branch, and can publish each release's image from CI so installs pull it instead of building it.

[app]
name = "my-app"
version = "1.2.3"
release_tag_format = "semver"

[runtime.container]
image = "Dockerfile"
port = 8080
prebuilt_image = "registry.cloudinabottle.org/my-app"
  • Following releases. An app follows releases when it sets [app] release_tag_format and is installed with no ref pinned (so it tracks its repo's default branch). It then installs and updates to the newest release tag on that branch (vX.Y.Z; release candidates excluded), whether or not it sets prebuilt_image. A newer major version is just a newer release. A pinned ref (url@ref: a branch, tag or commit) ignores both fields and tags, and builds its head as before.
  • No release, no install. If the app follows releases but the default branch has no release tag, the install or update fails.
  • Prebuilt images. [runtime.container] prebuilt_image makes each release pull <prebuilt_image>:<full commit sha> instead of building image; CI must push that tag before tagging the commit. It requires release_tag_format, since the image is only pulled for releases: installing an app that sets prebuilt_image without it fails (unless a ref is pinned). An already installed app whose manifest has prebuilt_image but no release_tag_format (app releases from before the field existed) keeps working: the image is ignored and the app is built from image, and its next update moves it to a release. Without prebuilt_image, each release is built from image.
  • Falling back to building. If an image pull fails, it is tried 3 times in all, a few seconds apart, and then the release's image Dockerfile is built locally instead. If signature verification fails or cannot complete (including a registry or trust-service outage during verification), the source build starts immediately, without retrying verification or pulling the rejected image. The router and app build logs record why the image could not be used. Local setup errors such as a missing binary or a failed image retag still fail the operation.
  • Updates prepare the new image first. An update of an app that follows releases (from the app's page, or the scheduled one) pulls the release's image, or builds it, before the running container is stopped. If that fails, the working tree is rolled back, the app is marked with the error (a scheduled update records it as failed instead), and the running version keeps running untouched.
  • Signatures. Apps installed from the cloud-in-a-bottle GitHub org require an image signed through GitHub Actions for that app's repo and the deployed commit, wherever the image is hosted. A particular workflow file or registry is not required. Cosign verifies the tagged image; only the digest in its verified payload is pulled, so a later tag move cannot swap the image. A failed check builds the release locally instead. Third-party repos (including forks outside our org) pull images without this policy, even if they point at our registry. Moving one of our apps to another registry no longer needs an owner-approval warning: its image still must verify, or it is built from source.
  • Forks. A fork that changes the app should remove (or comment out) prebuilt_image, so it is built from its own Dockerfile, and release_tag_format too unless it tags its own releases.
  • Tests. The test harness deploys the working tree, built from image, by default, so tests cover it; pass deploy_newest_release=True to OpenhostStack to deploy the newest release (with its prebuilt image, if the manifest sets one) instead.

image stays required: Cloud in a Bottle versions without release support ignore both fields and build the default branch's head.

More Examples

App with extra container permissions

[app]
name = "ha-tunnel"
version = "0.2.0"
description = "WebSocket tunnel to Home Assistant"

[runtime.container]
image = "Dockerfile"
port = 8080

[routing]
public_paths = ["/tunnel"]

[resources]
memory_mb = 128
cpu_cores = 0.1

App with extra port mappings

[app]
name = "monitoring"
version = "0.1.0"

[runtime.container]
image = "Dockerfile"
port = 8080

[[ports]]
label = "metrics"
container_port = 9090
host_port = 9090

[[ports]]
label = "debug"
container_port = 5005
host_port = 0  # auto-assigned

Minimal app (wrapping existing software)

[app]
name = "file-browser"
version = "0.1.0"
description = "Web-based file browser"

[runtime.container]
image = "Dockerfile"
port = 5000
command = "/data -A"

[data]
access_all_app_data = true
[app]
name = "synapse"
version = "0.1.0"

[runtime.container]
image = "Dockerfile"
port = 3000

[[links]]
name = "admin"
path = "/_openhost/admin"

This page lives in the Cloud in a Bottle repo. Suggest an edit. Prefer the raw markdown? Add .md to the URL, or grab the whole manual at all.md.