Skip to main content

npm

# PostgreSQL example
npx @bytebase/dbhub \
  --transport http \
  --port 8080 \
  --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"

# Or use demo mode for testing
npx @bytebase/dbhub --transport http --port 8080 --demo

Docker

docker run --rm --init \
  --name dbhub \
  --publish 8080:8080 \
  bytebase/dbhub \
  --transport http \
  --port 8080 \
  --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"

# Or use demo mode for testing
docker run --rm --init \
  --name dbhub \
  --publish 8080:8080 \
  bytebase/dbhub \
  --transport http \
  --port 8080 \
  --demo
When connecting to databases on your host machine from Docker, use host.docker.internal instead of localhost:
--dsn "postgres://user:[email protected]:5432/dbname"

Verification

After starting DBHub, verify it’s running correctly:
curl http://localhost:8080/healthz
You should see “OK” indicating the server is running.