Updating Asternodis
Asternodis updates in place with a single command, the same shape as the installer:
curl -fsSL https://asternodis.com/update.sh | sh
Run it on the host where Asternodis is installed. It re-runs itself with sudo if
needed (root is required), so you can launch it as any user with sudo access.
What it does
- Reads the installed version (
asternodis version) and the latest published version. - If you’re already current, it prints Already up to date and exits, so it’s safe to run anytime (including from cron).
- Downloads the matching static binary for your OS/architecture together with the
release’s signed checksums, and verifies the signature on
SHA256SUMSand the binary’s SHA-256 against it. A release that doesn’t verify is refused and your current install is left untouched. - Sanity-checks that the verified binary runs before touching the current install. On
the
latestchannel it also refuses to replace your install with an older signed release (pin a version to roll back). - Replaces
/usr/local/bin/asternodisand restarts theasternodissystemd service.
The check uses the host’s OpenSSL or, where that can’t verify the signature, the installed
asternodis itself (asternodis verify-release). A host with neither is told so and
nothing is changed. Update from Settings → Software updates in the web UI instead
(press Check for updates, then Update to the new version), which verifies with the key
built into Asternodis. When a newer release is published, an Update available button also
appears at the bottom of the sidebar for an admin: it updates in one click on an install that can
update itself, and opens Software updates (with the command to run) on one that can’t. You can
also let the controller apply updates by itself with Apply updates automatically and a
Maintenance window (UTC) in the same section; it never updates during an operation.
Your state under /var/lib/asternodis (the controller database, this site’s identity,
and its keys) is never touched, so pairings, licenses, and protected guests carry
straight across the update.
Port 443: since Asternodis 1.0.2 the web UI serves on port 443 (with a
:80 → :443redirect). Updating from an older:8443install migrates the systemd service automatically the first time you runupdate.sh.
Updating a DR Site Pair
Each site runs its own controller, and each is updated on its own. Update the recovery site first, then the primary, one after the other:
- The recovery site is where recovery plans live, and a primary refuses to send plan changes to a recovery site older than itself. The primary keeps showing its last copy of the plans until the recovery site is updated.
- The Site Link needs both sites on 1.1 or later. While one site is older, the pair keeps working over the direct paths it used before.
- Settings → Software updates is the safer way to update a site that is replicating.
It does not start while a failover, failback, first copy, recovery-point operation or
reverse sync is running on that controller (it says what is running). Just before it
restarts, it waits up to 30 minutes for anything that started in the meantime, and it never
restarts over work in flight.
update.shrestarts the service straight away.
Sites & nodes → Site pairs warns while the two sites run different versions.
Updating from 1.0 to 1.1
On its first start, a 1.1 recovery site takes ownership of the pair’s recovery plans. A plan that the two sites held differently, or a change that was never confirmed, is not deleted: it is listed under Plans set aside by the upgrade on the Recover page, where you can recreate it or dismiss it. A copy of the whole database is kept beside it before the first change. See Recovery plans.
Pin a version or roll back
Pass the version as an argument to install (or downgrade to) a specific release instead of the latest. Version folders are immutable, so a pinned version always installs exactly that build.
Only the current release is published as its own channel, beside latest. When a new
release is published, the previous version’s folder goes away, so pinning cannot take you
back to an older release: it fails with “No published release at …”. Check which version is
current with:
curl -fsSL https://dl.asternodis.com/latest/VERSION
To roll back, keep a copy of the binary you are running before you update. That copy
is your rollback: stop the service, put it back at /usr/local/bin/asternodis, and start
the service again.
A version is pinned by passing it as an argument: sh -s -- vX.Y.Z for either script. The -s -- is the part worth
remembering: writing ASTERNODIS_VERSION=vX.Y.Z curl … | sh looks equivalent but is
not. In a shell pipeline the assignment applies to curl, and the sh on the right
never sees it, so that form silently installs latest, the opposite of a rollback.
Environment overrides
These work when you run the script directly (sh ./update.sh) rather than through
a pipe. Over a pipe, use the argument form above for the version.
| Variable | Default | Purpose |
|---|---|---|
ASTERNODIS_VERSION | latest | Release channel, or a specific vX.Y.Z to install. An argument wins over it. |
ASTERNODIS_DOWNLOAD_BASE | https://dl.asternodis.com | Mirror to download from. Must be HTTPS (a plain-http base is refused) and must serve SHA256SUMS and SHA256SUMS.sig beside the binaries. |
ASTERNODIS_BIN | /usr/local/bin/asternodis | Path to the installed binary. |
If the script re-runs itself with sudo, it forwards these and the version
argument explicitly, so a pinned version and any overrides survive a non-root run.
Verifying
After the service restarts, the running version appears in the web UI (at the
bottom of the sidebar) and from asternodis version on the CLI.