[{"data":1,"prerenderedAt":167},["ShallowReactive",2],{"seo-verification":3,"blog-how-to-host-langflow-on-a-vps-ma-en":6,"promo-bar-likely":158},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-how-to-host-langflow-on-a-vps-ma-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"noindex":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":28,"featuredImage":30,"bgImage":31,"posterImage":32,"relatedSolution":33,"intro":36,"sections":37,"ctaTitle":109,"ctaBody":110,"ctaButton":111,"ctaUrl":112,"relatedPosts":113},10,"how-to-host-langflow-on-a-vps",{"fr":12,"en":10,"ar":13,"es":14},"heberger-langflow-vps","كيفية-استضافة-langflow-على-خادم-vps","como-alojar-langflow-en-un-vps","How to host LangFlow on a VPS: complete Docker and HTTPS guide","Deploy LangFlow on your VPS with Docker, PostgreSQL and nginx HTTPS proxy. Step-by-step install, REST API, RAG pipeline, Python components and troubleshooting.",13,2,false,"2026-06-10T00:00:00+00:00","2026-11-04T16:30:24+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},1,"Artificial Intelligence","intelligence-artificielle","bg-purple-500\u002F10 text-purple-400","ia",[29],{"id":23,"name":24,"slug":25,"color":26,"icon":27},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-langflow-vps-poster.svg",{"categorySlug":34,"appSlug":35},"artificial-intelligence","langflow","LangFlow is a visual AI pipeline editor — RAG, chatbots, LangChain agents — that runs in your browser and exposes each flow as a REST API. Hosted on your VPS, it becomes a private, shareable workshop: your flows, API keys and execution history stay under your control, never passing through an external SaaS. This guide covers the full installation with Docker Compose, PostgreSQL, nginx reverse proxy and HTTPS — then goes further: calling a flow from Python or curl, RAG pipeline on documents, custom components, and updating without data loss.",[38,42,53,56,84,87,90,93,96,99,103,106],{"type":39,"title":40,"body":41},"h2","Why host LangFlow on a VPS","LangFlow addresses a specific use case: designing AI pipelines by dragging and dropping components — LLM models, retrievers, prompts, memory, agents — then testing them without writing a single line of code. It is the visual alternative to code-only LangChain, suited to teams that want to iterate quickly before committing logic to Python.\n\nOn a VPS, you get a stable and persistent instance accessible to the whole team, unlike a local setup that disappears on reboot. Your flows often encode sensitive business logic — prompt chains, API keys, connectors to your databases. This data should not pass through a SaaS whose data retention policy you do not control.\n\nLangFlow relies on FastAPI on the server side and exposes each flow as a REST endpoint: your applications can call your AI pipelines directly, with no intermediary code. It is this combination — visual interface for design, API for integration — that makes it a serious prototyping tool for use cases such as document RAG, support chatbots, multi-step agents, or classification pipelines.",{"type":43,"title":44,"items":45},"ul","What you gain with a self-hosted instance",[46,47,48,49,50,51,52],"**Visual pipeline interface** — drag LLM, retriever, memory, and prompt components onto a canvas, connect them, and test without code.","**Multiple LLM connectors** — OpenAI, Anthropic, Ollama (local), Hugging Face, and any OpenAI-compatible provider.","**Built-in RAG** — load PDF or text documents, with chunking, embedding and vector search in the same flow.","**Automatic API per flow** — each pipeline becomes a REST endpoint callable from any application.","**Encrypted global variables** — your API keys are stored server-side, never exposed in the client code.","**Custom Python components** — extend LangFlow with your own business logic without forking the project.","**Flow version control** — export as JSON and version in Git, independently of the database state.",{"type":39,"title":54,"body":55},"Prerequisites before you start","LangFlow is more memory-intensive than a typical web application: its execution engine loads models and embeddings into RAM. Plan for at least **2 vCPU and 4 GB of RAM** for comfortable use. If you connect a local Ollama model for inference on the same VPS, move to 8 GB minimum.\n\nOn the software side, you need Docker (version 24 or later) and Docker Compose v2, installed and running. Port `7860` must be accessible locally (LangFlow listens on this port by default). You do not expose this port directly to the internet: the nginx reverse proxy handles that.\n\nPrepare a subdomain pointing to your VPS IP — for example `langflow.your-domain.com` — with DNS records already propagated before running certbot. Finally, a PostgreSQL database is strongly recommended for production: the default SQLite corrupts under concurrent load and does not support simultaneous access by multiple users.",{"type":57,"title":58,"steps":59},"steps","Install LangFlow with Docker Compose and PostgreSQL",[60,63,66,69,72,75,78,81],{"title":61,"body":62},"Create the working directory","Log in to your VPS via SSH, then create the folder that will host the stack:\n\n```bash\nmkdir -p \u002Fopt\u002Flangflow && cd \u002Fopt\u002Flangflow\n```",{"title":64,"body":65},"Write the docker-compose.yml file","Create a `docker-compose.yml` file with two services — `postgres` and `langflow` — and authentication environment variables:\n\n```yaml\nservices:\n  postgres:\n    image: postgres:16\n    restart: unless-stopped\n    environment:\n      POSTGRES_USER: langflow\n      POSTGRES_PASSWORD: strong-password\n      POSTGRES_DB: langflow\n    volumes:\n      - pgdata:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\n    healthcheck:\n      test: [\"CMD-SHELL\", \"pg_isready -U langflow\"]\n      interval: 10s\n      retries: 5\n\n  langflow:\n    image: langflowai\u002Flangflow:latest\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:7860:7860\"\n    environment:\n      LANGFLOW_DATABASE_URL: postgresql:\u002F\u002Flangflow:strong-password@postgres:5432\u002Flangflow\n      LANGFLOW_SECRET_KEY: change-this-to-a-random-string\n      LANGFLOW_AUTO_LOGIN: \"false\"\n      LANGFLOW_SUPERUSER: admin\n      LANGFLOW_SUPERUSER_PASSWORD: strong-admin-password\n    depends_on:\n      postgres:\n        condition: service_healthy\n\nvolumes:\n  pgdata:\n```\n\nNote two important points: port `7860` is bound to `127.0.0.1` (LangFlow is not reachable from the outside without going through the proxy), and the `healthcheck` on `postgres` ensures LangFlow waits for a truly ready database before starting, avoiding silently failing first requests.",{"title":67,"body":68},"Start the stack","Start both containers in the background:\n\n```bash\ndocker compose up -d\n```\n\nFollow LangFlow logs during the first initialization (schema creation in the database, roughly 30 seconds to 1 minute):\n\n```bash\ndocker compose logs -f langflow\n```\n\nWait for the line indicating that the server is listening on port `7860` before continuing.",{"title":70,"body":71},"Verify the interface responds","From your VPS, test that LangFlow responds locally before setting up the proxy:\n\n```bash\ncurl -s http:\u002F\u002F127.0.0.1:7860\u002Fhealth\n```\n\nThe expected response is `{\"status\":\"ok\"}`. If you get a connection refused error, the startup logs contain the cause.",{"title":73,"body":74},"Configure the nginx reverse proxy with HTTPS","Install nginx and certbot if not already done, then create a configuration file:\n\n```nginx\nserver {\n    listen 80;\n    server_name langflow.your-domain.com;\n    return 301 https:\u002F\u002F$host$request_uri;\n}\n\nserver {\n    listen 443 ssl;\n    server_name langflow.your-domain.com;\n\n    ssl_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Flangflow.your-domain.com\u002Ffullchain.pem;\n    ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Flangflow.your-domain.com\u002Fprivkey.pem;\n\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:7860;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n    }\n}\n```\n\nThe `Upgrade` and `Connection` headers are essential for WebSocket support, used by the interactive canvas. Obtain the certificate with certbot:\n\n```bash\ncertbot --nginx -d langflow.your-domain.com\n```",{"title":76,"body":77},"Log in and create your first flow","Open `https:\u002F\u002Flangflow.your-domain.com` in your browser. Log in with the credentials set in `LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`. In the interface, click **New Flow**, choose a template or start from an empty canvas. Add an LLM component, a prompt and an output component, connect them, then click **Run** to test the pipeline.",{"title":79,"body":80},"Store API keys in global variables","Rather than entering your API keys in each component, use **Global Variables** (icon at the top right): the key is encrypted in the database and reusable across all your flows. From the **API** menu of a flow, you retrieve the `curl` or Python call code to integrate this pipeline into an external application.",{"title":82,"body":83},"Back up flows and the database","Schedule a daily `pg_dump` of the database from the host:\n\n```bash\ndocker exec langflow-postgres-1 pg_dump -U langflow langflow > \u002Fopt\u002Fbackups\u002Flangflow-$(date +%F).sql\n```\n\nAlso export your flows as JSON from the **Export** menu of each flow: it is a versionable safety net in Git, independent of the database state.",{"type":39,"title":85,"body":86},"Calling a flow from an application: REST API","Each LangFlow flow is accessible via the `\u002Fapi\u002Fv1\u002Frun\u002F\u003Cflow-id>` endpoint. You find the flow identifier in the editor URL or in the flow's **API** menu. Two concrete examples.\n\n**With curl:**\n\n```bash\ncurl -s -X POST \\\n  https:\u002F\u002Flangflow.your-domain.com\u002Fapi\u002Fv1\u002Frun\u002FYOUR-FLOW-ID \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"x-api-key: YOUR-API-KEY\" \\\n  -d '{\n    \"input_value\": \"What is the capital of France?\",\n    \"input_type\": \"chat\",\n    \"output_type\": \"chat\"\n  }'\n```\n\n**With Python (`requests` library):**\n\n```python\nimport requests\n\nFLOW_ID = \"YOUR-FLOW-ID\"\nBASE_URL = \"https:\u002F\u002Flangflow.your-domain.com\"\nAPI_KEY = \"YOUR-API-KEY\"\n\nresponse = requests.post(\n    f\"{BASE_URL}\u002Fapi\u002Fv1\u002Frun\u002F{FLOW_ID}\",\n    headers={\n        \"Content-Type\": \"application\u002Fjson\",\n        \"x-api-key\": API_KEY,\n    },\n    json={\n        \"input_value\": \"What is the capital of France?\",\n        \"input_type\": \"chat\",\n        \"output_type\": \"chat\",\n    },\n    timeout=60,\n)\n\nresult = response.json()\nprint(result[\"outputs\"][0][\"outputs\"][0][\"results\"][\"message\"][\"text\"])\n```\n\nThe API key is generated in **Settings → API Keys** in the LangFlow interface. It authenticates each call and can be revoked at any time without touching the flow.",{"type":39,"title":88,"body":89},"RAG pipeline: index your documents and query them","RAG (Retrieval-Augmented Generation) is the central use case of LangFlow: you load documents (PDF, text, Markdown), split them into chunks, embed them into a vector database, then an LLM answers questions by drawing on this context.\n\n**Which VectorStore on a VPS?** On a server with limited resources, **Chroma** (ChromaDB) is the lightest choice: it runs in-process in the same LangFlow container, requires no additional service, and persists its data in a local directory. **Qdrant** is suitable if you have more RAM and want a dedicated service in a neighboring container.\n\n**Building the indexing pipeline in LangFlow:**\n\nIn the editor, assemble the following chain by dragging components:\n\n1. **File** (or **Directory**) → loads the PDF or document folder.\n2. **Split Text** → splits into chunks (recommended size: 500 to 800 tokens, overlap 50).\n3. **OpenAI Embeddings** (or **Ollama Embeddings** to stay fully local) → transforms each chunk into a vector.\n4. **Chroma DB** → stores the vectors. Point the **Persist Directory** field to a Docker-mounted volume so the index survives restarts.\n\nFor the Chroma volume, add to your `docker-compose.yml`:\n\n```yaml\n  langflow:\n    volumes:\n      - chromadb:\u002Fdata\u002Fchroma\n\nvolumes:\n  pgdata:\n  chromadb:\n```\n\nThen define the LangFlow global variable `CHROMA_PERSIST_DIR` with the value `\u002Fdata\u002Fchroma`.\n\n**Query pipeline:**\n\nOnce the index is populated, create a second flow: **Text Input** → **Chroma DB** (in search mode, same directory) → **Prompt** (inject retrieved chunks) → **LLM** → **Chat Output**. Each question triggers a vector search, retrieves the closest passages, and submits them to the model with context.",{"type":39,"title":91,"body":92},"Custom components: extending LangFlow in Python","LangFlow lets you create custom Python components without forking the project. A component is a class that inherits from `Component` and declares its inputs, outputs, and logic.\n\nMinimal example — a component that cleans and uppercases received text:\n\n```python\nfrom langflow.custom import Component\nfrom langflow.io import MessageTextInput, Output\nfrom langflow.schema import Data\n\nclass UpperCaseComponent(Component):\n    display_name = \"Uppercase Text\"\n    description = \"Converts text to uppercase.\"\n\n    inputs = [\n        MessageTextInput(\n            name=\"input_text\",\n            display_name=\"Input Text\",\n        )\n    ]\n\n    outputs = [\n        Output(\n            display_name=\"Processed Text\",\n            name=\"output_text\",\n            method=\"process_text\",\n        )\n    ]\n\n    def process_text(self) -> Data:\n        result = self.input_text.strip().upper()\n        return Data(text=result)\n```\n\nTo add this component to your instance: in the LangFlow interface, go to **Settings → Custom Components**, paste the code and save. The component immediately appears in the sidebar, ready to be dragged into any flow.",{"type":39,"title":94,"body":95},"Updating LangFlow without losing your data","LangFlow releases updates regularly (the 1.x branch is the active stable branch as of October 2026). Before any update, systematically back up the database:\n\n```bash\ndocker exec langflow-postgres-1 pg_dump -U langflow langflow \\\n  > \u002Fopt\u002Fbackups\u002Flangflow-before-update-$(date +%F).sql\n```\n\nThen update the image and restart the stack:\n\n```bash\ncd \u002Fopt\u002Flangflow\ndocker compose pull\ndocker compose up -d\n```\n\nFollow the logs to detect any automatic schema migrations:\n\n```bash\ndocker compose logs -f langflow\n```\n\n**Watch out for breaking changes in v1.x.** Some components are renamed or refactored between minor versions. Export your flows as JSON before upgrading — it is the fastest way to restore them to a known state if a migration causes issues.\n\nTo pin a specific version (recommended in production), replace `latest` with the desired tag in your `docker-compose.yml`:\n\n```yaml\nimage: langflowai\u002Flangflow:1.12.4\n```",{"type":39,"title":97,"body":98},"Advanced configuration: useful environment variables","LangFlow exposes several environment variables to adapt the instance to your context. `LANGFLOW_SECRET_KEY` encrypts sensitive data stored in the database — change the default value before first startup, as a later rotation invalidates existing encrypted data. `LANGFLOW_AUTO_LOGIN` set to `false` always requires an explicit login, even from `localhost`. `LANGFLOW_WORKERS` controls the number of Uvicorn processes: the default value (`1`) is suitable for moderate use, increase to `2` or `4` if multiple users execute flows simultaneously.\n\nFor flows that call local models via Ollama, define `OLLAMA_BASE_URL` in LangFlow's global variables rather than in the Docker environment: the value is then managed by the interface and can be changed without a restart.\n\nIf you update LangFlow, always do a `pg_dump` before `docker compose pull && docker compose up -d`: some version upgrades touch the database schema.",{"type":100,"title":101,"body":102},"tip","Security: do not expose LangFlow directly to the internet","LangFlow has no built-in rate limiting on its API endpoints. Without additional measures, a publicly exposed flow can be called without limit by anyone who knows the URL. Two approaches complement each other.\n\nFirst, keep `LANGFLOW_AUTO_LOGIN=false` permanently and create distinct user accounts for each team member. Second, if your flows should only be called by your own applications (rather than by direct users), add an `auth_basic` nginx block in front of the management interface and expose only the `\u002Fapi\u002Fv1\u002Frun\u002F\u003Cflow-id>` endpoints with token authentication to your applications.\n\nNever leave LangFlow in production with SQLite: the database corrupts under concurrent access and you lose your flows without an explicit error message.",{"type":39,"title":104,"body":105},"Extended troubleshooting: common errors","**OOM error (Out of Memory).** If the LangFlow container restarts spontaneously, check `docker compose logs langflow` and look for `Killed`. The cause is insufficient RAM. Reduce `LANGFLOW_WORKERS` to `1` and, if the problem persists, increase the VPS RAM or avoid running heavy flows simultaneously.\n\n**`RuntimeError: CUDA out of memory`.** This error occurs when a component attempts to use a GPU (via PyTorch or a Hugging Face model) but the VPS has none, or GPU memory is insufficient. Force CPU execution by adding the environment variable `CUDA_VISIBLE_DEVICES=\"\"` to the langflow service in `docker-compose.yml`. If the error comes from a Hugging Face model, select a CPU variant (suffix `-cpu` or `gguf`) in the component.\n\n**Port 7860 already in use.** If `docker compose up -d` fails with `address already in use`, another process is listening on that port. Identify it with `ss -tlnp | grep 7860` and stop it, or change the host port in `docker-compose.yml` (for example `\"127.0.0.1:7861:7860\"`) and update the nginx configuration accordingly.\n\n**`ImportError: No module named 'torch'` or missing dependency.** Some advanced components (Hugging Face embeddings, local models) require heavy libraries not included in the base image. Create a derived `Dockerfile` that installs missing dependencies, or use the `langflowai\u002Flangflow-backend` image with the required extras.\n\n**Connection refused to Ollama.** If LangFlow cannot reach Ollama running on the same VPS, check that Ollama listens on `0.0.0.0` and not only on `127.0.0.1`. In `docker-compose.yml`, add `extra_hosts: [\"host-gateway:host-gateway\"]` to the LangFlow service and use the address `http:\u002F\u002Fhost-gateway:11434` in LangFlow's Ollama components.\n\n**Blank canvas or disconnected WebSocket.** Check that the `Upgrade` and `Connection` headers are properly forwarded by nginx. An intermediate proxy (Cloudflare in Full Strict mode, load balancer) may intercept WebSockets: ensure the WebSocket protocol is properly configured in the proxy.\n\n**Missing or incomplete flow logs.** LangFlow stores execution logs in the database. If the PostgreSQL database was not ready when LangFlow started, the first requests fail silently. The `healthcheck` in the `docker-compose.yml` example above resolves this problem.",{"type":39,"title":107,"body":108},"Next steps: extending your LangFlow instance","Once LangFlow is running, several integrations expand its scope.\n\nIf you want a fully local LLM model (without any external API call), install Ollama on the same VPS and connect it to LangFlow via the **Ollama** component: your pipelines no longer send data outside your infrastructure. Ollama exposes an OpenAI-compatible API on port `11434`.\n\nFor more robust document RAG, move from Chroma to **Qdrant** — an open source vector database you deploy in a neighboring container with better performance on large corpora.\n\nFinally, if multiple teams use the instance, consider isolating flows by workspace (feature available depending on the version) or deploying one LangFlow instance per project with the ServOrbit template, which automatically configures Docker Compose, PostgreSQL and the reverse proxy.","Host LangFlow on a dedicated VPS","Deploy your own LangFlow instance in minutes on a ServOrbit VPS — full privacy, no API rate limits, secure HTTPS access with TLS certificate included.","Deploy LangFlow","\u002Fapplications\u002Fartificial-intelligence\u002Flangflow",[114,131,148],{"id":23,"slug":115,"slugs":116,"title":120,"excerpt":121,"readTime":122,"views":23,"isPinned":19,"noindex":19,"publishedAt":123,"updatedAt":124,"category":125,"categories":126,"featuredImage":30,"bgImage":31,"posterImage":128,"relatedSolution":129},"how-to-host-open-webui-on-a-vps",{"fr":117,"en":115,"ar":118,"es":119},"heberger-open-webui","كيفية-استضافة-open-webui-على-خادم-vps","como-alojar-open-webui-en-un-vps","How to Host Open WebUI on a VPS","A complete guide to deploying Open WebUI on your own VPS. Keep control of your data, avoid cloud API costs, and access your LLMs from a clean web interface.",9,"2026-06-01T00:00:00+00:00","2026-11-09T20:55:18+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[127],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fheberger-open-webui-poster.svg",{"categorySlug":34,"appSlug":130},"open-webui",{"id":18,"slug":132,"slugs":133,"title":137,"excerpt":138,"readTime":139,"views":23,"isPinned":19,"noindex":19,"publishedAt":140,"updatedAt":141,"category":142,"categories":143,"featuredImage":30,"bgImage":31,"posterImage":145,"relatedSolution":146},"deploying-dify-on-a-vps-ai-workflows-under-control",{"fr":134,"en":132,"ar":135,"es":136},"deployer-dify-vps","نشر-dify-على-vps-سير-عمل-الذكاء-الاصطناعي-تحت-السيطرة","desplegar-dify-en-un-vps","Deploy Dify on a VPS: Complete Guide from Installation to Plugins","Install Dify on a ServOrbit VPS: requirements, Docker Compose, offline plugins, known Docker limits, backup before upgrading, and troubleshooting.",15,"2026-02-11T00:00:00+00:00","2026-10-29T03:10:23+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[144],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fdeployer-dify-vps-poster.svg",{"categorySlug":25,"appSlug":147},"dify",{"id":149,"slug":150,"slugs":151,"title":155,"excerpt":156,"readTime":157,"views":23,"isPinned":19,"noindex":158,"publishedAt":159,"updatedAt":160,"category":161,"categories":162,"featuredImage":30,"bgImage":31,"posterImage":164,"relatedSolution":165},121,"hosting-openclaw-on-a-vps",{"fr":152,"en":150,"ar":153,"es":154},"heberger-openclaw-vps","استضافة-openclaw-على-خادم-vps","alojar-openclaw-en-un-vps","Hosting OpenClaw on a VPS","Host OpenClaw on your VPS: the open source personal AI assistant reachable from WhatsApp, Telegram, Discord and 50+ messaging apps. Docker, LLM setup and HTTPS.",4,true,"2026-02-23T00:00:00+00:00","2026-11-09T20:55:19+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[163],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fheberger-openclaw-vps-poster.svg",{"categorySlug":34,"appSlug":166},"openclaw",1794270425754]