Skip to main content

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

OptionDescription
-i, --id IDCustom Server ID and URL prefix
-e, --env KEY=VALUEEnvironment value; repeatable
--env-file FILELoad a dotenv file
--secret NAMEInject a named Secret; repeatable
--credentials NAMEPin a compute credential
--region REGIONPin a compute region
--vm-type TYPEExact VM; repeat for an ordered fallback pool
--gpu-type TYPEGPU model/count; repeat for an ordered fallback pool
--localRun with the API server's Local compute capability
--disk-size GBRoot disk capacity
--disk-tier TIERmedium, high, or ultra
--zone ZONEAvailability zone
--gpus VALUEDocker GPU exposure
--shm-size SIZEDocker shared memory
--memory LIMITDocker memory limit
--cpus COUNTDocker CPU limit
--runtime RUNTIMEDocker runtime
--ipc MODEDocker IPC mode
--ulimit VALUEDocker 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.