Skip to content

Redis and Valkey

KryoDesk speaks RESP2 to Redis, Valkey and other RESP2 servers itself: every command it sends, also the ones at login, is printed in the console of the connection tab with the reply size and time. Nothing is sent that is not logged (no CLIENT SETINFO, no switch to RESP3). A connection is read-only by default; the console of the tab sends commands that change data only in Write mode, after a confirmation of the exact command.

Sessions → New session → Databases, arrow of the tile → Redis / Valkey (port 6379).

Field Values Default What it does
Specify username ACL user; empty = default Empty AUTH <user> <password>; without a user AUTH <password> (requirepass).
Database 0 to 1023 0 SELECT after login. Cluster mode has only database 0.
TLS On / off Off TLS from the first byte (Redis has no STARTTLS). See TLS.
CA file PEM path Empty Extra CA trusted next to the macOS trust settings.
Client certificate, Client key PEM paths, both or neither Empty For tls-auth-clients yes. The key must be an unencrypted PKCS#8 key (BEGIN PRIVATE KEY; openssl pkcs8 -topk8 -nocrypt -in key.pem -out key-pkcs8.pem).
Allow Write mode On / off Off Without it the tab has no Write mode.
Production On / off (needs Allow Write mode) Off Write mode needs a second confirmation.

The write flags are read again from sessions.json at every Write mode change and every write: turning Allow Write mode off ends Write mode in open tabs; turning Production on ends it in tabs that entered it without the production confirmation.

The password is kept in the vault as password:redis://[<user>@]<host>:<port>, after Save the password in the vault? [y/N] in the console. While KryoDesk is locked the vault is not read: the console asks for the password and does not offer to save it. There is no Quick connect for Redis.

KeePass export writes redis:// or rediss:// (TLS) with the database as the path; import accepts redis://, rediss://, valkey://, valkeys:// and the Protocol/TLS/Database fields (write flags and certificate paths are not imported). MobaXterm has no such session type: export skips Redis sessions with a warning.

Each step is printed in the console:

  1. Resolving <host>... and the addresses; Connecting to <address>... for each in turn (20 s each).
  2. TLS, when on (below; TLS 1.2 or newer): the certificate’s subject, issuer, validity and SHA-256. The CA, certificate and key files must be regular files of at most 1 MiB; a client key readable by other users (mode other than 600) gets a warning.
  3. Login. A password saved in the vault: AUTH [user] ********; with TLS off KryoDesk first asks TLS is off: send the password saved in the vault (…) unencrypted to host:port? [y/N] (No = type a password). Without one, for the default user, PING first; NOAUTH asks for the password (<user>@<host>'s password:). Up to 3 typed passwords. AUTH to a server without a password (without any password configured) continues without it. The password never appears in the console or the logs.
  4. HELLO 2 (stays on RESP2): server (redis, valkey), version, connection id, mode, role, modules. Redis older than 6 answers an error; the details then come from INFO.
  5. INFO server, INFO replication (when the role is still unknown), CLIENT ID (when unknown), SELECT <db> (database other than 0), DBSIZE.

While idle, a PING every 60 s keeps the connection open (not logged). A command without a reply within 30 s closes the connection: it may still run on the server (CLIENT LIST ID <id>, SLOWLOG GET).

Server What KryoDesk does
Cluster (redis_mode:cluster) Prints the primaries and their slots (CLUSTER NODES). SCAN lists the keys of this node only; a key in another node’s slot answers MOVED, which is not followed: open a session to that node.
Sentinel (redis_mode:sentinel) No keys: prints the primaries it watches (SENTINEL MASTERS: name, address, flags, replicas, quorum); the tab opens on Server. Open a session to the primary.
Replica Replica: the server refuses writes (READONLY).

The connection goes to the address from DNS; the certificate is checked with the macOS trust settings (Windows: the Windows certificate store) (and the session’s CA file) for the host name of the session. A certificate macOS does not trust (self-signed, expired, another name, unknown CA) prints the TLS error; KryoDesk then reads the certificate in a separate TLS handshake (nothing else is sent) and shows its subject, SAN, issuer, validity, serial and SHA-256. Trust this certificate for host:port (pin its SHA-256)? [y/N] saves the pin in redis_known_hosts.json in the configuration folder. Compare the SHA-256 with the server’s own:

Terminal window
openssl x509 -noout -fingerprint -sha256 -in redis.crt

A pinned host accepts only that certificate, also when macOS would trust another one; the pin is checked right after the handshake, before AUTH. Another certificate prints TLS: CERTIFICATE CHANGED for host:port with both fingerprints and asks Replace the pin of host:port with this certificate? [y/N] (No disconnects). There is no “verification off”.

Without TLS the console prints that the password, commands and values travel unencrypted.

The left side of the tab lists keys with SCAN (never KEYS):

SCAN 0 MATCH user:* COUNT 500 TYPE hash

Pattern is the glob of MATCH (*, ?, [abc]), the type filter goes to SCAN … TYPE (Redis 6 and later; older servers get the filter applied to each page). One page takes SCAN calls until about 200 keys or 20 calls; More continues from the cursor, scan complete means cursor 0. Type, TTL and size of a page come in one pipeline, logged as one line:

> TYPE, PTTL, MEMORY USAGE of 200 keys (pipeline of 600 commands)

A server or ACL without MEMORY USAGE prints why once; sizes are then left empty. DB with Select sends SELECT <n> and DBSIZE on the tab’s connection.

Clicking a key reads TYPE, PTTL, OBJECT ENCODING and MEMORY USAGE (one pipeline), then the value by type, in pages of 200 elements:

Type Commands Page
string STRLEN, GETRANGE key 0 262143 First 256 KiB
hash HLEN, HSCAN key <cursor> COUNT 200 Cursor
list LLEN, LRANGE key <from> <from+199> Offset, index shown
set SCARD, SSCAN key <cursor> COUNT 200 Cursor
zset ZCARD, ZRANGE key <from> <from+199> WITHSCORES Offset, score shown
stream XLEN, XRANGE key <id> + COUNT 200 Next id after the last one shown

Text is shown with control and invisible characters (bidi, zero-width) made visible; bytes that are not UTF-8 are shown as hex. Module types (JSON, time series, …) are named; read them in the console (JSON.GET, TS.RANGE).

Server shows the connection (address, user, connection id, mode, role, TLS, modules), the cluster or Sentinel topology and INFO by section.

Console in the tab takes Redis commands split like redis-cli ("…" with \xHH, \n, \t; '…'). What happens to a command:

Kind Examples What KryoDesk does
Read GET, HGETALL, LRANGE, SCAN, TTL, INFO, CONFIG GET, CLIENT LIST, SLOWLOG GET, MEMORY USAGE, ACL WHOAMI Sent. CONFIG GET shows the values of password parameters (requirepass, masterauth, *pass*) as ********.
Heavy read KEYS; SCAN / HSCAN / SSCAN / ZSCAN with COUNT above 1000; MEMORY USAGE … SAMPLES 0 Shows why it blocks the server (for KEYS with the key count of the last DBSIZE); sent after Send.
Write SET, DEL, HSET, EXPIRE, CLIENT SETNAME, TOUCH, PFCOUNT (updates the cached cardinality), ACL LOG RESET, commands of modules and anything not on the read list Only with Allow Write mode and Write mode on in the tab; the exact command is shown, sent after Send.
Dangerous FLUSHALL, FLUSHDB, SWAPDB, SHUTDOWN, DEBUG, SAVE, REPLICAOF / SLAVEOF, FAILOVER, MIGRATE, CONFIG SET / REWRITE / RESETSTAT, ACL changes, MODULE changes, CLUSTER changes, SCRIPT FLUSH / KILL, FUNCTION changes, CLIENT KILL / PAUSE, SENTINEL changes As a write, plus the reason, and Send only after the command’s name is typed (e.g. FLUSHALL); KryoDesk checks the typed name.
Refused SUBSCRIBE and the other pub/sub commands, MONITOR, SYNC, PSYNC; SELECT (use DB); AUTH, HELLO, RESET, QUIT; MULTI / EXEC / WATCH; blocking commands (BLPOP, XREAD … BLOCK, WAIT); CLIENT REPLY; SCRIPT DEBUG Not sent: they would switch the shared connection to a push stream, change its state, put a password into the log or hold the connection. Use redis-cli in a terminal.

The confirmation shows the server (host:port) and database and keeps the prepared command for 5 minutes; KryoDesk sends exactly what it showed, only to the same database (another database selected meanwhile, or Write mode turned off, drops it), and checks Write mode and the session’s flags again before sending. A session edited to another host or port allows no writes in tabs opened before. Secrets in AUTH, HELLO, MIGRATE, CONFIG SET (requirepass, masterauth, …), SENTINEL SET / SENTINEL CONFIG SET (auth-pass, …) and ACL SETUSER (>password, #hash) are replaced by ******** in the log and the confirmation.

Write mode, the confirmations and the typed command name guard against mistakes in this tab; they are not a security boundary. What a user may do on the server is decided by the server: an ACL user with only the needed commands and keys (ACL SETUSER … +@read) is the limit that holds.

A reply is read whole (up to 64 MiB); the console shows bulk strings up to 64 KiB ("…"…(N B)) and at most 2 MiB or 10,000 lines of one reply.

The terminal below the view is the connection log; status there prints the server, address, user, connection id, database, TLS and Write mode.

Error Meaning
NOAUTH The server needs a password.
WRONGPASS Wrong user or password, or the ACL user is disabled. A rejected vault password stays in the vault until you save a new one.
NOPERM The ACL user lacks the permission for this command or key.
MOVED, ASK Cluster: the key lives on another node.
READONLY The server is a replica.
LOADING The server is loading its dataset.
BUSY A script or function is running (SCRIPT KILL / FUNCTION KILL).
MISCONF RDB snapshots fail; the server refuses writes.
OOM maxmemory reached and the eviction policy refuses writes.
DENIED Protected mode: only local clients until a password or bind address is set.
WRONGTYPE The key holds another type.

Scroll or pinch to zoom · drag to move · double-click to zoom · Esc or click outside to close