The `cloudflared tunnel list` command is used to display a list of Cloudflare Tunnels (formerly Argo Tunnels) associated with your Cloudflare account. It provides an overview of the tunnels, including their ID, name, status, and associated ingress rules or services.
cloudflared tunnel list [OPTIONS]This command retrieves and displays information about all active and inactive Cloudflare Tunnels created under the Cloudflare account associated with your `cloudflared` login or the specified configuration. It's useful for quickly auditing your existing tunnels, checking their status, and verifying their configuration.
By default, the output is presented in a human-readable table format. You can use various flags to customize the output format or filter the results.
* `--json`: Output the list of tunnels in JSON format. This is particularly useful for scripting and programmatic access.
* `--output <format>`: Specify the output format. Supported formats include `json`, `yaml`, `csv`, `table` (default).
* `--config <path>`: Specify the path to a `cloudflared` configuration file. If not provided, `cloudflared` will look for its default configuration file (e.g., `~/.cloudflared/config.yml`) or rely on the login credentials.
* `--metrics <address>`: Expose metrics on the specified address. (Less common for `list` command directly, but relevant for running tunnels).
#### 1. List all tunnels in a human-readable table (default)
This is the most common way to use the command. It provides a clear overview of your tunnels.
cloudflared tunnel list**Example Output (truncated):**
ID NAME CREATED CONNECTIONS STATUS
7a6b5c4d-e3f2-1a2b-3c4d-5e6f7a8b9c0d my-web-tunnel 2023-01-15T10:30:00Z 2 healthy
a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d dev-api-tunnel 2023-02-20T14:00:00Z 0 inactive
...#### 2. List tunnels and output in JSON format
When you need to parse the tunnel information programmatically, the `--json` flag is invaluable.
cloudflared tunnel list --json**Example Output (truncated):**
[
{
"id": "7a6b5c4d-e3f2-1a2b-3c4d-5e6f7a8b9c0d",
"name": "my-web-tunnel",
"created_at": "2023-01-15T10:30:00Z",
"connections": [
{
"id": "conn-1",
"ip": "192.0.2.1",
"is_pending_reconnect": false,
"location": "us-east-1",
"opened_at": "2023-11-20T10:00:00Z",
"origin_ip": "198.51.100.1"
},
...
],
"status": "healthy",
"deleted": false
},
{
"id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"name": "dev-api-tunnel",
"created_at": "2023-02-20T14:00:00Z",
"connections": [],
"status": "inactive",
"deleted": false
}
]#### 3. List tunnels and output in YAML format
Similar to JSON, YAML can be useful for human-readable structured output or integration with other tools.
cloudflared tunnel list --output yaml**Example Output (truncated):**
- id: 7a6b5c4d-e3f2-1a2b-3c4d-5e6f7a8b9c0d
name: my-web-tunnel
created_at: 2023-01-15T10:30:00Z
connections:
- id: conn-1
ip: 192.0.2.1
is_pending_reconnect: false
location: us-east-1
opened_at: 2023-11-20T10:00:00Z
origin_ip: 198.51.100.1
status: healthy
deleted: false
- id: a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d
name: dev-api-tunnel
created_at: 2023-02-20T14:00:00Z
connections: []
status: inactive
deleted: false#### 4. Listing tunnels from a specific configuration file
If you manage multiple `cloudflared` configurations or accounts, you might need to specify a particular configuration file.
cloudflared tunnel list --config /etc/cloudflared/my-specific-config.ymlThis command is essential for anyone managing Cloudflare Tunnels, providing a quick way to inspect the state and configuration of your private network connections to Cloudflare's edge.