HUB
Sign inSign up
db-studio logo

30rutvik/db-studio

By 30rutvik

โ€ขUpdated 2 days ago

Modern web database studio for PostgreSQL, MySQL, MongoDB, ClickHouse & Redis โ€” rutvikraut.com

Image
0

1.7K

30rutvik/db-studio repository overview

โ DB Studio (DBPilot)

A modern, open-source database studio for developers. Browse data, run queries, visualize schemas and manage indexes across PostgreSQL, MySQL / MariaDB, MongoDB, ClickHouse and Redis โ€” from a single, lightweight web UI.

๐ŸŒ Website: rutvikraut.comโ  ๐Ÿ’ป Source: github.com/rutvikraut2001/dbpilotโ  ๐Ÿ“„ License: MIT


โ Quick start

docker run -d --name db-studio -p 3030:3030 --restart unless-stopped 30rutvik/db-studio:latest

Open http://localhost:3030โ  and paste a connection string.

โ Connecting to a database on your machine

Inside the container, localhost refers to the container itself. To reach a database running on your host:

  • Docker Desktop (macOS / Windows): use host.docker.internal as the host โ€” DB Studio also retries localhost connections against it automatically.

  • Linux: add the host gateway mapping:

    docker run -d -p 3030:3030 --add-host=host.docker.internal:host-gateway 30rutvik/db-studio:latest
    

    or run with --network host (then open http://localhost:3030โ ).

โ Docker Compose
services:
  db-studio:
    image: 30rutvik/db-studio:latest
    ports:
      - "3030:3030"
    environment:
      - FORCE_READ_ONLY=false
      - AUDIT_LOG_ENABLED=true
      - RATE_LIMIT_MAX_REQUESTS=100
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: unless-stopped

โ Supported databases

DatabaseBrowse & edit dataQueriesSchema / ER diagram
PostgreSQLFull CRUDSQLโœ…
MySQL / MariaDBFull CRUDSQLโœ…
MongoDBFull CRUDMQL (JSON)โœ… (inferred)
ClickHouseRead + appendSQLโœ…
RedisKey browser, TTL, flushCommandsโ€”
โ Connection string examples
postgresql://user:password@host:5432/database
mysql://user:password@host:3306/database
mongodb://user:password@host:27017/database?authSource=admin
clickhouse://default:password@host:8123/default
redis://host:6379/0

The database name is optional for SQL servers โ€” connect to the server and pick a database from the sidebar.


โ Features

Data browsing & editing

  • Multi-tab data viewer โ€” open tables side by side like browser tabs
  • Resizable columns, with full values shown on hover for truncated cells
  • Double-click a cell to edit one field, or edit the full row in a dialog
  • Add new rows, copy any row as JSON, and import JSON to create a new record from it
  • Smart cells: JSON expansion, boolean badges, UUID detection, click-to-copy
  • Foreign-key navigation โ€” jump to the referenced row in a new tab
  • Bulk delete, CSV / JSON export (current page or full table)

Queries, schema & indexes

  • Monaco-powered query editor for SQL, MongoDB queries and Redis commands
  • Interactive ER diagrams with PK/FK relationships and export
  • Index management โ€” list, create and drop indexes; flags duplicate, unused and oversized ones
  • Database picker โ€” switch or create databases without reconnecting

Connections

  • Smart connect with automatic fallbacks (localhost, 127.0.0.1, host.docker.internal)
  • SSH tunneling with password or private-key authentication
  • Actionable connection diagnostics and auto-reconnect health monitoring
  • Switch between saved connections from the header

Safety

  • Read-only mode enforced server-side, with time-limited write access
  • Audit log of write operations
  • API rate limiting
  • Runs as a non-root user

โ Configuration

VariableDefaultDescription
PORT3030Port the server listens on inside the container
FORCE_READ_ONLYfalsetrue blocks all writes for every connection โ€” recommended for production databases
AUDIT_LOG_ENABLEDtrueRecord write operations in the audit log
AUDIT_LOG_MAX_ENTRIES1000Maximum audit entries kept in memory
RATE_LIMIT_MAX_REQUESTS100Max API requests per client per window
RATE_LIMIT_WINDOW_MS60000Rate-limit window in milliseconds

Example โ€” a locked-down, read-only instance:

docker run -d -p 3030:3030 -e FORCE_READ_ONLY=true 30rutvik/db-studio:latest

โ Image details

  • Base: node:20-alpine, multi-stage build (Next.js standalone output)
  • Port: 3030
  • User: non-root (nextjs, uid 1001)
  • Tags: latest tracks the newest release

โ Security notes

  • DB Studio connects to databases from the container, using the credentials you enter. Expose port 3030 only on trusted networks, or put it behind an authenticating reverse proxy / VPN.
  • Prefer read-only database users and FORCE_READ_ONLY=true when pointing at production.

Built and maintained by Rutvik Raut ยท rutvikraut.comโ 

Tag summary

Content type

Image

Digest

sha256:303bd2a81โ€ฆ

Size

54.1 MB

Last updated

2 days ago

docker pull 30rutvik/db-studio