Levelrail
Skip to content

Self-host LiteLLM Proxy with Docker ​

One OpenAI-format gateway in front of 100+ model providers, with keys, budgets, and spend tracking.

This page describes the Levelrail template for LiteLLM Proxy (AI). It deploys the services below as one Docker Compose app on your own server.

Project site: https://docs.litellm.ai/docs/simple_proxy.

Recommended memory: about 1024 MiB.

Services, ports and volumes ​

ServiceImageContainer portsVolumes
dbpostgres:16-alpinenone
litellm_db_data -> /var/lib/postgresql/data
litellmghcr.io/berriai/litellm:main-stable4000none

Environment variables ​

ServiceVariableValue
dbPOSTGRES_DBPreset in the template
dbPOSTGRES_PASSWORDGenerated at deploy
dbPOSTGRES_USERPreset in the template
litellmDATABASE_URLGenerated at deploy
litellmLITELLM_MASTER_KEYGenerated at deploy
litellmSTORE_MODEL_IN_DBPreset in the template

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

Deploy LiteLLM Proxy with Levelrail ​

In the dashboard, open Apps, choose New app, then Browse templates, and select LiteLLM Proxy. Review the Compose body and deploy.

With the CLI:

levelrail-cli templates deploy litellm --name my-litellm

See Service template catalog for how templates work, and Getting started if you have not installed Levelrail yet.

More AI templates ​

All templates are listed in the self-host gallery.

Released under the Apache 2.0 License.