LLMAIAI Coding Agents

TextGen (text-generation-webui): a local LLM desktop app and API (Linux, Windows, Mac)

Before you start

  • 20 min read

Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#

TextGen, formerly called text-generation-webui, is a free app that runs AI language models (LLMs) on your own computer: you get a chat window and an OpenAI-style API for your other tools, and by default your prompts stay on your machine.

TextGen official logo

Logo: the official TextGen project (github.com/oobabooga/textgen)

You download one archive, put a model file in a folder and start chatting. It can also read images, attach PDFs, call tools and switch between model engines.

WhatValue (official sources, read November 2026)
Current versionv4.9, released 20 May 2026 (previous: v4.8, 7 May 2026)
Time neededAbout 20 minutes plus the model download (our estimate, not measured)
RAM and diskThe project gives no minimum; the model decides. Portable archive 0.3 to 1.3 GB, full install about 10 GB
PortsTCP 7860 (chat page), TCP 5000 (API)
LicenceGNU AGPL v3 (GitHub shows AGPL-3.0); no paid edition found
Official docsWiki and README at v4.9

Screenshot of the TextGen desktop window in dark mode: a chat list on the left, a conversation with web search tool calls in the middle, and tool and mode settings on the right

Image: the official TextGen project (README at v4.9, "Chat mode" screenshot). It shows version 4.8, so small details may differ.

At a glance:

  • Easiest route: the portable build. Unzip, double-click textgen, a window opens. It runs GGUF models (a single-file model format).
  • Full install: needed for ExLlamaV3, Transformers, LoRA training, image generation and extensions.
  • Docker: no official image. You build it yourself, and the build is not pinned (Step 7).

The rename, and which version. The project was renamed in v4.5.2 (15 April 2026): "The GitHub URL is now github.com/oobabooga/textgen." The old address redirects. It is the same project and author. We keep the old name because people search for it. Activity is slow: the last release is v4.9, the newest commit is from 17 August 2026, and the repository is not archived. Open v4.9 bugs (see Known bugs) hit specific setups, so we pin v4.9.

How it fits together#

You open the chat page or API, TextGen loads a model file through a helper program, and everything is saved in one user_data folder.

Flow: a desktop window or browser reaches the TextGen Python app on port 7860 and your own tools reach its API on port 5000; TextGen starts llama-server for GGUF models, reads and saves the user_data folder, and only if you switch it on talks to the internet; Caddy or Traefik is an optional HTTPS layer in front

Drawn for this guide from the official README, launcher script and source files at v4.9. Dashed parts are optional.

The internet is used for model downloads, the web_search and fetch_webpage tools, and remote tool servers (MCP) you add. The README claims no telemetry.

Before you start#

The portable route needs no Python, no Docker and no admin rights. You need curl and tar (Linux, Mac) or PowerShell (Windows 64-bit). Windows on ARM is not documented. For the full install you also need Git.

Pick the build that matches your hardware:

Your hardwareBuild name partHow to choose
NVIDIA GPUcuda13.1 or cuda12.4nvidia-smi shows CUDA Version. 13.1 or higher: cuda13.1, otherwise cuda12.4
NVIDIA DGX Spark (Linux ARM64)linux-arm64-cuda13.1The only ARM64 build
AMD or Intel GPUvulkanLinux and Windows
AMD GPU with ROCmrocm7.2Not on Windows RDNA 4 cards (issue 7546): use vulkan
No GPUcpuSlower, works everywhere
Apple Silicon or Intel Macmacos-arm64 or macos-x86_64Pick by the chip in "About This Mac"

Builds named ik use a llama.cpp fork; if unsure, take the normal one.

Check your tools (skip nvidia-smi without an NVIDIA card; on Windows both commands also work in PowerShell):

Run in terminalbash
tar --version
nvidia-smi

Checklist:

  • [ ] You know which build name part fits your hardware
  • [ ] Free disk for the archive, its files and a model (0.5 to 6 GB to start)
  • [ ] Your install folder path has no spaces (the full install refuses them)
  • [ ] Ports 7860 and 5000 are free
  • [ ] HTTPS section only: a domain with a DNS record, and ports 80 and 443 free

Tested by DIY Lab Hub: not yet. Commands come from the official README, release notes, source files and archive contents at v4.9, read November 2026. We did not run them.

Step 1: Download and unpack the portable build#

The portable build ships its own Python and llama.cpp. Windows commands use C:\ai, a path without spaces.

Linux#

Run in terminalbash
mkdir -p ~/ai && cd ~/ai
ARCHIVE="textgen-portable-4.9-linux-cpu.tar.gz"
# NVIDIA with CUDA below 13.1: textgen-portable-4.9-linux-cuda12.4.tar.gz
curl -fL -o "$ARCHIVE" "https://github.com/oobabooga/textgen/releases/download/v4.9/$ARCHIVE"
ls -lh "$ARCHIVE"
tar -xzf "$ARCHIVE"
ls textgen-4.9

Windows (PowerShell)#

Codepowershell
New-Item -ItemType Directory -Force C:\ai | Out-Null
Set-Location C:\ai
$Archive = "textgen-portable-4.9-windows-cpu.zip"
# NVIDIA with CUDA below 13.1: textgen-portable-4.9-windows-cuda12.4.zip
curl.exe -fL -o $Archive "https://github.com/oobabooga/textgen/releases/download/v4.9/$Archive"
Get-Item $Archive | Select-Object Name, Length
Expand-Archive -Path $Archive -DestinationPath .
Get-ChildItem .\textgen-4.9

Mac (Terminal)#

The build is not signed. The release notes say to clear the quarantine flag on the whole folder, not on one file (issue 7558).

Run in terminalbash
mkdir -p ~/ai && cd ~/ai
ARCHIVE="textgen-portable-4.9-macos-arm64.tar.gz"
# Intel Mac: textgen-portable-4.9-macos-x86_64.tar.gz
curl -fL -o "$ARCHIVE" "https://github.com/oobabooga/textgen/releases/download/v4.9/$ARCHIVE"
tar -xzf "$ARCHIVE"
xattr -cr ~/ai/textgen-4.9
ls textgen-4.9

Check it worked. The archive is 0.3 to 1 GB (an error page would be tiny). The folder textgen-4.9 holds app, user_data and the launcher textgen (textgen.bat on Windows).

Step 2: Download a model#

TextGen needs a model file. The portable build runs GGUF files placed in user_data/models. We start with a tiny test model, Qwen_Qwen3-0.6B-Q4_K_M.gguf (about 484 MB), the file name the official API wiki uses. The original Qwen3 models are Apache-2.0.

Linux#

Run in terminalbash
cd ~/ai/textgen-4.9
curl -fL -o user_data/models/Qwen_Qwen3-0.6B-Q4_K_M.gguf \
  "https://huggingface.co/bartowski/Qwen_Qwen3-0.6B-GGUF/resolve/main/Qwen_Qwen3-0.6B-Q4_K_M.gguf"
ls -l user_data/models

Windows (PowerShell)#

Codepowershell
Set-Location C:\ai\textgen-4.9
curl.exe -fL -o user_data\models\Qwen_Qwen3-0.6B-Q4_K_M.gguf "https://huggingface.co/bartowski/Qwen_Qwen3-0.6B-GGUF/resolve/main/Qwen_Qwen3-0.6B-Q4_K_M.gguf"
Get-Item user_data\models\Qwen_Qwen3-0.6B-Q4_K_M.gguf | Select-Object Name, Length

Mac (Terminal)#

Same commands as Linux.

Check it worked. The file is about 484 MB (484,220,320 bytes when we checked).

A 0.6B model is only a test. For real use try Qwen3 4B or 8B Q4_K_M (2.5 and 5.0 GB, in the bartowski/Qwen_Qwen3-4B-GGUF and -8B-GGUF repositories). Estimate memory first with the author's GGUF memory calculator or our VRAM guide. The Model tab can also download models.

Step 3: Start TextGen and chat#

The launcher opens a desktop window. --no-electron skips it so you use your own browser. --listen is different: it opens the network (read Security first). Never use --share or --public-api.

Linux#

Run in terminalbash
cd ~/ai/textgen-4.9
./textgen
# Browser instead of the window: ./textgen --no-electron

Windows (PowerShell)#

Codepowershell
Set-Location C:\ai\textgen-4.9
.\textgen.bat
# Browser instead of the window: .\textgen.bat --no-electron

Mac (Terminal)#

Same commands as Linux.

Check it worked. A TextGen window opens, or the terminal prints Running on local URL: http://127.0.0.1:7860 (the form seen in issue logs) and you open that address. Then:

  1. Open the Model tab, pick Qwen_Qwen3-0.6B-Q4_K_M.gguf and click Load.
  2. Open the Chat tab, type Say hello in five words. and press Enter.

A short reply appears. If the app closes at once, see Troubleshooting.

Tip: The launcher always starts the API too. Both ports listen on 127.0.0.1 only until you add --listen.

Step 4: Use the API from your own tools#

The API follows the OpenAI style (and the Anthropic style). It answers at http://127.0.0.1:5000/v1, with docs at http://127.0.0.1:5000/docs. The wiki says it does not connect to OpenAI. Load a model in the app first. If you set --api-key, add the header Authorization: Bearer <your-api-key>.

Linux#

Run in terminalbash
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}'

Windows (PowerShell)#

Codepowershell
$body = '{"messages":[{"role":"user","content":"Hello!"}],"temperature":0.6,"top_p":0.95,"top_k":20}'
Invoke-RestMethod -Method Post -Uri "http://127.0.0.1:5000/v1/chat/completions" -ContentType "application/json" -Body $body | ConvertTo-Json -Depth 6

Mac (Terminal)#

Same commands as Linux.

Check it worked. The answer is JSON with choices and the model's text. The request body is the official wiki example.

To point another app at it, set OPENAI_API_BASE=http://127.0.0.1:5000/v1 and OPENAI_API_KEY (any text, or your key). Add "stream": true for streaming.

Step 5: Save your flags in CMD_FLAGS.txt#

Flags are options such as --model. TextGen reads user_data/CMD_FLAGS.txt at start. Lines starting with # are ignored, the other lines are joined with spaces, and flags you type on the command line win. These commands replace the file, so edit it by hand if you already added flags.

Linux#

Run in terminalbash
cat > ~/ai/textgen-4.9/user_data/CMD_FLAGS.txt << 'EOF'
# load this model at start
--model Qwen_Qwen3-0.6B-Q4_K_M.gguf
--cache-type q8_0
EOF

Windows (PowerShell)#

File contentpowershell
@'
# load this model at start
--model Qwen_Qwen3-0.6B-Q4_K_M.gguf
--cache-type q8_0
'@ | Set-Content -Encoding ascii C:\ai\textgen-4.9\user_data\CMD_FLAGS.txt

Mac (Terminal)#

Same commands as Linux.

Check it worked. After a restart the model loads by itself. The name must match a file in user_data/models.

Step 6: Install the full version (optional)#

Skip this if you only chat with GGUF models. The full install (about 10 GB, it downloads PyTorch) adds the ExLlamaV3 and Transformers engines, LoRA training (a small add-on that fine-tunes a model), image generation and extensions.

The one-click scripts need no admin rights. They build a Python 3.13 environment in installer_files and ask for your GPU: A NVIDIA, B AMD (Linux only), C Apple M series, D Intel Arc (beta), N CPU.

Linux#

Run in terminalbash
cd ~/ai
git clone https://github.com/oobabooga/textgen.git textgen-full
cd textgen-full
git checkout v4.9
./start_linux.sh

Windows (PowerShell)#

Codepowershell
Set-Location C:\ai
git clone https://github.com/oobabooga/textgen.git textgen-full
Set-Location textgen-full
git checkout v4.9
.\start_windows.bat

Mac (Terminal)#

Run in terminalbash
cd ~/ai
git clone https://github.com/oobabooga/textgen.git textgen-full
cd textgen-full
git checkout v4.9
./start_macos.sh

Check it worked. After the GPU question and the downloads, the console prints Running on local URL: with http://127.0.0.1:7860. Restart later with the same script. Models still go in user_data/models.

Tip: git checkout v4.9 pins the code. The update wizard later moves you to the newest release tag on purpose.

Step 7: Run it in Docker (advanced)#

Read this first. The official Docker route has three problems.

  • No official image. Docker Hub has none under oobabooga. The README links a community wrapper, Atinoda/text-generation-webui-docker, which is not official.
  • Not pinned. The official Dockerfile runs git clone https://github.com/oobabooga/textgen.git with no tag, so it builds the current main branch, not v4.9.
  • Open bug. Issue 7592: an NVIDIA Docker build cannot load a GGUF (see Known bugs).

If you still want Docker, follow the official wiki layout. You need Docker Compose v2.17 or newer and, for NVIDIA, the NVIDIA Container Toolkit. The folders docker/amd, docker/intel (beta) and docker/cpu hold the other variants.

We changed the official compose file in three ways: no obsolete version: line, ports on 127.0.0.1, and restart: unless-stopped.

Linux#

Run in terminalbash
mkdir -p ~/docker_volumes/textgen && cd ~/docker_volumes/textgen
git clone --branch v4.9 --depth 1 https://github.com/oobabooga/textgen.git src
cd src/docker/nvidia
cp ../.env.example .env
sed -i "s/^APP_RUNTIME_GID=.*/APP_RUNTIME_GID=$(id -g)/" .env
nvidia-smi --query-gpu=name,compute_cap --format=csv
mkdir -p user_data/logs user_data/cache user_data/models
printf '%s\n' '--api' > user_data/CMD_FLAGS.txt
cp docker-compose.yml docker-compose.official.yml

The nvidia-smi line shows your GPU's compute capability. If it is not 8.6 or 8.9, set it as TORCH_CUDA_ARCH_LIST in .env, as the official comment says. Copy the test model from Step 2 into user_data/models. Then replace docker-compose.yml with this file:

File contentyaml
services:
  textgen:
    build:
      context: .
      args:
        TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST:-8.6;8.9+PTX}
        BUILD_EXTENSIONS: ${BUILD_EXTENSIONS:-}
        APP_GID: ${APP_GID:-6972}
        APP_UID: ${APP_UID:-6972}
    env_file: .env
    user: "${APP_RUNTIME_UID:-6972}:${APP_RUNTIME_GID:-6972}"
    restart: unless-stopped
    ports:
      - "127.0.0.1:${HOST_PORT:-7860}:${CONTAINER_PORT:-7860}"
      - "127.0.0.1:${HOST_API_PORT:-5000}:${CONTAINER_API_PORT:-5000}"
    stdin_open: true
    tty: true
    volumes:
      - ./user_data:/home/app/textgen/user_data
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
Run in terminalbash
docker compose up -d --build
docker compose ps
docker compose logs --tail=50 textgen

Windows (PowerShell)#

Docker Desktop passes an NVIDIA GPU to Linux containers only with the WSL 2 backend (Docker GPU docs). Turn on Docker Desktop's WSL integration for an Ubuntu distro, open that distro, and run the Linux commands above inside it.

Run in terminalpowershell
wsl --update
wsl -d Ubuntu

Inside Ubuntu, docker version must work before you build.

Mac (Terminal)#

Docker on a Mac cannot use the Apple GPU. Use the portable build (Step 1) or the full install (Step 6).

Check it worked. docker compose ps shows textgen running. The first build downloads PyTorch and takes long. Open http://127.0.0.1:7860, load the test model and chat. If loading fails with libllama-common.so.0, you hit issue 7592.

Tip: The container starts ./start_linux.sh --listen and no --api. That is why we write --api into user_data/CMD_FLAGS.txt. Without it port 5000 is published but nothing answers.

Put it behind HTTPS (with or without Traefik)#

Skip this if you use TextGen only on your own computer. You need a domain with a DNS record and ports 80 and 443 reachable. Use a host name such as textgen.<your-domain>, not a sub-path (--subpath exists, but we did not test it).

Set the login and the API key first (see Security). Without --listen the API refuses any Host header except localhost and 127.0.0.1. With --listen it also allows requests from any web page. The examples below serve the chat page only; the API needs its own host name, --listen and --api-key.

Create the shared network once:

Run in terminalbash
docker network create proxy

With Traefik#

For the Docker route of Step 7. Edit the Step 7 compose file: delete the ports: block and merge in the network and labels. We assume Traefik v3 with the Docker provider and an entrypoint named https; use your own name.

File contentyaml
services:
  textgen:
    # same build, env_file, user, restart, volumes and deploy as in Step 7, but no ports
    networks:
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.http.routers.textgen.rule=Host(`textgen.<your-domain>`)"
      - "traefik.http.routers.textgen.entrypoints=https"
      - "traefik.http.routers.textgen.tls=true"
      - "traefik.http.services.textgen.loadbalancer.server.port=7860"

networks:
  proxy:
    external: true

Run docker compose up -d. Check it worked. curl -I https://textgen.<your-domain>/ shows an HTTP status line over HTTPS with a valid certificate. Then open the page in a browser and log in.

Without Traefik: Caddy#

Caddy gets and renews Let's Encrypt certificates by itself. For a home-only name add tls internal; each device must then trust Caddy's root certificate once (our Caddy guide has the steps). We mount the conf folder, not a single file.

Run in terminalbash
mkdir -p ~/docker_volumes/caddy/{conf,data,config}
cd ~/docker_volumes/caddy
cat > docker-compose.yml << 'EOF'
services:
  caddy:
    image: caddy:2.11.9
    container_name: caddy
    restart: unless-stopped
    ports:
      - "80:80/tcp"
      - "443:443/tcp"
      - "443:443/udp"
    volumes:
      - ./conf:/etc/caddy:ro
      - ./data:/data
      - ./config:/config
    networks:
      - proxy

networks:
  proxy:
    external: true
EOF

For the Docker route, join the textgen service to the proxy network too. Save ~/docker_volumes/caddy/conf/Caddyfile:

File contenttext
textgen.example.com {
    reverse_proxy textgen:7860
}

For the portable build with Caddy as a program on the same host, use reverse_proxy 127.0.0.1:7860. Inside a Caddy container 127.0.0.1 is the container itself.

Run docker compose up -d in the Caddy folder. Check it worked. curl -I https://textgen.example.com/ shows an HTTP status line over HTTPS; then log in from a browser.

Tip: On Windows use curl.exe. The Docker and Caddy commands work unchanged in PowerShell and Mac Terminal.

Security and testing#

The default is safe: both ports listen on 127.0.0.1. Risk starts when you add --listen.

ControlWhat to do
Bind address--listen opens the UI and API on all interfaces; the source warns about an open web UI
Web login--gradio-auth user:pass, or better --gradio-auth-path <file> with chmod 600. The source splits on , and :, so keep both out of the password
API keyThe UI login does not protect port 5000. Set --api-key <key>; clients send Authorization: Bearer <key>. --admin-key guards model loading and defaults to the API key
TunnelsNever use --share (a proprietary tunnel) or --public-api (a Cloudflare URL)
Code you runTools in user_data/tools/ and stdio MCP servers in user_data/mcp.json run code on your machine. Keep "Confirm tool calls" ticked
Model code--trust-remote-code lets a model run code. Leave it off
Several users--multi-user is for small trusted teams: not for the internet, chats are not saved, Stop stops everyone

What leaves the machine: model downloads, web_search (DuckDuckGo), fetch_webpage and any remote MCP server. --verbose prints your prompts to the terminal.

Create a login file and an API key (Linux and Mac; on Windows use Notepad in C:\ai\textgen-4.9\user_data):

Run in terminalbash
cd ~/ai/textgen-4.9
printf 'admin:<long-password-without-comma-or-colon>\n' > user_data/auth.txt
chmod 600 user_data/auth.txt
printf '%s\n' '--gradio-auth-path user_data/auth.txt' '--api-key <your-api-key>' >> user_data/CMD_FLAGS.txt

Restart TextGen with --no-electron. Check it worked. The browser asks for the login. This call prints 401 without the key (the source raises 401):

Run in terminalbash
curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:5000/v1/internal/model/list

With -H "Authorization: Bearer <your-api-key>" it lists your models. Make sure the login really appears; a relative path depends on the folder the server runs in.

Model engines: which one for which model#

TextGen calls its engines loaders. You pick one in the Model tab, and it can switch without a restart.

LoaderModel formatInstallWhen to use it
llama.cppOne .gguf filePortable or fullThe default. CPU, NVIDIA, AMD and Apple
ik_llama.cpp.ggufik portable build, or --ikOnly for newer quant types
ExLlamaV3EXL3 folderFullGPU speed; parallel requests out of the box
TransformersMulti-file Hugging Face folderFullUnquantised models, training
TensorRT-LLMEngine folderFullNVIDIA special cases

Multi-file models need their own sub-folder in user_data/models.

Common mistakes#

These come from the official source, release notes and GitHub issues.

MistakeWhy it happensDo this instead
AI assistants: invent oobabooga/text-generation-webui:latest, a ghcr.io image or a Docker tag equal to the releaseNo official image existsUse the portable archive (Step 1) or build from source (Step 7)
AI assistants: copy Open WebUI settings (OLLAMA_BASE_URL, 3000:8080, admin sign-up) or call port 5000 the web pageMixed up with another toolUI is 7860, API is 5000, models are files. There is no sign-up
AI assistants and old guides: start_linux.sh for a portable build, or --row-splitv4.7.3 moved portable builds to textgen / textgen.bat and replaced --row-split with --split-mode./textgen or .\textgen.bat; --split-mode
xattr on one file on a MacThe whole unsigned bundle is quarantined (issue 7558)xattr -cr on the whole folder
Looking for training in the portable buildIt has no PyTorch (issue 7500)Full install (Step 6)
Expecting TextGen to use Ollama or a remote APIIt hosts models itself (issue 7561)Run the model in TextGen, or use a front end like Open WebUI
API through a proxy without --listenThe API checks the Host header and answers 400--listen plus --api-key (see HTTPS)
--listen with no login or keyUI and API then listen on every interface--gradio-auth-path and --api-key first
A login password with , or :The login list is split on bothLetters, digits, - or _
Expecting Docker to build v4.9The Dockerfile clones main, no tagKnow it, or use the portable build

Tip: Start with the 0.6B test model. If it loads and replies, the install is fine and any later problem is model size or settings.

Tip: Check the build name against nvidia-smi before you download 900 MB. cuda13.1 needs CUDA Version 13.1 or higher.

Tip: Check a flag against ./textgen --help before you save it. Flags change: --draft-max broke in v4.7.3 and was fixed in v4.8 (issue 7541).

Troubleshooting#

ProblemSolution
The window opens and closesRun ./textgen --no-electron and read the terminal. On Windows 11 with the CUDA 13.1 build, try cuda12.4 (issue 7598)
A browser tab opens on every startThe start_ scripts add --auto-launch for portable setups (issue 7475). Use the window or --no-electron
Replies loop or are garbage (Gemma 4 31B derivatives)Try another chat template or chat-instruct mode (issue 7684)

Exact error texts#

  • {"detail":"Invalid host header"}: the API accepts only localhost and 127.0.0.1 as Host unless --listen is set. Add --listen and --api-key.
  • This script relies on Miniforge which can not be silently installed under a path with spaces.: move the full-install folder to a path without spaces.
  • invalid value for main_gpu: 0 (available devices: 0): AMD Linux full install. The reporter installed the missing ROCm libraries, rocm-hip-libraries (issue 7665).
  • ROCm error: device kernel image is invalid: Windows, RX 9070 XT. AMD's reply: a known Windows ROCm limit on RDNA 4. Use the vulkan build.
  • Old Docker reports: FileNotFoundError: [Errno 2] No such file or directory: 'user_data/characters' (v3.1 era, issue 6916: the mounted user_data lacked the default folders), There was a problem when trying to write in your cache folder (2024, issue 5457: give the group write access) and error while loading shared libraries: libgomp.so.1 (2025, issue 6917: apt install libgomp1).

Known bugs (open, November 2026)#

  • Issue 7592: a reported NVIDIA Docker failure. The image builds, then a GGUF fails with llama-server: error while loading shared libraries: libllama-common.so.0: cannot open shared object file: No such file or directory and Server process terminated unexpectedly with exit code: 127. A second user saw it. No fix is posted.
  • Issue 7629: Continue after one message that fills the context raises jinja2.exceptions.UndefinedError: list object has no element 0. Use shorter messages or a bigger --ctx-size.
  • Issue 7584: Gemma 4 vision freezes after an image sent with no text (number of bitmaps (1) does not match number of markers (0)).
  • Issue 7598: the Windows cuda13.1 build closes after about five seconds for two users.

Diagnose with ./textgen --help and, for Docker, docker compose logs --tail=100 textgen.

Updates and backups#

Portable build. Download and extract the new release, then replace its user_data with yours. Since version 4.0 you can keep user_data one folder up, next to the install folders, and it is found automatically.

Full install. Run update_wizard_linux.sh, update_wizard_windows.bat or update_wizard_macos.sh. It moves you to the newest release tag.

Docker. docker compose pull does not rebuild a locally built image. Rebuild with --no-cache, or the cached git clone layer stays old (and the build is still unpinned):

Run in terminalbash
cd ~/docker_volumes/textgen/src/docker/nvidia
docker compose build --no-cache
docker compose up -d

Back up the active user_data folder (chats, characters, presets, tools, models). Stop TextGen first. The backup holds your chats, so keep it private. For automatic copies see our restic guide.

Linux#

Run in terminalbash
mkdir -p ~/ai/backups
tar -czf ~/ai/backups/textgen-userdata-$(date +%F).tar.gz -C ~/ai/textgen-4.9 user_data
chmod 600 ~/ai/backups/textgen-userdata-*.tar.gz

Windows (PowerShell)#

Codepowershell
New-Item -ItemType Directory -Force C:\ai\backups | Out-Null
tar -czf "C:\ai\backups\textgen-userdata-$(Get-Date -Format yyyy-MM-dd).tar.gz" -C C:\ai\textgen-4.9 user_data

Mac (Terminal)#

Same commands as Linux. If you moved user_data elsewhere, point -C at that folder. Schedule it at 03:00 with crontab -e (Linux, Mac) or Task Scheduler (Windows).

Restore test. Unpack into a new empty folder, never over the live one:

Run in terminalbash
mkdir -p /tmp/restore-test && tar -xzf ~/ai/backups/textgen-userdata-<date>.tar.gz -C /tmp/restore-test
ls /tmp/restore-test/user_data

You should see CMD_FLAGS.txt, models and characters. For full proof, start TextGen with --user-data-dir on the restored folder and open a saved chat.

Performance and resources#

The project publishes no RAM or VRAM minimum and no benchmark, so we give no figure. Model size plus context size (how much text it remembers) decide memory. Layers that do not fit in GPU memory run on the slower CPU. Measure with nvidia-smi, Task Manager, Activity Monitor or htop.

FlagWhat it does (README at v4.9)
--gpu-layersLayers on the GPU; -1 = auto
--ctx-sizeContext in tokens; 0 = auto for llama.cpp (needs gpu-layers -1); 8192 for other loaders
--cache-typeContext cache type for llama.cpp: fp16, q8_0 (uses less memory than fp16), q4_0
--threads, --threads-batchCPU threads for generation and for reading the prompt
--parallel NN request slots; context is divided between them (4 x 8192 needs 32768)
--idle-timeout NUnload the model after N idle minutes; it reloads on use
--split-mode, --tensor-splitSpread a model over several GPUs

TextGen or something else?#

ToolChoose it whenPort, licence
TextGenOne app with several engines, characters, tools and training7860 and 5000, AGPL-3.0
KoboldCppOne single file for GGUF models5001, AGPL-3.0
LM Studio headlessA polished model manager and local API1234, app is proprietary
Open WebUI with OllamaA web front end for Ollama or a remote API3000

TextGen cannot be a front end for another server. For a small Docker API server see our llama.cpp guide; for a front end, SillyTavern.

FAQ#

Is TextGen the same as text-generation-webui? Yes. It was renamed in v4.5.2. The old GitHub address redirects to github.com/oobabooga/textgen.

Do I need a GPU? No. Every system has a cpu build. Small models run on the CPU, only slower.

Can I train a LoRA? Not in the portable build, which has no PyTorch. Use the full install (Step 6).

Can I connect it to Ollama? Not as its model (issue 7561). Other apps can use TextGen's API at http://127.0.0.1:5000/v1.

Is it private? The README says no telemetry, external resources or automatic update requests. Data leaves only through downloads and the tools you switch on (see Security).

Sources#

Checked against the official docs on 2026-11-21.