# Deploy an image If your CI already builds and tests a container image, you can deploy that exact image to Smolcloud. Publish it to a public repository on Docker Hub or GitHub Container Registry (GHCR) and copy its digest. If you have a source folder or Dockerfile, [deploy from source](source-preparation.md). ## Submit an image 1. In the app’s **Configuration**, set the port your server listens on and a health path that returns HTTP 200. 2. From a CLI profile with **Can deploy** on the app, run the command below. Replace `APP_ID` with the app ID and the image reference with the one from your registry. The part after `sha256:` is the full 64-character digest. ```sh smolcloud deploy-image APP_ID ghcr.io/owner/image@sha256:DIGEST ``` For Docker Hub, use `docker.io/owner/image@sha256:DIGEST`. A digest pins the contents even if someone moves a tag like `latest`. Smolcloud pulls the image and starts it with the app’s runtime settings. Once the health check passes, the CLI prints the app’s address. The app’s existing [sharing settings](builder-guide.md#6-share-it) determine who can open it. **If this release needs resources**, add the folder containing `innie-resources.json` as the last argument. For a file in your current folder, append `.` to the command above. The CLI reads the declaration locally and the deployment waits for [resource approval](resource-declarations.md). **For CI or a coding agent**, append `--result v1` for JSON. Save `operation_id` and check for `status: "succeeded"` before sharing the address. [Read deployment results](builder-guide.md#read-deployment-results-from-an-agent). ## What the image needs | Check | Requirement | | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | Registry | The image must be downloadable without signing in. Use a digest reference from `docker.io` or `ghcr.io`. | | Platform | Include a Linux image for the worker’s CPU architecture. A multi-platform image works if its index has exactly one matching Linux entry. | | Server | Listen on `0.0.0.0` at the configured port. The process runs as user and group `10001:10001` with a read-only root filesystem. | | Persistent files | Use a bucket or an approved disk for saved files. Smolcloud rejects images that declare a Docker `VOLUME`. | ## If the terminal disconnects Find the deployment ID and reconnect to the same deployment: ```sh smolcloud status APP_ID smolcloud resume APP_ID DEPLOYMENT_ID ``` If the pull fails, check public access, digest and platform. If the image starts but never becomes healthy, run `smolcloud logs DEPLOYMENT_ID runtime` and check the listening port and health path. To return to an earlier release, see [Roll back app code](rollback.md). ## Limits The selected image can have up to 128 layers, with a maximum download of 512 MiB and an expanded size of 2 GiB.