Skip to main content

Configuration

µQuery is configured via CLI flags or environment variables. All flags have a corresponding UQ_* environment variable.

Server

FlagEnv varDefaultDescription
--portUQ_PORT8080Port to listen on
--addrUQ_ADDR0.0.0.0Address to listen on
--cors-enabledUQ_CORS_ENABLEDfalseEnable permissive CORS (all origins)
--pool-sizeUQ_POOL_SIZE4Number of concurrent DuckDB connections
--query-timeoutUQ_QUERY_TIMEOUT30Seconds until a query times out (0 = disabled)

Pool size

UQ_POOL_SIZE controls how many DuckDB connections are kept ready. Requests beyond the pool size queue until a connection is free.

Set it based on your expected query concurrency. Higher values use more memory.

docker run -p 8080:8080 -e UQ_POOL_SIZE=8 fb64/uquery

Query timeout

UQ_QUERY_TIMEOUT sets the maximum time (in seconds) between receiving a request and the first result batch. Queries that take longer return HTTP 408.

Set to 0 to disable:

docker run -p 8080:8080 -e UQ_QUERY_TIMEOUT=0 fb64/uquery

Database

FlagEnv varDefaultDescription
--db-fileUQ_DB_FILEDuckDB file to attach (read-only)
--allowed-directoriesUQ_ALLOWED_DIRECTORIEScurrent dir + cloud prefixesRestrict file access to specific paths

Attached database

Attaches a DuckDB file at startup. All queries run in that database context, making pre-defined macros and views immediately available.

uquery --db-file custom.db

See the Custom Database tutorial for a full example.

Allowed directories

By default µQuery allows access to the current working directory and cloud storage prefixes (s3://, gcs://, etc.). Use --allowed-directories to restrict or expand this:

uquery --allowed-directories /data/readonly,/tmp/uploads

Setting this disables all external access not explicitly listed.


Cloud Storage

AWS S3

FlagEnv varDescription
--aws-credential-chainUQ_AWS_CREDENTIAL_CHAINUse the AWS credential chain (IAM role, instance profile, env vars)
docker run -p 8080:8080 -e UQ_AWS_CREDENTIAL_CHAIN=true fb64/uquery

Once enabled, query S3 files directly:

SELECT * FROM 's3://my-bucket/data.parquet'

See the AWS Serverless tutorial for full IAM setup.

Google Cloud Storage

FlagEnv varDescription
--gcs-credential-chainUQ_GCS_CREDENTIAL_CHAINUse the GCP credential chain (Workload Identity, ADC)
--gcs-key-idUQ_GCS_KEY_IDGCS HMAC key ID (static credentials)
--gcs-secretUQ_GCS_SECRETGCS HMAC secret (static credentials)

Prefer UQ_GCS_CREDENTIAL_CHAIN=true on Cloud Run and GKE — no secrets required:

docker run -p 8080:8080 -e UQ_GCS_CREDENTIAL_CHAIN=true fb64/uquery

Once enabled, query GCS files using the gcs:// or gs:// prefix:

SELECT * FROM 'gcs://my-bucket/data.parquet'

See the GCP Serverless tutorial for full setup.


Iceberg

FlagEnv varDescription
--ic-catalog-endpointUQ_ICEBERG_CATALOG_ENDPOINTREST catalog endpoint URL
--ic-catalog-nameUQ_ICEBERG_CATALOG_NAMECatalog name to attach
--ic-userUQ_ICEBERG_USERCatalog client ID
--ic-secretUQ_ICEBERG_SECRETCatalog client secret

All four values must be set together to enable Iceberg. Once attached, query Iceberg tables directly by name.


DuckDB UI

FlagEnv varDefaultDescription
--duckdb-uiUQ_UI_PROXYfalseEnable the DuckDB web UI proxy
--duckdb-ui-portUQ_UI_PORT14213Port for the DuckDB UI
docker run -p 8080:8080 -p 14213:14213 -e UQ_UI_PROXY=true fb64/uquery

Verbose logging

Use -v (debug) or -vv (trace) for more detailed logs:

uquery -v