Self-host Langflow with Docker
A visual low-code tool for building and deploying multi-agent and RAG workflows in Python.
This page describes the Levelrail template for Langflow (AI). It deploys the services below as one Docker Compose app on your own server.
Project site: https://docs.langflow.org.Recommended memory: about 2048 MiB.
Services, ports and volumes
| Service | Image | Container ports | Volumes |
|---|---|---|---|
db | postgres:16-alpine | none | langflow_db_data -> /var/lib/postgresql/data |
langflow | langflowai/langflow:1.12.3 | 7860 | langflow_data -> /app/langflow |
Environment variables
| Service | Variable | Value |
|---|---|---|
db | POSTGRES_DB | Preset in the template |
db | POSTGRES_PASSWORD | Generated at deploy |
db | POSTGRES_USER | Preset in the template |
langflow | LANGFLOW_AUTO_LOGIN | Preset in the template |
langflow | LANGFLOW_CONFIG_DIR | Preset in the template |
langflow | LANGFLOW_DATABASE_URL | Generated at deploy |
langflow | LANGFLOW_SUPERUSER | Preset in the template |
langflow | LANGFLOW_SUPERUSER_PASSWORD | Generated at deploy |
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 Langflow with Levelrail
In the dashboard, open Apps, choose New app, then Browse templates, and select Langflow. Review the Compose body and deploy.
With the CLI:
levelrail-cli templates deploy langflow --name my-langflowSee 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.