StarQuery is a desktop and web database/resource browser with support for SQL datasources, Elasticsearch, and S3-compatible object storage.
Status:
- Work in progress
- No stable releases yet
- Configuration and data formats may still change
Datasource types:
mysqlpostgressqlite(local only)elasticsearchs3minio
Runtime targets:
- Electron desktop app with a built-in local backend
- Hosted backend + Vite frontend for browser usage
- Browser frontend against a configured remote StarQuery server
- Starts its own local backend automatically
- Provides the built-in
Local computerserver Local computeris available only inside Electron- Auth is disabled completely for the built-in local backend
- SQLite datasources are only available here
- You can still add remote StarQuery servers and use those with auth
- Intended for self-hosting on a server
- Auth is enabled by default
- Uses MySQL as the default meta database
- Can optionally bootstrap users, projects, and datasources from JSON
- Connects to remote StarQuery servers
- Does not expose
Local computer - Can auto-register the current origin as a default hosted server in production
- Can be locked to exactly one server via frontend env vars
Run local seeded test databases:
docker compose up -dThis starts:
- MySQL on
127.0.0.1:3307 - Postgres on the configured compose port
Useful commands:
docker compose down
docker compose down -vUse docker compose down -v if you want to wipe the database and re-run the seed from scratch.
There is a dedicated Docker deployment for the hosted web version with:
- a Vite-built frontend served by Nginx
- a Node backend
- a MySQL metastore for users, roles, projects, datasources, tokens, and settings
Start it with:
docker compose -f docker-compose.hosted.yml up -d --buildThen open:
- Frontend:
http://localhost:8080
Services in the hosted stack:
frontend: public web UI on port8080backend: internal StarQuery API inhostedmodemeta-db: MySQL database used by the backend as its metastore
Stop it with:
docker compose -f docker-compose.hosted.yml downReset the hosted metastore volume with:
docker compose -f docker-compose.hosted.yml down -vThere are three main configuration surfaces:
- frontend env vars for the browser UI
- backend env vars for the API server and auth
- optional bootstrap JSON for provisioning users, projects, and datasources
These are read by the Vite frontend.
| Variable | Default | Description |
|---|---|---|
VITE_LOCKED_SERVER_URL |
unset | Locks the frontend to exactly one StarQuery server. When set, server switching is disabled and only this server is used. |
VITE_LOCKED_SERVER_NAME |
Configured Server |
Label shown for VITE_LOCKED_SERVER_URL. |
VITE_DEFAULT_SERVER_URL |
unset | Default remote server URL for the plain web frontend when not locked. |
VITE_APP_BASE_URL |
http://127.0.0.1:3000 |
Fallback local backend URL used by the frontend if no Electron-provided local backend URL is available. Mostly useful for development. |
Behavior notes:
- In production web builds, if
VITE_DEFAULT_SERVER_URLis not set, the frontend will use the current browser origin as the default hosted server when possible. VITE_LOCKED_SERVER_URLtakes precedence over all other frontend server defaults.- The built-in
Local computerserver is not created in the plain web frontend.
These are read by the StarQuery backend.
| Variable | Default | Description |
|---|---|---|
STARQUERY_MODE |
hosted |
Runtime mode. Valid values: hosted, local. |
PORT |
3000 |
HTTP port for the backend. |
HOST |
0.0.0.0 |
HTTP bind host. |
STARQUERY_SERVER_NAME |
Hosted Server in hosted mode, Local Computer in local mode |
Display name returned by /api/server/info. |
STARQUERY_REQUEST_BODY_LIMIT |
100mb |
Express/body-parser request size limit. |
| Variable | Default | Description |
|---|---|---|
STARQUERY_META_DRIVER |
mysql in hosted mode, sqlite in local mode |
Meta database driver. Valid values: mysql, sqlite. |
STARQUERY_META_SQLITE_PATH |
<cwd>/.starquery/starquery-meta.sqlite |
SQLite file path for the meta database. Only used when STARQUERY_META_DRIVER=sqlite. |
STARQUERY_META_MYSQL_HOST |
127.0.0.1 |
MySQL host for the meta database. |
STARQUERY_META_MYSQL_PORT |
3307 |
MySQL port for the meta database. |
STARQUERY_META_MYSQL_USER |
starquery |
MySQL user for the meta database. |
STARQUERY_META_MYSQL_PASSWORD |
starquery |
MySQL password for the meta database. |
STARQUERY_META_MYSQL_DATABASE |
starquery |
MySQL database name for the meta database. |
| Variable | Default | Description |
|---|---|---|
STARQUERY_AUTH_SESSION_TTL_HOURS |
720 |
Session token lifetime in hours. |
STARQUERY_AUTH_API_KEY_TTL_DAYS |
365 |
API key lifetime in days. |
Auth mode notes:
- In
localmode, auth is disabled completely in the backend. - In
hostedmode, auth is enabled. - The Electron-built-in
Local computerserver runs inlocalmode.
If these are set in hosted mode, the backend will provision an admin-capable user on startup if needed.
| Variable | Default | Description |
|---|---|---|
STARQUERY_SEED_ADMIN_EMAIL |
unset | Seed admin email. |
STARQUERY_SEED_ADMIN_PASSWORD |
unset | Seed admin password. |
STARQUERY_SEED_ADMIN_NAME |
Admin |
Seed admin display name. |
Optional hosted-mode OpenID Connect / OAuth2 login.
| Variable | Default | Description |
|---|---|---|
STARQUERY_AUTH_OPENID_ISSUER |
unset | OpenID issuer URL. |
STARQUERY_AUTH_OPENID_CLIENT_ID |
unset | OpenID client ID. |
STARQUERY_AUTH_OPENID_CLIENT_SECRET |
unset | OpenID client secret, if required by the provider. |
STARQUERY_AUTH_OPENID_SCOPES |
openid profile email |
Space-separated scopes requested during login. |
| Variable | Default | Description |
|---|---|---|
STARQUERY_BOOTSTRAP_CONFIG_PATH |
unset | Path to a JSON bootstrap file used to create/update users, projects, and datasources on startup. |
STARQUERY_MODE=hosted
HOST=0.0.0.0
PORT=3000
STARQUERY_SERVER_NAME="StarQuery Hosted"
STARQUERY_META_DRIVER=mysql
STARQUERY_META_MYSQL_HOST=127.0.0.1
STARQUERY_META_MYSQL_PORT=3306
STARQUERY_META_MYSQL_USER=starquery
STARQUERY_META_MYSQL_PASSWORD=secret
STARQUERY_META_MYSQL_DATABASE=starquerySTARQUERY_MODE=local
HOST=127.0.0.1
PORT=3000
STARQUERY_META_DRIVER=sqlite
STARQUERY_META_SQLITE_PATH=/absolute/path/to/starquery-meta.sqliteThe bootstrap file is loaded from STARQUERY_BOOTSTRAP_CONFIG_PATH.
Supported top-level keys:
usersprojects
Example:
{
"users": [
{
"email": "admin@example.com",
"name": "Admin",
"password": "change-me",
"permissions": ["*"],
"roles": ["admin"]
}
],
"projects": [
{
"slug": "analytics",
"name": "Analytics",
"description": "Shared analytics resources",
"dataSources": [
{
"name": "Primary MySQL",
"type": "mysql",
"position": 0,
"config": {
"host": "127.0.0.1",
"port": 3306,
"user": "app",
"password": "secret",
"database": "analytics"
}
}
]
}
]
}Bootstrap behavior:
- Users are matched by email and updated if they already exist.
- Projects are matched by slug and updated if they already exist.
- Datasources are matched by name within a project and updated if they already exist.
- Datasource configs are normalized through the datasource registry before being saved.
- Local-only datasource types such as
sqlitecannot be bootstrapped on hosted servers.
Capabilities:
- SQL query editor
- table browser
- schema editor
Config fields:
hostportuserpassworddatabase
Capabilities:
- SQL query editor
- table browser
- schema editor
Config fields:
hostportuserpassworddatabase
Capabilities:
- SQL query editor
- table browser
- schema editor
Restrictions:
- local only
Config fields:
filePath
Capabilities:
- resource browser
- document search/edit workflow
Config fields:
nodeusernamepasswordapiKeyindex
Auth notes:
- you can use either
apiKey - or
usernamepluspassword - or no auth if the cluster allows it
Capabilities:
- bucket/object browser
- preview
- upload
- download
- delete
Config fields:
endPointportuseSSLpathStyleaccessKeysecretKeysessionTokenregionbucket
Capabilities:
- bucket/object browser
- preview
- upload
- download
- delete
Config fields:
endPointportuseSSLpathStyleaccessKeysecretKeysessionTokenregionbucket
Defaults compared to s3:
useSSL=falsepathStyle=trueport=9000
Hosted mode includes:
- local email/password auth
- optional OpenID Connect auth
- sessions
- API keys
- roles and wildcard-based permissions
Electron local backend behavior:
- no login required
- auth disabled completely
- wildcard access is effectively available for the built-in local server
Permissions support:
- plain path permissions such as
project.analytics - explicit read permissions such as
project.analytics:read - explicit write permissions such as
project.analytics:write - wildcard patterns such as
project.*
Examples:
datasource.analytics.primarydatasource.analytics.primary:readdatasource.analytics.primary:writeproject.analytics.users:write*
- If you self-host the browser build, the frontend and backend can live behind the same origin and the frontend will talk to
/api. - If you want a browser build that can only talk to one server, use
VITE_LOCKED_SERVER_URL. - If you use Electron, the built-in local backend is managed by the app and should not require a manual URL.
- Password-like datasource fields are redacted when datasources are read back from the API.
Potential next improvements:
- replace the current custom meta migration runner with generated Drizzle migrations
- add a root
.env.example - add production HTTPS reverse-proxy examples
- move Electron password storage to
keytar