Skip to main content

Updating the single-server install

Written by Aron Day

Upgrade one major version at a time. Skipping major versions is not supported. If your target is more than one major version ahead, upgrade through each intervening major version in order. Verify that the installation is working after each upgrade before continuing.

If this server was installed before v2.2.1, do the one-time installer refresh first. After that, the steps below apply.

When upgrading from v2 to v3, follow upgrading from v2 to v3 if you need to retain existing Blobstore data. That guide also explains how to start the Blobstore upgrade fresh when retaining the existing data is unnecessary.

PostgreSQL 18 is the only supported version for 3B v10 and later. If your
server uses PostgreSQL 16, contact Tines Support to plan a logical dump and
restore before running setup. The installer does not upgrade PostgreSQL data
in place.

The v9 upgrade also updates k3s and Helm. Schedule a maintenance window and
take a restorable VM or disk snapshot, including the application’s persistent
data, before running setup. Runtime restarts interrupt the Kubernetes API and
may interrupt 3B. See the
​backup guidance.

Standard (online) server

bootstrap.sh is only used for the initial installation. The installed setup.sh handles subsequent upgrades.

  1. Edit /opt/3b/.env and change VERSION to the new release.

  2. Run the installed setup script:

sudo bash /opt/3b/setup.sh

The setup script compares the requested VERSION with the release stamped into its installed bundle. When they differ, it downloads and verifies the requested bundle, replaces its installer, Helm chart, and bundled tools, and re-executes the new setup.sh before touching Helm or application images. Your data in Kubernetes persistent volumes is preserved, and your configuration and secrets in /opt/3b/.env are reused. Nothing rotates.

The server needs outbound access to oci.tines.com for every update, just like the first install.

An upgrade from 6.x to 7.x automatically stops the application, migrates its
workflow history, and starts the new release. Later releases use rolling
application updates. You do not need to install intermediate 7.x releases.
Schedule a maintenance window for the 6.x to 7.x migration; its duration
depends on the amount of workflow history and database performance. The
installer allows up to nine hours for migrations. See the
​workflow storage upgrade guidance for failure
recovery and rollback restrictions.

Air-gapped (offline) server

The offline server can’t reach the registry, so you build the new version’s bundle on a connected machine, copy it across, extract it into /opt/3b, and re-run setup.sh.

On a machine that meets the build host requirements, run the air-gapped bundle builder and provide your registry credentials:

VERSION=<new-version> \
  REGISTRY_USERNAME="$OCI_USERNAME" \
  REGISTRY_PASSWORD="$OCI_PASSWORD" \
  bash -c "$(curl --proto '=https' --tlsv1.2 -fsSL https://sh.3b.dev/airgapped.sh)"

This creates 3b-self-hosted-<new-version>.zip in the current directory. Copy it to the offline server by whatever means you use. Change VERSION in /opt/3b/.env, replace the previous chart, images, and bundled tools, and re-run the installer:

sudo rm -rf /opt/3b/chart /opt/3b/images /opt/3b/bundled
sudo unzip -o 3b-self-hosted-<new-version>.zip -d /opt/3b
cd /opt/3b && sudo bash setup.sh

Your configuration and secrets in /opt/3b/.env are preserved. For the full flow, see updating an air-gapped server.

Required k3s version

Starting with v9, releases require the exact version in
​/opt/3b/bundled/K3S_VERSION. Fresh installs use the bundled binary. On an
existing server, v9 setup runs the bundled runtime upgrade before changing
Kubernetes Secrets or deploying the application. Setup checks that the
installed binary, running API server, and node match the required version
before continuing.

The v9 release bundles include upgrade-k3s.sh and every intermediate
runtime needed to upgrade from v1.33.3+k3s1 to v1.37.2+k3s1. Fresh
installs use v1.37.2+k3s1 directly. Later major releases bundle only their
pinned runtime; upgrade through v9 first.

Online setup downloads the requested release before upgrading the runtime.
On an offline server, extract the v9 bundle first, as above. Both use the same
upgrade path; no separate upgrade command is required.

If you already have the v9 release bundle, you can optionally check the host
and bundle without changing the runtime:

sudo bash /opt/3b/upgrade-k3s.sh --check

The helper supports the standard single-server installation on Linux amd64
with systemd and cgroup v2. It checks the installed versions, service binary,
and default SQLite datastore before changing the runtime. It upgrades through every
required Kubernetes minor and updates the bundled containerd and Helm
versions along the way.

Before the first runtime change, the helper stops k3s and saves one backup
at /var/lib/3b/k3s-upgrades/<target>/backup. It copies the entire
​/var/lib/rancher/k3s/server/db directory, the server token, and the original
k3s and Helm binaries. It preserves this backup through later steps and
retries. The backup excludes application volumes and does not replace the
full host snapshot.

If a step fails, resolve the reported problem and rerun the same upgrade
with sudo bash /opt/3b/setup.sh and the same release bundle. The helper uses
the installed k3s binary to find the current step, checks the runtime,
and restarts k3s if needed before continuing. It does not roll back
automatically. Do not downgrade the k3s binary alone.

A newer installed k3s version fails the exact-version check; the helper does
not downgrade it. Use a compatible 3B release bundle instead.

Tunnel networks

If tunnel networks are enabled, an upgrade stops the gateway before starting its replacement. Tunnel connectivity is interrupted, and requests still running after the 30-second shutdown window can fail. Exit nodes reconnect automatically once the replacement is ready; recovery time depends on image pulls, scheduling, and startup. Schedule a maintenance window for workloads that depend on tunnels.

The installer preserves the gateway CA and authentication token across upgrades and disable/re-enable cycles. Keep the generated gateway secrets in /opt/3b/.env and the Kubernetes tunnel-secrets Secret: replacing the CA would prevent existing exit nodes from reconnecting.

Verify

After the installer finishes, confirm everything rolled out and the UI responds. See verifying the install.

Recommendations

  • Back up /opt/3b/.env and the database before updating anything you care about.

  • The installer is safe to re-run. If an update is interrupted, run sudo bash /opt/3b/setup.sh again.

Did this answer your question?