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

# Upgrading

> Move to a newer backend or dashboard version.

<Steps>
  <Step title="Get the new versions">
    RELAI will tell you which `RELAI_BACKEND_SERVICE_VERSION` and/or
    `RELAI_DASHBOARD_VERSION` to move to.
  </Step>

  <Step title="Update .env">
    Set the new version(s) in your `.env` file.
  </Step>

  <Step title="Re-pull and restart">
    ```sh theme={"system"}
    docker compose up -d --remove-orphans
    ```

    This pulls the new images and recreates any service whose image
    changed. `app-migrations` and `init-commands` run again automatically —
    migrations are safe to re-run against an already-migrated database.
  </Step>

  <Step title="Verify">
    Repeat the checks in [Verifying the deployment](/verifying-the-deployment).
  </Step>
</Steps>

<Info>
  Back up your database before upgrading across major versions, the same as
  you would for any production database.
</Info>
