Deploy Langflow from Its Official Docker Image

·3 min read
aiai-agentsdockerself-hostedpythonhow-to

Langflow is a visual development environment for flows and agents. Its official image can run as one container with SQLite, so you can start without provisioning PostgreSQL. The crucial storage detail is to put both the configuration directory and SQLite database on the volume.

This recipe targets the image version used in the current upstream Docker examples and was checked on October 28, 2026. It has not been live-tested on JustRunMy.App. See the official-image comparison for other options.

Open the pre-filled form

Configure Langflow on JustRunMy.App

Before Create, add LANGFLOW_SUPERUSER_PASSWORD with a unique strong password. No secret is included in the link.

Field Value
Image langflowai/langflow:1.13.0
Registry Docker Hub
Run command Leave empty
Volume /app/langflow
Container port and protocol 7860, HTTPS

The upstream Docker guide documents this pinned image and a single-container SQLite configuration. Pinning makes the recipe easier to reproduce; check the project's releases and security updates before deployment rather than assuming any fixed version remains suitable indefinitely.

Confirm the environment settings

The link supplies the following non-secret values:

LANGFLOW_CONFIG_DIR=/app/langflow
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true
LANGFLOW_AUTO_LOGIN=false
LANGFLOW_HOST=0.0.0.0
LANGFLOW_PORT=7860

Add these privately:

  • LANGFLOW_SUPERUSER: your chosen operator username, or use the default langflow.
  • LANGFLOW_SUPERUSER_PASSWORD: your unique password.
  • LANGFLOW_SECRET_KEY: a securely generated random secret that you retain across recreations.

The environment-variable reference documents these controls. Keep automatic login disabled. Configure the model provider's credentials through the application's credential settings or the supported environment/global-variable mechanism for your flow; a running editor does not automatically have a usable model.

The paired storage settings matter: mounting /app/langflow alone does not move SQLite there. With LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true, the database follows the config directory. Preserve the whole directory, including files and the credential-encryption secret, across image replacements.

Create a small flow

Select CPU, RAM, and disk before creating the app. Langflow's Python dependencies and executed components need more headroom than a minimal polling bot; measure startup and your actual flow before selecting a long-term allocation. A remote model API avoids local inference hardware, but still incurs provider charges.

Open the generated HTTPS address, sign in, and create a small flow connecting chat input, a remote chat model, and chat output. Run a short prompt in the playground. Add an Agent component and one bounded tool only after the basic model call succeeds. Store the model key as a credential rather than literal text in an exported flow.

Keep editor access limited to trusted operators

Langflow's security documentation describes the editor as a code-execution environment. Application accounts do not isolate mutually untrusted users from the process, its files, or its network. This recipe is for an operator or trusted team; it does not establish a safe public multi-tenant agent service.

If a flow requires a separate database, MCP server, sandbox, or external executable, account for that dependency explicitly. Components needing packages absent from the official image exceed this recipe's no-custom-image scope. A generic deploy link cannot install them for you.

Verify persistence and execution

  1. In a private browser window, confirm that editor access requires authentication.
  2. Run the basic flow and confirm a real model response.
  3. Save the flow and a provider credential, then recreate the container through a configuration change.
  4. Sign in again and rerun the saved flow. This checks that the database and the key needed to decrypt credentials both survived.
  5. Test each required tool separately and check logs and memory while it executes.

A startup permission error can mean the volume is not writable by the image's user; the upstream guide notes UID 1000. A missing flow after recreation usually points to the database living outside the volume. Consult the upstream Docker guide's persistence section before changing paths on an existing installation.

Back up the volume before upgrades. Keep database copies and their corresponding encryption secret together. See volumes and resource limits for platform behavior, or AnythingLLM for a document-assistant interface.