Running DBX, a Lightweight Multi-DB Client, on Docker Behind Traefik at /dbx

Running DBX, a Lightweight Multi-Database Client, Behind Traefik at a /dbx Subpath

* This page contains promotional content

DBeaver, which lets me edit PostgreSQL data in bulk through a GUI while writing almost no SQL, had been invaluable. It is Java based, though, so it is fairly heavy to start up, and I had come to want something a bit lighter for looking at several databases together.
That was when I found DBX. It is free, supports many databases, and is said to run lightly. I decided to try building it into my Traefik-fronted Docker environment.

There is one thing that bothers me: DBX is developed in China. I want to keep an eye on how the development structure and the handling of data go from here, but for now I decided to run it in my own environment and see how it behaves.


What DBX is

DBX is a lightweight multi-database client built with Rust + Vue 3. Its official tagline is “80+ databases in 20 MB”.

  • Supported databases: more than 80 kinds, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB and SQL Server
  • Lightweight: about 20MB as a single binary, with no external runtime dependency
  • Query editor: based on CodeMirror 6, with syntax highlighting and metadata completion
  • AI SQL assistant: generates SQL from natural language through Claude/OpenAI integration
  • Data grid: supports virtual scrolling, with inline editing, filtering and exporting
  • Schema tools: comes with a browser, ER diagrams, a structure editor and a comparison utility
  • Dedicated browsers: support Redis key management and MongoDB document CRUD
  • Distribution: four channels, namely Desktop (Homebrew/Scoop/WinGet/Flatpak), Docker, CLI and MCP Server

Trying it first in a plain docker-compose environment

Before building it into Traefik straight away, I decided to run it first in a minimal configuration that does not use Traefik.

services:
  dbx:
    image: t8y2/dbx:latest
    container_name: dbx
    restart: unless-stopped
    ports:
      - "4224:4224"
    volumes:
      - dbx_data:/app/data

volumes:
  dbx_data:

If you start it with docker compose up -d, you can access http://<host>:4224 directly.
In my home environment, however, Traefik already dispatches every service from ports 80 and 443, and exposing a port directly for DBX alone would break the consistency of the setup. So from here I switched to the approach of putting it on the /dbx subpath behind Traefik.


Building the Docker environment behind Traefik

In my home environment, Traefik runs as a reverse proxy on an external network called traefik_network. I decided to join DBX to this network and publish it on a subpath called /dbx.

The official DBX image already provides an environment variable for serving under a subpath from a reverse proxy.

Setting the environment variable DBX_PUBLIC_BASE_PATH=/dbx makes it support being published under a context path such as /dbx. pgadmin All that is needed is to combine this with Traefik’s PathPrefix rule.

services:
  dbx:
    image: t8y2/dbx:latest
    container_name: dbx
    pull_policy: always
    restart: unless-stopped
    environment:
      DBX_PUBLIC_BASE_PATH: "/dbx"
    volumes:
      - dbx_data:/app/data
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_network"
      - "traefik.http.services.dbx.loadbalancer.server.port=4224"
      - "traefik.http.routers.dbx.rule=PathPrefix(`/dbx`)"
      - "traefik.http.routers.dbx.entrypoints=web"
      - "traefik.http.routers.dbx.priority=10"
    networks:
      - traefik_network

volumes:
  dbx_data:

networks:
  traefik_network:
    external: true

Key points of the configuration

  • Port: DBX listens on 4224 inside the container. I matched the loadbalancer.server.port Traefik label to it
  • Persistence: I mounted a named volume called dbx_data at /app/data
  • Network: it is connected only to traefik_network. Unlike a setup such as pgadmin4 that has a separate network for an internal database, DBX configures each target database individually inside the app, so this network alone is enough
  • Routing: it is dispatched with the PathPrefix(/dbx) rule, and I stated priority=10 explicitly to show its precedence against the other rules

Starting it up

cd /home/user/docker/compose/dbx
docker compose up -d

After starting it, I could access it at http://<host>/dbx.


Summary

ItemDetails
Reason for choosing itIt is lighter than DBeaver, it is free, and it supports many databases
Point of concernThe developer is in China. I will keep an eye on how things go
How it is publishedCombined DBX_PUBLIC_BASE_PATH=/dbx with Traefik’s PathPrefix and published it under the /dbx subpath
PersistenceMounted the dbx_data named volume at /app/data

With DBeaver I could copy and paste while editing data, but with DBX I could not.
On the other hand, DBX’s bulk edit feature made it possible to change several pieces of data at once.
Whether it can stand in for DBeaver is not clear yet, but at least I now have an environment for trying out its lightness and the breadth of databases it supports.

I want to keep watching what the developer does.

See also