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

# Prerequisites

> What you need before setting up a self-hosted Digcrate instance

Before you deploy Digcrate, you need accounts with three external services and a few tools installed locally. All required services have free tiers that are sufficient for a personal or small-team instance.

<Steps>
  <Step title="Install Node.js 20+ and npm 10+">
    Digcrate requires Node.js 20 or later. Check your current version:

    ```bash theme={null}
    node --version
    npm --version
    ```

    If you need to upgrade, download the LTS release from [nodejs.org](https://nodejs.org) or use a version manager like `nvm`:

    ```bash theme={null}
    nvm install 20
    nvm use 20
    ```
  </Step>

  <Step title="Install Git">
    You need Git to clone the repository.

    ```bash theme={null}
    git --version
    ```

    If Git is not installed, follow the [official installation guide](https://git-scm.com/downloads).
  </Step>

  <Step title="Create a Clerk account">
    Clerk handles user authentication (sign-in, sign-up, sessions).

    1. Sign up at [clerk.com](https://clerk.com) — the free tier is sufficient.
    2. Create a new application.
    3. From the application dashboard, copy your **Publishable Key** (`pk_test_...`) and **Secret Key** (`sk_test_...`). You will need both when configuring environment variables.
    4. Note the **Webhook Secret** from the Webhooks section — Digcrate uses this to sync users to Convex.

    <Note>
      Clerk's free tier includes up to 10,000 monthly active users and all OAuth providers.
    </Note>
  </Step>

  <Step title="Create a Convex account">
    Convex is the real-time database that stores sessions, messages, playlists, usage events, subscriptions, and all other application state.

    1. Sign up at [convex.dev](https://convex.dev) — the free tier is sufficient for most self-hosted instances.
    2. You do not need to create a project manually. Running `npx convex dev` during setup will create and configure one automatically.

    <Note>
      Convex's free tier includes 1M function calls and 1 GB database storage per month.
    </Note>
  </Step>

  <Step title="Create a Vercel account (recommended)">
    Vercel is the recommended deployment target. Digcrate uses Next.js App Router and serverless API routes, which deploy without any additional configuration on Vercel.

    1. Sign up at [vercel.com](https://vercel.com).
    2. You can also deploy to any Node.js host that supports Next.js, but Vercel is the path with the least configuration.

    <Note>
      Vercel's free Hobby tier works for personal instances. Team instances with higher traffic should use a Pro plan.
    </Note>
  </Step>

  <Step title="Get an Anthropic API key">
    Digcrate's agent runs on Claude. You need an Anthropic API key to power queries for free and Pro users (BYOK users supply their own keys at runtime).

    1. Sign up at [console.anthropic.com](https://console.anthropic.com).
    2. Create an API key. This becomes the `PLATFORM_ANTHROPIC_KEY` environment variable.

    <Warning>
      Without `PLATFORM_ANTHROPIC_KEY`, only users who have entered their own API key (BYOK) will be able to run queries. Free-tier and Pro users will see an error.
    </Warning>
  </Step>

  <Step title="Optional: Stripe, Auth0, and other services">
    The following services are optional depending on which features you want to enable:

    * **Stripe** — Required for subscription billing (free/pro/team plans and checkout). Sign up at [stripe.com](https://stripe.com).
    * **Auth0** — Required for connected services (Spotify, Slack, Google Docs via Token Vault). Sign up at [auth0.com](https://auth0.com).
    * **Last.fm API key** — For similar artists and listening stats. Get a key at [last.fm/api](https://www.last.fm/api).
    * **Discogs API key** — For release data and cover art. Get a key at [discogs.com/settings/developers](https://www.discogs.com/settings/developers).
    * **Ticketmaster API key** — For concert listings. Get a key at [developer.ticketmaster.com](https://developer.ticketmaster.com).

    See [Environment variables](/self-hosting/environment-variables) for the full list.
  </Step>
</Steps>

Once you have these accounts and tools ready, continue to [Environment variables](/self-hosting/environment-variables).
