---
title: Storage, backups, and updates
description: "Back up self-host data and key volumes, understand Update available checks, upgrade the Docker container safely, and move from a local Executor."
---

Self-hosted Executor stores persistent state and generated key files in `/app/data` (with the live product database in `/app/data/product` in the Docker image) and keeps optional telemetry separately in `/app/motel-data` (**Self-host** only).

Before upgrading, stop the container, back up the `/app/data` volume into a private directory, pull the target release tag from **How to update**, remove only the stopped container (`docker rm executor-v2`), and recreate it with that tag plus all of your original volume mounts and environment variables.

**Prerequisites:** Docker host access to your self-host container and volumes. In the dashboard, only organization `owner` and `admin` roles see the **Update available** notice.

**You'll know it worked when** the recreated container logs `Executor is ready at <BETTER_AUTH_URL>`, `/health` returns `{"status":"ok"}`, and your existing apps and accounts remain intact.

## Volumes and key files

| Mount path | Default volume | What it stores |
| --- | --- | --- |
| `/app/data` | `executor-v2-data` (or `pglite-data` in Compose) | Live product database (`/app/data/product`), app source and builds, app data, and generated key files (`auth-secret.key`, `encryption.key`, and analytics key material when needed, owned by the container's server user with mode `0600`). |
| `/app/motel-data` | Container filesystem (ephemeral unless mounted) | Bundled telemetry collector storage (`EXECUTOR_MOTEL_DATA_DIR`, named historically from Motel). Must be separate from `/app/data`. |

### Back up `/app/data` and keys

Back up the entire `/app/data` volume while the container is stopped (or using an atomic filesystem/volume snapshot):

- **Generated keys:** `auth-secret.key` and `encryption.key` live inside `/app/data`, owned by the container's `executor` user with POSIX mode `0600` (privileged host users and Docker operators can still read the volume). Keep both files and keep volume backups encrypted and private.
- **Supplied keys (`BETTER_AUTH_SECRET`, `EXECUTOR_ENCRYPTION_KEY`):** Environment-variable overrides take precedence and are not written to key files in `/app/data`. Executor encrypts saved account fields with AES-256-GCM using a 64-hex-character key and a fresh random nonce, binding each record to its account ID: `EXECUTOR_ENCRYPTION_KEY` must be exactly 64 hexadecimal characters, and `BETTER_AUTH_SECRET` is a separate value (at least 32 characters) whose rotation invalidates existing session cookies. Keep those exact values in your secret manager and supply them on every start.

Keep the same key source across upgrades. If an original key file is missing or malformed for an existing database, restore it or supply the original value through the environment. Startup validates key format rather than matching prior ciphertext — supplying a different valid 64-hex-character `EXECUTOR_ENCRYPTION_KEY` can pass startup validation and still leave previously stored credentials unreadable.

### Telemetry storage (`/app/motel-data`)

By default, replacing the container discards stored telemetry. Mount a separate volume at `/app/motel-data` if you want traces to survive upgrades.

The bundled collector expires telemetry **7 days** (168 hours) after the last write and evicts the oldest stored data to stay within its **1 GiB** data budget. It buffers up to 4 pending exports (16 MiB) and rejects new exports when the bounded ingest queue is full; inspect queue limits and refusal counts with `docker exec executor-v2 executor-host telemetry /api/ingest`.

If you upgraded from an older image that ran Motel and mounted a persistent `/app/motel-data` volume, its legacy `motel` subdirectory (up to ~1 GiB) is no longer read or removed automatically. After confirming the mount is the intended one, delete that subdirectory with:

```bash
docker exec executor-v2 rm -rf /app/motel-data/motel
```

## Updates

### Daily update check (`Update available`)

Self-host checks at most once a day whether a newer Executor release exists and shows organization `owner` and `admin` users an **Update available** tag at the bottom of the sidebar with a **How to update to v\<version\>** button that opens the **How to update** dialog. Regular `member` users see nothing.

How the check works:

- Sends one `GET` request to `<EXECUTOR_NPM_REGISTRY>/-/package/executor/dist-tags` (default `https://registry.npmjs.org`) with no query string, cookies, or identifying headers.
- Follows no HTTP redirects, ignores `HTTP_PROXY` and `HTTPS_PROXY`, and times out after **5 seconds**.
- Records each due attempt in `/app/data` before sending the request and reuses a valid record for 24 hours. With its last-attempt record intact, restarting or a failed response does not trigger another check within 24 hours; if the record is missing, undecodable, or cannot be written, the check treats it as unchecked or logs a warning.
- Owners' and admins' browsers read update status from this self-host server; the server itself makes the registry request.
- Beta images compare against newer betas and newer stable releases; stable images compare against stable releases only.
- Disable the check completely with `EXECUTOR_NO_UPDATE_CHECK=1`.

### Upgrade the Docker container

Never remove your data volume (`executor-v2-data`) during an upgrade. Set `TARGET_VERSION` to the new release tag shown in **How to update** before stopping the old container. Because `docker rm` drops the old container's flags, preserve your saved `docker run` or Compose configuration — especially every volume mount (`/app/data` and any `/app/motel-data`) and every environment variable (`BETTER_AUTH_URL`, supplied keys, SSO, OAuth, or proxy settings):

```bash
# Set the new release tag from "How to update" (shown here with the current release)
TARGET_VERSION="2.0.0-beta.79"

# 1. Stop the running container
docker stop executor-v2

# 2. Back up the executor-v2-data volume into a private (0700) directory with mode 0600
BACKUP_DIR=$(umask 077 && mktemp -d)
(umask 077 && docker run --rm -v executor-v2-data:/data:ro alpine \
  tar czf - -C /data . > "$BACKUP_DIR/executor-v2-data-backup.tgz")

# 3. Pull the target image
docker pull "ghcr.io/usefulsoftwareco/executor-selfhost:${TARGET_VERSION}"

# 4. Remove only the stopped container (not the volume)
docker rm executor-v2

# 5. Recreate the container with the target tag and all of your original settings and mounts
# (This run command matches the default loopback quick start; include your saved env vars and mounts.)
docker run -d --name executor-v2 --init --restart unless-stopped \
  -p 127.0.0.1:4400:4400 -v executor-v2-data:/app/data \
  "ghcr.io/usefulsoftwareco/executor-selfhost:${TARGET_VERSION}"
```

Encrypt `"$BACKUP_DIR/executor-v2-data-backup.tgz"` before copying it to long-term storage.

You'll know it worked when `docker logs -f executor-v2` prints `Executor is ready at ...` and `curl -sf http://127.0.0.1:4400/health` returns `{"status":"ok"}`.

To test or restore a backup into a fresh empty volume (supplying the same original environment overrides if any were used):

```bash
docker volume create executor-v2-restore
docker run --rm -i -v executor-v2-restore:/data alpine \
  tar xzf - -C /data < "$BACKUP_DIR/executor-v2-data-backup.tgz"
```

Mount `executor-v2-restore:/app/data` on a container with your original environment overrides, then verify `/health` returns `{"status":"ok"}` and an existing account can sign in.

## Move from a local Executor

A self-hosted server starts empty. Data is not copied automatically from a **Local** Executor or from Executor 1, and both instances keep running independently.

1. **Add your apps again.** Install catalog apps from **Add app** in the self-host dashboard. To deploy custom apps with CLI `2.0.0-beta.79`, sign in for app commands against your self-host origin (and sign in separately with `executor login` if you also use shell tool commands or `executor mcp`):

   ```bash
   HOST="https://executor.example.com" # replace with your self-host origin
   executor apps login --host "$HOST"
   executor apps list --host "$HOST"
   # Optional, for shell tool commands and executor mcp:
   executor login --host "$HOST"
   ```

2. **Connect your accounts again.** Credentials are encrypted with each server's own key and do not transfer. Connect each account from its app's page.
3. **Back up the new server.** Snapshot the `/app/data` volume together with any supplied keys.
4. **Replace each MCP client's old entry.** Remove or replace the old local or Executor 1 entry using the same client configuration and scope where you added it:
   - Codex: `codex mcp remove executor`, then add `<your origin>/mcp` (see [Add an MCP client](/docs/mcp-clients)).
   - Claude Code: `claude mcp remove executor` (or pass the `--scope` you originally used, such as `--scope user`), then add `<your origin>/mcp`.
5. **Start a new client session.** Most MCP clients load server definitions only when a session starts.
6. **Verify it works.** Ask your agent to [search the tools](/docs/mcp-clients#check-that-it-worked) and call one read-only tool from an app you added.

## Limits

- Do not mount `/app/motel-data` inside `/app/data`; they must remain separate directories.
- Copying only part of `/app/data` or starting without the matching `encryption.key` / `EXECUTOR_ENCRYPTION_KEY` leaves stored provider credentials unreadable; keep the entire `/app/data` volume together with its original key.
- Moving from **Local** to **Self-host** requires reconnecting provider accounts because encryption keys are per-instance.

## Related

- [Self-host with Docker](/docs/run/self-host)
- [Deploy, proxy, and tune self-host](/docs/run/self-host/deploy)
- [Sign-in and OIDC SSO](/docs/run/self-host/sign-in-and-sso)
- [Tracing](/docs/run/tracing)
- [Add an MCP client](/docs/mcp-clients)
- [Upgrade and migrate from Executor 1](/docs/run/cli/upgrade)
