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

# Deploy Your First Application on Varo Cloud — Guide

> Walk through creating a project, configuring an environment, and triggering your first deployment on Varo Cloud from the dashboard or API.

Deploying an application on Varo Cloud takes just a few steps — you can trigger a deployment directly from the dashboard at [varo.cloud](https://varo.cloud) or programmatically through the API. This guide walks you through both paths, shows you how to monitor progress in real time, and explains how to roll back if something goes wrong.

## Before you begin

<Note>
  Make sure you have the following ready before starting your first deployment:

  * A Varo Cloud account with at least one project created
  * An API key generated from **Settings → API Keys**
  * Your application code pushed to a Git repository, or a container image ready to deploy
</Note>

## Deploy from the dashboard

The Varo Cloud dashboard gives you a visual interface to configure and launch deployments without writing any code or commands.

<Steps>
  <Step title="Open your project">
    Log in to [varo.cloud/auth](https://varo.cloud/auth) and select the project you want to deploy from the Projects list on your home screen.
  </Step>

  <Step title="Click New Deployment">
    Inside your project, navigate to the **Deployments** tab and click the **New Deployment** button in the top-right corner.
  </Step>

  <Step title="Select an environment">
    Choose the target environment for this deployment — for example, **production**, **staging**, or **development**. Environments are configured under **Project → Settings → Environments**.
  </Step>

  <Step title="Choose your source">
    Select how Varo Cloud should retrieve your application code:

    * **Git repository** — provide your repo URL and branch name
    * **Container image** — provide a registry URL and image tag

    If you have already connected a GitHub account, your authorized repositories will appear in a dropdown.
  </Step>

  <Step title="Click Deploy">
    Review your configuration and click **Deploy**. Varo Cloud immediately queues a build and begins streaming logs on the deployment detail page. You can watch progress in real time under the **Logs** tab, and the deployment status updates from `queued` → `building` → `active` (or `failed`).
  </Step>
</Steps>

## Deploy via the API

You can also trigger a deployment with a single API call. This is useful for CI/CD pipelines, scripts, or any automation that runs outside the dashboard.

```bash theme={null}
curl -X POST https://inference.varo.cloud/v1/deployments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_abc123",
    "environment": "production",
    "source": {
      "type": "git",
      "repo": "https://github.com/your-org/your-app",
      "branch": "main"
    }
  }'
```

A successful request returns a deployment object with the new deployment's ID and its initial status:

```json theme={null}
{
  "id": "dep_xyz789",
  "status": "queued",
  "environment": "production",
  "created_at": "2024-01-15T10:30:00Z"
}
```

Save the `id` field — you will need it to poll for status updates and to trigger a rollback.

## Monitor deployment progress

Once a deployment is underway, you can follow its progress from the dashboard or the API.

**From the dashboard:** Navigate to **Deployments**, click the deployment you want to inspect, and open the **Logs** tab. Logs stream in real time and are colour-coded by severity. You can filter by log level or search for specific strings using the toolbar above the log viewer.

**From the API:** Poll the deployment endpoint to check status and retrieve build output:

```bash theme={null}
curl https://inference.varo.cloud/v1/deployments/dep_xyz789 \
  -H "Authorization: Bearer YOUR_API_KEY"
```

When the deployment has successfully started, the response reflects the updated status:

```json theme={null}
{
  "id": "dep_xyz789",
  "status": "active",
  "environment": "production",
  "created_at": "2024-01-15T10:30:00Z",
  "deployed_at": "2024-01-15T10:32:14Z"
}
```

## Rollback a deployment

If a deployment introduces a problem, you can instantly roll back to the previous stable version.

**From the dashboard:** Open the deployment you want to revert to under **Deployments**, then click **Roll Back to This Version** in the top-right action menu. Varo Cloud re-activates that version without requiring a new build.

**From the API:** Send a POST request to the rollback endpoint, referencing the deployment ID you want to restore:

```bash theme={null}
curl -X POST https://inference.varo.cloud/v1/deployments/dep_xyz789/rollback \
  -H "Authorization: Bearer YOUR_API_KEY"
```

The rollback creates a new deployment record that points to the previous build artifact, so your deployment history remains intact and auditable.

<Tip>
  Set up a webhook to receive real-time notifications when deployments complete, fail, or are rolled back — no polling required. Head to **Settings → Webhooks** in your dashboard to configure an endpoint, or see the API Reference for full webhook event details.
</Tip>
