Skip to content
Console

CLI: Pod Create & Update

Create GPU or CPU Pods from templates with local or network volumes, model sets, port overrides, and edit existing Pods in place via meshive pod-create and meshive pod-update.

Creating and editing Pods with the meshive CLI. See Pods & Lifecycle to list, inspect, start, stop, or delete Pods, and Ports, SSH & Exec for locked ports, SSH, watched folders, and logs.

Terminal window
meshive pod-create <workspace> <name> --template <id> [options]

Creates a pod from a template. Omit --gpu for a CPU pod: it runs on the cheapest CPU line that fits unless you pick one with --cpu-line, and gets 8 vCPU and 32 GiB of RAM (or the nearest sizes the line offers) unless you set --vcpu / --ram.

OptionMeaning
--template <id>Template ID from meshive templates (required).
--gpu <model>GPU model exactly as meshive gpus prints it, e.g. "RTX 3060".
--gpu-count <n>GPUs per pod (default 1). meshive gpus shows the most one pod can get.
--vram <GB>VRAM tier when a model comes in several sizes.
--spotSpot (preemptible) rental instead of on-demand.
--vcpu <n>, --ram <GiB>Override the default vCPU and RAM — the GPU’s recommended sizes, or 8 vCPU / 32 GiB for a CPU pod. Use sizes the console offers; any other size is refused with the allowed values. Only vCPU/RAM above the amount included with the GPU cost extra. The system disk is sized by the server (the estimate shows it as disk) and cannot be changed — attach a storage volume for data.
--cpu-line <line>CPU pods only: the CPU line to run on, from the LINE column of meshive cpus (default: the cheapest line that fits).
--volume <storage>:/mountAttach an existing network storage volume (repeatable). Create one with storage-create. Existing local storage can’t be attached to a new pod.
--local-volume <name>:/<path>:<GiB>[:encrypted]Create local storage on the pod’s machine together with the pod (repeatable), e.g. scratch:/scratch:50. Add :encrypted for at-rest encryption. At least 10 GiB; not available with --spot. It is billed by size until you delete it — also while the pod is stopped — and the estimate includes it.
--env KEY=VALUE, --secret KEYEnvironment variables; --secret marks one as secret. Variables the template requires need a value.
--port <port>[:<name>[:internal]]Open a port the template doesn’t (repeatable). A port or port name the template already opens is refused, as is a port listed twice — to change one the template opens, use --template-port.
--template-port <port>[:<name>][:<new-port>][:internal|external]Change a port the template opens (repeatable), as on the console’s deploy screen. <port> is its current number; the other fields are positional, and an empty one keeps the template’s value: 8080:ide renames it, 8080::8443 gives it the number 8443, 8080:::internal makes it internal only, 8080:ide:8443:external does all three. A name of only digits, or internal / external, is refused with the form to use instead. Template ports can’t be removed. A port the template doesn’t open is refused, as is a clash with another port or port name.
--no-lockCreate the pod’s public ports unlocked: anyone with the URL gets through. Without it they are locked (1.10 or later), and a port the template opens follows the template author’s choice when there is one.
--lock-port <port>, --unlock-port <port>Lock, or leave unlocked, this one port whatever the default says (repeatable).
--command <cmd>Override the template’s command (at most 32,000 characters). Several commands all run, in order.
--region <code>Deprecated and ignored — pods are placed without a region. Still accepted with a warning; it will be removed in 2.0.
--internet-premium, --uptime-premium, --cpu-premiumPremium options; each narrows the eligible machines.
--max-price <USD>Cap the final compute hourly rate, excluding storage and Asset Hub charges.
--input-asset <id>[=<dir>]Place an asset in the pod (repeatable) — by default under /inputs/<name> or the template’s path for its type. It adds an input volume billed by size.
--watch <path>Upload new files in this folder as assets (repeatable). The template’s output folders are watched already. Templates without an output folder take it too when the pod has storage for the folder.
--watch-off <path>Turn off one of the template’s watched folders from the start (repeatable), as on the console’s create screen. meshive pod-watch --on turns it back on.
--watch-move <path>=<new path>Move one of the template’s output folders to another path (repeatable); MESHIVE_SYS_OUTPUT_DIR and its storage follow. Needs meshive 1.4 or later.
--model-set <slug>Start the pod with one of the template’s model sets, from the SLUG column of meshive model-sets. One set per pod; the estimate shows it.
--hf-token <id>Quick Deploy templates whose model set is gated on Hugging Face: a token ID from meshive hf-tokens whose Hugging Face account accepted the model’s license. The files download with that token. Needs meshive 1.3 or later — see Gated model sets.
--estimatePrint the estimate and exit without creating.
--wait <status>, --wait-timeout <s>After creating, wait until the pod reaches the status (e.g. running). A failed creation ends the wait at once with the reason. Exit code 1 if the creation fails or the pod isn’t there in time.
-y, --yesSkip the confirmation.

These settings follow the same rules as the console; when one is refused, the error says what is allowed.

Terminal window
meshive pod-create my-ws train-box --template 457 --gpu "RTX 3060" --estimate
meshive pod-create my-ws train-box --template 457 --gpu "RTX 3060" --local-volume scratch:/scratch:50 --estimate
meshive pod-create my-ws train-box --template 457 --gpu "RTX 3060" --max-price 0.10 --yes --wait running
meshive pod-create my-ws cpu-box --template <id> --cpu-line <line> --estimate # a CPU pod
meshive pod-create my-ws ide-box --template <id> --gpu "RTX 3060" --template-port 8080:ide:8443 --estimate # rename and renumber the template's port 8080

-o name prints the pod ID once it is known (with --wait), otherwise the transaction id. In the estimate, a new local volume shows as scratch (new local, 50 GiB)→/scratch.

Before it asks for confirmation, pod-create says which public ports will be locked and warns about any that will be open to anyone with the URL. With --wait, a port that was to be locked but comes up unlocked ends the command with exit code 1. When the server can’t lock ports, nothing is created — see Locked ports and access keys.

With --model-set, the set’s files are added to the workspace before the pod is created, which can take several minutes. pod-create waits up to 15 minutes for that (or --timeout, if longer) and doesn’t resend the request after a timeout: the pod may still be created, so check meshive pods and meshive transactions before running it again. If any file can’t be added, no pod is created — the command lists the failed files and exits 1; files already added stay in the workspace and are reused next time. A slug the template doesn’t offer is refused with the sets it does.

Terminal window
meshive pod-update <workspace> <pod> [options]

Changes an existing pod the way the console’s edit screen does. Only what you pass changes; everything else stays as it is. The command first prints the estimate — the hourly price after the change (and now), whether the running pod restarts, and the list of changes — then asks for confirmation.

OptionMeaning
--name <label>Rename the pod. A rename alone applies in place without a restart.
--template <id>Move the pod to another template. Its variables, ports and command then start from the new template; the estimate lists what you added that doesn’t carry over.
--rental demand|spotChange the rental type. Spot pods can’t have local storage; --detach it in the same command.
--gpu <model>, --gpu-count <n>, --vram <GB>GPU pods: change the GPU. A new GPU resets vCPU and RAM per GPU to its recommended sizes; changing only the count keeps the per-GPU ratio.
--cpu-line <line>CPU pods: change the CPU line. Cores and RAM reset to the console’s default.
--vcpu <n>, --ram <GiB>Pod totals, in sizes the console offers.
--env KEY=VALUE, --secret KEYSet or add environment variables.
--remove-env KEYRemove a variable you added. The template’s variables can’t be removed.
--port <port>[:<name>[:internal]]Open a new port. A public one is locked unless --no-lock or --unlock-port says otherwise (1.10 or later).
--template-port <port>[:<name>][:<new-port>][:internal|external]Rename, renumber, expose or hide a current port, as in pod-create.
--no-lockLeave the ports this change newly makes public unlocked — a new public port, an internal port it exposes, and with --template the public ports the new template adds. Without it they are locked. Ports that are public already keep their lock either way.
--lock-port <port>, --unlock-port <port>Lock or unlock this port (repeatable). On a port that is public already, this only switches its lock, without a restart, like port-lock.
--remove-port <port>Close a port you opened. The template’s ports can’t be removed.
--command <cmd>Replace the start command; --command "" goes back to the template’s.
--volume <storage>:/mountAttach existing network storage, or local storage on the pod’s current machine.
--local-volume <name>:/<path>:<GiB>[:encrypted]Create local storage on the pod’s machine and attach it, as in pod-create.
--detach <storage>Detach a volume. The volume and its data stay.
--allow-node-migrationLet the pod move to another machine when its machine can’t fit the change.
--allow-data-lossSeparately consent to losing the pod’s unpreserved workspace files if it moves.
--drop-watched-folder <path>Agree that the change removes this watched folder (repeatable).
--enable-folder-savingAdd the uploader to an older pod that has none, so its folders can be watched (needs storage on the pod; a running pod restarts once). meshive pod-watch --add on such a pod tells you to run this first. A pod that already has the uploader, or has no storage, is refused before anything restarts. Needs meshive 1.4 or later.
--max-price <USD>Refuse the edit if the new compute hourly rate is above this.
--estimatePrint the changes and the new price, and exit without changing anything.
-y, --yesSkip the confirmation.

All list options are repeatable. The pod type (GPU or CPU), premiums and image can’t change. A running pod restarts with the new settings; a stopped pod uses them at its next start. Input assets and watched folders are kept. The output prints the transaction to follow with meshive transaction.

Terminal window
meshive pod-update my-ws <pod> --gpu-count 2 --estimate
meshive pod-update my-ws <pod> --env HF_HOME=/data/hf --port 7860:gradio
meshive pod-update my-ws <pod> --name renamed-box --yes # no restart

Some changes need consent first. Nothing changes; the command explains why, says what to run again with, and exits 2:

  • The machine can’t fit the change. Run it again with --allow-node-migration to let the pod move. A move permanently deletes unpreserved workspace files, so when the pod has any, --allow-data-loss is needed as well.
  • Watched folders would be removed because the storage they are on is detached. The command names the folders; run it again with --drop-watched-folder <path> for each.
  • An older pod’s RAM can’t be read back exactly. Pass --ram (and --vcpu) with the change.

Local storage attached to a pod keeps it on its machine, so when that machine can’t fit the change, the edit is refused: detach the local storage with --detach, or keep the current resources. Other refusals — a template variable or port you tried to remove, a GPU change on a CPU pod — print the server’s reason.