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

# Configuration

> Change how difyctl installs, set the environment variables it reads, adjust its timeout, and find the files it keeps

## Install Options

Set these variables on the [install command](/en/cli/get-started.md#install):

| Variable | Description | Example |
| :- | :- | :- |
| `DIFY_VERSION` | The Dify release to install `difyctl` from. Set it to your server's version. Defaults to the latest Dify release. | `1.18.0` |
| `DIFYCTL_PREFIX` | The install directory. The binary lands in `<prefix>/bin`. Add that folder to your `PATH` if it isn't on it. Defaults to `~/.local` on macOS and Linux, `%LOCALAPPDATA%\difyctl` on Windows. | `$HOME/tools` |
| `GITHUB_TOKEN` or `GH_TOKEN` | A GitHub token. It needs no scopes. Set it if the installer stops at GitHub's limit of 60 requests per hour, which everyone behind the same IP address shares. | |

For example, to install the build for Dify 1.18.0 into `~/tools/bin`:

```bash macOS / Linux theme={null}
curl -fsSL https://raw.githubusercontent.com/langgenius/dify/main/cli/scripts/install-cli.sh | DIFY_VERSION=1.18.0 DIFYCTL_PREFIX=$HOME/tools sh
```

```powershell Windows theme={null}
# applies for the rest of this PowerShell session
$env:DIFY_VERSION = "1.18.0"
$env:DIFYCTL_PREFIX = "$HOME\tools"
irm https://raw.githubusercontent.com/langgenius/dify/main/cli/scripts/install.ps1 | iex
```

## Environment Variables

Set these variables in the shell or job that runs `difyctl`:

| Variable | Description |
| :- | :- |
| `DIFY_CONFIG_DIR` | The config folder to use instead of the [default one](/en/cli/manage-sign-in.md#where-your-token-lives). Set it to [stay signed in to several servers at once](/en/cli/manage-sign-in.md#use-several-servers-or-accounts), one folder each. |
| `DIFY_OUTPUT` | The format of errors and `help` output: `json` or `text`. Without it, they're text in a terminal and JSON when sent to a file or another program. Results are always JSON. Set `DIFY_OUTPUT=json` in scripts so errors are JSON wherever they run. [`--json`](/en/cli/reference/results-errors-and-exit-codes#where-output-goes) wins over `DIFY_OUTPUT=text`. |
| `DIFY_SERVER` | The address of the server to send commands to, such as `https://dify.example.com`. Used only together with `DIFY_TOKEN`. |
| `DIFY_TOKEN` | The token from a `difyctl` sign-in. Set it with `DIFY_SERVER` and `DIFY_WORKSPACE_ID`, and commands use them instead of your saved sign-in. While `DIFY_TOKEN` is set, `login` and `logout` refuse to run. Without `DIFY_SERVER`, commands fail with [exit code 2](/en/cli/reference/results-errors-and-exit-codes.md#exit-codes). Without `DIFY_WORKSPACE_ID`, commands that work in a workspace fail. To get a token for a job and keep it safe, see [Use `difyctl` in CI and Automation](/en/cli/scripts-and-ci). |
| `DIFY_WORKSPACE_ID` | The ID of the workspace for commands that work in one, such as `get console_app`. `difyctl get workspace` lists it as `id`. Set it whenever you set `DIFY_TOKEN`: a sign-in from variables has no saved workspace. `--workspace-id` wins over this variable, and this variable wins over your saved sign-in's workspace. |
| `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` | The proxy to send `difyctl`'s requests through: `HTTPS_PROXY` for an `https://` server, `HTTP_PROXY` for an `http://` one. The lowercase `http_proxy` and `https_proxy` work too. To skip the proxy for a server, such as an internal one, put its host in `NO_PROXY` (or `no_proxy`). |
| `NO_COLOR` | Set it to any value, such as `1`, to turn off colors in terminal text. |

## Settings

`http.timeout` sets how long, in milliseconds, `difyctl` waits for the server to start responding before the command fails. The default is `30000`.

Raise it if commands time out on a slow server or network, or while sending large files. It limits only the wait for the server's first response, not how long the command takes. So an app run that lasts several minutes, with or without `--stream`, doesn't need a higher value.

To change it, for example to 60 seconds:

```bash theme={null}
difyctl set config http.timeout 60000
```

To put it back to its default, run `difyctl unset config http.timeout`. To see your settings and the file they're saved in, run `difyctl get config`.

## Files difyctl Keeps

`difyctl` keeps these files in its [config folder](/en/cli/manage-sign-in.md#where-your-token-lives):

| File | Holds |
| :- | :- |
| `login.yml` | Your saved sign-in: the server, account, and workspace, and where your token is kept. |
| `login-pending.yml` | A sign-in started with `login --no-wait`, until `login --resume` finishes it. |
| `tokens.yml` | Your token, when it's [kept in a file](/en/cli/manage-sign-in.md#where-your-token-lives) instead of the OS keychain. |
| `config.yml` | Your settings, once you've changed one. |
| `catalog/<server>.json` | The saved command list for each server you use. Safe to delete: the next command fetches it again. |


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