# Configuration
URL: /docs/configuration
LLM index: /llms.txt
Description: Global CLI options, environment variables, and deployment configuration.

# Configuration

All global options must be placed **before** the database subcommand. The general command shape is:

```bash
sql-studio [OPTIONS] <SUBCOMMAND> [ARGS...]
```

Every option can also be set with an environment variable — useful when running SQL Studio inside Docker or a process manager without modifying the command line.

## Global Options

| Option | Short | Description | Default | Env Var |
|--------|-------|-------------|---------|---------|
| `--address` | `-a` | Address and port to bind to | `127.0.0.1:3030` | `ADDRESS` |
| `--timeout` | `-t` | Timeout for queries from the query page | `5secs` | `TIMEOUT` |
| `--base-path` | `-b` | Base URL path for the UI (e.g. `/sql-studio`) | _(none)_ | `BASE_PATH` |
| `--no-browser` | | Don't open the URL in the system browser | `false` | `NO_BROWSER` |
| `--no-shutdown` | | Don't show the shutdown button in the UI | `false` | `NO_SHUTDOWN` |

## Timeout Format

The `--timeout` option accepts human-readable durations. Valid examples: `5secs`, `30secs`, `1min`, `2min 30secs`. The timeout applies to queries executed from the Query Editor page — it does not affect schema or metadata fetches.

## Binding to a Custom Address

By default SQL Studio binds to `127.0.0.1:3030`, which is only reachable from the local machine. To expose it on your local network or inside a container:

```bash
sql-studio --address=0.0.0.0:8080 sqlite ./my-app.db
```

## Setting a Base Path

If you're serving SQL Studio behind a reverse proxy under a sub-path, use `--base-path`:

```bash
sql-studio --base-path=/sql-studio postgres postgres://localhost:5432/mydb
```

The UI will then expect to be reached at `http://your-host/sql-studio`.

## Running Headless

For server or CI environments where no browser is available, suppress the automatic browser launch and disable the shutdown button:

```bash
sql-studio --no-browser --no-shutdown sqlite ./my-app.db
```

## Logging

SQL Studio reads the standard `RUST_LOG` environment variable to control log verbosity. Set it before running the binary:

```bash
RUST_LOG=debug sql-studio sqlite ./my-app.db
```

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
