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

# Installation

> Deploy the Magic Meal Kits server into your own Google Cloud project, and upgrade it later.

You install Magic Meal Kits from the web app at
[make.magicmealkits.com](https://make.magicmealkits.com) — a one-click wizard deploys the
MMK image into **your own** Google Cloud project. You own the deployment, the data, and
the URL.

## Prerequisites

<CardGroup cols={3}>
  <Card title="A Magic Meal Kits license" icon="key">
    Your subscription provides a **license key** and an **API key** used by the server.
  </Card>

  <Card title="A Google account" icon="google">
    Use the **same** account you sign in to Google Cloud with.
  </Card>

  <Card title="A GCP project with billing" icon="cloud">
    Cloud Run requires **billing enabled**. MMK itself is free — infrastructure is billed
    by Google, and the free tier covers light usage.
  </Card>
</CardGroup>

<Warning>
  **Install with a personal Gmail account, not a Google Workspace account.** The deployment
  wizard currently supports installing into the GCP environment of a **regular Gmail account**
  only. (Your Make account and the accounts you connect from Make may use Workspace freely —
  this restriction applies only to the Magic Meal Kits install.)
</Warning>

## Deploy your server

Open [make.magicmealkits.com/deploy](https://make.magicmealkits.com/deploy) and follow the
wizard.

<Steps>
  <Step title="Connect Google Cloud">
    Click **Connect to Google Cloud** and grant access. Use the **same Google account**
    you use for Google Cloud so the wizard can see your projects and create resources.
  </Step>

  <Step title="Select the app">
    Choose the **Magic Meal Kits** template (or **Magic Meal Kits Pro**, depending on your
    plan).
  </Step>

  <Step title="Pick or create a project">
    Select an existing GCP project, or **create a new one** (project names are 6–30
    characters, lowercase letters/numbers/hyphens, and must start with a letter). The
    wizard then **checks billing** and blocks deployment until it's enabled — enable it in
    the Google Cloud Billing console and click **Recheck Billing**.
  </Step>

  <Step title="Choose a tier and deploy">
    Pick a **resource tier**, then click **Let's Go!**.

    | Tier            | Resources       | Suited for              | Approx. GCP cost       |
    | --------------- | --------------- | ----------------------- | ---------------------- |
    | **Free**        | 1 vCPU / 256 MB | Development & testing   | Free within GCP limits |
    | **Basic**       | 1 vCPU / 512 MB | Production workloads    | \~\$5/month            |
    | **Performance** | 2 vCPU / 1 GB   | High-traffic production | \~\$15/month           |

    <Note>
      Magic Meal Kits is free to use. Infrastructure costs are billed directly by Google
      Cloud, which includes a generous free tier (vCPU-seconds, memory-seconds, and \~2M
      requests/month). Actual cost depends on your usage and region.
    </Note>
  </Step>

  <Step title="Done">
    On the success screen, use **Visit Your Application** to open your server, or **View
    Deployment Status** to open the [App Status](https://make.magicmealkits.com/app-status)
    page.
  </Step>
</Steps>

## What gets set up

The installer provisions everything the server needs **in your project**:

* **Cloud Run** service `magic-meal-kits` (region `us-west1`)
* **Firestore** `(default)` database — jobs and sync state
* **BigQuery** dataset `threads_data` — search-heavy posts/replies storage
* **Secret Manager** and **Cloud Tasks**
* The required Google APIs and IAM roles, and a public (invokable) URL

It also sets these environment variables on the service:

| Variable               | Purpose                               |
| ---------------------- | ------------------------------------- |
| `GOOGLE_CLOUD_PROJECT` | Your project ID                       |
| `MMK_LICENSE_KEY`      | Your license key                      |
| `MMK_API_KEY`          | API key used to authenticate requests |
| `APP_TYPE`             | Application type                      |

## After deploying

Your **server URL** and **API key** are shown on the
[App Status](https://make.magicmealkits.com/app-status) page — that's where you copy them
from (you don't hand-configure them).

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    How the `X-API-KEY` header and license tiers work.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Make your first call to your deployment.
  </Card>
</CardGroup>

## Upgrading (redeploy)

To move your deployment to a newer server version, open
[App Status](https://make.magicmealkits.com/app-status) and click
**Update Service (Redeploy)** under **Service Management**. The page shows your current
**Version** and **Last Deployed** time. The redeploy is an **in-place upgrade** — it
replaces the running container with the latest version and creates a new Cloud Run
revision.

| Preserved                      | Changes                             |
| ------------------------------ | ----------------------------------- |
| Server URL, API key, license   | The container **image / version**   |
| GCP project and region         | A new Cloud Run revision is created |
| **Firestore & BigQuery data**  | —                                   |
| Environment variables / config | —                                   |

<Note>
  Redeploying does **not** lose data and does **not** change your URL or API key — only the
  server version moves forward. There's no automatic "update available" banner; you trigger
  the upgrade from App Status when you want it.
</Note>
