# Introducing QueryProxy

> An open-source, self-hosted portal that puts an approval in front of every production query — without handing out credentials.

- Published: 2026-09-07
- Updated: 2026-10-10
- Tags: announcement, release
- Source: https://queryproxy.com/blog/introducing-queryproxy/
- Language: en-US
- Author: Muhammet Şafak

---
:::note[Editor's note — updated 1 October 2026]
This post announced the first release. A few details have changed since then
(see the [changelog](https://github.com/QueryProxy/QueryProxy/blob/main/CHANGELOG.md)):

- **Administrative statements:** `GRANT`, `REVOKE` and user management are
  still blocked outright, but `CREATE EXTENSION`, `DO` and
  `SET GLOBAL` / `SET PERSIST` are now refused only for untrusted procedural
  languages and dangerous variables. See [SQL guards](/docs/sql-guards/).
- **Self-approval:** a system administrator can approve their own request; the
  override is recorded in the audit log. See
  [Approval workflow](/docs/approval-workflow/).
- **Roles:** Admin is a system-wide role; DBA, Developer and Auditor are
  assigned per team.
- **First account:** there is no web sign-up. Create the first administrator
  with `QUERYPROXY_ADMIN_EMAIL` / `QUERYPROXY_ADMIN_PASSWORD` on first boot or
  `php artisan queryproxy:create-admin`, and install with a single
  `docker run`. See [Quick start](/docs/quickstart/).
:::

Every engineering team eventually has this conversation: a developer needs
production data to debug something real, and the only ways in are handing over
credentials, opening a tunnel, or a DBA running queries on other people's
behalf all day. All three are bad — the first is how incidents happen, the last
two don't scale.

**QueryProxy** is our answer: a self-hosted portal that sits between your team
and your databases, replacing shared passwords with a workflow.

## How it works

1. A developer writes SQL in a guarded editor, against a connection a DBA
   granted them. Credentials stay in an AES-256-encrypted vault.
2. Before the request is even submitted, the SQL is parsed and inspected:
   `UPDATE`/`DELETE` without a `WHERE` is rejected, `SELECT` without a `LIMIT`
   gets one injected (default 1000, hard cap 10000), and administrative
   statements are blocked outright.
3. A DBA approves or rejects — from the web queue, or straight from Slack with
   interactive buttons. Every chat callback is HMAC-SHA256-verified with replay
   protection, and nobody can approve their own request (a system administrator
   can override this, and the override is flagged in the audit log).
4. A queue worker executes the query asynchronously, streaming results
   row-by-row through your masking rules — matching values are masked *before*
   they touch disk — and writing every step to an append-only audit log.

## What ships today

- Teams with Admin / DBA / Developer / Auditor roles and hard isolation
- PostgreSQL, MySQL, MariaDB, SQLite and SQL Server targets (SQL Server needs a custom image: the published one ships without the driver)
- SQL guards enforced by parsing, not pattern-matching
- Slack interactive approvals and a replay-protected Teams HMAC action endpoint
- Column-pattern and content-regex data masking (full / partial / hash)
- Optional TOTP two-factor authentication, enforceable per role
- Streaming NDJSON results, CSV export, automatic retention pruning
- An append-only, filterable, exportable audit log (the application never edits or deletes entries)

## Try it in two minutes

```bash
docker run -d --name queryproxy \
  -p 7432:7432 \
  -v queryproxy-data:/var/www/html/storage/app \
  -e QUERYPROXY_ADMIN_EMAIL=you@example.com \
  -e QUERYPROXY_ADMIN_PASSWORD='choose-a-strong-password' \
  queryproxy/queryproxy
```

Open `http://localhost:7432` and log in with that address. The admin variables
create the first account on first boot; without them, create it with
`docker exec -it queryproxy php artisan queryproxy:create-admin`. To explore
with a demo team instead, set `QUERYPROXY_SEED_DEMO=true` together with
`QUERYPROXY_SEED_DEMO_FORCE=true` (the image runs with `APP_ENV=production`,
which refuses the seeder otherwise) — for demo instances only, not for
production. Its one-time password is printed in the container logs. The
[documentation](/docs/) covers everything from
[quick start](/docs/quickstart/) to
[Slack setup](/docs/slack-integration/) and the exact
[guard rules](/docs/sql-guards/).

QueryProxy is free and open source under AGPL-3.0. Star it, fork it, run it
tonight — and if you find something sharp, the
[issue tracker](https://github.com/QueryProxy/QueryProxy/issues) and
[security policy](https://github.com/QueryProxy/QueryProxy/blob/main/SECURITY.md)
are waiting.
