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

# cordon stop

> Stop a running cordon proxy.

Stop a running cordon proxy. Finds the process listening on the configured port and sends SIGTERM.

## Usage

```bash theme={null}
cordon stop [OPTIONS]
```

## Options

| Option           | Description                                                       |
| ---------------- | ----------------------------------------------------------------- |
| `--config`, `-c` | Path to config file (mutually exclusive with `--scope`)           |
| `--scope`        | `project` (default) or `user` — selects which config file to read |

`--config` and `--scope` are mutually exclusive — passing both is an error. Omitting both defaults to project scope (`$CWD/cordon.toml`).

## Examples

```bash theme={null}
# Stop the project-scope proxy
cordon stop

# Stop the user-scope proxy
cordon stop --scope user

# Stop a proxy using a specific config file
cordon stop --config /path/to/cordon.toml
```

## Behavior

1. Reads the config file to determine the listen port.
2. Checks if a process is listening on that port. If not, prints a warning and exits.
3. Checks if the port is managed by an installed service. If so, refuses to stop and suggests using `cordon service stop` instead.
4. Verifies the process on the port is actually cordon before sending SIGTERM.

<Tip>
  If cordon is running as an installed service, use `cordon service stop` instead — `cordon stop` will detect the service and point you there.
</Tip>
