Langflow
What is Langflow?
Langflow is a visual builder for LLM apps and AI agents. You wire components together on a canvas, then call the finished flow from Laravel over HTTP. Its components are plain Python, so you can drop into code for a custom step instead of being limited to the built-in nodes.
Langflow and Flowise solve the same problem in different ecosystems, the same way Laradock ships both MySQL and PostgreSQL. Pick whichever fits: Langflow if you want Python-native components, Flowise if you want a Node-based builder.
Start Langflow
- Laradock CLI
- Docker Compose
./laradock start langflow
docker compose up -d langflow
First boot takes a minute or two while Langflow initializes its database.
Stop Langflow
Stopping just pauses the container; your flows are safe (kept in the langflow Docker volume):
- Laradock CLI
- Docker Compose
./laradock stop langflow
docker compose stop langflow
To delete the container entirely (the langflow volume, and everything in it, is still untouched):
- Laradock CLI
- Docker Compose
./laradock remove langflow
docker compose rm -sf langflow
Configuration
All settings live in langflow/defaults.env and can be overridden by adding the same line to your own .env:
| Variable | Default | What it does |
|---|---|---|
LANGFLOW_VERSION | latest | Image tag from the langflowai/langflow Docker Hub image. |
LANGFLOW_HOST_PORT | 3021 | Host-side port the Langflow builder/API is published on (container port 7860). |
LANGFLOW_SUPERUSER | admin | Username for the Langflow admin account. |
LANGFLOW_SUPERUSER_PASSWORD | secret | Password for the Langflow admin account. Change this if the port is reachable by anyone but you. |
Langflow refuses to boot without a superuser set, so Laradock ships admin / secret by default to keep first run zero-config. Those defaults are for local development only, override both in your .env before exposing Langflow beyond localhost.
The account is created from these values on first boot only, when the database in the langflow volume is initialized. Changing them later won't update an existing account; change the password from inside the Langflow UI, or wipe the volume (see Start completely fresh) to re-seed.
Flows, credentials, and run history persist in the langflow volume at /app/langflow across restarts.
Change the Langflow version
Set the version in your .env:
LANGFLOW_VERSION=latest
Then apply the change:
- Laradock CLI
- Docker Compose
./laradock rebuild langflow
docker compose build langflow
Flows and credentials live in the langflow volume, separate from the image, so changing versions doesn't touch your data. Restart the container after rebuilding: ./laradock restart langflow.
Connect
Open the builder at http://localhost:3021 and log in with admin / secret (or whatever you set LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD to). Health check: /health returns {"status":"ok"}. Once you've built a flow, call it from your app at /api/v1/run/{flow_id} (the Langflow UI shows the exact endpoint and payload for each flow under its API panel); from inside another container that's reachable at http://langflow:7860.
Use it with the rest of your stack
Langflow talks to the other Laradock AI services over the backend network, so point its components at container names rather than localhost:
- Ollama for local models:
http://ollama:11434 - Qdrant for vector storage:
http://qdrant:6333 - LiteLLM as one OpenAI-compatible endpoint in front of every provider:
http://litellm:4000
Backup and restore
Langflow stores flows, credentials, and run history in a named Docker volume (not a bind-mounted host folder), so back it up by copying the container's data directory out to your host while the container is running:
- Laradock CLI
- Docker Compose
./laradock cp langflow:/app/langflow ./langflow-backup
docker compose cp langflow:/app/langflow ./langflow-backup
To restore, copy a backup folder back in (the container must already exist), then restart:
- Laradock CLI
- Docker Compose
./laradock cp ./langflow-backup/. langflow:/app/langflow
docker compose cp ./langflow-backup/. langflow:/app/langflow
Restart afterward: ./laradock restart langflow.
Start completely fresh (wipe all data)
To throw away every flow, credential, and run history and start Langflow from a clean, empty state (⚠️ this permanently deletes everything in the langflow volume, back up first if you need anything):
- Laradock CLI
- Docker Compose
./laradock stop langflow
./laradock remove langflow
docker volume rm $(docker volume ls -q --filter name=langflow)
./laradock start langflow
docker compose stop langflow
docker compose rm -sf langflow
docker volume rm $(docker volume ls -q --filter name=langflow)
docker compose up -d langflow
Langflow's data lives in a named Docker volume, not a DATA_PATH_HOST folder, so removing the container alone doesn't touch it, you have to remove the volume too. The filter matches on the volume name containing langflow, if you run multiple Laradock projects on the same machine, check docker volume ls | grep langflow first and remove the exact one for this project.
Common issues
- Builder is blank or errors on first load. Langflow initializes its database on first boot and the UI can be reachable before that finishes. Give it a minute, then reload; check progress with
./laradock logs langflow. - Container keeps restarting with
ValueError: Username and password must be set. Langflow won't boot without a superuser. Laradock sets one inlangflow/defaults.env, so this means both values resolved to empty, usually from an override in your own.env. SetLANGFLOW_SUPERUSERandLANGFLOW_SUPERUSER_PASSWORDto non-empty values. Note Langflow also rejects its own legacy default password (langflow), pick anything else. - Login fails with the credentials in your
.env. The account is seeded on first boot only. If you changed the values after the volume already existed, the old account is still in force. Change the password in the UI, or wipe the volume to re-seed. - Can't reach the API from your Laravel app. From inside another container, use
http://langflow:7860, notlocalhost:3021, the host port only applies from outside Docker. - A flow can't reach Ollama or a vector DB. Use the container name (
http://ollama:11434), notlocalhost. Inside the Langflow container,localhostis Langflow itself. - Port already in use on your host. Change
LANGFLOW_HOST_PORTin.envand restart:./laradock restart langflow. - Flows disappeared after recreating the container. Data lives in the
langflownamed volume, not the container itself, so./laradock remove langflowfollowed by./laradock start langflowis safe. It's only gone if the volume itself was removed (see Start completely fresh above), or if you ran rawdocker compose down -vfor the whole project, which removes volumes for every service.
Prefer a Node-based builder for the same job? See Flowise. Want general-purpose automation with AI nodes attached? See n8n. New to Laradock? Start with Getting Started.