FOSSFEEDWhere activity matters more than stars. Discover Fire Pit Noted Submit a project
← All articles

LibreDB Studio: open-source, free, self-hosted SQL IDE that runs in your browser, for 46 databases

LibreDB Studio is a free, open-source database editor that runs in Docker, letting you securely manage your databases directly from your browser without exposing ports, opening SSH tunnels, or installing additional software.

If you self-host long enough, you end up with a small zoo of databases. A Postgres for Immich or Nextcloud, a Redis somewhere, maybe a MariaDB left over from an old WordPress install. They all live on a Docker network or in a cluster, and every time I wanted to look inside one, I had the same options: publish a port I did not want published, open an SSH tunnel, or install yet another desktop client on whichever laptop I happened to be using.

LibreDB Studio is the tool we built to stop doing that. It is a database editor that runs as a container next to your databases and opens in the browser. The databases never need a port exposed to the outside, nobody opens a tunnel, and there is nothing to install on the laptop.

It is MIT licensed, and that covers everything: single sign-on, role-based access and the AI assistant are all in the open source build. There is no paid edition and nothing held back.

Running it #

The quickest start is one command:

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

On first run it generates an admin password and prints it to the container log:

docker logs libredb-studio

Open http://your-server:3000, sign in as [email protected] with that password, and you are in.

For anything you plan to keep, use Docker Compose. The repo ships a ready-made compose file with every setting documented inline. Two settings are worth changing on day one:

  • Set ADMIN_PASSWORD and JWT_SECRET yourself in a .env file instead of relying on the generated ones.
  • Set STORAGE_PROVIDER=sqlite and mount a volume on /app/data. By default, saved connections and queries live in your browser's local storage, which is fine for a quick look but not for a homelab you access from three devices. With SQLite they live on the server. There is also a postgres option if you run more than one replica.

If you already run Kubernetes, there is a Helm chart and an operator as well, but compose is the natural fit for most homelabs.

Connecting to your databases #

This is where running it next to the data pays off. Put LibreDB Studio on the same Docker network as your database containers and connect by service name, postgres:5432 rather than localhost:5432. The database stays on the internal network and only the editor is reachable from your browser.

It ships eighteen drivers: PostgreSQL, MySQL, Oracle, SQL Server, SQLite, libSQL, DuckDB, MongoDB, Redis, Couchbase, ClickHouse, Druid, Elasticsearch, OpenSearch, Trino, Cassandra, Prometheus and Apache Kafka.

Another twenty-eight engines speak one of those wire protocols and connect through an existing driver: MariaDB, TimescaleDB, CockroachDB, YugabyteDB, Valkey, DragonflyDB, FerretDB, ScyllaDB, VictoriaMetrics, Redpanda and more. We tested each one against a live instance, and the compatibility table says honestly how much works on each. Most behave exactly like their parent engine; a few lose some panels, and the table says which.

Once connected you get what you would expect from a desktop client: an editor built on the same engine as VS Code with schema-aware autocomplete, multiple tabs, a data grid you can edit in place, visual EXPLAIN plans, ER diagrams, schema diff, charts, and CSV or JSON export.

Single sign-on and roles #

If you run Authentik, Keycloak or any other OpenID Connect provider for your services, LibreDB Studio can use it. Set NEXT_PUBLIC_AUTH_PROVIDER=oidc, point it at your issuer, and tell it which claim carries roles. There is a compose file in the repo that starts Studio with a preconfigured Keycloak so you can try the whole flow locally before touching your real setup.

There are two roles. Admins get everything, including maintenance tools. Users can run queries and nothing more. If you share a server with family or friends, or want a lower-privilege account for yourself on a bad day, that split covers it.

You can also pre-configure connections in a YAML file, with passwords read from environment variables, and decide which role sees which connection. The file reloads without a restart.

The AI assistant, with your own model #

The AI features are off until you configure a model, and with no model configured nothing leaves your network. When you do configure one, you choose where it runs: Gemini, OpenAI, any OpenAI-compatible endpoint, or a local Ollama. For a homelab the last option is the interesting one, because then the model and the data both stay on your own hardware.

The main AI feature is an agent that sits beside the editor. You ask a question, like "which customers placed the most orders?" or "why is this query slow?", and it drafts SQL, runs it, reads the results and writes a short report where every claim cites the result it came from.

Letting a model run SQL against your database sounds risky, so this part is strict. The agent is read-only, and the database enforces it rather than a text filter: a read-only transaction on PostgreSQL, a query-only mode on SQLite, a read-only handle on DuckDB. Writes and schema changes are refused before they reach the database. The agent never runs anything it recommends; applying a change is always your click. Agent mode works on PostgreSQL, SQLite, DuckDB and SQL Server today. On the other engines you can still use it to plan a query, which you then run yourself.

Not every local model can do this job, since the agent needs a model that reliably calls tools. We measured this rather than guessing, and the repo has per-model results for the models we tested. Something as small as qwen2.5:7b, under 5 GB, handles it.

Twelve official docs listings #

This one surprised us. Twelve database projects now list LibreDB Studio in their official documentation or ecosystem pages, each after their own maintainers reviewed it: PostgreSQL, Redis, ClickHouse, MariaDB, DuckDB, Trino, YugabyteDB, StarRocks, DragonflyDB, OpenSearch, Apache Cloudberry and Aiven.

For a self-hoster that matters for a simple reason. When the people who build your database have looked at a tool and agreed it works with their engine, you can spend less of your weekend finding out whether it does.

Try it #

There is a live demo at app.libredb.org if you want to click around before deploying anything, and the source is at github.com/libredb/libredb-studio. Issues and feedback are welcome, and if you hit an engine that does not behave the way the compatibility table says, we want to hear about it.

GitHub - libredb/libredb-studio: One browser tab for PostgreSQL, MySQL, Oracle, SQL Server, MongoDB, Redis, SQLite, Couchbase, ClickHouse, Druid, DuckDB, Turso and more. An open-source SQL IDE with SSO, audit trail and AI-assisted queries MIT licensed, with nothing held back behind an enterprise wall.

One browser tab for PostgreSQL, MySQL, Oracle, SQL Server, MongoDB, Redis, SQLite, Couchbase, ClickHouse, Druid, DuckDB, Turso and more. An open-source SQL IDE with SSO, audit trail and AI-assisted…

github.com

Comments 0

Join the conversation.

Write a comment

No comments yet. Be the first to comment.

Leave a comment

Anonymous comments are reviewed before publication. Sign in to comment as a member.

Navigation