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

> ## Agent Instructions
> For autonomous tasks, use live SaladCloud API responses for current state, availability, quotas, models, and other dynamic values. Use current OpenAPI specifications where provided for paths, schemas, required fields, and enums. Never invent endpoints, fields, prices, availability, quotas, models, or state. Prefer API workflows over Portal steps. Read before changing and never expose credentials, signed media URLs, prompts, or sensitive outputs. Retry only safe or idempotent operations with bounded backoff, honoring Retry-After. Verify every write with a read. Stop rather than repeat an uncertain non-idempotent or billable request. AI Gateway uses an organization-specific Bearer key and live /v1/models discovery. Do not delete, cancel, stop, or reduce capacity without explicit user intent. Bind shared operation IDs to the selected product path. Treat Container Engine instances as interruptible and local state as ephemeral. Install the SaladCloud skills (npx skills add https://docs.salad.com), start from the salad skill and /agents/overview; docs MCP: https://docs.salad.com/mcp.

# Quickstart

> Get your first container up and running on SaladCloud in minutes!

*Last Updated: January 12, 2026*

## Deploying Your First Application on SaladCloud

Welcome to Salad Container Engine (SCE), a fully managed container service for deploying AI and simulation workloads to
our global network of idle GPUs. Unlike traditional cloud providers, SaladCloud operates a decentralized marketplace
where individuals can sell idle compute time on their PCs, and businesses can run workloads at industry-low costs.

This guide walks you through deploying a simple FastAPI application on SCE. Before continuing, make sure you have:

* A [SaladCloud account](https://portal.salad.com)
* An organization created in the portal
* At least a few dollars in credits added to your account

***

## Step 1: Prepare Your Application

We'll deploy a simple FastAPI server with a `GET /hello` endpoint and basic probe endpoints (`/started`, `/live`,
`/ready`). The `/hello` route returns a greeting and the machine ID via environment variable injection at runtime. While
the probe routes aren't meaningful in this demo, SCE can use them to manage container lifecycle events.

```python app.py theme={null}
from fastapi import FastAPI
import os

salad_machine_id = os.getenv("SALAD_MACHINE_ID", "localhost")

app = FastAPI()


@app.get("/hello")
async def hello_world():
    return {"message": "Hello, World!", "salad_machine_id": salad_machine_id}


@app.get("/started")
async def startup_probe():
    return {"message": "Started!"}


@app.get("/ready")
async def readiness_probe():
    return {"message": "Ready!"}


@app.get("/live")
async def liveness_probe():
    return {"message": "Live!"}
```

### Dockerfile

The Dockerfile uses the Python 3.13 base image, installs dependencies, and runs the server with `uvicorn`. Ensure your
server listens on both IPv4 and IPv6 by using `--host *`, as SaladCloud requires IPv6 compatibility.

```dockerfile Dockerfile theme={null}
FROM python:3.13-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY app.py .

# It is important to use `--host *` to allow access on ipv6
# networks, such as SaladCloud.
CMD ["uvicorn", "app:app", "--host", "*", "--port", "8000"]
```

***

## Step 2: Push Your Container Image

Build and push your container image to a registry. In this example, we use
[Docker Hub](https://hub.docker.com/layers/saladtechnologies/misc/hello-world/images/sha256-37cd1bf360e4858a1820b0432f278d83a2eb8e8a75f700df79e481686226b8b4):

```shell theme={null}
docker build -t saladtechnologies/misc:hello-world .
docker push saladtechnologies/misc:hello-world
```

Images up to 35 GB (compressed) are supported.

***

## Step 3: Deploy a Container Group

In the [SaladCloud Portal](https://portal.salad.com):

1. Navigate to your organization and project (e.g., "salad-benchmarking / Default").

2. Click **Deploy a Container Group**.

3. Choose **Custom** (instead of a preconfigured Recipe).

4. Set the name to `hello-world`.

5. Under **Image Source**, enter `saladtechnologies/misc:hello-world`.

6. Set **Replicas** to 3 for high availability across potentially unreliable nodes.

7. Skip env vars and command overrides for this example (optional: use `sleep infinity` for debugging).

8. Configure **Hardware**:
   * CPU: 1 vCPU
   * RAM: 1 GB
   * GPU: None (select one or more if needed; Salad matches your workload to one).

9. Skip **Storage** for this example (note: storage is ephemeral).

***

## Step 4: Configure Network Access

* Click **Add Container Gateway** to expose your app via a load balancer.
* In the configuration panel, set **Port** to `8000`.
* Select **Round Robin** for the load balancing algorithm (Least Connections is preferred for AI workloads).
* Authentication is optional—if enabled, include your Salad API key in the `Salad-Api-Key` header.
* Optionally restrict concurrency to 1 request per instance. Not relevant for this demo, but useful for workloads with
  high vram usage.
* Click **Configure** to save the Container Gateway settings.

***

## Step 5: Set Health Probes

Configure HTTP probes to manage instance lifecycle:

### Startup Probe (`/started`)

* Initial Delay: `0`
* Period: `1s`
* Timeout: `1s`
* Success Threshold: `1`
* Failure Threshold: `5`

### Liveness Probe (`/live`)

* Starts after startup probe succeeds
* Detects deadlocks or unresponsive processes
* Failure Threshold: `3`

### Readiness Probe (`/ready`)

* Controls load balancer routing
* Can be used to reject new traffic during internal queue saturation

Refer to the [probe documentation](https://docs.salad.com/container-engine/explanation/infrastructure-platform/health-probes.md) for full
details.

***

## Step 6: Deploy

* Enable **Auto Start**.
* Click **Deploy**.
* Watch your instances move through “Allocating” → “Starting” → “Running” → “Ready”.
* Each replica is assigned to its own machine.
* You will not be billed while instances are down or being reallocated.

***

## Step 7: Test Your Deployment

* Access the app via the container gateway URL (e.g., `https://tomato-navybean-pm82t0txwjyus8yy.salad.cloud/hello`).
* The response should include the text `Hello, World!` and a machine ID.
* Refreshing may show different machine IDs as traffic is distributed.

***

## Step 8: Monitor and Debug

* **Instance Details**: Run shell commands or inspect logs.
* **System Events**: View instance reallocations, exit codes, and lifecycle events.
* **Container Logs**: View logs across all instances (use an external provider like [Axiom](https://axiom.co) for
  production).

***

## Clean Up

* Click **Stop** to terminate the container group and stop billing.

***

## What's Next?

Explore more in the [SaladCloud Docs](https://docs.salad.com/index.md), including:

* [Container group recipes](https://docs.salad.com/container-engine/reference/recipes/overview.md)
* [Storage](https://docs.salad.com/container-engine/tutorials/performance/high-performance-storage-solutions.md) and
  [checkpointing](https://docs.salad.com/container-engine/explanation/job-processing/long-running-tasks.md)
* [External logging](https://docs.salad.com/container-engine/explanation/infrastructure-platform/external-logging.md)

Happy building! 🚀


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.