SQL Studio

Configuration

Global CLI Options

These options apply to all database subcommands and must be placed before the subcommand.

sql-studio [OPTIONS] <SUBCOMMAND> [ARGS...]
OptionShortDescriptionDefaultEnv Var
--address-aAddress and port to bind to127.0.0.1:3030ADDRESS
--timeout-tTimeout for queries from the query page5secsTIMEOUT
--base-path-bBase URL path for the UI (e.g. /sql-studio)(none)BASE_PATH
--no-browserDon't open the URL in the system browserfalseNO_BROWSER
--no-shutdownDon't show the shutdown button in the UIfalseNO_SHUTDOWN

Timeout Format

The --timeout option accepts human-readable durations: 5secs, 30secs, 1min, 2min 30secs, etc.

Examples

# Custom address and longer timeout
sql-studio --address 0.0.0.0:8080 --timeout 30secs sqlite ./my.db

# Serve under a base path
sql-studio --base-path /sql-studio sqlite ./my.db

Environment Variables

Every CLI option can be set via an environment variable. This is particularly useful for Docker deployments or CI environments.

export ADDRESS="0.0.0.0:3030"
export TIMEOUT="30secs"
export BASE_PATH="/sql-studio"
export NO_BROWSER="true"
export NO_SHUTDOWN="true"

sql-studio sqlite ./my.db

Logging

SQL Studio uses the tracing crate with env-filter support. Control log verbosity with the RUST_LOG environment variable:

# Show info-level logs
RUST_LOG=info sql-studio sqlite ./my.db

# Show debug-level logs
RUST_LOG=debug sql-studio sqlite ./my.db

# Show only SQL Studio logs
RUST_LOG=sql_studio=debug sql-studio sqlite ./my.db

Deployment

Reverse Proxy

When deploying behind a reverse proxy (e.g. Nginx, Caddy, Traefik), use the --base-path option so all UI routes are served under a prefix:

sql-studio --base-path /sql-studio --no-browser --no-shutdown sqlite ./my.db

Then configure your reverse proxy to forward /sql-studio/* to http://127.0.0.1:3030/sql-studio/.

Docker

docker run -p 3030:3030 frectonz/sql-studio /bin/sql-studio \
  --no-browser \
  --no-shutdown \
  --address=0.0.0.0:3030 \
  postgres \
  postgresql://user:pass@host/mydb

For file-based databases (SQLite, DuckDB, Parquet, CSV), mount a volume:

docker run -p 3030:3030 \
  -v /path/to/data:/data \
  frectonz/sql-studio /bin/sql-studio \
  --no-browser \
  --no-shutdown \
  --address=0.0.0.0:3030 \
  sqlite /data/my-database.db

On this page

No Headings