Update plugins on one or many sites

Update plugins on one site or many from the Plugins tab.

Open Plugins, select the rows, then select Update selected. To update one plugin on one site, select Update on its row on the site page.

Before you start

  • You are a Developer, Admin or Owner, or your custom role holds updates:write. Read-Only members see the tab with updates:read but cannot update. See Roles and permissions.
  • Fleet installs no plugin on your sites. Fleet runs .github/workflows/fleet-update.yml in the site's own GitHub repository. The workflow installs the new version with npm install <package>@<version> --save-exact, and Fleet commits the changed files. Nothing runs on the live site. See EmDash and plugin updates.
  • The repository holds an active fleet-update.yml. A site Fleet created has it. Fleet writes it once, when it creates the site, and never changes it afterwards, so on another repository you add the file yourself.
  • Each site is Active, Setup not finished, Deploying or Migrating. An update for a Deploying or Migrating site waits in the queue.
  • A linked site needs a GitHub connection. Without one, its page shows "Limited mode: add GitHub to enable updates" and Add GitHub for a member who can edit sites.
  • Fleet lists plugins from the site admin connection when the site has an active one, and otherwise from package.json and astro.config.mjs. Without the connection, a plugin from the EmDash registry shows "not visible to Fleet". See Connect and manage the site admin connection.

Steps

  1. Open Plugins. The table lists each plugin per site with its installed and latest version and its importance.
  2. Search or filter to narrow the list. The importance is Minor for a patch release, Recommended for a minor release, Important for a major release and Critical when a security advisory affects the installed version.
  3. Select the rows to update. Select all applies to every row of the filtered result across pages and shows the count. Select All sites on a row to select that plugin on every site.
  4. Select Update selected. The review lists each site with its installed and target version, grouped by plugin and target version.
  5. Confirm the review. Fleet sends one request per group, in turn.
  6. Open the update job page that the tab links. It lists the result per site.

To change whether editors can install plugins on a site Fleet created from an EmDash template, open the site page and go to its Plugin registry section. Plugins from the EmDash plugin registry run in a sandbox on the site. You need sites:write and deploys:write. The three states:

  • Off: the site runs without sandboxed plugins.
  • On: editors can find and install plugins from the EmDash plugin registry in the site's admin. Fleet offers On when the site's Cloudflare account is on Workers Paid.
  • Paused: installed plugins keep running. Editors cannot install new ones.

Choose a state and select Save and deploy. Fleet commits astro.config.mjs and wrangler.jsonc to the repository and deploys the site. The change goes live with the site's next successful deploy.

Result

  • A site Fleet created in direct mode gets a commit on the default branch of its repository, and the deploy follows. See Deploy a site. Set the mode on the site page.
  • A linked site, and a created site in pull_request mode, gets a pull request from the branch fleet/update-<job_id> that links the Fleet job. Fleet deploys nothing. The job succeeds with the address of the pull request. Fleet does not track the merge, so the next deploy builds whatever the default branch then holds.
  • A failed item leaves the running version unchanged, and the other sites go on. The member who started the update sees a "Job failed" banner on the site and in its Activity view.

If something goes wrong

If Fleet refuses a request, it creates nothing for it and stops the requests after it. The review states how many updates were requested before the refusal, and those groups leave the selection. A selected site in the wrong status gives this message.

One or more selected sites cannot be updated in their current status. Open each site to see its next step.

The job page shows this when its site left a status that allows updates.

This site cannot be updated in its current status. Open the site page to see its next step. If its resources are missing, use Recreate or Unlink there.

While Fleet support has paused updates, every request is refused.

Fleet support paused updates. Try again later.

The job fails before it changes anything when the repository has no active workflow file.

This repository has no active fleet-update.yml, so Fleet cannot prepare the update. Add it as the Fleet documentation describes, then try again.

Nothing is committed when the default branch changed during the run.

The default branch changed while Fleet prepared this update, so nothing was committed. Run the update again.

Nothing is committed when the run returned files Fleet does not accept.

The update run returned files Fleet does not accept, so nothing was committed. Run the update again. If it fails again, contact support and quote job <id>.

Related

Report a problem with this page