anycloud serve
Deploy a long-running HTTP Server:
anycloud serve <image> [-- command...] [options]
A cloud-backed Server container must listen on 0.0.0.0:$PORT. PORT
defaults to 8088 and can be overridden with --env PORT=9000. When the
selected substrate provides public ingress, the response includes
https://<id>.anycloud.sh.
Options
| Option | Description |
|---|---|
-i, --id ID | Custom Server ID and URL prefix |
-e, --env KEY=VALUE | Environment value; repeatable |
--env-file FILE | Load a dotenv file |
--secret NAME | Inject a named Secret; repeatable |
--credentials NAME | Pin a compute credential |
--region REGION | Pin a compute region |
--vm-type TYPE | Exact VM; repeat for an ordered fallback pool |
--gpu-type TYPE | GPU model/count; repeat for an ordered fallback pool |
--local | Run with the API server's Local compute capability |
--disk-size GB | Root disk capacity |
--disk-tier TIER | medium, high, or ultra |
--zone ZONE | Availability zone |
--gpus VALUE | Docker GPU exposure |
--shm-size SIZE | Docker shared memory |
--memory LIMIT | Docker memory limit |
--cpus COUNT | Docker CPU limit |
--runtime RUNTIME | Docker runtime |
--ipc MODE | Docker IPC mode |
--ulimit VALUE | Docker ulimit; repeatable |
--bind BIND... | Host bind mounts |
--spot, Job persistence flags, and Bucket mounts are not supported for
Servers.
anycloud serve ghcr.io/acme/api:v1 \
--id model-api \
--credentials my-aws \
--vm-type t3.medium
anycloud serve upgrade
Replace a Server's backing VM while preserving its deployment ID and public URL:
anycloud serve upgrade <id> <image> [-- command...]
anycloud serve upgrade model-api ghcr.io/acme/api:v2 \
-- python -m myapp
Upgrade reuses the existing Server configuration. The command accepts the new image and optional container command, not a new set of cloud flags.