Skip to content

Connecting to Redis and Valkey

  • Redis / Valkey

A Redis connection profile reaches a standalone server, a master found through Sentinel, or a Cluster. Valkey servers connect the same way: pick Redis as the engine, and Querybara reports Valkey and its version once connected. You sign in with a password, optionally as an ACL user.

  1. Open the Connection actions menu at the top of the side bar and choose New connection, or press Ctrl + Shift + N (Cmd + Shift + N on macOS).
  2. Pick the Redis card and choose Next, or double-click the card. To start from a URI instead, paste it into Paste a URI to fill the form and choose Fill from URI: the URI names the engine, so the form opens filled in.
  3. On the General tab, enter a Name, pick how Querybara reaches the server under Connect with (see Endpoints) and fill in its fields.
  4. Still on General, set Authentication (see Sign-in). A new connection starts with None.
  5. On the Advanced tab, set the options you need.
  6. On the TLS tab, set the TLS mode and, if needed, the CA certificate, Client certificate and Client key. A new connection starts with TLS off; a rediss:// or valkeys:// URI turns it on.
  7. Choose Test Connection. It runs DNS lookup, TCP connect, SSH tunnel, TLS handshake, Authentication, Ping and Server version. The last step names the product and version (Redis or Valkey) and the shape: the server’s role, “through Sentinel”, or the number of Cluster primaries.
  8. Choose Save.

A tab that holds an invalid field shows a red dot, and Save or Test Connection opens it.

Connect with What you enter
Host and port Host and Port of one server.
Unix socket Socket path, such as /var/run/redis/redis-server.sock.
Sentinel Sentinels (host and port of each; Querybara asks them for the current master) and the Master name, such as mymaster.
Cluster Seed nodes: any reachable nodes. Querybara discovers the rest of the cluster from them.
Connection URI URI (without the password), such as redis://[email protected]:6379/0.

Add sentinel and Add seed add rows. Sentinel and Cluster checks pass the DNS and TCP steps when at least one of the listed servers answers.

A URI names one server. redis:// and valkey:// connect without TLS, rediss:// and valkeys:// with TLS (set on the TLS tab), and unix:///path?db=N through a socket.

These fields are on the Advanced tab.

Option What it does
Database number Optional: the logical database, 0 to 15 on a default server. Not shown for Cluster (a cluster has only database 0) or for a URI, which carries its own.
Key delimiter Splits key names into the key browser’s namespace tree. Empty uses :.
Authentication What you enter
None Nothing.
Password (optional ACL user) User (optional; empty signs in as default) and the password.

With Sentinel, the same user and password are sent to the Sentinels.

To manage ACL users once connected, see ACL users.

Sentinel and Cluster through SSH and proxies

Section titled “Sentinel and Cluster through SSH and proxies”

Sentinel and Cluster profiles work through an SSH tunnel (jump hosts included) and through SOCKS5 and HTTP proxies. Querybara forwards each node it learns about, and shows nodes by the addresses they announce, so node names and the topology view look the same as without a tunnel. See Replica sets, Sentinel and Cluster through tunnels.

querybara test runs the same stepwise check:

Terminal window
querybara test "redis://[email protected]:6379/0"
querybara test "rediss://[email protected]:6380/0" --ssh [email protected] --ssh-agent

A Redis URI names one host, so test a Sentinel or Cluster setup through its saved profile:

Terminal window
querybara test "Shop · cache"

Documents Querybara 0.1.1 · built frombc9f5aa