Skip to main content

LibreDB Studio

Introduction

LibreDB Studio is an open source (MIT licensed) database IDE that runs in a browser: a query editor, a key browser, and a monitoring dashboard for a wide range of database engines, including Redis. It ships as a container, a Helm chart, or an npm package rather than a desktop download, so it runs next to your Dragonfly instance instead of on your laptop.

Dragonfly speaks the Redis wire protocol, so LibreDB Studio connects to it the same way it connects to Redis itself, through the ioredis driver. No Dragonfly-specific configuration, flags, or code changes are required.

TL;DR

Run Dragonfly and LibreDB Studio on the same Docker network, add a connection of type Redis pointed at the Dragonfly container's name and port, and use the query editor, key browser, and monitoring dashboard as you would against Redis.

docker network create libredb-studio
docker run --name dragonfly --network libredb-studio --ulimit memlock=-1 docker.dragonflydb.io/dragonflydb/dragonfly:latest
docker run --network libredb-studio -p 3000:3000 ghcr.io/libredb/libredb-studio:latest

Running LibreDB Studio with Dragonfly

Dragonfly and LibreDB Studio both run as containers here, so they need a Docker network in common: on Docker's default network a container cannot reach another one by name.

1. Create a network

docker network create libredb-studio

2. Start Dragonfly

docker run --name dragonfly --network libredb-studio --ulimit memlock=-1 docker.dragonflydb.io/dragonflydb/dragonfly:latest

3. Start LibreDB Studio

docker run --network libredb-studio -p 3000:3000 ghcr.io/libredb/libredb-studio:latest

A Helm chart and an npm package (npx @libredb/studio) are also available. See the LibreDB Studio repository for details.

4. Create a connection

  1. Open LibreDB Studio in your browser and sign in.
  2. Click the + button to add a new connection.
  3. For the connection type, select Redis.
  4. Fill in the host (dragonfly, the container name above) and port (6379) of your Dragonfly instance.
  5. Click Test Connection to verify, then Establish Connection.

The connection appears in the sidebar with type redis. From there you can browse keys, run commands, and view monitoring data in the browser.

What you can do

  • Browse keys. The key browser groups keys by their prefix (everything before the first :), so user:1 and user:2 both appear under one user:* entry, the same grouping it uses for Redis.
  • Run commands. The query editor accepts plain Redis commands (HGETALL user:1, SCAN 0 MATCH user:* COUNT 50, ...) or a JSON command object, with the same right-click "Generate Command" cheatsheet the Redis provider offers.
  • Monitor the server. The monitoring dashboard reads INFO, SLOWLOG GET, and CLIENT LIST for an overview, performance metrics, slow-query log, and an active-sessions table.

Limitations

LibreDB Studio's Dragonfly support goes through its Redis driver rather than a Dragonfly-specific one, so a few panels show what Dragonfly's INFO and CLIENT LIST actually publish rather than the full picture:

  • The overview's version field shows the Redis compatibility level Dragonfly's INFO reports under redis_version, not Dragonfly's own version, published in the same INFO reply under its own field, dragonfly_version.
  • The connections card reads "no limit published" rather than a number, because Dragonfly's INFO does not publish a value under the same field name the driver reads for a connection limit.
  • Every row in the active-sessions table shows default in the User column, whatever ACL user the connection authenticated as, because Dragonfly's CLIENT LIST does not publish a per-session user field.
  • Every row in the active-sessions table shows idle in the Query column and N in the State column, because Dragonfly's CLIENT LIST does not publish a per-session command or flags field either.

None of this affects the query editor, the key browser, or running commands: those answered identically to Redis in testing against docker.dragonflydb.io/dragonflydb/dragonfly:latest.

Useful Resources