NEWAI chat: ask your fleet anything, in plain language. Chat with your fleet Read more →
How-to · Updates

How to update software on many Linux devices at once: robots, Raspberry Pis and Jetsons in the field

To update software on many Linux devices at once, describe the update once, send it to a few devices first and then the rest, and check on each device that the new version really works, undoing the change wherever it doesn't. SSH scripts do this for a handful of devices on one network, but break down when devices are offline, behind NAT or left half-updated. With PhysicalFleet you build a release from blocks (Docker Compose, Git code, files, AI models, ROS workspaces, system packages, scripts) and roll it out to a group in phases, with automatic rollback, a health gate that stops a release that makes devices worse, and offline devices catching up when they reconnect.

What you need

  • Linux devices: Raspberry Pis, NVIDIA Jetsons, PCs or robots, on arm64, armv7, armv6, amd64, 386 or riscv64, with systemd, OpenRC, SysV or BusyBox init, or in containers. Each needs an outbound internet connection, even a slow or cellular one. No public IP, VPN or open port.
  • Your software in a form a machine can install: a Docker Compose file and images in a registry, a Git repository, files or archives, model weights, a ROS workspace, or system packages.
  • A way to tell that it works: an HTTP endpoint that reports the running version, a container health check, an active service, or ROS nodes and topics publishing at their usual rate.
  • A PhysicalFleet account. Anyone in the organization can build a release. Owners and admins publish it and start rollouts. PhysicalFleet is free for up to 3 machines.
  • One or two test devices that look like the rest of the fleet, for the first phase.

Ways to update software on many Linux devices

There are four common ways. Most teams start with the first and move on when the fleet grows past what one person can watch.

WayHow it worksGood atWatch out for
SSH loop or scriptA script logs into each device, in turn or in parallel, and runs apt, git pull or docker composeNothing to install. Fine for a few devices on one networkDevices behind NAT or on cellular can't be reached. Offline devices are skipped. A failure halfway leaves some devices old, some new and some broken, with no undo
Configuration management toolsYou declare the state you want (packages, files, services). A tool pushes it over SSH, or an agent on each device pulls itRepeatable and idempotent. Good for OS settingsPush tools still need to reach every device. Rolling back means applying the old state again, which isn't atomic. They don't know a robot is in the middle of a task
Image-based A/B updatesA new full OS image is written to a spare partition, and the device boots into it, falling back to the old one if it doesn't bootVery safe for the OS itself: a device that can't boot the new image goes back to the old oneNeeds a partition layout planned from day one. Large downloads unless the tool sends only the differences, and a reboot for every change. "It booted" doesn't mean "the robot works". Slow for daily app changes
Container pullsDevices run Docker. A script, timer or watcher pulls new images and restarts containersSimple, and fits apps already in containersTags like :latest drift: devices that pull at different times run different builds. A container that crash-loops isn't rolled back. No phases: every device updates at once

Whichever you choose, check it against the problems in the next section. They are what turns a routine update into a site visit.

What goes wrong when you update a whole fleet

  • Partial failures. One device in twenty has a full disk, an older OS or a flaky link. The update has to fail cleanly on that device and leave it on the old version, not halfway.
  • Offline devices. Robots in the field are switched off, charging or out of coverage. They need the update when they come back, without you keeping a retry list.
  • Rollback. Every change needs a way back that runs on the device itself, without a network or a person nearby, including after a power cut in the middle of the update.
  • Installed isn't working. A container can start and still make the robot slower, and a model can load and make worse decisions. Check behaviour, not only exit codes.
  • Busy devices. A robot halfway through a task shouldn't restart its software. Updates need a maintenance window or a way for the device to say "not now".
  • Mixed hardware. A Raspberry Pi and a Jetson need different images or packages. A first phase that only reached one kind can hide a problem on the other.

A simple SSH loop shows most of these problems at once:

for h in $(cat robots.txt); do
  ssh -o ConnectTimeout=10 "$h" 'cd /opt/app && docker compose pull && docker compose up -d' \
    && echo "$h updated" || echo "$h FAILED"
done
# an offline robot just prints FAILED and never gets the update;
# a container that crash-loops after "up -d" still counts as updated;
# nothing waits for a robot to finish its task, and nothing rolls back

The steps below do the same job with PhysicalFleet, where each of these problems has an answer built in.

Step 1: Install the agent and put devices into groups

In PhysicalFleet, open Fleet, press Add machine and run the one-line install command it shows on each device. The device is online in about 10 seconds. Add a group and tags at the end of the command, so each device lands in the right place as it joins:

# the command from Fleet › Add machine, with options added at the end
curl -fsSL <install URL from the dashboard> | sudo sh -s -- --token <enrollment key> \
  --name pi-07 --group warehouse-1/pickers --tags pi,beta

The command is non-interactive, so it fits a provisioning script or cloud-init. Running it again repairs or upgrades the agent and keeps the device's identity. To place many new devices without editing the command, create a key in Fleet › Enrollment keys that carries a group and tags: every device installed with it joins there. See Getting started.

Fleet › Organize describes machines three ways: Locations (where a machine is), Groups (how you run it, a tree such as factory-a/line-1) and Tags (anything else: jetson, pi, beta). To change many machines at once, select rows on Fleet › Machines and use Set group or Add tag. A device can also set its own, unless an admin locked them:

pf device set-group warehouse-1/pickers
pf device set-tags pi,beta

Plan groups around how you release: groups for lines, sites or customers, tags for hardware and pilots. A rollout can then target "line 3" or "every Jetson tagged beta".

Step 2: Build a release from blocks

Go to OTA Updates › Releases and press New release. Give it a name for what it installs (vision-stack) and a version (2.4.1). The builder has the Blocks palette on the left, the pipeline in the middle with a second lane, If the release fails, and the selected block's settings on the right. It saves as you go.

Blocks come in three groups: Ship software, Run and Control the flow. Each one shows what undoes it.

BlockWhat it doesIf the release fails
DockerContainer: Update running or Start new. Compose stack: Deploy or Stop. Compose is the recommended way when a machine runs several containersThe old container comes back. A Compose stack gets its old file and .env back and returns to exactly the images it ran before, without pulling
CodeA Git repository from GitHub, GitLab or any Git server over HTTPS, at the newest commit of a branch, a tag or an exact commit. Optionally runs a build command before it is switched incurrent points back at the previous checkout, or the working copy returns to its previous commit
FilesDownload, extract an archive, write, copy, move or remove a file. Downloads need a SHA-256 and resume after interruptionsThe previous file or folder comes back
AI modelA model from a URL, an uploaded file or Hugging Face, unpacked into <models folder>/<version> and switched in by pointing current at it. Or shadow-test it first, then switch: your app runs the new model next to the current one with the PhysicalFleet library, and it switches only if they agree enoughcurrent points back. Two versions are kept by default
ROSDeploy a workspace (with an optional rosdep and colcon or catkin build), restart a launch and wait for its nodes and topic rates, set parameters, install ROS packagesThe previous workspace and parameter values come back. A failed build never switches
System packagesInstall, upgrade or remove packages with apt, apk, dnf, yum or opkgInstalled packages are removed again, upgraded ones go back to their previous versions while the package manager still offers them. Removals aren't undone
Command or scriptA shell command, or a sh, bash or python3 scriptNothing automatic: give it an undo command
ServiceRestart, start, stop, enable or disable a systemd or OpenRC serviceUndone. Restarts are undone last, so the service comes back on its old files
Wait & checkUntil healthy (a service active, a container running, an HTTP status and body text, a TCP port or a command) or For some timeNothing to undo
WebhookCall a URL, for example to turn on maintenance modeIts undo request runs, if you gave one
RebootRestart the machine. The release continues when it is backNot undone

Each block can carry linked parts: a check that must pass, a restart of a service or ROS launch, a promote for models, and an undo command for the rollback lane. Files you upload become blocks of their own (archives extract, models deploy, other files download), each pinned by its SHA-256, and every upload field also takes a link: GitHub, GitLab, Hugging Face, S3, FTP or any URL. JSON shows the raw definition if you'd rather write releases by hand.

Every step has a Timeout (600 seconds by default, up to 7,200) and can retry up to 5 times, 10 seconds apart. A failed attempt is undone before the next one.

Step 3: Add checks, variables, secrets and conditions

Check that it works, not that it started. Add a linked check after every change: an HTTP endpoint that reports the new version, a container running, a service active, or ROS nodes and topic rates. A failed check rolls the release back on that machine. A Compose deploy already waits until every service is running, healthy and has stayed up for 10 seconds, and a crash-looping service fails the step with its last error line.

Variables and secrets let one release serve every machine and every version:

PlaceholderFilled with
{{var:VERSION}}The release's own variables, set in its settings
{{device:name}}A fact about the machine: arch, id, name, group, os_id or hostname
{{secret:NAME}}A secret, fetched on the machine when the step runs. Never stored in the job, and shown as *** in output

Add secrets (registry logins, API keys, database passwords) in Organization settings › Secrets, for the whole organization, a group and the groups below it, or one machine. A machine uses its own value first, then its closest group's, then the organization's. Apps on the machine can read the same secrets with pf secret get NAME.

Runs on limits a block to some machines: by architecture, OS, tags, a file that exists or a command that succeeds. Other machines skip it, so one release serves Raspberry Pis and Jetsons alike.

Release settings decide when and how it runs:

SettingWhat it does
If a step failsRoll back (default): undo completed steps in reverse, then run the If the release fails lane. Or stop and leave the machine as it is
Restart the machine afterwardsNever (default), always, or if a step needs it
Before startingPreconditions: free disk space, battery level, an unmetered network (not cellular), and a maintenance window such as 22:00 to 05:00 in the machine's local time
Download ahead while waitingOn by default: files download and images are pulled while the machine waits for its window, so the update itself is quick
Wait at mostHow long to wait for a busy machine or its preconditions. Default 24 hours
Newest versionsSources that give the newest version each time you roll out: a container image (Amazon ECR, Docker Hub, GHCR or any OCI registry), the newest file in an S3 folder, a GitHub release, a Hugging Face file or a Git branch. Each rollout pins it by digest or SHA-256, so every machine gets the same bytes

In the JSON view, a release that deploys a Compose stack at night, checks the new version and installs a package only on Jetsons looks like this:

{
  "variables": {"VERSION": "2.4.1"},
  "preconditions": {
    "min_free_mb": 2048,
    "network": "unmetered",
    "window": {"start": "22:00", "end": "05:00"}
  },
  "on_failure": "rollback",
  "steps": [
    {
      "id": "stack",
      "name": "Deploy the vision stack {{var:VERSION}}",
      "type": "compose.up",
      "file": "/opt/cell/compose.yaml",
      "project": "cell",
      "env": {"TAG": "{{var:VERSION}}", "DB_PASSWORD": "{{secret:DB_PASSWORD}}"}
    },
    {
      "id": "stack--check",
      "type": "health.wait",
      "check": {"type": "http", "url": "http://127.0.0.1:8080/version", "contains": "{{var:VERSION}}"},
      "timeout_s": 180
    },
    {
      "id": "can-tools",
      "type": "package.install",
      "packages": ["can-utils"],
      "manager": "apt",
      "when": {"tags": ["jetson"]}
    }
  ]
}

Machines without the jetson tag skip the last step. If /version doesn't report 2.4.1 within three minutes, the stack returns to its previous images and the run ends rolled back, counting as a failure in the rollout. More on Compose files built for this in Docker Compose for robot fleets.

Step 4: Preview on a machine, then publish

On every save, each step is checked, and the builder adds advice: an image tagged :latest, a password typed in plain text, a change with no check after it, a command with no undo. Errors block publishing; advice doesn't, so read it.

Press Preview on a machine and pick a real device. It's a dry run: the agent checks every step and changes nothing. You see which steps would run or be skipped and why, what each would change, missing images, secrets or disk space, unreachable URLs, and the variables' values on that machine. A line under the pipeline also says whether every machine's agent can run the release, with Update their agent when some can't.

Then press Publish (owners and admins). A published release never changes. For the next change, New version copies it, and the release page shows what changed against the previous version.

Step 5: Roll it out to a group in phases

Press Roll out on the release, or New rollout in OTA Updates › Rollouts. The wizard asks four things:

  1. Release: a published release and, if it has newest-version sources, which versions: the newest, or ones you pick.
  2. Machines: filter by location, group, type, tags, status, health, architecture, OS or agent version, or pick machines by hand. A filter that matches nothing means no machine, never all. The plan shows each machine's phase and anything that would stop it: an agent too old for a step, a missing secret, or another rollout on it.
  3. Phases & safety: the phases, the failure threshold, a wait after each phase, the health gate (step 6) and When to start: right away or at a set time, up to 90 days ahead.
  4. Review: check the plan, then press Start rollout (or Schedule rollout). Nothing is sent until then.

Each phase starts only when the one before ended well:

PresetPhases
All at once100 %
Canary, then everyone1 machine, then 100 %
Careful10 %, 50 %, 100 %
Canary, then careful (a good default)1 machine, 10 %, 50 %, 100 %

Or set your own, as percentages or numbers of machines, up to 20 phases. Machines that are online now go first, and the first machines cover every architecture, OS and init system you have, so a problem on one kind of device shows early.

Safety settingDefaultWhy
Stop when more than this share of a phase fails20 %Judged all the time, not only at the end of a phase
Wait after each phase0 minTime to look before the next phase
Health gateOffTurn it on: see step 6
At most this many machines updating at once200A large fleet never pulls the same image in the same second
Offline machines can still get it for7 daysSee step 7

Step 6: Turn on the health gate and automatic rollback

Rollback happens at two levels. On each machine, a failed step or check undoes the release right away. Across the fleet, the health gate catches the harder case: a release that installs fine and makes robots worse.

With the gate on, after each phase the rollout waits a soak time (Watch for: 30 minutes by default, at least 10), then compares the updated machines before and after, against machines not updated yet, so a fleet-wide change such as the time of day isn't blamed on the release. It stops the rollout when:

  • a guarded measurement gets worse by more than 20 % (you can change this): model inference time, round trip or rate, control-loop rate, ROS topic rates, RL success, cycle yield and cycle time
  • error events rise noticeably above the comparison machines
  • more than 25 % of the updated machines get a new issue

With only one or two machines in a phase (a canary), each machine is also judged on its own: going silent after the update, or a guarded measurement stopping or moving the wrong way, fails it.

Set On a regression, install to a published release, usually the version before. A halt then starts an automatic rollback rollout to it on the machines that got the new one, and the rollout page explains each phase's verdict in one sentence, for example inference time 200% higher (p50 10 ms → 30 ms).

The guarded measurements come from what the agent already sees (ROS topic rates, Python models it traces) and from task cycles, sent with the PhysicalFleet library or read from a ROS topic. On a fleet that reports none of them, the gate judges errors and new issues. When too few machines have data for the comparison, the phase is marked Insufficient, each machine is still checked on its own, and the rollout goes on.

Step 7: Watch the rollout, and let offline devices catch up

The rollout page updates live: its state, the Phases with each gate verdict, how many machines are installed, installing, waiting, failed or skipped, each machine's current step (step 2 of 3 · Deploy the vision stack 2.4.1) with its progress and last line of output, why a machine is waiting, and What happened, a log of the rollout. Open a machine to see every step and its output. Each machine's own page has a Releases tab with every release that ran there, step by step.

  • Busy machines (pf busy) and machines waiting for their maintenance window show as deferred with the reason, and install when they may.
  • Offline machines don't hold their phase back. They keep the job and install when they come back, within the time you set (7 days by default). If every machine of a phase is offline, the next online machines stand in.
  • A machine that goes silent for 30 minutes after starting counts as failing, since a release that breaks the network makes machines silent.
  • Machines whose agent is too old for a step are skipped and don't count as failures.
ActionWhoWhat happens
PauseEveryoneMachines that started finish; nobody new gets it until you resume
ResumeOwners and adminsContinues a paused or stopped rollout
CancelOwners and adminsMachines that haven't started never get it
RetryOwners and adminsA new rollout of the same release to the machines that failed or were held back
Roll backOwners and adminsInstalls another published release on the machines that installed this one
Explain with AIEveryoneHow it's going, which machines failed or wait, why, and what to do

When a rollout stops itself, machines holding the job without having started it are told not to run it.

Safety: what keeps a device safe during an update

  • Undo is saved first. Each step records what it needs to undo itself before it changes anything. On a failure, completed steps are undone in reverse, then the If the release fails lane runs.
  • Power cuts are safe. Steps are journaled on disk, and after a reboot the agent finishes or rolls back the release. Steps that may not be safe to repeat (commands, scripts, webhooks) aren't run twice unless you mark them safe to run again; the release rolls back instead.
  • Only that machine runs it. Each machine receives the release as a signed job meant for it.
  • Secrets stay secret. Values are fetched on the machine when a step runs and shown as *** in output. Git and Hugging Face logins are handed to the machine for that one step only.
  • Same bytes everywhere. Files are checked against their SHA-256 and newest-version sources are pinned by digest. If a newer version appears between your review and Start rollout, the wizard shows the review again: nothing is installed unseen.
  • The robot's work comes first. Wrap work that mustn't be interrupted in pf busy, and the update waits.
pf busy --reason "picking order 1182" --for 30m    # updates wait for 30 minutes
pf busy --reason "assembly cycle" -- ./run_cycle.sh # wait while this command runs
pf busy --clear                                      # release the locks

A lock around a command is released when the command exits, or about a minute after it crashes, so a dead app never blocks updates for good. A lock lasts at most 7 days.

Rehearse rollback every so often: roll out a release that you know fails its check to one test machine, watch it roll back, and confirm your undo commands do what you expect.

When something goes wrong

What you seeLikely causeWhat to do
A machine is skipped as too old, or the builder offers Update their agentIts agent is older than a step needsPress Update their agent, or approve the Agent X is ready for N machines card in OTA Updates › Releases. Skipped machines don't count as failures
The plan or the preview says a secret is missingNo value for {{secret:NAME}} at that machine's scopeAdd it in Organization settings › Secrets for the organization, the machine's group or the machine
A machine shows deferred with a reasonIt's busy (pf busy), outside its maintenance window, or a precondition doesn't hold: free disk, battery or an unmetered networkWait: it installs when it may. Or run pf busy --clear on it, or loosen the precondition. It waits at most 24 hours by default
The Compose step fails with a service's last error lineA service crash-loops or fails its health checkThe stack is already back on its previous images. Fix the service, publish a New version and roll it out again
The rollout says Stopped by itselfMore than 20 % of a phase failedOpen a failed machine for each step's output, or press Explain with AI. If the cause was on the machines (a full disk, a lost network), fix it and Retry the failed and held-back machines. If it was the release, publish a New version and roll that out
The health gate halted the rollout after a phaseThe release installed fine but made updated machines worse than the ones not updatedWith On a regression, install set, the rollback rollout is already running. Otherwise press Roll back
The preview reports a missing image or an unreachable URLA wrong tag, a private registry without a login, or a typoFix the tag, or add the block's Registry login using secrets
A machine counts as failing after going silentIt stopped reporting for 30 minutes after it started, often because the release broke its network or the agent's connectionLook at what the release changes about networking. When the machine reconnects, its steps and output show what happened
Some offline machines still run the old versionThey install when they reconnect, within 7 days by defaultWait, or Retry for machines that stayed offline longer
The wizard shows the review again when you press Start rolloutA newer version of a source appeared since you reviewedCheck the new version and start again

To see why a step failed on the device itself, read its logs: see how to see logs from remote Linux devices.

Checklist
  • Devices grouped and tagged, with one or two test devices that look like the rest
  • A check after every change, and an undo for every command
  • Versions pinned with tags or digests, never :latest
  • Previewed on a real machine before publishing
  • Rolled out with Canary, then careful and the health gate on
  • A previous release set under On a regression, install
  • Long tasks wrapped in pf busy, and disruptive updates in a maintenance window
How PhysicalFleet helps

PhysicalFleet OTA updates turn an update into a release you build once from blocks: Docker Compose, Git code, files, AI models, ROS workspaces, system packages, scripts and services, each with a check and a way back. A rollout sends it to a group in phases, online machines first and one of every kind early, stops itself on failures or when the health gate sees robots getting worse, and rolls back on its own. Offline machines install when they return, busy machines wait, and a power cut in the middle of an update ends with the release finished or rolled back.

See PhysicalFleet OTA updates

Written for PhysicalFleet as of December 3, 2026.

FAQ

Update many devices: common questions

Something else? Talk to our team.

What is the best way to update software on many Linux devices at once?

Describe the update once, roll it out in phases starting with a few devices, check on each device that the new version works, and undo it automatically where it doesn't. SSH scripts work for a handful of devices on one network. Past that, use a tool that queues the update for offline devices, waits for busy ones and rolls back on failure, such as PhysicalFleet OTA updates.

How do I update devices that are offline?

Use a method where each device pulls its update when it connects, instead of a script that pushes to devices that happen to be online. In PhysicalFleet, offline machines keep the job and install it when they come back, for up to 7 days by default, and they don't hold the rest of their phase back.

How do I roll back a bad update on many devices?

Make every change reversible on the device itself, then roll back by installing the previous release. In PhysicalFleet a failed step or check undoes the release on that machine at once, Roll back installs another published release on every machine that got this one, and the health gate can start that rollback by itself when updated machines get worse.

Can one release update both Raspberry Pis and Jetsons?

Yes. Runs on limits a block to machines by architecture, OS, tags, a file or a command, so a Jetson-only package or an arm64 image is skipped elsewhere. Device facts such as {{device:arch}} fill in per machine, and the first machines of a rollout cover every architecture, OS and init system you have.

Does PhysicalFleet replace image-based A/B OS updates?

No. PhysicalFleet updates the software on top of the OS: containers, Compose stacks, code, files, models, ROS workspaces, packages and services, each with its own undo. It doesn't write full OS images to a spare partition. If you need whole-image OS updates, keep an image-based updater for the OS and ship your apps with releases. The PhysicalFleet agent itself updates with A/B slots and goes back to the previous version if the new one doesn't check in.

How do I stop an update from interrupting a robot in the middle of a task?

Give the robot a way to say not now. With PhysicalFleet, wrap the task in pf busy and updates wait until it ends, or add a maintenance window to the release's preconditions. Files and images download ahead while the machine waits, so the update itself is quick.

Can a release always install the newest Docker image?

Yes. Add the image as a source under Release settings, Newest versions. Each rollout pins the newest tag by its digest, so every machine gets the same build, and a retry keeps those versions. You still start each rollout yourself; new pushes don't roll out on their own.

How much does it cost to update devices with PhysicalFleet?

Updates are free on the Free plan; on a paid month every update is $0.10, each time a release starts to install on one machine, whether it succeeds or rolls back. Agent updates and health-gate rollbacks are free, and update files linked from GitHub, S3, Hugging Face or a container registry download free. PhysicalFleet is free for up to 3 machines.

From the lab bench. To the entire fleet.

Connect your first machine in minutes, develop it in the lab and run your whole fleet in production from one place.

Free for up to 3 machines · Then pay as you go