> ## 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.

# Quickstart

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

*Last Updated: January 12, 2026*

<iframe src="https://player.vimeo.com/video/1081576659?transparent=0" width="100%" height="470px" webkitallowfullscreen mozallowfullscreen allowfullscreen allow="fullscreen" />

## 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](/container-engine/explanation/infrastructure-platform/health-probes) 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), including:

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

Happy building! 🚀
