fly machine create
Create, but don't start, a machine
Usage
fly machine create <image> [command] [flags]
Options
-a, --app Application name
--autostart Automatically start a stopped Machine when a network request is received
--autostop Automatically stop a Machine when there are no network requests for it
--build-arg Set of build time variables in the form of NAME=VALUE pairs. Can be specified multiple times.
--build-local-only Only perform builds locally using the local docker daemon
--build-nixpacks Build your image with nixpacks
--build-only Only build the image without running the machine
--build-remote-only Perform builds remotely without using the local docker daemon
--build-target Set the target build stage to build if the Dockerfile has more than one stage
-c, --config Path to application configuration file
--cpus Number of CPUs
--detach Return immediately instead of monitoring deployment progress
--dockerfile The path to a Dockerfile. Defaults to the Dockerfile in the working directory.
--entrypoint The command to override the Docker ENTRYPOINT.
-e, --env Set of environment variables in the form of NAME=VALUE pairs. Can be specified multiple times.
--file-literal Set of literals to write to the Machine, in the form of /path/inside/machine=VALUE pairs, where VALUE is the base64-encoded raw content. Can be specified multiple times.
--file-local Set of files to write to the Machine, in the form of /path/inside/machine=<local/path> pairs. Can be specified multiple times.
--file-secret Set of secrets to write to the Machine, in the form of /path/inside/machine=SECRET pairs, where SECRET is the name of the secret. The content of the secret must be base64 encoded. Can be specified multiple times.
--host-dedication-id The dedication id of the reserved hosts for your organization (if any)
--id Machine ID, if previously known
--image-label Image label to use when tagging and pushing to the fly registry. Defaults to "deployment-{timestamp}".
--kernel-arg A list of kernel arguments to provide to the init. Can be specified multiple times.
--lsvd Enable LSVD for this machine
--memory Memory (in megabytes) to attribute to the VM
-m, --metadata Metadata in the form of NAME=VALUE pairs. Can be specified multiple times.
-n, --name Machine name. Will be generated if omitted.
--no-build-cache Do not use the cache when building the image
--org The organization that will own the app
-p, --port The external ports and handlers for services, in the format: port[:machinePort][/protocol[:handler[:handler...]]])
For example: --port 80/tcp --port 443:80/tcp:http:tls --port 5432/tcp:pg_tls
To remove a port mapping use '-' as handler. For example: --port 80/tcp:-
-r, --region The target region (see 'flyctl platform regions')
--restart Set the restart policy for a Machine. Options include 'no', 'always', and 'on-fail'.
Default is 'on-fail' for Machines created by 'fly deploy' and Machines with a schedule. Default is 'always' for Machines created by 'fly m run'.
--rm Automatically remove the Machine when it exits. Sets the restart-policy to 'never' if not otherwise specified.
--schedule Schedule a Machine run at hourly, daily and monthly intervals
--skip-dns-registration Do not register the machine's 6PN IP with the internal DNS system
--standby-for For Machines without services, a comma separated list of Machine IDs to act as standby for.
--vm-cpu-kind The kind of CPU to use ('shared' or 'performance')
--vm-cpukind The kind of CPU to use ('shared' or 'performance')
--vm-cpus Number of CPUs
--vm-gpu-kind If set, the GPU model to attach (a100-pcie-40gb, a100-sxm4-80gb, l40s, a10)
--vm-gpukind If set, the GPU model to attach (a100-pcie-40gb, a100-sxm4-80gb, l40s, a10)
--vm-gpus Number of GPUs. Must also choose the GPU model with --vm-gpu-kind flag
--vm-memory Memory (in megabytes) to attribute to the VM
--vm-size The VM size to set machines to. See "fly platform vm-sizes" for valid values
-v, --volume Volume to mount, in the form of <volume_id_or_name>:/path/inside/machine[:<options>]
Global Options
-t, --access-token string Fly API Access Token
--debug Print additional logs and traces
--verbose Verbose output