> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-chore-sync-comfy-api-v2-spec-463e218.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Linux — Comfy Desktop

> Build and run Comfy Desktop from source on Linux

**Comfy Desktop** can run on Linux, but there is no official published Linux installer yet. The [Downloads page](https://comfy.org/download) ships Windows and macOS only. On Linux, clone the [Comfy Desktop repository](https://github.com/Comfy-Org/Comfy-Desktop) and run it from source.

## System Requirements

* **OS:** Linux (Ubuntu 22.04 or later recommended)
* **Architecture:** x64
* **Node.js:** v22 LTS or later
* **pnpm:** v10 or later (enable with Corepack)
* **GPU:** A dedicated GPU (NVIDIA / AMD) is recommended, but not required
* **Disk Space:** At least 4.85 GB recommended per ComfyUI installation

## Build and run from source

These steps match the [Development](https://github.com/Comfy-Org/Comfy-Desktop#development) section in the repository README.

### Prerequisites

Install Node.js 22, then enable pnpm:

```bash theme={null}
nvm install 22 && nvm use 22
corepack enable
```

If you do not use nvm, install Node.js 22 from [nodejs.org](https://nodejs.org/) instead.

### Clone and install

```bash theme={null}
git clone https://github.com/Comfy-Org/Comfy-Desktop.git
cd Comfy-Desktop
pnpm run init
```

`pnpm run init` installs dependencies and builds the bundled bootstrap Python.

### Start the app

```bash theme={null}
./linux-dev.sh
```

This starts Comfy Desktop in development mode. The script sets `ELECTRON_DISABLE_SANDBOX=1` because Electron's sandbox often fails in Linux dev environments.

<Card title="Next Step: Using Comfy Desktop" icon="book-open" href="/installation/desktop/usage/overview">
  Once the app is running, learn how to create instances, manage installations, and configure settings.
</Card>

## Updating

There is no in-app auto-update for a source checkout. Pull the latest code and start the app again:

```bash theme={null}
git pull
pnpm run init
./linux-dev.sh
```

## Optional: local package

To produce a local `.deb` or AppImage for yourself (not an official Comfy Org download):

```bash theme={null}
pnpm run build:linux
```

Artifacts land in `dist/`. If an AppImage fails because Chromium cannot create a sandbox, retry with `--no-sandbox`. That flag disables Electron sandboxing for every process.

## Removing leftover data

Stopping the source checkout does not delete ComfyUI installations or app data. Delete these folders only if you want a complete cleanup:

| Data                    | Default Location                   | Description                                                                                                                 |
| ----------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Installations           | `~/ComfyUI-Installs`               | Each ComfyUI installation you created (can also be deleted from within the app). Custom install paths are also not removed. |
| Shared models & outputs | `~/ComfyUI-Shared`                 | Shared model library, input/output directories                                                                              |
| App config              | `~/.config/comfyui-desktop-2`      | Settings and installation records                                                                                           |
| App data                | `~/.local/share/comfyui-desktop-2` | Persistent app data                                                                                                         |
| Cache                   | `~/.cache/comfyui-desktop-2`       | Download cache and other non-essential files                                                                                |
| State                   | `~/.local/state/comfyui-desktop-2` | Runtime state such as port locks                                                                                            |
| Logs                    | `~/.config/comfyui-desktop-2/logs` | Desktop app logs (`app.log`)                                                                                                |

To fully remove everything:

1. **Delete the clone** of `Comfy-Desktop`
2. **Delete the config folder**: `~/.config/comfyui-desktop-2`
3. **Delete the data, cache, and state folders**: `~/.local/share/comfyui-desktop-2`, `~/.cache/comfyui-desktop-2`, and `~/.local/state/comfyui-desktop-2`
4. **Delete individual installations** from within the app, or manually delete `~/ComfyUI-Installs` plus any custom installation directories you configured
5. **Delete the shared model library** at `~/ComfyUI-Shared` (only if you no longer need these files)
