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

# Hybrid

> Run the service locally while persisting tasks and contacts in the cloud.

Hybrid mode runs the service on your machine (or a VPS) for channel processing, while tasks and contacts are stored in the cloud for team access.

## What you get

* Service processes channels locally — messages never leave your machine
* Tasks and contacts persist in Supabase via the cloud API
* Team members access shared data through the cloud web UI or mobile app
* API token (PAK) authentication between service and cloud

## Setup

<Steps>
  ### Deploy the cloud

  Deploy the cloud component to Vercel or your hosting platform of choice. Set up a Supabase project and run the migrations in `cloud/supabase/migrations/`.

  ### Create an API token

  Sign in to the cloud web UI, go to **Settings**, and create a new API token. Copy the token — it starts with `obk_`.

  ### Configure the service

  ```bash .env theme={null}
  BACKEND=remote
  REMOTE_API_URL=https://your-cloud-url.vercel.app
  REMOTE_API_TOKEN=obk_your-token-here
  REMOTE_TEAM_ID=your-team-uuid
  OPENROUTER_API_KEY=sk-or-v1-your-key
  OPENROUTER_MODEL=anthropic/claude-sonnet-4
  ```

  ### Start the service

  ```bash theme={null}
  cd service
  npm install && npm run dev
  ```
</Steps>

## How data flows

* **Messages** are stored locally in SQLite (they never leave the service)
* **Tasks and contacts** are created and updated via HTTP calls to the cloud API
* The cloud API enforces team-scoped access using the PAK token and `X-Team-Id` header
* The cloud can push events back to the service via SSE (e.g., Gmail notifications)

## When to use this mode

* Teams that want shared task management
* When channel credentials must stay on a local or private machine
* When you need the cloud web UI and mobile app access
