> ## 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)

<Tabs>
  <Tab title="npm">
    ```bash theme={"dark"}
    npm install -g openclaw@latest
    ```
  </Tab>

  <Tab title="pnpm">
    ```bash theme={"dark"}
    pnpm add -g openclaw@latest
    pnpm approve-builds -g     # if prompted for build script approval
    ```
  </Tab>

  <Tab title="From source">
    ```bash theme={"dark"}
    cd /path/to/wednesdayai-core
    git pull --rebase
    pnpm install
    pnpm build
    pnpm ui:build
    ```
  </Tab>
</Tabs>

## 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.
</Note>

## 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

<Tabs>
  <Tab title="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>

  <Tab title="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`
  </Tab>
</Tabs>

## Migrating to a new machine

<Steps>
  <Step title="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
    ```
  </Step>

  <Step title="Install on the new machine">
    Follow [Getting started](/admin/getting-started) to install and onboard. Stop the gateway after onboarding completes.
  </Step>

  <Step title="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 ~/
    ```
  </Step>

  <Step title="Verify">
    ```bash theme={"dark"}
    openclaw doctor
    openclaw gateway start
    openclaw status
    ```
  </Step>
</Steps>

<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`.
</Note>

***

**Related:** [Doctor](/admin/doctor) · [Troubleshooting](/admin/troubleshooting) · [Getting started](/admin/getting-started)
