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

# etcd

> Connect to etcd v3 clusters with prefix-based key browsing and an etcdctl-style command editor

# etcd Connections

TablePro connects to etcd v3 over the HTTP/JSON gRPC-gateway (it never speaks raw gRPC). On connect it probes the `/v3/`, `/v3beta/`, and `/v3alpha/` gateway prefixes in order, so etcd 3.2 through current releases work without configuration. Browse keys grouped by prefix, edit values in the grid, and run etcdctl-style commands in the editor.

## Quick Setup

Click **New Connection**, select **etcd**, enter host (default `localhost`) and port (default `2379`), and connect. The plugin auto-installs, or use **Settings** > **Plugins** > **Browse** > **etcd Driver**.

## Connection Settings

| Field                   | Description                                      |
| ----------------------- | ------------------------------------------------ |
| **Host**                | etcd server hostname or IP (default `localhost`) |
| **Port**                | Client port, default `2379`                      |
| **Username / Password** | Only if etcd authentication is enabled           |

With a username set, TablePro exchanges the credentials for a gateway token via the gateway's `auth/authenticate` endpoint and retries once with a fresh token when a request returns 401.

### Advanced Fields

| Field                  | Description                                                                 |
| ---------------------- | --------------------------------------------------------------------------- |
| **Key Prefix Root**    | Scope browsing to a subtree (e.g. `/app`). Empty browses the whole keyspace |
| **TLS Mode**           | Disabled, Required (skip verify), Verify CA, or Verify Identity             |
| **CA Certificate**     | Path to the CA certificate (`ca.pem`) for Verify CA and Verify Identity     |
| **Client Certificate** | Path to the client certificate for mutual TLS                               |
| **Client Key**         | Path to the client private key for mutual TLS                               |

For self-signed certificates, pick **Required (skip verify)** or set the **CA Certificate** path.

## Connection URL

```
etcd://127.0.0.1:2379
etcds://127.0.0.1:2379
```

Both schemes are accepted when importing a URL. The scheme alone does not switch TLS on; set **TLS Mode** in the Advanced fields.

## Browsing Keys

The sidebar groups keys by their first path segment under the Key Prefix Root; keys without a segment appear under **(root)**. The grid shows one row per key with the columns **Key**, **Value**, **Version**, **ModRevision**, **CreateRevision**, and **Lease**. Key is the primary key. Saving grid edits generates `put` and `del` commands.

## Command Editor

The editor accepts etcdctl-style commands with autocomplete for commands and flags.

<Frame caption="etcdctl-style commands in the editor">
  <img className="block dark:hidden" src="https://mintcdn.com/ngquct/tXWaltqW4Zqkau0T/images/etcd-command-editor.png?fit=max&auto=format&n=tXWaltqW4Zqkau0T&q=85&s=4954046021bca7d0f153dbedb2dfcecb" alt="etcd command editor with a get --prefix result grid" width="1560" height="960" data-path="images/etcd-command-editor.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/ngquct/tXWaltqW4Zqkau0T/images/etcd-command-editor-dark.png?fit=max&auto=format&n=tXWaltqW4Zqkau0T&q=85&s=ae7fb8d28174cc62c8163dfcdadaf3d6" alt="etcd command editor with a get --prefix result grid" width="1560" height="960" data-path="images/etcd-command-editor-dark.png" />
</Frame>

```bash theme={null}
get /app/config --prefix --limit=50 --keys-only
put /app/config/timeout 30
put /app/session/abc hello --lease=694d77aa1e775e08
del /app/cache --prefix
watch /app/config --prefix --timeout=60
```

`get` supports `--prefix`, `--limit=N`, `--keys-only`, `--order` (ASCEND or DESCEND), and `--sort-by` (KEY, VERSION, CREATE, MOD, or VALUE). `watch` collects events for `--timeout` seconds (default 30), then returns them as a grid.

Lease, cluster, and maintenance commands:

```bash theme={null}
lease grant 300
lease timetolive 694d77aa1e775e08 --keys
lease revoke 694d77aa1e775e08
lease list
member list
endpoint status
endpoint health
compaction 1000 --physical
```

Lease IDs accept decimal or hex (`0x` prefix optional).

Auth, user, and role management:

```bash theme={null}
auth enable
user add alice secretpw
user grant-role alice readonly
role add readonly
user list
role list
```

## SSH Tunnel

etcd connections support [SSH tunneling](/databases/ssh-tunneling) for reaching remote clusters through a bastion host.

## Troubleshooting

**Connection refused**: Verify etcd is running and the client port (default 2379) is reachable.

**No supported etcd API found**: TablePro requires the HTTP/JSON gateway, which etcd 3.x serves on the client port by default. Point the connection at the client port, not the peer port (2380).

**Authentication failed**: Check the username and password, and that the user has the required roles.

**TLS errors**: Set **TLS Mode** and the certificate paths in the Advanced fields. For self-signed certificates use **Required (skip verify)** or provide the CA certificate.

**Limitations**: No transactions, no schema editing, and no import.
