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

# Testnet Deployment

> Deploy your Crunch to the Solana devnet for end-to-end testing.

Testnet deployment lets you validate your full Crunch setup — registration, model submission,
scoring, and payouts — before going to mainnet. The **Coordinator Platform** guides you through each
step.

## Prerequisites

* Solana wallet with devnet SOL (see
  [Wallet & CLI setup](/getting-started/wallet-and-cli-setup) if you haven't set this up yet)
* Coordinator registration approved by the Foundation
* **CLI workflow only:** Crunch Protocol CLI installed: `npm install -g @crunchdao/cli`
* **CLI workflow only:** Certificate tools installed: `pipx install crunch-certificate`

<Warning>
  If you're using the CLI workflow, verify your Solana CLI is set to **devnet** before proceeding:
  `solana config set --url devnet`
</Warning>

## Step 1: Register your Coordinator

If you haven't already registered, do so now:

<Tabs>
  <Tab title="Platform (recommended)">
    Open the Coordinator Platform at **[http://localhost:3000](http://localhost:3000)** and follow the **Get Started**
    onboarding flow to register.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    crunch-cli coordinator register "<coordinator-name>"
    ```
  </Tab>
</Tabs>

Wait for Foundation approval before continuing.

## Step 2: Create your Crunch

<Tabs>
  <Tab title="Platform (recommended)">
    In the Coordinator Platform, navigate to **Create Crunch** and fill in the competition details —
    name, prize pool, and max models per participant.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    crunch-cli crunch create "<crunch-name>" 5000 2
    ```
  </Tab>
</Tabs>

## Step 3: Fund the Crunch

Deposit USDC into the competition's escrow wallet. This is the reward pool for participants.

<Tabs>
  <Tab title="Platform (recommended)">
    Use the funding interface on your Crunch's page in the Coordinator Platform.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    crunch-cli crunch deposit-reward "<crunch-name>" 1200
    ```

    Alternatively, send USDC directly to the Crunch Token Account shown in the output of the create
    command.
  </Tab>
</Tabs>

## Step 4: Start your Crunch

<Tabs>
  <Tab title="Platform (recommended)">
    Start your Crunch from the competition overview page in the Coordinator Platform.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    crunch-cli crunch start "<crunch-name>"
    ```
  </Tab>
</Tabs>

## Step 5: Deploy your Crunch Node

Launch your Crunch Node on your preferred cloud provider or on-premises infrastructure.
To connect to the Model Nodes, you need to generate and configure certificates.

<Steps>
  <Step title="Generate a certificate">
    Use the [Crunch Certificate](https://pypi.org/project/crunch-certificate/) tool to generate
    a certificate. Decompress the output and keep the folder for the next step.

    <Tip>
      You can also enroll for a certificate through the **Certificate Enrollment** page in the
      Coordinator Platform.
    </Tip>
  </Step>

  <Step title="Store the certificate securely">
    Restrict access to the certificate files and add them to your Crunch Node deployment.
  </Step>

  <Step title="Configure the certificate in your node">
    Set the path to the certificate folder in your environment or code:

    ```python theme={null}
    secure_credentials = SecureCredentials.from_directory(
        path="../../issued-certificate"
    )
    self.model_concurrent_runner = DynamicSubclassModelConcurrentRunner(
        self.MODEL_RUNNER_TIMEOUT,
        "my-challenge",                          # Your CRUNCH_ID
        self.MODEL_RUNNER_NODE_HOST,
        self.MODEL_RUNNER_NODE_PORT,
        "starter_challenge.tracker.TrackerBase",  # Your MODEL_BASE_CLASSNAME
        max_consecutive_failures=100,
        max_consecutive_timeouts=100,
        secure_credentials=secure_credentials,
    )
    ```
  </Step>
</Steps>

## Step 6: Publish your Crunch

Use the Coordinator Platform to configure and publish your Crunch to the
[Testnet Hub](https://hub.crunchdao.io/):

1. Open the Coordinator Platform
2. Configure your Crunch details — leaderboard, metrics, rules, and pitch page
3. Publish to make your Crunch visible to participants on the testnet Hub

<Card title="Next: Mainnet deployment" icon="arrow-right" href="/getting-started/mainnet-deployment">
  Go live with your Crunch on mainnet.
</Card>
