LINUX · NVIDIA · ORIGINAL REPOSITORY

Install Forge on Linux without hiding the first failure

With a working NVIDIA driver, Git, Python 3.10 and venv, clone the original repository and run ./webui.sh as your normal user. The current code contains this launcher; the project README still does not publish a complete supported Linux route.

01 · SCOPE CHECK

Choose the environment you actually have.

“Linux” is not one hardware path. The driver, acceleration backend and host boundary decide whether this procedure applies.

Choose a Linux Forge environment
COMMUNITY-REPORTED

Use the repository launcher with a clean local venv.

This guide covers a 64-bit Linux host where nvidia-smi already works, Git is available, and Python 3.10 can create a virtual environment. The Forge shell launcher exists in current source, but the project README still does not publish a complete supported Linux path.

Run the Linux preflight
02 · PREFLIGHT

Eight checks before one install command.

Tick a check only after its command succeeds in the exact shell that will run Forge. The receipt stays in your browser and sends nothing anywhere.

0 / 8Not ready to clone
FORGE_LINUX_PREFLIGHTLOCAL ONLY
uname -m
id -u
git --version
python3.10 --version
python3.10 -c "import venv; print('venv: OK')"
nvidia-smi
df -h .
03 · CLEAN INSTALL

Clone once. Let the launcher own its environment.

The commands below do not install a model. They establish a clean original-Forge runtime that can be tested before data and extensions are added.

  1. 01

    Prove the GPU driver before touching Forge

    Run nvidia-smi in the same Linux environment where Forge will run. If the command is missing or cannot see the GPU, fix the host or WSL driver layer first. Forge cannot repair that layer.

    nvidia-smi
  2. 02

    Verify a non-root, 64-bit shell

    The current webui.sh refuses root by default and exits on a 32-bit OS. Install into a directory owned by your normal user; do not answer a permissions problem by launching the whole application with sudo.

    uname -m
    id -u
    test -w . && echo 'directory: writable'
  3. 03

    Verify Git, Python and venv

    The shell tries python3.10 first, then falls back to python3. The launcher names Python 3.10.6 as tested. Confirm the exact interpreter can import venv before cloning.

    git --version
    python3.10 --version
    python3.10 -c "import venv; print('venv: OK')"
  4. 04

    Clone the original repository

    Clone lllyasviel/stable-diffusion-webui-forge—not a similarly named fork—and enter the checkout. Save the origin URL and full HEAD so the environment can be reproduced later.

    git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
    cd stable-diffusion-webui-forge
    git remote get-url origin
    git rev-parse HEAD
  5. 05

    Set the interpreter only when needed

    If python3.10 resolves correctly, leave webui-user.sh unchanged. If Python 3.10 lives elsewhere, set python_cmd in webui-user.sh to its absolute path. Do not edit webui.sh; its own header tells users to put overrides in webui-user.sh.

    ONLY WHEN NEEDED · webui-user.shpython_cmd="/absolute/path/to/python3.10"
  6. 06

    Launch with no extra flags

    Run ./webui.sh from the cloned repository as your normal user. The script creates venv when missing, upgrades pip, activates that environment and starts launch.py. Do not preinstall requirements or add xformers, CUDA skip flags or performance flags to the first baseline.

    ./webui.sh
  7. 07

    Let the first start finish

    The launcher can install Torch, pinned requirements and code assets before the UI appears. Keep the terminal open. Success is a running process that prints its Python version, Forge commit and a local URL—not merely a completed git clone.

    Python …Commit hash …Model loaded …Running on local URL …
  8. 08

    Verify and record the clean baseline

    Confirm the venv interpreter can import Torch and see CUDA, open the exact local URL, then record distro, kernel, GPU, driver, Python, Torch, Forge HEAD and launch flags before adding a model or extension.

    venv/bin/python -c "import torch; print(torch.__version__); print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0))"
    git rev-parse HEAD

04 · STARTUP LAYERS

Stop at the first layer that fails.

The final browser symptom is often downstream of a driver, interpreter or package failure already visible in the terminal.

01 · HOST

nvidia-smi fails

Forge has not started. Repair GPU visibility in native Linux or WSL before changing Python, Torch or launch flags.

02 · INTERPRETER

venv cannot be imported

Install venv support for the selected Python. Re-run the exact import; do not assume a generic python3-venv package matches a separately installed Python 3.10.

03 · ENVIRONMENT

Cannot activate python venv

Scroll up to the first python -m venv or pip error. Confirm write access and venv/bin/activate. Preserve a partial environment until its cause is recorded.

04 · TORCH

torch.cuda.is_available() is false

Record driver, GPU, Python, Torch build and wheel index. Do not hide Forge’s CUDA test; prove a compatible PyTorch environment instead.

Diagnose Python, CUDA and Torch →
05 · APPLICATION

A traceback stops before the URL

Capture the first traceback and exact commit. Test a clean source checkout before changing pinned packages or adding extensions.

Trace the startup failure →
06 · BROWSER

The terminal prints a URL but no tab opens

Keep the process running and open the exact local address manually. If the browser still cannot connect, check the port and host boundary without reinstalling.

05 · WSL 2

The driver belongs to Windows. Forge belongs to the Linux environment.

WSL 2 is not identical to native Ubuntu. Prove each side independently before starting the same repository procedure.

Read NVIDIA’s current WSL guide ↗
WINDOWS HOSTNVIDIA Windows driverInstall and update on Windows
WSL BRIDGEnvidia-smi visibleLimited output can be normal
LINUX USERSPACEGit + Python 3.10 + venvNo Linux display driver
FORGEOriginal repo + local venvRun as the WSL user
Do

Keep the initial checkout under your Linux home directory, verify GPU access inside WSL, and use the Windows driver recommended by NVIDIA.

Do not

Install cuda-drivers or another Linux NVIDIA display driver inside WSL, copy a ready-made venv from Windows, or diagnose /mnt/c permission behavior as if it were native Linux.

06 · EVIDENCE BOUNDARY

Do not turn old device branches into a support promise.

Current webui.sh contains AMD detection and old ROCm wheel URLs. Their presence proves code exists—not that those packages remain correct for your GPU and distribution.

UNKNOWN

AMD / ROCm

Needs an exact GPU, supported ROCm release, distribution, Python and Torch matrix. The Fedora video in our research manually replaces Torch in a custom environment; it is dated community evidence, not the original Forge default.

UNKNOWN

Intel / CPU

The launcher exposes device branches and flags, but this page has no clean generation result or current support matrix to publish.

COMMUNITY-REPORTED

Docker / cloud images

Third-party containers can be useful, but their images, entrypoints, credentials, ports and update policies belong to another maintainer. They are not official Forge binaries.

07 · LINUX FAQ

Answers that keep the environment attributable.

These questions were built from the repository gap, community failure reports, WSL guides and the exact launcher branches—not from keyword variations.

Can Stable Diffusion WebUI Forge run on Linux?

The original repository contains a Linux-capable webui.sh launcher, and community users report successful Linux installs. The current README does not provide a merged, complete Linux installation guide, so this page labels the route community-supported rather than official parity with the Windows package.

What is the shortest Linux installation sequence for Forge?

With a working NVIDIA driver, Git, Python 3.10 and venv support, clone the original repository, enter it and run ./webui.sh as a normal user. The launcher creates its local venv and prepares dependencies.

Which Forge repository should I clone on Linux?

Clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git. Verify git remote get-url origin after cloning so a fork or similarly named project is not mistaken for original Forge.

Which Python version should I use for Forge on Linux?

The inspected launcher accepts Python 3.7 through 3.11 on non-Windows systems but explicitly says the program is tested with Python 3.10.6. We use Python 3.10 for the controlled baseline because accepted by a version check is not the same as verified against every pinned package.

Why does webui.sh use python3 instead of python3.10?

The current shell first looks for python3.10 and falls back to python3 when that executable is unavailable. If python3 points to an unsuitable interpreter, set python_cmd to the intended absolute Python 3.10 path in webui-user.sh.

Do I need to create the Forge venv manually?

Normally no. Current webui.sh creates the venv directory when it is missing, upgrades pip and activates venv/bin/activate. Manually creating another environment can make it unclear which interpreter installed the packages.

Why does Forge say python3-venv is not installed?

The selected interpreter could not import the venv module. Install the matching venv package for that exact Python through your distribution, then rerun the preflight import. Do not continue until that command succeeds.

How do I fix “Cannot activate python venv, aborting” in Forge?

Check the earlier output from python -m venv, confirm venv/bin/activate exists, and verify the install directory is writable. A partial venv or an interpreter without ensurepip can produce the final activation message. Preserve the first error before recreating only the Forge-local venv.

Should I run Forge as root or with sudo?

No for a normal desktop installation. webui.sh blocks root by default. Use a user-owned folder and normal account so generated files and the venv do not become root-owned.

Do I need to install the full CUDA Toolkit for Forge on Linux?

The controlled baseline requires a compatible NVIDIA driver and lets Forge install its configured PyTorch wheels. A development CUDA Toolkit is a separate requirement for compiling CUDA software; do not install it merely because nvidia-smi shows a CUDA capability value.

What does the CUDA version shown by nvidia-smi mean?

It indicates the maximum CUDA version supported by the installed driver, not proof that an identically numbered Toolkit is installed. Forge must still load a PyTorch build compatible with the driver and GPU architecture.

Why does Forge install Torch 2.3.1 on Linux?

At the inspected Forge commit, launch_utils.py defaults to torch 2.3.1, torchvision 0.18.1 and the CUDA 12.1 wheel index unless an environment override changes the command. This is a dated source default, not a current-hardware compatibility guarantee.

Should I run pip install -r requirements.txt before webui.sh?

Not for the clean path in this guide. The launcher manages Torch and then checks the pinned requirements file. A proposed Linux README PR used manual pip steps but remains unmerged and even received a correction about the requirements filename.

Should I add --xformers on the first Linux launch?

No. Start without optional acceleration flags so a package or launch failure has fewer possible causes. Add one justified change only after the clean baseline works and record the before-and-after result.

How do I pass command-line flags to Forge on Linux?

Set export COMMANDLINE_ARGS="..." in webui-user.sh, which webui.sh sources before launch. Keep the variable empty for the first baseline; do not modify webui.sh itself.

Why does ./webui.sh return permission denied?

A Git clone should preserve the executable bit. First verify the file and repository identity. Running bash webui.sh is a diagnostic fallback; avoid downloading a lone script from a mirror or changing permissions before confirming its source.

Why does the browser not open after running webui.sh?

Read the terminal. If no local URL was printed, startup failed before the server was ready. If a URL was printed and the process is still running, open that exact address manually and route remaining connection symptoms through the startup guide.

Can I install Forge in WSL 2?

Community evidence shows WSL 2 installs, but treat WSL as a distinct environment. Prove GPU access inside WSL first. NVIDIA instructs users to install the Windows NVIDIA driver and not a Linux display driver inside WSL.

Where should I store Forge inside WSL 2?

For the first baseline, keep the checkout and venv in the Linux filesystem rather than under /mnt/c. This avoids mixing Windows file semantics into Python environment diagnosis. Model-sharing decisions can be made after the clean launch works.

Does this Linux guide support AMD ROCm?

No. The page deliberately covers NVIDIA CUDA only. The current shell contains dated ROCm branches and community procedures disagree on Python, Torch and ROCm versions; those require a separately tested AMD path.

Does this guide support Fedora, Arch or openSUSE?

The Forge shell contains a historical distro-tested message, but that is inherited code rather than a current Forge certification matrix. The repository launch sequence is the same; package names and Python availability must be verified for the exact distribution.

How do I update a Linux Git installation of Forge?

Stop Forge, save git status and the full current HEAD, then use the dedicated update-and-rollback procedure. Do not combine the first successful install with an unrecorded source update, package replacement and new extensions.

08 · EVIDENCE

Code sets behavior. Community sources expose the gaps.

No community recipe overrides the inspected original source. Inaccessible sources remain visible as unavailable rather than silently supplying claims.

PRIMARY / DIRECTOriginal Forge repository and READMEDefines original-project identity and shows that the published install section remains Windows-first.PRIMARY / DIRECTCurrent webui.shDefines interpreter selection, non-root and 64-bit gates, venv creation, user override loading and launch flow.PRIMARY / DIRECTCurrent webui-user.shDefines the supported location for python_cmd, COMMANDLINE_ARGS, TORCH_COMMAND and other overrides.PRIMARY / DIRECTCurrent launch_utils.pyDefines the Python check, Torch default, CUDA availability test, requirements and source-state output.PRIMARY / DIRECTCurrent requirements_versions.txtPinned application dependency snapshot used by the launcher.PRIMARY / DIRECTInspected original Forge commitExact source snapshot checked locally on 29 August 2026.PRIMARY / DIRECTLinux documentation gap · issue #138Community reports, successful examples and recurring venv failures; not maintainer-approved instructions.PRIMARY / DIRECTUnmerged Linux documentation · PR #2896Confirms demand and a proposed procedure, but remains open and cannot be presented as official documentation.PRIMARY / DIRECTPyTorch Linux installation and verificationCurrent upstream GPU-build selection and torch.cuda.is_available verification boundary.PRIMARY / DIRECTPython venv documentationExplains isolated environments, ensurepip and the POSIX activation layout.PRIMARY / DIRECTGitHub clone documentationPrimary explanation of repository cloning.PRIMARY / DIRECTNVIDIA CUDA compatibilitySeparates driver compatibility from installed Toolkit assumptions.PRIMARY / DIRECTNVIDIA CUDA on WSL guideDefines the Windows-driver boundary and warns against a Linux display driver inside WSL.
Research catalog reviewed · 6 records
AuthorForge Field Guide editorial teamReviewerTechnical editorial reviewUpdated29 Aug 2026EnvironmentSource-audited · bash syntax checked · no GPU run
NEXT

The UI opened. Keep the baseline clean.

Add one compatible model, make one controlled image, and record the result before installing extensions.

Create the first image