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

# Configure a Lifetime Backend

> Connect a lifetime or BYOD Aiola profile to Supabase and an analytics backend you control.

The **Backend (Lifetime / BYOD)** page is available in the desktop app to accounts with lifetime access. It is opt-in: until a profile is activated, Aiola continues using its default hosted backend.

With an active profile, analytics, app logs, and feedback use infrastructure you own while you continue signing in with your Aiola account.

## Prepare the backend

Open **Central Settings → Backend**. The setup section provides:

* an AI setup prompt
* schema SQL
* analytics SQL
* access-policy SQL
* your Aiola user ID for associating data with your account

You can provision a cloud or self-hosted Supabase project, or use the local/VPS Docker stack. If you run the SQL manually, apply it in the order shown in the app.

<Warning>
  Use the Supabase anon key and the Aiola project key. Do not paste a Supabase service-role key into Aiola.
</Warning>

## Add a connection profile

<Steps>
  <Step title="Enter the Supabase connection">
    Add a label, an HTTPS Supabase URL, the Supabase anon key, and the Aiola project key created during setup. All three connection values are required.
  </Step>

  <Step title="Choose analytics storage">
    Select Postgres-lite, Tinybird, Tinybird through your edge function, or self-hosted ClickHouse. Postgres-lite uses the connected Supabase project and needs no additional analytics service.
  </Step>

  <Step title="Add provider-specific values">
    For Tinybird, provide its API host and read and append tokens; the admin token is optional for deletes. For the proxy, provide the function URL. For ClickHouse, provide its HTTP URL, user, and password.
  </Step>

  <Step title="Test the connection">
    Select **Test connection** and review the reported health details. This checks the profile without activating it.
  </Step>

  <Step title="Run setup checkpoints">
    Select **Run checkpoints**. Aiola checks Supabase core, edge functions, analytics, and MCP and license requirements.
  </Step>

  <Step title="Save or activate">
    Use **Save** to keep the profile inactive, or **Save & activate** after the critical checkpoints pass. Aiola reloads after activation.
  </Step>
</Steps>

## Understand checkpoints

Checkpoint results are grouped and use four states:

* pass
* critical failure or skipped critical requirement, which blocks activation
* warning, which does not block activation
* skipped

Failed and warning checks expand automatically. Open a result to see missing items and the suggested fix, then copy the fix if needed. Re-run one group or all checkpoints after making changes.

## Send data to the active backend

After activation, **Send your data here** lists the App Logs, Analytics, and Feedback ingest endpoints plus the project key. Point the corresponding Aiola SDK, analytics snippet, or feedback widget at these values so new data reaches the active backend.

## Manage and recover profiles

Saved profiles show their Supabase URL, analytics type, and active state. From the list you can:

* test a saved profile again
* activate another profile
* deactivate the active profile to return to the default backend
* delete a saved profile

If activation is blocked, expand the failed critical checkpoints, apply their fixes, and re-run the checks. Warnings can remain without blocking activation. If an active backend becomes unavailable, use **Test** to identify the failing service or deactivate it to restore the default backend, then activate it again after recovery.
