Levelrail
Skip to content

Self-host New API with Docker ​

An LLM gateway and AI asset management system that unifies many model providers.

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

Project site: https://docs.newapi.pro/en/getting-started/.

Recommended memory: about 512 MiB.

Services, ports and volumes ​

ServiceImageContainer portsVolumes
new-apicalciumion/new-api:v0.9.2.03000none
postgrespostgres:16-alpinenone
postgres_data -> /var/lib/postgresql/data
redisredis:7-alpinenone
redis_data -> /data

Environment variables ​

ServiceVariableValue
new-apiERROR_LOG_ENABLEDPreset in the template
new-apiREDIS_CONN_STRINGPreset in the template
new-apiSESSION_SECRETGenerated at deploy
new-apiSQL_DSNGenerated at deploy
new-apiTZPreset in the template
postgresPOSTGRES_DBPreset in the template
postgresPOSTGRES_PASSWORDGenerated at deploy
postgresPOSTGRES_USERPreset 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 New API with Levelrail ​

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

With the CLI:

levelrail-cli templates deploy new-api --name my-new-api

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.