> ## 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 3.2 and later need nothing configured beyond a host and the client port, 2379. The peer port on 2380 serves no HTTP/JSON gateway, so a connection aimed there never opens.

The etcd driver is not in the app. Picking etcd in the **Choose a Database** sheet offers the
download before the form opens, and opening a saved etcd connection installs it without asking.
See [Plugins](https://docs.tablepro.app/features/plugins.md).

## Quick setup

Click **New Connection…**, select **etcd**, enter host and port, then click **Save & Connect**. etcd has no databases, so there is no Database field and nothing to switch between.

## Connection settings

| Field | Description |
| - | - |
| **Host** | etcd server hostname or IP. `localhost` by default |
| **Port** | Client port, `2379` by default |
| **Username / Password** | The etcd user to authenticate as. Leave both empty on a server that has no authentication |

### Advanced pane fields

| Field | Description |
| - | - |
| **Key Prefix Root** | Scope browsing to a subtree, `/app`. Empty browses the whole keyspace |
| **TLS Mode** | Disabled, Required (skip verify), Verify CA, or Verify Identity |
| **CA Certificate** | Path to `ca.pem`, for Verify CA and Verify Identity |
| **Client Certificate** / **Client Key** | Paths to the client certificate and private key, for mutual TLS. PEM or DER, with an unencrypted RSA or EC key. Only used with both set |

## Authentication

Fill in **Username** and **Password** once the server has run `auth enable`. Credentials against a server that has authentication off still connect, unauthenticated, the way `etcdctl --user` does.

The user does not need the `root` role. A user whose roles cover part of the keyspace connects and browses what those roles allow. `endpoint status` and the `user` and `role` commands do need `root`, and answer `etcdserver: permission denied` without it. On etcd 3.6.0 through 3.6.11 that also leaves the database size blank.

Running `auth enable` from the command editor turns authentication on for the whole cluster. A connection that already holds a username and password keeps working; one that holds neither cannot, and has to be reopened with credentials.

## Connection URL

```text theme={null}
etcd://127.0.0.1:2379
etcds://127.0.0.1:2379
```

Both schemes import. Neither switches TLS on by itself; set **TLS Mode** on the **Advanced** pane.

## Browsing keys

The sidebar groups keys by their first path segment under the **Key Prefix Root**, with segment-less keys under **(root)**. The grid gives one row per key: **Key**, **Value**, **Version**, **ModRevision**, **CreateRevision** and **Lease**. Key is the primary key. The three revision columns belong to etcd: an edit to one stops the save and names the column.

Saving edits generates commands. Changing **Value** or **Lease** re-`put`s the key. Setting **Value** to NULL stores an empty value, and setting **Lease** to NULL removes the lease. Changing **Key** is a `put` at the new name and a `del` of the old one, so the old key is deleted rather than moved. A new row whose key does not start with `/` gets the **Key Prefix Root** prepended.

## Command editor

The editor takes etcdctl-style commands, with autocomplete over both commands and flags.

![etcd command editor with a get --prefix result grid](https://mintcdn.com/ngquct/tXWaltqW4Zqkau0T/images/etcd-command-editor.png?fit=max\&auto=format\&n=tXWaltqW4Zqkau0T\&q=85\&s=4954046021bca7d0f153dbedb2dfcecb)

etcdctl-style commands in the editor

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

The whole vocabulary is `get`, `put`, `del` (or `delete`), `watch`, `lease grant|revoke|timetolive|list|keep-alive`, `member list`, `endpoint status|health`, `compaction`, `auth enable|disable`, `user add|delete|list|grant-role|revoke-role`, and `role add|delete|list`. Anything else, an etcdctl command with no entry here included, comes back as `Unknown command: …` without reaching the server.

| Command | Flags |
| - | - |
| `get` | `--prefix`, `--limit=N`, `--keys-only`, `--order=ASCEND` or `DESCEND`, `--sort-by=KEY`, `VERSION`, `CREATE`, `MOD` or `VALUE`. Leave the last two out and the server's own ordering applies |
| `put` | `--lease=ID` |
| `del` | `--prefix`. Without it, `del` removes one key and counts as a write; with it, every key under the prefix, which counts as destructive. A range end or `--from-key` is refused |
| `watch` | `--prefix`, `--timeout=SECONDS`, 30 by default. Events collect for that long, then arrive as a grid |
| `lease timetolive` | `--keys` |

Lease IDs take decimal or hex, and hex is detected by its letters. Prefix an all-digit hex ID with `0x` (`--lease=0x69407712`) or it reads as decimal and resolves to another lease.

Quote a key that holds a space, a quote or an invisible character. Inside quotes, `\n`, `\t`, `\\` and `\"` are escapes, and `\xHH` is one byte, so `get "/app/\xff" --prefix` reaches keys that are not UTF-8. Put a key that starts with `--` after a bare `--`: `del --prefix -- --cache/`.

## SSL/TLS

TLS here is set by **TLS Mode** on the **Advanced** pane, not by the connection's SSL mode, and it starts **Disabled**. **Required (skip verify)** encrypts without checking the certificate, **Verify CA** checks it against the **CA Certificate** you name, and **Verify Identity** adds the hostname check. **Client Certificate** and **Client Key** cover mutual TLS under either verifying mode. See [SSL/TLS](https://docs.tablepro.app/connections/ssl.md) for the concepts.

The **CA Certificate** may be PEM or DER. **Verify CA** needs one, since it checks no hostname, and a connection without it is refused. **Verify Identity** with no **CA Certificate** checks the system trust store. A file that cannot be read fails the connection rather than falling back to the system trust store.

## Limitations

* No transactions. Each command, and each row you save, is its own gateway request.
* The form takes one endpoint and does not fail over to another member. Point it at a member that is up; `member list` shows the rest.
* A key or value that is not valid UTF-8 shows in the grid as hex and saves back byte for byte. Text you type in a cell is sent as UTF-8.
* No schema editing and no import.

## Troubleshooting

### No etcd v3 API found

The gateway answered 404 on `/v3`, `/v3beta` and `/v3alpha`. Point the connection at the client port, 2379 by default, and not the peer port on 2380.

### The server answered but is not an etcd v3 JSON gateway

Something is listening on that port and it is not etcd. A reverse proxy that rewrites 404 into a branded page does this too.

### This etcd server has authentication enabled

The server wants a token and the connection carries no credentials. Add a **Username** and **Password** and connect again.

### etcdserver: authentication failed, invalid user ID or password

etcd rejected the credentials. Check them with `etcdctl --user=name:password endpoint health`.

### "Verify CA needs a CA certificate"

**TLS Mode** is Verify CA and **CA Certificate** is empty. Choose the CA certificate that signed the server's certificate, or set **TLS Mode** to **Verify Identity** to check it against the system trust store.

### etcdserver: permission denied

The credentials were accepted and the user's roles do not cover that key or command. `endpoint status`, `user` and `role` need the `root` role.

## Related

* [SSH Tunneling](https://docs.tablepro.app/connections/ssh-tunneling.md), for reaching a cluster through a bastion host
* [Import & Export](https://docs.tablepro.app/features/import-export.md)


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