How to Install Text Generation WebUI for Local LLMs (2026)

Quick answer

To install Text Generation WebUI, download the portable build for your operating system and GPU from the official TextGen releases page, unzip it, and double-click textgen. Put a GGUF model file in user_data/models, then load it in the interface. TextGen is $0 under AGPL-3.0. If it replaces a ChatGPT Plus subscription you no longer need, the software saving is $240 a year before electricity, hardware, and your time.

You want a local AI workspace with more control than a simple chat app gives you. You also want your prompts, files, and model choices to stay on a computer you control.

Text Generation WebUI, now presented by its project as TextGen, is built for that job. This guide shows how to install Text Generation WebUI for local LLMs, add a first model, use the optional API, secure the setup, back it up, update it, and fix the errors that stop most first installs.

Quick Answer

To install Text Generation WebUI, download the portable build for your operating system and GPU from the official TextGen releases page, unzip it, and double-click textgen. Put a GGUF model file in user_data/models, then load it in the interface. TextGen is $0 under the AGPL-3.0 licence. If it replaces a ChatGPT Plus subscription you no longer need, the software saving is $240 a year before electricity, hardware, and your time.

In this article

  • How we checked this guide
  • What Text Generation WebUI replaces, and what it does not
  • Portable or full install: choose the right route
  • Requirements before you install Text Generation WebUI
  • Step 1: install the portable build
  • Step 2: add and load your first model
  • Step 3: install the full version when you need more backends
  • Step 4: turn on the local API
  • First-run security steps you must not skip
  • Make Text Generation WebUI useful for real work
  • Backup and update routine
  • Common errors and fixes
  • Tips and tricks that save time
  • The real cost maths: Text Generation WebUI versus ChatGPT Plus
  • When not to self-host Text Generation WebUI
  • Pros and cons
  • Our verdict
  • FAQ
  • Strategic Pivot: price the whole stack before you switch
  • Sources

How we checked this guide

We checked the install routes, model folders, command-line flags, update scripts, and licence on the official oobabooga/textgen GitHub repository. We checked the portable downloads, NVIDIA build choice, macOS launch note, and portable update method on the official releases page.

We checked the API port, endpoints, API-key flag, and local-network options in the project’s official OpenAI API wiki. The paid comparison uses OpenAI’s official Help Center page, which lists ChatGPT Plus at $20 a month, billed monthly. Where the project does not publish a fixed RAM or VRAM minimum, we say so instead of inventing one.

TextGen official GitHub repository showing local LLM desktop app and AGPL-3.0 licence

What Text Generation WebUI replaces, and what it does not

TextGen replaces the hosted chat window for work that a local model can handle well. It gives you instruct chat, character-style chat modes, a notebook for free-form generation, file attachments, vision with suitable models, tool calling, and an OpenAI/Anthropic-compatible API.

The difference from a hosted subscription is control. You choose the model, backend, context size, sampler settings, and whether the API is exposed beyond your own machine. The project states that it has no telemetry and that local generation is private and offline. Optional web-search and page-fetch tools are different: when you deliberately use them, they need network access.

Best for: a small-business owner, freelancer, or technical operator who wants private local drafting and document work, plus the freedom to test GGUF models, adjust generation settings, or connect a local app through an API. Skip if: you want the simplest possible desktop chat app, guaranteed support, or frontier-model quality on every request.

TextGen also sits beside the tools in our earlier local-AI guides. Our guide to install Ollama on Ubuntu covers a simpler model runner. Our guide to install Open WebUI with Ollama covers a browser front end for Ollama. Our guide to install llama.cpp for local LLM on CPU covers the engine layer. Our guides to install GPT4All for private offline AI chat and install Jan AI desktop for local models cover friendlier desktop apps. Our guide to install LocalAI as a self hosted OpenAI alternative covers an API-first server. Choose TextGen when model controls and backend choice matter more than one-click simplicity.

Portable or full install: choose the right route

The portable build is the right first install for most readers. It includes the dependencies, opens as a desktop app, and works with GGUF models through llama.cpp. Official portable builds cover Linux, Windows, and macOS, with CUDA, Vulkan, ROCm, and CPU-only options where the platform supports them.

The full install is for people who need more than GGUF. It adds backends such as Transformers and ExLlamaV3, LoRA training, image generation, and extensions. The official README says the full route needs about 10 GB of disk space and downloads PyTorch.

RouteBest forModel formatsMain trade-off
Portable buildFastest first install and normal local chatGGUFFewer backends and features
Manual portable with venvBrowser UI without the desktop windowGGUFYou manage Python packages
Full one-click installTraining, extensions, and extra backendsGGUF, Transformers, EXL3, and other supported formatsLarger install and more moving parts
DockerA server or repeatable container setupDepends on the selected image and backendYou manage Compose, volumes, and GPU settings

Best for: the portable build fits a first test, private drafting, and a small local API. Skip if: you already know you need Transformers models, EXL3 models, LoRA training, or image generation. Start with the full install instead of migrating later.

Requirements before you install Text Generation WebUI

The project does not publish one fixed RAM or VRAM minimum that fits every model. That is the honest answer. The app is only the control layer; the model file, quantization, context size, backend, and GPU-layer settings decide how much memory a load needs.

Use these official requirements as your floor:

  • Portable build: download the build that matches your operating system and GPU. The current official release downloads range from 272 MB to 1.33 GB before models.
  • Manual portable install: Python 3.9 or newer.
  • Full install: about 10 GB of disk space for the installation, plus separate space for every model.
  • NVIDIA portable choice: the official release notes say to use the CUDA 13.1 build when nvidia-smi reports CUDA Version 13.1 or higher, and the CUDA 12.4 build otherwise.
  • Model space: a GGUF file goes in user_data/models. Multi-file Transformers and EXL3 models need their own subfolder and the full installation.

Before downloading a large model, estimate its memory use. The official README links to a GGUF Memory Calculator for that job. Start with a smaller GGUF model, prove that the interface loads and answers, then move up only when the smaller model fails a real task.

Step 1: install the portable build

TextGen official GitHub releases page showing the latest portable release
  1. Open the official TextGen releases page.
  2. Choose the llama.cpp column unless you specifically need ik_llama.cpp. The release notes say to use the llama.cpp column when you are unsure.
  3. Download the build for your operating system and GPU.
  4. Unzip the download into a folder you can keep. Do not run it from a temporary downloads folder you clean every week.
  5. Double-click textgen. A desktop window should open.

On macOS, the official release notes add one step: run xattr -cr /path/to/your/textgen-folder on the extracted folder before launching. Replace the example path with the real folder path on your Mac.

If you prefer the browser interface instead of the desktop window, use the manual portable route:

git clone https://github.com/oobabooga/textgen
cd textgen
python -m venv venv
source venv/bin/activate
pip install -r requirements/portable/requirements.txt --upgrade
python server.py --portable --api --auto-launch

On Windows, activate the environment with venv\Scripts\activate. The README also tells you to choose the appropriate requirements file under requirements/portable for your hardware. The launch command above enables the API and opens the web UI in your browser.

Step 2: add and load your first model

Download a GGUF model file from Hugging Face, then place the .gguf file directly in user_data/models. The official README says the UI detects it automatically. Load the model in the interface and send one short test prompt before you change advanced settings.

Use this first test:

  1. Confirm the model appears in the model list.
  2. Load it with the default context and GPU-layer settings.
  3. Ask for a short rewrite of a harmless paragraph.
  4. Attach a small text file and ask one question about it.
  5. Note the reply speed and whether the model follows the instruction.

That test separates an install problem from a model-quality problem. If the model loads but writes weak answers, the install worked and the model choice is the issue. If the model does not appear, check the folder before you reinstall anything.

To load the same model automatically on every launch, add this line to user_data/CMD_FLAGS.txt:

--model my-model.gguf

Replace my-model.gguf with the exact file name in user_data/models. Put each extra flag on its own line. For example, the official README shows --cache-type q8_0 as a separate line for KV-cache settings.

Step 3: install the full version when you need more backends

Use the full install when the portable build cannot load the model format you need, or when you need training, image generation, or extensions. The official one-click route is:

  1. Clone the repository, or download and extract its source code.
  2. Run start_windows.bat on Windows, start_linux.sh on Linux, or start_macos.sh on macOS.
  3. Select your GPU vendor when prompted.
  4. Open http://127.0.0.1:7860 after installation.

Run the same start script to restart the full install. The scripts use Miniforge to create a Conda environment inside installer_files/, and the README says they do not need admin or root access. Persistent flags can go in user_data/CMD_FLAGS.txt.

Multi-file models need a different folder shape. Put a Transformers or EXL3 model in its own subfolder inside user_data/models, with its config, tokenizer, and weight files together. A loose collection of model files in the main models folder is a common reason a model fails to appear or load.

Docker is also an official route. The repository includes Docker files for NVIDIA, AMD, Intel, and CPU setups. You link the pair you need, copy docker/.env.example to .env, create user_data/logs and user_data/cache, edit .env and user_data/CMD_FLAGS.txt, then run docker compose up --build. Docker Compose v2.17 or higher is required. Choose Docker only when you are comfortable maintaining containers and GPU passthrough.

Step 4: turn on the local API

TextGen official OpenAI API wiki showing chat completions example on port 5000

TextGen can serve an OpenAI/Anthropic-compatible API for local apps. Add --api to your launch flags. The official API wiki says the API uses port 5000 by default, and --api-port changes that port.

Test the chat endpoint after a model is loaded:

curl http://127.0.0.1:5000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "Hello!"}
    ],
    "temperature": 0.6,
    "top_p": 0.95,
    "top_k": 20
  }'

The local API documentation is available at http://127.0.0.1:5000/docs while the API server is running. The wiki states that the API is offline and private, creates no logs, does not connect to OpenAI, and does not use the OpenAI Python library.

Use --api-key yourkey when another local app needs authenticated API access. Use a separate --admin-key when you want model loading and unloading protected by a different key. If --admin-key is not set, the README says it falls back to the API key.

First-run security steps you must not skip

TextGen is safest when it stays on your own machine. The full web UI address, http://127.0.0.1:7860, is a local address. The API address, http://127.0.0.1:5000, is also local. Problems start when a helpful flag quietly turns a private tool into a network service.

Follow these rules before anyone else can reach the machine:

  1. Do not add --listen until you know which network can reach the UI.
  2. Do not add --share unless you intend to create a public UI URL.
  3. Do not add --public-api unless you intend to create a public API URL through Cloudflare.
  4. If the UI must be reachable by other people, set --gradio-auth username:password with your own credentials, or use --gradio-auth-path for a credentials file.
  5. If the API must be reachable, set --api-key, and set a separate --admin-key for model administration.
  6. Use SSL flags when the setup needs encrypted browser access, and keep the machine behind a controlled network or reverse proxy.

The latest official release also restricts CORS to localhost by default to prevent drive-by API access. Treat --listen and --public-api as deliberate exposure choices, not convenience switches.

Model files need the same care. The --force-safetensors flag prevents arbitrary code execution during model loading. The --trust-remote-code flag does the opposite for models that need custom code, so use it only with model sources you trust. Extensions and tools can also change the risk profile. Install them one at a time, and test after each change.

Multi-user mode is not a public hosting switch. The README describes it as best suited for small trusted teams, and chat histories are not saved or automatically loaded in that mode. For a customer-facing service, use a system designed and supported for that job.

Make Text Generation WebUI useful for real work

Start with instruct mode for normal business tasks. It is the mode the project describes as instruction-following, like ChatGPT. Use chat-instruct or chat when you need a character-style conversation. Use the Notebook tab when you want free-form continuation rather than a chat exchange.

File attachments make the local setup useful for private document work. The official feature list includes text files, PDF documents, and .docx documents. A good first business test is simple: attach a draft policy, ask for a five-bullet summary, then ask the model to list anything unclear. Compare the result with the document before you trust the workflow.

Vision needs a suitable multimodal model and, for llama.cpp, an mmproj file. The official flags include --mmproj for the vision projector path. Recent releases also auto-detect sibling mmproj files when loading a model. If images are ignored, check the projector before you blame the prompt.

Tool calling needs a model that supports it. The API wiki names Qwen, Mistral, and GPT-OSS as examples of model families with tool-calling support. TextGen can pass tools to the model, receive a tool_calls response, and continue after your app sends the tool result back. MCP servers are also supported. Keep the first tool test read-only, such as a calculator or a local file search, before you connect anything that can send messages or change records.

The controls are the reason to choose TextGen over a simpler app. Context size changes how much conversation and document text the model can use. GPU layers change how much work moves to the GPU. Cache type changes memory use and speed. Sampler settings change randomness and repetition. Change one setting at a time, rerun the same prompt, and keep notes. Random tuning creates a fast demo and an unreliable workflow.

Backup and update routine

Back up user_data before every update. For a portable install, the official update method is to download and extract the latest version, then replace the new user_data folder with the one from your existing install. The release notes say all settings and models move with that folder.

Since version 4.0, you can also move user_data one folder up, next to the install folder. TextGen detects it automatically, so two version folders can share the same user_data. That makes updates easier and rollback simpler: keep the old version folder until the new one passes your model-load and API tests.

For the full install, run the update wizard for your operating system: update_wizard_windows.bat, update_wizard_linux.sh, or update_wizard_macos.sh. Use the wizard’s extension-requirements option when extensions need updated dependencies. The README says that option reinstalls the main project requirements at the end, so project requirements take precedence over conflicting extension dependencies.

If a full install is too broken to repair, back up user_data, delete installer_files, and run the start script again. Do not delete user_data during that repair. It holds the models and settings you want to keep.

A practical routine is short:

  1. Copy user_data to a dated backup folder.
  2. Update TextGen.
  3. Load the same model you used before the update.
  4. Run one chat test and one document test.
  5. Run one API test if you use the API.
  6. Delete the old version only after those tests pass.

Common errors and fixes

The model does not appear in the list

Put GGUF files directly in user_data/models. Put multi-file Transformers and EXL3 models in their own subfolder inside user_data/models. If you are using the portable build, use a GGUF model. The portable route does not replace the full install for other model formats.

The model loads, then runs out of memory

Use a smaller model or a smaller quantization first. Then reduce context size, reduce GPU layers, or try a smaller KV-cache type such as q8_0 or q4_0 where the backend supports it. The official flags show that context size, GPU layers, and cache type all affect memory use.

Replies are painfully slow

Check that you downloaded the build for your GPU. A CPU build on a GPU machine will feel broken even when it is working. Reduce context size, raise GPU layers when memory allows, and test a smaller model. The README also warns that training on CPU is extremely slow.

The browser cannot open the interface

For the full install, confirm the start script is still running, then open http://127.0.0.1:7860. For the API, confirm --api is enabled and test port 5000. If another program already uses the port, change --listen-port for the UI or --api-port for the API.

The API returns a connection error

Restart with --api. Check that your client uses http://127.0.0.1:5000 unless you changed --api-port. Open http://127.0.0.1:5000/docs to confirm the API server is alive. If you set --api-key, send that key from the client.

A safetensors model will not load in the portable build

Use a GGUF version of the model, or switch to the full installation. The official README states that multi-file Transformers and EXL3 formats require the full installation, not the portable build.

Images are ignored

Use a vision-capable model and load its mmproj file. Check whether the projector file sits beside the model with a name TextGen can detect. If auto-detection fails, set the projector path with --mmproj.

macOS blocks the first launch

Run xattr -cr /path/to/your/textgen-folder on the extracted folder, using your real path. Then launch textgen again. This step comes from the official release notes.

An extension breaks startup

Remove the newest extension from your launch flags, restart, and confirm the base app works. Then reinstall extension requirements through the update wizard. Add extensions back one at a time so the failing one is obvious.

Tips and tricks that save time

  • Keep one known-good model in user_data/models for repair tests. When a new model fails, load the known-good model before you reinstall the app.
  • Put repeat flags in user_data/CMD_FLAGS.txt, one flag per line. Auto-load your main model there only after manual loading works.
  • Create user_data/settings.yaml when you want the same interface defaults every launch. The README says that file loads by default without a --settings flag.
  • Use --idle-timeout when the machine is shared. It unloads the model after inactivity and reloads it when needed.
  • Use the Notebook tab for drafting continuations, outlines, and rewrites that do not fit a chat pattern.
  • Branch a conversation before you test a risky rewrite. Message editing and branching let you compare versions without losing the original path.
  • Test the API with the official chat-completions example before connecting a business app. A working curl test proves the server, model, and port are right.
  • Keep model licences with the model files. TextGen’s AGPL-3.0 licence does not replace the licence of the model you download.

The real cost maths: Text Generation WebUI versus ChatGPT Plus

OpenAI official Help Center page showing ChatGPT Plus costs $20 per month

TextGen costs $0 to download and use under the AGPL-3.0 licence. ChatGPT Plus costs $20 a month, billed monthly, on OpenAI’s official Help Center page. That is $240 a year.

Use a realistic solo-owner scenario. You already own a suitable computer. You use AI for private drafts, summaries of your own documents, and internal notes. A local model passes those tasks in your own test, so you cancel ChatGPT Plus.

ChoiceSoftware cost per yearWhat the number leaves out
TextGen on a computer you already own$0Electricity, model storage, update time, and quality limits
ChatGPT Plus$240Hosted model access and OpenAI’s service operation
Software saving$240Only real if the local model replaces the paid work

The saving is real only when the local model does the work you were paying for. If you still need ChatGPT Plus for stronger reasoning, hosted tools, or team habits, TextGen is an added private workspace, not a saving. If you must buy a GPU or rent a server, the project does not publish a hardware price for your case. Price that purchase separately before claiming a payback period.

The licence needs plain words. AGPL-3.0 is a copyleft open-source licence. You can use TextGen without paying a licence fee, but modified versions and network-offered services can carry source-sharing obligations. This guide is not legal advice. Read the licence and each model licence before building a customer-facing service on the stack.

When not to self-host Text Generation WebUI

Do not self-host TextGen when the work needs guaranteed uptime, customer support, or the strongest hosted model on every request. A local app cannot promise any of those. It runs when your machine runs, and it answers with the model you loaded.

Do not choose TextGen when you want the least possible setup. GPT4All and Jan are friendlier first stops for simple desktop chat. Ollama is simpler when you want a model runner with fewer controls. LocalAI is cleaner when the API server is the main product. TextGen earns its place when controls, backends, extensions, training, or model experimentation are the point.

Do not expose TextGen to the internet as a casual experiment. Public flags exist, but public access needs authentication, network controls, updates, logs you control, and a plan for abuse. If you cannot maintain those pieces, keep the UI and API local.

Do not ignore model quality. A private wrong answer is still a wrong answer. Test TextGen on your real documents, with your real prompts, before moving customer work, legal work, medical work, or financial work to a local model.

Pros and cons

Pros: $0 under AGPL-3.0; portable builds include dependencies; GGUF models load from user_data/models; full install adds Transformers, ExLlamaV3, training, image generation, and extensions; OpenAI/Anthropic-compatible local API; no telemetry claim from the project; user_data makes backup and portable updates straightforward.

Cons: model quality and speed depend on your hardware and model choice; the project does not publish one fixed RAM or VRAM minimum; portable builds are GGUF-focused; full installs need about 10 GB plus models; network exposure needs deliberate authentication; AGPL-3.0 and model licences need reading before commercial service use; you own updates, backups, and downtime.

Our verdict

Install Text Generation WebUI if you want a private local LLM workspace with real controls and you are willing to test models like an operator, not a spectator. Start with the portable build, one small GGUF model, and one document task. Add the API only after chat works. Move to the full install only when a backend, training job, image model, or extension gives you a reason.

FAQ

Is Text Generation WebUI free for business use?

TextGen is free to download and use under the AGPL-3.0 licence. That covers the app. Check the licence of each model before business use, and get legal advice before offering a modified network service built on AGPL software.

Does Text Generation WebUI need a GPU?

No. Official portable builds include CPU-only options, and the full install has a CPU-only requirements route. A GPU usually makes generation faster, but the model size, quantization, context, and backend decide whether a machine is practical.

Where do I put GGUF models?

Put the .gguf file directly in user_data/models. The official README says the UI detects it automatically. Multi-file Transformers and EXL3 models belong in their own subfolder inside user_data/models and need the full installation.

How do I enable the Text Generation WebUI API?

Add --api to the launch flags. The API listens on port 5000 by default. Test http://127.0.0.1:5000/v1/chat/completions, and open http://127.0.0.1:5000/docs for the local API documentation.

Is Text Generation WebUI safe to expose on my network?

Not by default. Keep it local unless you deliberately set authentication and network controls. Use --gradio-auth for UI access, --api-key for API access, and a separate --admin-key for model administration.

Strategic Pivot: price the whole stack before you switch

TextGen can remove one subscription from a private workflow. It does not price the rest of your AI stack, and the rest is where small businesses quietly overspend. Before you cancel or renew any plan, put the tools, seats, and monthly prices you actually use into our AI Cost Calculator and look at the yearly total.

Then decide with the number in front of you. Move steady private work to TextGen when your own test proves the local model is good enough. Keep the hosted plan that earns its cost. Cancel the line that survives only because nobody added it up.

Sources

Price note — updated 1 December 2026: Prices in this post were checked on 1 December 2026. When you are reading this, the price may be lower or higher — always check the official pricing page before you buy.

Pros

  • $0 under AGPL-3.0
  • portable builds include dependencies
  • GGUF models load from user_data/models
  • full install adds Transformers, ExLlamaV3, training, image generation, and extensions
  • OpenAI/Anthropic-compatible local API
  • no telemetry claim from the project
  • user_data makes backup and portable updates straightforward

Cons

  • Model quality and speed depend on hardware and model choice
  • no single fixed RAM or VRAM minimum is published
  • portable builds are GGUF-focused
  • full installs need about 10 GB plus models
  • network exposure needs deliberate authentication
  • AGPL-3.0 and model licences need reading before commercial service use
  • you own updates, backups, and downtime
Our verdict

Install Text Generation WebUI if you want a private local LLM workspace with real controls. Start with the portable build, one small GGUF model, and one document task. Add the API only after chat works. Move to the full install only when a backend, training job, image model, or extension gives you a reason.

Leave a Comment