Files
sencho/docs/features/remote-updates.mdx
T
Anso 023e962a26 fix(fleet): forward host bind mounts to self-update helper container (#509)
The self-update helper container runs `docker compose up -d
--force-recreate` to recreate the main Sencho container. Previously it
only mounted the docker socket, the compose working directory, and the
data directory. If the user's docker-compose.yml references env_file,
configs, or secrets at paths outside the compose working directory
(e.g. /opt/docker/env/globals.env), the helper could not resolve them
and compose failed with "env file not found".

Now during initialize(), SelfUpdateService collects all host bind mounts
from the container inspect data (filtered to Type=bind). In
triggerUpdate(), these are forwarded to the helper as read-only mounts
at their original host paths (source:source:ro), skipping the socket,
data dir, and compose working dir which are already mounted explicitly.
This lets docker compose resolve any host-path reference the user has
configured, without needing to parse compose files for specific
directives.
2026-04-12 02:20:42 -04:00

118 lines
6.8 KiB
Plaintext

---
title: Remote Updates
description: Check for outdated nodes and trigger over-the-air Sencho updates from the Fleet View.
---
Sencho can update remote nodes directly from the dashboard. When a node is running an older version than the latest available release, a one-click update pulls the latest image and recreates the container automatically. This includes the local (gateway) node itself.
<Note>
Remote updates require a **Skipper** or **Admiral** license.
</Note>
## Prerequisites
Remote updates work when each node meets these conditions:
- Deployed via **Docker Compose** (the recommended method)
- The Docker socket (`/var/run/docker.sock`) is mounted into the container
- Running a Sencho version that supports the `self-update` [capability](/features/node-compatibility)
Nodes deployed with `docker run` or orchestrators like Kubernetes do not support self-update. These nodes show an error message when you attempt to update them.
## Checking for updates
Open the **Fleet** tab and click **Check Updates** in the header. This opens the **Node Updates** dialog, which lists every node with its current version and update status.
<Frame>
<img src="/images/fleet-view/fleet-node-updates.png" alt="Node Updates dialog showing update status for each node" />
</Frame>
The dialog includes:
- **Summary cards** at the top showing counts of nodes that are Up to date, have updates Available, are currently Updating, or have Failed
- **Latest version** label showing the newest available Sencho release
- **Filter** search box to find specific nodes by name or type
- **Node table** with columns for name, type, current version, latest version, and status
Each node's status column shows one of:
| Status | Meaning |
|--------|---------|
| **Up to date** badge | Node is running the latest available version |
| **Update** button | A newer version is available; click to update |
| **Updating** badge | The node is pulling the new image and restarting |
| **Updated** badge | The node came back online with the new version |
| **Timed out** badge | The node did not come back within 5 minutes |
| **Failed** badge | The update was rejected or the image pull failed on the remote host |
Nodes that are too old to report their version show "unknown" in the current version column. These nodes are treated as outdated.
### Updating state
When an update is in progress, the dialog shows a spinning "Updating" badge and the summary card count changes in real time. The Fleet View polls every 5 seconds while an update is active.
<Frame>
<img src="/images/fleet-view/fleet-node-updating.png" alt="Node Updates dialog showing a node in the updating state" />
</Frame>
## Updating a single node
You can trigger an update in two ways:
- Click the **Update** button next to a node in the Node Updates dialog
- Click the **Update to vX.Y.Z** button directly on a node card in Fleet View
For remote nodes, the update happens in the background. The Fleet View automatically polls at a faster rate (every 5 seconds) while an update is in progress, so you can watch the status change in near real-time.
## Updating all nodes
Click **Update All (N)** in the footer of the Node Updates dialog to trigger updates on all outdated remote nodes simultaneously. The local node is excluded from bulk updates to avoid losing dashboard connectivity. Nodes that previously failed or timed out are automatically retried in a bulk update.
## Local node updates
When you update the local (gateway) node:
1. A confirmation dialog appears explaining that the dashboard will briefly disconnect.
2. After confirming, the server pulls the latest image and restarts.
3. A reconnecting overlay appears and polls the server every few seconds. It stays visible for the entire pull and restart cycle, even if the API briefly responds in between, so the page does not reload until the new container has actually booted.
4. Once the new container reports a fresh boot timestamp, the page automatically reloads with the new version.
If the new container does not come up within 5 minutes, a timeout message appears with a manual reload option. If the gateway can detect that the update did not complete (for example, the image pull failed or the restart helper container could not spawn), the local node card surfaces a "Failed" badge with the underlying error within about 3 minutes instead of waiting for the full timeout.
<Note>
The self-update helper container inherits all bind mounts from the main Sencho container. If your `docker-compose.yml` references `env_file`, `configs`, or `secrets` outside the compose working directory, those paths must be mounted into the Sencho container using the same host and container path (1:1 rule). See [Troubleshooting](/operations/troubleshooting#local-self-update-fails-with-env-file-not-found) if you encounter "env file not found" errors during a local update.
</Note>
## What happens during an update
When an update is triggered on a node, Sencho:
1. Pulls the latest `saelix/sencho` image using Docker Compose
2. Recreates the container with the new image
3. The node goes briefly offline during the restart
The gateway monitors the remote node until it comes back online, then marks it as **Updated**. Completion is detected by three signals: a version change, a change in the node's process start time, or detecting that the node went briefly offline and came back (indicating a container restart). The "Updated" badge clears automatically after about 60 seconds and the node returns to "Up to date" status.
If the node is still reachable and unchanged after about 90 seconds, the gateway marks the update as **Failed**. This usually means the image pull failed on the remote host. Check the Docker logs on the remote node for details.
## Handling failures
If an update times out or fails, the badge shows **Timed out** or **Failed** with two action buttons:
- **Retry** (circular arrow icon) clears the failed state and re-triggers the update
- **Dismiss** (X icon) clears the failed state without retrying, returning the node to "Update available"
Hovering over a failed or timed-out badge reveals the error message with details about what went wrong.
<Frame>
<img src="/images/fleet-view/fleet-node-failed.png" alt="Node Updates dialog showing a failed node with retry and dismiss buttons" />
</Frame>
You can also click **Recheck** in the dialog footer to clear all failed and timed-out states at once, refresh the cached latest version from GitHub, and fetch fresh version information from every node.
<Note>
Update tracking is stored in memory on the gateway. Restarting the gateway clears all update states, so any stuck "Timed out" or "Failed" badges will resolve on their own after a restart.
</Note>
If you run into issues with remote updates, see the [Troubleshooting](/operations/troubleshooting#remote-update-button-does-not-appear) page.