> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wednesdayai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrading and migrating

> Update WednesdayAI safely, roll back when needed, and migrate to a new machine.

# Upgrading and migrating

WednesdayAI releases frequently. Treat updates like shipping infrastructure: update, run checks, restart, verify. This page covers upgrading in place, rolling back, and migrating to a new machine.

## Before you upgrade

1. **Know your install method** — global npm/pnpm, or from source (git checkout).
2. **Know how your gateway runs** — foreground terminal, systemd service (Linux), or macOS menubar app.
3. **Snapshot your config:**

   ```bash theme={"dark"}
   cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
   ```

## Upgrade (recommended: installer script)

Re-run the installer — it detects your existing installation, upgrades in place, and runs `openclaw doctor` afterward:

```bash theme={"dark"}
curl -fsSL https://wednesdayai.dev/install.sh | bash
```

Skip re-running the onboarding wizard:

```bash theme={"dark"}
curl -fsSL https://wednesdayai.dev/install.sh | bash -s -- --no-onboard
```

For **source installs:**

```bash theme={"dark"}
curl -fsSL https://wednesdayai.dev/install.sh | bash -s -- --install-method git --no-onboard
```

## Upgrade (`openclaw update`)

`openclaw update` is the preferred path for **source installs**. It runs a safe update flow: requires a clean worktree, switches to the selected channel, fetches and rebases, installs deps, rebuilds core and the Control UI, runs `openclaw doctor`, and restarts the gateway (use `--no-restart` to skip).

```bash theme={"dark"}
openclaw update
openclaw update --dry-run            # preview without applying
```

On npm/pnpm installs (no git metadata), `openclaw update` tries to update via your package manager; if it cannot detect the install, use the manual path below.

Select a release channel, or pin a one-off tag/version:

```bash theme={"dark"}
openclaw update --channel stable     # production releases (default)
openclaw update --channel beta       # pre-release builds
openclaw update --channel dev        # bleeding edge
openclaw update --tag 2026.4.0       # one-off version/dist-tag
```

### Control UI — Update & Restart

The control panel has an **Update & Restart** action (RPC `update.run`) for source installs. It runs the same source-update flow, writes a restart report, restarts the gateway, and pings the last active session with the result. If the rebase fails, the gateway aborts and restarts without applying the update.

## Upgrade (manual)

> [tab] npm
>
> ```bash theme={"dark"}
> npm install -g openclaw@latest
> ```

> [tab] pnpm
>
> ```bash theme={"dark"}
> pnpm add -g openclaw@latest
> pnpm approve-builds -g     # if prompted for build script approval
> ```

> [tab] From source
>
> ```bash theme={"dark"}
> cd /path/to/wednesdayai-core
> git pull --rebase
> pnpm install
> pnpm build
> pnpm ui:build
> ```

## After upgrading

```bash theme={"dark"}
openclaw --version       # confirm the new version
openclaw doctor          # config migrations and channel health
openclaw gateway restart # apply the new binary
openclaw status          # verify everything is running
```

> [!NOTE]
>
> If channels stopped working after an upgrade, run `openclaw doctor`. WhatsApp auth state is migrated **only** via doctor, and doctor also warns if the service is now running on Bun or a version-managed Node path — WhatsApp and Telegram require a stable system Node.

## Auto-updater (optional)

The gateway can update itself on a schedule. Disabled by default:

```json5 theme={"dark"}
{
  update: {
    channel: "stable",
    auto: {
      enabled: true,
      stableDelayHours: 6,
      stableJitterHours: 12,
    },
  },
}
```

The `dev` channel never auto-applies — use manual `openclaw update`.

## Rolling back

> [tab] npm / pnpm
>
> ```bash theme={"dark"}
> npm install -g openclaw@<last-good-version>
> openclaw doctor
> openclaw gateway restart
> ```
>
> Find published versions: `npm view openclaw versions --json`

> [tab] From source
>
> ```bash theme={"dark"}
> cd /path/to/wednesdayai-core
> git fetch origin
> git checkout "$(git rev-list -n 1 --before='2026-04-01' origin/main)"
> pnpm install && pnpm build && pnpm ui:build
> openclaw gateway restart
> ```
>
> Return to latest later: `git checkout main && git pull && pnpm install && pnpm build`

## Migrating to a new machine

**1. Export from the old machine**

```bash theme={"dark"}
cp ~/.openclaw/openclaw.json ~/openclaw-config-backup.json
tar czf ~/openclaw-credentials-backup.tgz ~/.openclaw/credentials/
tar czf ~/openclaw-sessions-backup.tgz ~/.openclaw/agents/   # optional, can be large
```

**2. Install on the new machine**

Follow [Getting started](https://docs.wednesdayai.dev/next/admin/getting-started.md) to install and onboard. Stop the gateway after onboarding completes.

**3. Restore**

```bash theme={"dark"}
cp ~/openclaw-config-backup.json ~/.openclaw/openclaw.json
tar xzf ~/openclaw-credentials-backup.tgz -C ~/
tar xzf ~/openclaw-sessions-backup.tgz -C ~/
```

**4. Verify**

```bash theme={"dark"}
openclaw doctor
openclaw gateway start
openclaw status
```

> [!NOTE]
>
> WhatsApp credentials tied to a phone's linked-device pairing may need re-scanning the QR on the new host. If WhatsApp shows disconnected after migration, run `openclaw channels logout --channel whatsapp && openclaw channels login --channel whatsapp`.

***

**Related:** [Doctor](https://docs.wednesdayai.dev/next/admin/doctor.md) · [Troubleshooting](https://docs.wednesdayai.dev/next/admin/troubleshooting.md) · [Getting started](https://docs.wednesdayai.dev/next/admin/getting-started.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.