---
title: "Deploy LiteLLM on StackBlaze"
description: "Deploy LiteLLM with managed Postgres, platform email, and a public HTTPS URL. Give every app and teammate its own key with a budget, call any model through one OpenAI-compatible API, and see what each request cost. Bring your own provider keys."
category: "ai, development, utilities"
url: https://www.stackblaze.com/templates/litellm
---

# Deploy LiteLLM

Deploy LiteLLM with managed Postgres, platform email, and a public HTTPS URL. Give every app and teammate its own key with a budget, call any model through one OpenAI-compatible API, and see what each request cost. Bring your own provider keys.

**[Deploy LiteLLM on StackBlaze](https://dashboard.stackblaze.com/new/template/litellm)**

## This stack

- **LiteLLM**: Web service
- **PostgreSQL**: managed database · TCP:5432
- **Email**: platform add-on

## What you get

- **One API for every model**: Call OpenAI, Anthropic, Gemini, Bedrock, a local Ollama model or any other provider LiteLLM supports with the same OpenAI SDK code.
- **Closed by default**: Every API route needs the master key or a virtual key. The master key, the admin password and the encryption key are generated for this instance at deploy.
- **Virtual keys and teams**: Hand out a key per app, person or team, limited to the models you pick, with its own budget and rate limits. Revoke it without touching the provider key.
- **Spend tracking**: Every request is logged with its tokens and cost per key, team and model, so you can see where the money goes.
- **Admin UI**: Add models, create keys and teams, test a key in the playground and read the request logs from the browser.
- **Encrypted provider keys**: Provider API keys added in the UI are stored encrypted in Postgres with a salt key generated at deploy.

## After you deploy

1. **Sign in to the admin UI**: Open the public URL; it lands on the LiteLLM login. Sign in as admin with UI_PASSWORD from the app’s Variables in the dashboard.
2. **Connect your own model (optional)**: For a model you run yourself, such as vLLM on a rented GPU, set under Variables:
3. **Add a model**: Under Models, add a provider and paste its API key, or point a model at an OpenAI-compatible or Ollama endpoint you run.
4. **Create a virtual key and call it**: Under Virtual Keys, create a key for your app with the models and budget it may use, then call your URL’s /v1 endpoint with any OpenAI SDK.

## How it is wired

- **Postgres holds the gateway**: Models, virtual keys, teams, users and spend logs live in the attached database. Redeploy the app and everything is still there.
- **Keep the salt key**: LITELLM_SALT_KEY encrypts the provider keys you add. It is generated once at deploy. Changing it later makes the saved keys unreadable.
- **Email for invites and alerts**: Turn on email alerting in the admin UI and LiteLLM sends invites, new key notices and budget alerts through the platform email add-on.
- **Scale when traffic grows**: The proxy starts with 768 MB reserved and can use up to 2 GB. Raise CPU and RAM from the dashboard when request volume grows.

## Common questions

### How do I sign in after deploy?

Open the public URL and sign in as admin. The password is generated at deploy and shown as UI_PASSWORD in the app’s Variables in the dashboard.

### Is the API open to anyone who finds the URL?

No. Every model and admin route needs the master key (LITELLM_MASTER_KEY) or a virtual key you created. Only the health checks, the login page and the API reference answer without one.

### Can I stop using the shared admin password?

Yes, and LiteLLM recommends it. Invite yourself as an admin under Internal Users, set your own password from the invite link, then turn off the UI_PASSWORD login with the master key (disable_env_credential_login). The master key can turn it back on.

### Does it include a model?

No. LiteLLM routes to the providers you add, with your own API keys, or to a model you host yourself, such as Ollama.

### Can I use a model I host myself?

Yes. Under Variables, set:

### How do my apps call it?

Use any OpenAI SDK with the base URL set to your app’s /v1 endpoint and a virtual key as the API key. The model name is the one you gave the model in LiteLLM.

### Are Enterprise features included?

The open source proxy is included. Features LiteLLM sells under its Enterprise licence, such as SSO for more than five users and audit logs, need a licence key from LiteLLM.

### Can I use my own domain?

Yes. Attach a custom domain from the dashboard. The API, the admin UI and invite links move with it once you update PROXY_BASE_URL.

### What does it cost?

You pay for the compute, storage and bandwidth LiteLLM and Postgres use, not per request or per key. Model usage is billed by your providers.


Source: https://github.com/BerriAI/litellm
