Files
langflow/configuration-cli.html
2026-04-02 14:55:15 +00:00

190 lines
54 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-Develop/configuration-cli" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.9.2">
<title data-rh="true">Langflow CLI | Langflow Documentation</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://docs.langflow.org/configuration-cli"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Langflow CLI | Langflow Documentation"><meta data-rh="true" name="description" content="The Langflow command line interface is the main interface for managing and running the Langflow server."><meta data-rh="true" property="og:description" content="The Langflow command line interface is the main interface for managing and running the Langflow server."><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.langflow.org/configuration-cli"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/configuration-cli" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/configuration-cli" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://UZK6BDPCVY-dsn.algolia.net" crossorigin="anonymous"><script data-rh="true" type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Use the Langflow CLI","item":"https://docs.langflow.org/configuration-cli"}]}</script><link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SLQFLQ3KPT"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-SLQFLQ3KPT",{})</script>
<link rel="search" type="application/opensearchdescription+xml" title="Langflow Documentation" href="/opensearch.xml">
<script>window._ibmAnalytics={settings:{name:"DataStax",tealiumProfileName:"ibm-subsidiary"},trustarc:{privacyPolicyLink:"https://ibm.com/privacy"},"digitalData.page.services.google.enabled":!0},window.digitalData={page:{pageInfo:{ibm:{siteId:"IBM_"+_ibmAnalytics.settings.name},segment:{enabled:!0,env:"prod",key:"B04fNhD06DqDPuaRfQl5lZ2iQICdxxuh",coremetrics:!1,carbonComponentEvents:!1}},category:{primaryCategory:"PC230"}},commonProperties:{productTitle:"IBM Elite Support for Langflow",productCode:"5900BUB",productCodeType:"WWPC",UT30:"30AS5",instanceId:"docs-site",subscriptionId:"public-access",productPlanName:"Public",productPlanType:"freemium",userId:"IBMid-ANONYMOUS"}}</script>
<script src="//1.www.s81c.com/common/stats/ibm-common.js" async="true"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@550;600&amp;display=swap">
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("consent","default",{ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied"})</script>
<script>!function(){function e(){if(void 0!==window.truste&&window.truste.cma){var e=window.truste.cma.callApi("getConsent",window.location.href)||{},n=1===e[2],t=1===e[3];gtag("consent","update",{ad_storage:n?"granted":"denied",ad_user_data:n?"granted":"denied",ad_personalization:n?"granted":"denied",analytics_storage:t?"granted":"denied"})}}window.addEventListener&&(window.addEventListener("cm_data_subject_consent_changed",e),window.addEventListener("cm_consent_preferences_set",e)),"complete"===document.readyState?e():window.addEventListener("load",e)}()</script><link rel="stylesheet" href="/assets/css/styles.ba773e30.css">
<script src="/assets/js/runtime~main.23b610af.js" defer="defer"></script>
<script src="/assets/js/main.e8d613fb.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<svg style="display: none;"><defs>
<symbol id="theme-svg-external-link" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
</defs></svg>
<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="theme-layout-navbar navbar navbar--fixed-top navbarHideable_m1mJ"><div class="navbar__inner"><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/lf-docs-light.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div></a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a href="https://github.com/langflow-ai/langflow" target="_blank" class="navbar__item navbar__link header-github-link" data-event="UI Interaction" data-action="clicked" data-channel="docs" data-element-id="social-github" data-namespace="header" data-platform-title="Langflow"></a><a href="https://twitter.com/langflow_ai" target="_blank" class="navbar__item navbar__link header-twitter-link" data-event="UI Interaction" data-action="clicked" data-channel="docs" data-element-id="social-twitter" data-namespace="header" data-platform-title="Langflow"></a><a href="https://discord.gg/EqksyE2EX9" target="_blank" class="navbar__item navbar__link header-discord-link" data-event="UI Interaction" data-action="clicked" data-channel="docs" data-element-id="social-discord" data-namespace="header" data-platform-title="Langflow"></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP systemToggleIcon_QzmC"><path fill="currentColor" d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search (Meta+k)" aria-keyshortcuts="Meta+k"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="8" stroke="currentColor" fill="none" stroke-width="1.4"></circle><path d="m21 21-4.3-4.3" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="theme-layout-main main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd sidebarWithHideableNavbar_wUlq"><a tabindex="-1" class="sidebarLogo_isFc" href="/"><img src="/img/lf-docs-light.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></a><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/"><span title="Get started" class="categoryLinkLabel_W154">Get started</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/concepts-overview"><span title="Flows" class="categoryLinkLabel_W154">Flows</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/agents"><span title="Agents" class="categoryLinkLabel_W154">Agents</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/mcp-client"><span title="Model Context Protocol (MCP)" class="categoryLinkLabel_W154">Model Context Protocol (MCP)</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" href="/api-keys-and-authentication"><span title="Develop" class="categoryLinkLabel_W154">Develop</span></a></div><ul class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/api-keys-and-authentication"><span title="API keys and authentication" class="linkLabel_WmDU">API keys and authentication</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/jwt-authentication"><span title="JWT authentication" class="linkLabel_WmDU">JWT authentication</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/install-custom-dependencies"><span title="Install custom dependencies" class="linkLabel_WmDU">Install custom dependencies</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/configuration-global-variables"><span title="Global variables" class="linkLabel_WmDU">Global variables</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/environment-variables"><span title="Environment variables" class="linkLabel_WmDU">Environment variables</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/concepts-file-management"><span title="Storage and memory" class="categoryLinkLabel_W154">Storage and memory</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/logging"><span title="Observability" class="categoryLinkLabel_W154">Observability</span></a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/data-types"><span title="Use Langflow data types" class="linkLabel_WmDU">Use Langflow data types</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/concepts-voice-mode"><span title="Use voice mode" class="linkLabel_WmDU">Use voice mode</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/configuration-cli"><span title="Use the Langflow CLI" class="linkLabel_WmDU">Use the Langflow CLI</span></a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/deployment-overview"><span title="Deploy" class="categoryLinkLabel_W154">Deploy</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/concepts-components"><span title="Components reference" class="categoryLinkLabel_W154">Components reference</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/api-reference-api-examples"><span title="API reference" class="categoryLinkLabel_W154">API reference</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/contributing-community"><span title="Contribute" class="categoryLinkLabel_W154">Contribute</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/troubleshoot"><span title="Support" class="categoryLinkLabel_W154">Support</span></a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 sidebar-ad">
<a href="https://www.langflow.org/desktop" target="_blank" class="menu__link">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1645_37)">
<path d="M12 17H20C21.1046 17 22 16.1046 22 15V13M12 17H4C2.89543 17 2 16.1046 2 15V5C2 3.89543 2.89543 3 4 3H10M12 17V21M8 21H12M12 21H16M11.75 10.2917H13.2083L16.125 7.375H17.5833L20.5 4.45833H21.9583M16.125 11.75H17.5833L20.5 8.83333H21.9583M11.75 5.91667H13.2083L16.125 3H17.5833" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_1645_37">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
<div class="sidebar-ad-text-container">
<span class="sidebar-ad-text">Get started in minutes</span>
<span class="sidebar-ad-text sidebar-ad-text-gradient">Download Langflow Desktop</span>
</div>
</a>
</li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Develop</span></li><li class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link">Use the Langflow CLI</span></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Langflow CLI</h1></header><style>[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }</style>
<!-- -->
<p>The Langflow command line interface is the main interface for managing and running the Langflow server.</p>
<p>The Langflow CLI is automatically installed when you <a class="" href="/get-started-installation">install the Langflow package</a>.
It isn&#x27;t available for Langflow Desktop.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="how-to-use-the-cli">How to use the CLI<a href="#how-to-use-the-cli" class="hash-link" aria-label="Direct link to How to use the CLI" title="Direct link to How to use the CLI" translate="no"></a></h2>
<p>The Langflow CLI can be invoked in several ways, depending on your installation method and environment.</p>
<p>The recommended approach is to run the CLI with <code>uv run</code> from within a virtual environment where Langflow is installed.</p>
<p>For example, to start Langflow on the default port, run the following command:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow run</span></div></div><br></code></div></div>
<p>If Langflow is installed globally or added to your PATH, you can execute the CLI directly with <code>langflow</code>.</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow run</span></div></div><br></code></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="precedence">Precedence<a href="#precedence" class="hash-link" aria-label="Direct link to Precedence" title="Direct link to Precedence" translate="no"></a></h2>
<p>Langflow CLI options override the values of <a class="" href="/environment-variables">environment variables</a> set in your terminal or primary <code>.env</code> file.</p>
<p>For example, if you have <code>LANGFLOW_PORT=7860</code> defined as an environment variable, and you run the CLI with <code>--port 7880</code>, then Langflow sets the port to <code>7880</code> because the CLI option overrides the environment variable.</p>
<p>This also applies to Boolean environment variables.
For example, if you set <code>LANGFLOW_REMOVE_API_KEYS=True</code> in your <code>.env</code> file, you can change it to <code>False</code> at runtime by running the CLI with <code>--no-remove-api-keys</code>.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="langflow-cli-options">Langflow CLI options<a href="#langflow-cli-options" class="hash-link" aria-label="Direct link to Langflow CLI options" title="Direct link to Langflow CLI options" translate="no"></a></h2>
<p>All Langflow CLI commands support options that modify the command&#x27;s behavior or set environment variables.</p>
<p>To set values for options, you can use either of the following syntax styles:</p>
<ul>
<li class=""><code>--option value</code></li>
<li class=""><code>--option=value</code></li>
</ul>
<p>Values with spaces must be surrounded by quotation marks:</p>
<ul>
<li class=""><code>--option &#x27;Value with Spaces&#x27;</code></li>
<li class=""><code>--option=&quot;Value with Spaces&quot;</code></li>
</ul>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="boolean-options">Boolean options<a href="#boolean-options" class="hash-link" aria-label="Direct link to Boolean options" title="Direct link to Boolean options" translate="no"></a></h3>
<p>Boolean options enable and disable settings.
They have a true (enabled) and false (disabled) form:</p>
<ul>
<li class="">Enabled (true): <code>--option</code></li>
<li class="">Disabled (false): <code>--no-option</code></li>
</ul>
<p>The following examples compare Boolean option forms for <code>REMOVE_API_KEYS</code>.</p>
<div class="theme-tabs-container tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">True</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LNqP">False</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><p><code>--remove-api-keys</code> is equivalent to setting <code>LANGFLOW_REMOVE_API_KEYS=True</code> in <code>.env</code>:</p><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow run --remove-api-keys</span></div></div><br></code></div></div></div><div role="tabpanel" class="tabItem_Ymn6" hidden=""><p><code>--no-remove-api-keys</code> is equivalent to <code>LANGFLOW_REMOVE_API_KEYS=False</code> in <code>.env</code>:</p><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow run --no-remove-api-keys</span></div></div><br></code></div></div></div></div></div>
<p>In the following command references, default values for Booleans include both the CLI flag and the equivalent Boolean evaluation, such as &quot;<code>--option</code> (true)&quot; and &quot;<code>--no-option</code> (false)&quot;.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="universal-options">Universal options<a href="#universal-options" class="hash-link" aria-label="Direct link to Universal options" title="Direct link to Universal options" translate="no"></a></h3>
<p>The following options are available for all Langflow CLI commands:</p>
<ul>
<li class=""><code>--version</code>, <code>-v</code>: Show the version and exit.</li>
<li class=""><code>--install-completion</code>: Install auto-completion for the current shell.</li>
<li class=""><code>--show-completion</code>: Show the location of the auto-completion config file, if installed.</li>
<li class=""><code>--help</code>: Print information about command usage, options, and arguments.</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="cli-commands">CLI commands<a href="#cli-commands" class="hash-link" aria-label="Direct link to CLI commands" title="Direct link to CLI commands" translate="no"></a></h2>
<p>The following sections describe the available CLI commands and any additional options (beyond the <a href="#universal-options" class="">universal options</a>) available for each command.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="langflow">langflow<a href="#langflow" class="hash-link" aria-label="Direct link to langflow" title="Direct link to langflow" translate="no"></a></h3>
<p>Running the CLI without any arguments prints a list of available options and commands.</p>
<div class="theme-tabs-container tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">uv (recommended)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LNqP">Direct</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow</span></div></div><br></code></div></div></div><div role="tabpanel" class="tabItem_Ymn6" hidden=""><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow</span></div></div><br></code></div></div></div></div></div>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="langflow-api-key">langflow api-key<a href="#langflow-api-key" class="hash-link" aria-label="Direct link to langflow api-key" title="Direct link to langflow api-key" translate="no"></a></h3>
<p>Creates a Langflow API key.</p>
<p>You must be a superuser to create API keys with the CLI.
For more information, see <a class="" href="/api-keys-and-authentication#langflow-api-keys">Langflow API keys</a>.</p>
<div class="theme-tabs-container tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">uv (recommended)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LNqP">Direct</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow api-key</span></div></div><br></code></div></div></div><div role="tabpanel" class="tabItem_Ymn6" hidden=""><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow api-key</span></div></div><br></code></div></div></div></div></div>
<h4 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="options">Options<a href="#options" class="hash-link" aria-label="Direct link to Options" title="Direct link to Options" translate="no"></a></h4>
<table><thead><tr><th>Option</th><th>Default</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>--log-level</code></td><td><code>error</code></td><td>String</td><td>The logging level. One of <code>debug</code>, <code>info</code>, <code>warning</code>, <code>error</code>, or <code>critical</code>.</td></tr></tbody></table>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="langflow-copy-db">langflow copy-db<a href="#langflow-copy-db" class="hash-link" aria-label="Direct link to langflow copy-db" title="Direct link to langflow copy-db" translate="no"></a></h3>
<p>Copies the Langflow database files from the cache directory to the current Langflow installation directory, which is the directory containing <code>__main__.py</code>.
You can find the copy target directory by running <code>which langflow</code>.</p>
<p>The following files are copied if they exist in the cache directory:</p>
<ul>
<li class=""><code>langflow.db</code>: The main Langflow database, stored in the user cache directory</li>
<li class=""><code>langflow-pre.db</code>: The pre-release database, if it exists</li>
</ul>
<div class="theme-tabs-container tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">uv (recommended)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LNqP">Direct</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow copy-db</span></div></div><br></code></div></div></div><div role="tabpanel" class="tabItem_Ymn6" hidden=""><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow copy-db</span></div></div><br></code></div></div></div></div></div>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="langflow-migration">langflow migration<a href="#langflow-migration" class="hash-link" aria-label="Direct link to langflow migration" title="Direct link to langflow migration" translate="no"></a></h3>
<p>Manages Langflow database schema changes using <a href="https://alembic.sqlalchemy.org/en/latest/" target="_blank" rel="noopener noreferrer" class="">Alembic</a>, a database migration tool for SQLAlchemy.</p>
<p>The <code>migration</code> command has two modes:</p>
<ul>
<li class="">
<p><strong>Test mode (default)</strong>: Checks if migrations can be applied safely without actually running the migrations.
Use this mode to previews the changes that would be made to the database schema before proceeding with the migrations.</p>
</li>
<li class="">
<p><strong>Fix mode</strong>: Applies the migrations to update the database schema.</p>
<div class="theme-admonition theme-admonition-warning admonition_xJq3 alert alert--warning"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>warning</div><div class="admonitionContent_BuS1"><p><code>langflow migration --fix</code> is a destructive operation that can delete data.
Always run <code>langflow migration</code> first to preview the changes.</p></div></div>
</li>
</ul>
<div class="theme-tabs-container tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">uv (recommended)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LNqP">Global</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><ol>
<li class="">Run test mode:</li>
</ol><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow migration</span></div></div><br></code></div></div><ol start="2">
<li class="">
<p>Preview the changes returned by the test to determine if it&#x27;s safe to proceed with the migration.</p>
</li>
<li class="">
<p>Run fix mode to apply the changes:</p>
</li>
</ol><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow migration --fix</span></div></div><br></code></div></div></div><div role="tabpanel" class="tabItem_Ymn6" hidden=""><ol>
<li class="">Run test mode:</li>
</ol><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow migration</span></div></div><br></code></div></div><ol start="2">
<li class="">
<p>Preview the changes returned by the test to determine if it&#x27;s safe to proceed with the migration.</p>
</li>
<li class="">
<p>Run fix mode to apply the changes:</p>
</li>
</ol><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow migration --fix</span></div></div><br></code></div></div></div></div></div>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="langflow-run">langflow run<a href="#langflow-run" class="hash-link" aria-label="Direct link to langflow run" title="Direct link to langflow run" translate="no"></a></h3>
<p>Starts the Langflow server.</p>
<div class="theme-tabs-container tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">uv (recommended)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LNqP">Direct</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow run [OPTIONS]</span></div></div><br></code></div></div></div><div role="tabpanel" class="tabItem_Ymn6" hidden=""><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow run [OPTIONS]</span></div></div><br></code></div></div></div></div></div>
<h4 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="options-1">Options<a href="#options-1" class="hash-link" aria-label="Direct link to Options" title="Direct link to Options" translate="no"></a></h4>
<p>This command supports some common and non-sensitive configuration options for your Langflow server.
Other options must be set in the <code>.env</code> or your terminal.
For more information Langflow configuration options, see <a class="" href="/environment-variables">Langflow environment variables</a>.</p>
<table><thead><tr><th>Option</th><th>Default</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>--auto-saving</code></td><td><code>--auto-saving</code> (true)</td><td>Boolean</td><td>Whether to enable flow auto-saving in the visual editor. Use <code>--no-auto-saving</code> to disable flow auto-saving.</td></tr><tr><td><code>--auto-saving-interval</code></td><td><code>1000</code></td><td>Integer</td><td>The interval for flow auto-saving in milliseconds.</td></tr><tr><td><code>--backend-only</code></td><td><code>--no-backend-only</code> (false)</td><td>Boolean</td><td>Whether to run Langflow&#x27;s backend service only (no frontend). Omit or use <code>--no-backend-only</code> to start both the frontend and backend. See <a href="#start-langflow-in-headless-mode" class="">Start Langflow in headless mode</a>.</td></tr><tr><td><code>--cache</code></td><td><code>async</code></td><td>String</td><td>The type of <a class="" href="/memory">cache storage</a> to use. One of <code>async</code>, <code>redis</code>, <code>memory</code>, or <code>disk</code>.</td></tr><tr><td><code>--components-path</code></td><td>Not set</td><td>String</td><td>The path to the directory containing your custom components.</td></tr><tr><td><code>--dev</code></td><td><code>--no-dev</code> (false)</td><td>Boolean</td><td>Whether to run in development mode (may contain bugs).</td></tr><tr><td><code>--env-file</code></td><td>Not set</td><td>String</td><td>The path to the <code>.env</code> file containing Langflow environment variables. See <a href="#start-langflow-with-a-specific-env-file" class="">Start Langflow with a specific .env file</a>.</td></tr><tr><td><code>--frontend-path</code></td><td>Not set</td><td>String</td><td>The path to the frontend directory containing build files. This is only used when <a class="" href="/contributing-how-to-contribute">contributing to the Langflow codebase</a> or developing a custom Langflow image that includes customized frontend code.</td></tr><tr><td><code>--health-check-max-retries</code></td><td><code>5</code></td><td>Integer</td><td>The maximum number of retries for your Langflow server&#x27;s health check.</td></tr><tr><td><code>--host</code></td><td><code>localhost</code></td><td>String</td><td>The host on which the Langflow server will run.</td></tr><tr><td><code>--log-file</code></td><td><code>logs/langflow.log</code></td><td>String</td><td>The path to the log file for Langflow.</td></tr><tr><td><code>--log-level</code></td><td><code>critical</code></td><td>String</td><td>The logging level as one of <code>debug</code>, <code>info</code>, <code>warning</code>, <code>error</code>, or <code>critical</code>.</td></tr><tr><td><code>--log-rotation</code></td><td>Not set</td><td>String</td><td>The log rotation interval, either a time duration or file size.</td></tr><tr><td><code>--max-file-size-upload</code></td><td><code>1024</code></td><td>Integer</td><td>The maximum size in megabytes for file uploads.</td></tr><tr><td><code>--open-browser</code></td><td><code>--no-open-browser</code> (false)</td><td>Boolean</td><td>Whether to open the system web browser on startup. Use <code>--open-browser</code> to open the system&#x27;s default web browser when Langflow starts.</td></tr><tr><td><code>--port</code></td><td><code>7860</code></td><td>Integer</td><td>The port on which the Langflow server will run. The server automatically selects a free port if the specified port is in use.</td></tr><tr><td><code>--remove-api-keys</code></td><td><code>--no-remove-api-keys</code> (false)</td><td>Boolean</td><td>Whether to remove API keys and tokens from flows saved in the Langflow database.</td></tr><tr><td><code>--ssl-cert-file-path</code></td><td>Not set</td><td>String</td><td>The path to the SSL certificate file on the local system for SSL-encrypted connections.</td></tr><tr><td><code>--ssl-key-file-path</code></td><td>Not set</td><td>String</td><td>The path to the SSL key file on the local system for SSL-encrypted connections.</td></tr><tr><td><code>--worker-timeout</code></td><td><code>300</code></td><td>Integer</td><td>The Langflow server worker timeout in seconds.</td></tr><tr><td><code>--workers</code></td><td><code>1</code></td><td>Integer</td><td>The number of Langflow server worker processes.</td></tr></tbody></table>
<h4 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="start-langflow-with-a-specific-env-file">Start Langflow with a specific .env file<a href="#start-langflow-with-a-specific-env-file" class="hash-link" aria-label="Direct link to Start Langflow with a specific .env file" title="Direct link to Start Langflow with a specific .env file" translate="no"></a></h4>
<p>The <code>--env-file</code> option starts Langflow using the configuration defined in the given <code>.env</code> file.
Additional options appended to this command override the values in the <code>.env</code> file if there are duplicates.</p>
<p>If <code>--env-file</code> is omitted or doesn&#x27;t include all required variables, Langflow uses the default values for those variables.</p>
<div class="theme-tabs-container tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">uv (recommended)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LNqP">Direct</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow run --env-file PATH/TO/LANGFLOW/.env</span></div></div><br></code></div></div></div><div role="tabpanel" class="tabItem_Ymn6" hidden=""><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow run --env-file PATH/TO/LANGFLOW/.env</span></div></div><br></code></div></div></div></div></div>
<h4 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="start-langflow-in-headless-mode">Start Langflow in headless mode<a href="#start-langflow-in-headless-mode" class="hash-link" aria-label="Direct link to Start Langflow in headless mode" title="Direct link to Start Langflow in headless mode" translate="no"></a></h4>
<p>The <code>--backend-only</code> option starts Langflow&#x27;s backend service only.
This headless mode has no frontend (visual editor), and you can only access the server programmatically with the Langflow API and CLI.</p>
<div class="theme-tabs-container tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">uv (recommended)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LNqP">Direct</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow run --backend-only</span></div></div><br></code></div></div></div><div role="tabpanel" class="tabItem_Ymn6" hidden=""><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow run --backend-only</span></div></div><br></code></div></div></div></div></div>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="langflow-superuser">langflow superuser<a href="#langflow-superuser" class="hash-link" aria-label="Direct link to langflow superuser" title="Direct link to langflow superuser" translate="no"></a></h3>
<p>Creates a superuser account with the given username and password.</p>
<div class="theme-tabs-container tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">uv (recommended)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_LNqP">Direct</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>uv run langflow superuser --username [NAME] --password [PASSWORD] [OPTIONS]</span></div></div><br></code></div></div></div><div role="tabpanel" class="tabItem_Ymn6" hidden=""><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>langflow superuser --username [NAME] --password [PASSWORD] [OPTIONS]</span></div></div><br></code></div></div></div></div></div>
<h4 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="options-2">Options<a href="#options-2" class="hash-link" aria-label="Direct link to Options" title="Direct link to Options" translate="no"></a></h4>
<table><thead><tr><th>Option</th><th>Default</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>--log-level</code></td><td><code>error</code></td><td>String</td><td>The logging level. One of <code>debug</code>, <code>info</code>, <code>warning</code>, <code>error</code>, or <code>critical</code>.</td></tr></tbody></table>
<p>For this command, <code>--username</code> and <code>--password</code> aren&#x27;t optional, and they have no default value.
The command fails if you don&#x27;t provide these arguments.
For more information, see <a class="" href="/api-keys-and-authentication#langflow-superuser"><code>LANGFLOW_SUPERUSER</code> and <code>LANGFLOW_SUPERUSER_PASSWORD</code></a>.</p>
<h4 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="disable-cli-superuser-creation">Disable CLI superuser creation<a href="#disable-cli-superuser-creation" class="hash-link" aria-label="Direct link to Disable CLI superuser creation" title="Direct link to Disable CLI superuser creation" translate="no"></a></h4>
<p>The <code>langflow superuser</code> command is controlled by the <a class="" href="/api-keys-and-authentication#langflow-enable-superuser-cli"><code>LANGFLOW_ENABLE_SUPERUSER_CLI</code></a> environment variable:</p>
<ul>
<li class=""><strong><code>LANGFLOW_ENABLE_SUPERUSER_CLI=True</code> (default)</strong>: The <code>langflow superuser</code> command is available, and superuser creation is unrestricted.</li>
<li class=""><strong><code>LANGFLOW_ENABLE_SUPERUSER_CLI=False</code> (recommended)</strong>: Disables the <code>langflow superuser</code> command.
For security reasons, this is recommended to prevent unauthorized superuser creation, especially in production environments.</li>
</ul>
<p>To disable the <code>langflow superuser</code> command, you must set <code>LANGFLOW_ENABLE_SUPERUSER_CLI=False</code> in your Langflow <code>.env</code> file, and then <a href="#start-langflow-with-a-specific-env-file" class="">start Langflow with your <code>.env</code> file</a>.</p></div></article><nav class="docusaurus-mt-lg pagination-nav" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/concepts-voice-mode"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Use voice mode</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/deployment-overview"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Langflow deployment overview</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#how-to-use-the-cli" class="table-of-contents__link toc-highlight">How to use the CLI</a></li><li><a href="#precedence" class="table-of-contents__link toc-highlight">Precedence</a></li><li><a href="#langflow-cli-options" class="table-of-contents__link toc-highlight">Langflow CLI options</a><ul><li><a href="#boolean-options" class="table-of-contents__link toc-highlight">Boolean options</a></li><li><a href="#universal-options" class="table-of-contents__link toc-highlight">Universal options</a></li></ul></li><li><a href="#cli-commands" class="table-of-contents__link toc-highlight">CLI commands</a><ul><li><a href="#langflow" class="table-of-contents__link toc-highlight">langflow</a></li><li><a href="#langflow-api-key" class="table-of-contents__link toc-highlight">langflow api-key</a></li><li><a href="#langflow-copy-db" class="table-of-contents__link toc-highlight">langflow copy-db</a></li><li><a href="#langflow-migration" class="table-of-contents__link toc-highlight">langflow migration</a></li><li><a href="#langflow-run" class="table-of-contents__link toc-highlight">langflow run</a></li><li><a href="#langflow-superuser" class="table-of-contents__link toc-highlight">langflow superuser</a></li></ul></li></ul></div></div></div></div></main></div></div></div><footer class="theme-layout-footer footer"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class="footer__title"></div><ul class="footer__items clean-list"><li class="footer__item"><div class="footer-links">
<span>© 2026 Langflow</span>
<span id="preferenceCenterContainer"> ·&nbsp; <a href="#" onclick='return"undefined"!=typeof window&&window.truste&&window.truste.eu&&window.truste.eu.clickListener&&window.truste.eu.clickListener(),!1' style="cursor: pointer;">Manage Privacy Choices</a></span>
</div></li></ul></div></div></div></footer><div style="position:fixed;right:21px;bottom:21px;z-index:100;display:flex;align-items:center;gap:10px;cursor:pointer"><div style="background-color:#f6f6f6;border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0,0,0,0.1)"><img src="/img/langflow-icon-black-transparent.svg" style="width:40px" alt="Search"></div></div></div>
</body>
</html>