---
title: "Quickstart"
url: "/docs/proxy/docker_quick_start"
canonical_url: "https://docs.litellm.ai/docs/proxy/docker_quick_start"
type: "docs"
last_updated: "2026-11-26"
summary: "Start LiteLLM with one command or one click and go from zero to your first gateway request in about five minutes, using the Admin UI for everything after startup."
related:
  - "/docs/simple_proxy"
  - "/docs/proxy/sync_models_github"
---
# Quickstart

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


Run LiteLLM and PostgreSQL locally, then use the Admin UI to add models, create keys, and send your first request.

**Up and running in a minute**

macOS and Linux:

```bash
curl -fsSL https://raw.githubusercontent.com/BerriAI/litellm/main/litellm/scripts/quickstart.sh | sh
```

Windows (PowerShell):

```powershell
irm https://raw.githubusercontent.com/BerriAI/litellm/main/litellm/scripts/quickstart.ps1 | iex
```

When the command finishes, open the Admin UI. Then you can [add your models](#3-add-your-first-model), [create virtual keys](#5-create-a-virtual-key), and [call the gateway from your apps](#6-call-the-gateway-from-your-app).

## 1. Start LiteLLM

```bash
curl -sSLO https://github.com/BerriAI/litellm/raw/main/litellm/deploy/docker/docker-compose.quickstart.yml
printf 'LITELLM_MASTER_KEY=sk-%s\nLITELLM_SALT_KEY=sk-%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose -f docker-compose.quickstart.yml up -d
```

The [compose file](https://github.com/BerriAI/litellm/blob/f52f26d9c636038c6e3609cc7d17cf625d434c3e/docker/docker-compose.quickstart.yml) starts the full LiteLLM proxy on port 4000 and PostgreSQL. Pin a tested release tag or digest before production.

For Kubernetes, see the [Helm guide](./deploy/helm.md).

Deploy into your own cloud account from Cloud Shell: [AWS](/docs/proxy/deploy/terraform#aws) or [GCP](/docs/proxy/deploy/terraform#gcp) (steps: https://docs.litellm.ai/docs/proxy/deploy.md#1-click-deploy-from-cloud-shell). Use your deployment's URL in place of http://localhost:4000.

:::warning[What the two keys do]
The local setup generates both keys in `.env`. The compose file requires both keys. On a 1-click deploy, set them in the provider's environment.

`LITELLM_MASTER_KEY` authorizes every management API call and serves as the default Admin UI password. The generated `sk-` prefix is optional.

`LITELLM_SALT_KEY` encrypts the provider API keys you add in the UI. It has no in-place rotation, so keep the generated value: changing it later makes every stored credential unreadable until you re-enter it. See [key rotations](./master_key_rotations) for how the two keys relate.
:::

## 2. Log in to the Admin UI

Open [http://localhost:4000/ui](http://localhost:4000/ui). The username is `admin` and the password is the `LITELLM_MASTER_KEY` value in `.env`.

[Image: LiteLLM Admin UI login page]

## 3. Add your first model

Go to **Models + Endpoints**, open the **Add Model** tab, pick your provider and models, and paste your provider API key.

[Image: Add Model form with OpenAI provider and gpt-5.5 selected]

Click **Test Connect** to verify the key against the provider, then **Add Model**. It appears under **Deployed Models** with its pricing already mapped:

[Image: Deployed Models list showing the newly added model with cost data]

:::tip[Keep provider keys out of the UI]
If you prefer to manage provider keys as environment variables, download the compose file, add them to the `litellm` service (for example `OPENAI_API_KEY: ${OPENAI_API_KEY}`), and enter `os.environ/OPENAI_API_KEY` in the API key field instead of the raw key.
:::

## 4. Send a test message

Go to **Playground**, select your model, and send a message. The response includes latency and token counts:

[Image: Playground showing a live response from the model with latency and token metrics]

The **Get Code** button generates the equivalent API call for your language.

## 5. Create a virtual key

Virtual keys are what you hand to applications and teammates instead of raw provider keys. Each key can carry its own budget, rate limits, and model access, and all its spend is tracked automatically.

Go to **Virtual Keys**, click **+ Create New Key**, give it a name, and click **Create Key**:

[Image: Save your Key modal showing the newly created virtual key]

Copy the key now. It is shown only once.

## 6. Call the gateway from your app

The gateway is OpenAI-compatible, so any OpenAI SDK works by pointing it at `http://localhost:4000` with your virtual key.

**curl**

```bash
curl http://localhost:4000/v1/chat/completions \
  -H 'Authorization: Bearer sk-<your-virtual-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gpt-6.1-sol",
    "messages": [{"role": "user", "content": "Say hello in five words."}]
  }'
```

Expected response:

```json
{
  "id": "chatcmpl-DzGKiNRbQ4fe9Mgt8HSHFQ6ApfRJi",
  "model": "gpt-6.1-sol",
  "object": "chat.completion",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "Hello, nice to meet you.",
        "role": "assistant"
      }
    }
  ],
  "usage": {
    "completion_tokens": 70,
    "prompt_tokens": 12,
    "total_tokens": 82
  }
}
```

**OpenAI Python SDK**

```python
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:4000",
    api_key="sk-<your-virtual-key>",
)

response = client.chat.completions.create(
    model="gpt-6.1-sol",
    messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(response.choices[0].message.content)
```

**OpenAI JS SDK**

```javascript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "http://localhost:4000",
  apiKey: "sk-<your-virtual-key>",
});

const response = await client.chat.completions.create({
  model: "gpt-6.1-sol",
  messages: [{ role: "user", content: "Say hello in five words." }],
});
console.log(response.choices[0].message.content);
```

## The whole flow, end to end

## Running without a database

For API access without database-backed model management, virtual keys, or spend tracking, run the same image with a config file:

```yaml
# litellm_config.yaml
model_list:
  - model_name: gpt-6.1-sol
    litellm_params:
      model: openai/gpt-6.1-sol
      api_key: os.environ/OPENAI_API_KEY
```

```bash
export OPENAI_API_KEY="<your-openai-key>"
export LITELLM_MASTER_KEY="sk-<paste-a-long-random-key>"

docker run \
  -v "$PWD/litellm_config.yaml:/app/config.yaml:ro" \
  -e OPENAI_API_KEY \
  -e LITELLM_MASTER_KEY \
  -p 127.0.0.1:4000:4000 \
  docker.litellm.ai/berriai/litellm:latest \
  --config /app/config.yaml
```

Requests authenticate with the master key. See the [full config reference](./configs.md) for everything the file supports.

:::warning[Budgets are not enforced without a database]

`litellm_settings.max_budget` requires a database to load spend and enforce the global budget. Without one, `max_budget: 100` keeps serving requests past $100 with no request error or budget alert. The proxy logs a one-time warning at startup.

Virtual keys also require a database. Requests that carry one fail with `No connected db.`. The master key has no budget of its own.

To enforce LiteLLM budgets, run with a database. Otherwise, configure spending limits at your provider.

:::

## Next steps

Use the [deployment guides](./deploy.md) for Helm and Terraform, and the [production checklist](./prod.md) for hardening and tuning. The repository's [docker-compose.yml](https://github.com/BerriAI/litellm/blob/main/litellm/deploy/compose/docker-compose.yml) includes database, Redis, and Prometheus options.

## Related pages

- [LiteLLM Gateway](https://docs.litellm.ai/docs/simple_proxy.md)
- [Auto Sync New Models](https://docs.litellm.ai/docs/proxy/sync_models_github.md)
