> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-worktree-statusbar-redesign.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Redis

> Browse keys by namespace, manage TTLs, and run Redis commands directly from the editor

# Redis Connections

TablePro supports Redis 6.0 and later. Keys are grouped by colon-separated namespaces in the sidebar. Values display with type-aware formatting in the data grid (strings, hashes, lists, sets, sorted sets, JSON).

## Quick Setup

<Steps>
  <Step title="Create Connection">
    Click **New Connection**, select **Redis**, enter host/port/password/database, and click **Create**
  </Step>

  <Step title="Test Connection">
    Click **Test Connection** to verify
  </Step>
</Steps>

## Connection Settings

| Field             | Default     | Notes                            |
| ----------------- | ----------- | -------------------------------- |
| **Host**          | `localhost` |                                  |
| **Port**          | `6379`      |                                  |
| **Password**      | -           | Leave empty for local dev        |
| **Database**      | `0`         | 0-15                             |
| **Key Separator** | `:`         | Groups keys by prefix in sidebar |

<Tip>
  Open URLs like `redis://:password@host:6379/0` or `rediss://` (TLS) from your browser. See [Connection URL Reference](/databases/connection-urls#redis).
</Tip>

## Example Configurations

**Local**: host `localhost:6379`, no password
**Docker**: host `localhost:6379` (or mapped port), password from `REDIS_PASSWORD` env
**Redis Cloud**: Requires SSL/TLS, enable in connection form
**Remote**: Use [SSH tunneling](/databases/ssh-tunneling) for production

## Amazon ElastiCache (IAM)

Set **Authentication** to an AWS IAM mode (Access Key, Profile, or SSO) to connect to an IAM-enabled ElastiCache cache. TablePro generates a short-lived IAM auth token and uses it as the Redis password; the username is your IAM-enabled Redis user. Enter the AWS region and the cache name (replication group ID), and enable TLS, which ElastiCache IAM requires. Profiles resolve from `~/.aws/config` and `~/.aws/credentials`, including `credential_process`, SSO, and assumed roles.

## SSL/TLS

Configure in the **SSL/TLS** pane of the connection form. Managed services like Upstash and Redis Cloud require TLS. Use `rediss://` for URL imports.

| Mode                       | hiredis behavior                    | Use for                                          |
| -------------------------- | ----------------------------------- | ------------------------------------------------ |
| **Disabled**               | Plain TCP                           | Local dev                                        |
| **Preferred**              | TLS, do not verify peer             | Same as Required on Redis (there is no fallback) |
| **Required (skip verify)** | TLS, do not verify peer             | Self-signed certs, Upstash, untrusted CAs        |
| **Verify CA**              | TLS, verify peer with your CA cert  | Private PKI; supply CA path                      |
| **Verify Identity**        | TLS, verify peer and hostname (SNI) | Strict prod                                      |

For untrusted-CA endpoints (Upstash, internal load balancers), pick **Required (skip verify)**. For private CA setups, pick **Verify CA** or **Verify Identity** and provide the CA certificate path.

## Features

**Namespace Browsing**: Keys grouped by separator (default `:`) in sidebar tree. `user:1`, `user:2` appear under `user` folder. Multi-level nesting supported (e.g., `app:cache:session:1`). Change separator in Advanced settings.

**Key-Value Viewing**: String (plain text), Hash (key-value rows), List (with index), Set (individual rows), Sorted Set (with scores), JSON (syntax-highlighted).

**TTL Management**: View TTL for each key. `-1` = no expiration, `-2` = doesn't exist. Update TTL directly from interface.

**Key Filtering**: Toggle the filter bar to search keys by pattern. Patterns use Redis glob syntax (`*` matches any sequence, `?` matches one character, `[ae]` matches a character set) and are case-sensitive, the same as `redis-cli`. The type scope narrows results to one value type (String, Hash, List, Set, Sorted Set, Stream). Matching runs server-side with `SCAN MATCH` and `SCAN TYPE` across the whole keyspace, scanning up to 10,000 matching keys; a truncation indicator appears when more exist. Filtering by key value or TTL is not supported, since Redis has no server-side primitive for it.

**Redis CLI** (execute commands directly):

```redis theme={null}
-- Key operations
GET mykey
SET mykey "hello" EX 60
DEL mykey key2 key3
KEYS user:*

-- Hash operations
HGETALL myhash
HSET myhash field1 "value1"
HDEL myhash field1

-- List operations
LRANGE mylist 0 -1
LPUSH mylist "item1" "item2"
LLEN mylist

-- Set operations
SMEMBERS myset
SADD myset "member1" "member2"
SCARD myset

-- Sorted set operations
ZRANGE myzset 0 -1 WITHSCORES
ZADD myzset 1 "one" 2 "two"
ZCARD myzset

-- Scan for keys
SCAN 0 MATCH user:* COUNT 100

-- Server info
PING
INFO
DBSIZE
```

**Supported Commands**: String (GET, SET, INCR, DECR), Hash (HGET, HSET, HGETALL), List (LPUSH, RPUSH, LRANGE), Set (SADD, SMEMBERS), Sorted Set (ZADD, ZRANGE), Key (DEL, EXPIRE, SCAN), Server (PING, INFO). All commands sent to server.

## Troubleshooting

**Connection refused**: Check Redis is running (`brew services start redis`), verify correct port in `redis.conf`, check `bind` directive.

**Auth failed**: Verify password matches `requirepass` in `redis.conf`. For Redis 6.0+ ACL: `ACL SETUSER myuser on >password ~* +@all`

**Timeout**: Verify host/port, check network and firewall, whitelist IP for cloud-hosted Redis.

**Limitations**: Cluster mode unsupported, Pub/Sub and Streams limited in grid (work in CLI), large keys paginated.

**Performance**: Use namespace browsing for filtering, use `SCAN` instead of `KEYS` in CLI, check memory with `INFO memory`.
