> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Startup arguments in Comfy Desktop: flags, ComfyUI Manager, and ports

> Set a build's command-line flags, ComfyUI Manager security and network mode, launch mode, browser cache, port behavior, and environment variables in Comfy Desktop.

This page covers the **Startup arguments** tab of a build's page. To install, add, or connect the build, see [Builds](https://docs.comfy.org/installation/desktop/usage/instance-management.md).

## Set startup arguments

The **Startup arguments** tab on the build page controls how ComfyUI starts for this build: its command-line flags, ComfyUI Manager policy, window, and environment.

![Startup arguments tab of a Standalone build, numbered: 1 Startup arguments, 2 Manager security level, 3 Launch mode, 4 Browser cache](https://mintcdn.com/dripart/9B5KNlbcvxyUwmr7/images/desktop/usage/comfy-desktop-startup-arguments.png?fit=max\&auto=format\&n=9B5KNlbcvxyUwmr7\&q=85\&s=98747f80c3b725febf159d656f1632a2)

1. **Startup arguments**: the command-line flags ComfyUI starts with.
2. **Manager security level**: what ComfyUI-Manager is allowed to install.
3. **Launch mode**: its own app window, or a console.
4. **Browser cache**: shared with other builds, or unique to this build.

Every change applies the next time the build starts. If the build is running when you change a field, the field shows **Restart to apply**, and the header button reads **Restart to apply changes**. Click it to restart the build with the new settings.

### Pick flags from the list

The **Startup arguments** field holds the command-line arguments passed to ComfyUI, such as `--listen`. You can type them, or pick them from a list sorted by category. If beta features add arguments, a **+N beta** pill beside the field lists them. For every flag, see the [startup flags reference](https://docs.comfy.org/development/comfyui-server/startup-flags.md).

1. Click the gear (**Configure arguments**) next to **Startup arguments**.
2. Toggle flags in the categories, or edit **Raw arguments**. Both change the same arguments for this build.
3. Click **Back** to return to the tab.

### Control what ComfyUI Manager installs

Two settings decide which Node packs ComfyUI Manager can install for this build. Set **Manager security level** first:

* **Strict**: blocks all Node pack installs, updates, and uninstalls. ComfyUI Manager is read-only.
* **Standard (recommended)**: allows registered Node packs and blocks installs from unregistered sources, such as arbitrary git URLs. This is the default.
* **Relaxed**: like Standard, but also allows unregistered-source installs while ComfyUI is reachable only from this computer. `--listen` blocks them again.
* **Permissive**: allows every risk tier.

Then set **Manager network mode**, which decides how ComfyUI Manager reaches the Node registry.

> [!WARNING]
>
> **Personal cloud** lifts the `--listen` install block. Select it only on a computer you control.

* **Public (default)**: uses the public registry. With `--listen`, Node pack installs are blocked at every security level.
* **Private**: uses a private Node database that you configure yourself.
* **Offline**: makes no external network connections. Installs and updates that need downloads are unavailable.
* **Personal cloud**: treats this computer as your own trusted remote machine and lifts the `--listen` install block. The security level still applies.

### Set the window, cache, and port

These settings decide how the build opens and what it does when its port is taken:

* **Launch mode**: **App window** (the default) or **Console only**.
* **Browser cache**: **Unique to this build** or **Shared** with other builds. A new Standalone build starts with **Unique to this build**.
* **If port is busy**: **Ask what to do** or **Use next available port (asks if --port is set)**. Standalone and Portable builds use **Use next available port (asks if --port is set)** by default, and git builds use **Ask what to do**.

### Add environment variables

Environment variables pass extra settings to ComfyUI when the build starts.

> [!WARNING]
>
> Comfy Desktop stores environment variable values unencrypted on disk. Don't add API keys, tokens, or passwords.

* Under **Environment variables**, click **Add variable**, then enter the name and value.

Values for names that look like credentials, such as `HF_TOKEN`, stay hidden until you reveal them. A repeated name shows **Duplicate key**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.