Skip to main content
bqto lets you reach private Google Cloud services from your laptop or a CI job. It works with Cloud SQL, AlloyDB, and Memorystore. You do not need a VPN or a bastion that runs all the time. bqto creates a small bastion VM in your project when you connect. When you stop, bqto deletes the VM.

How it works

Your client connects to a local port. bqto carries the traffic through Identity-Aware Proxy (IAP) and a temporary bastion VM to the private address of the service.
  1. bqto asks the API of the service for its private address.
  2. bqto checks that the firewall lets IAP reach port 22. Then it creates a small bastion VM in the network of the service, with no external IP.
  3. bqto opens an IAP tunnel and forwards a local port through the bastion to the service.
  4. When you stop, bqto deletes the bastion. If bqto cannot delete it, a deadline set on the VM deletes it.
bqto acts as you. It uses your gcloud login and your Application Default Credentials. Your IAM roles decide what you can reach.

Limits

bqto is for interactive use, such as psql or a local client on a forwarded port, and for transfers of a few gigabytes. It is not for bulk data. Google says that IAP TCP forwarding is not intended for bulk transfer of data. A dump or restore of tens of gigabytes belongs on a VM in the VPC, with the data moved through Cloud Storage. These numbers were measured in us-central1, against Cloud SQL for PostgreSQL 17: Each query pays the round trip through IAP and the bastion. So thousands of queries in a row are slow. Batch them, or run the job inside Google Cloud. IAP closes a tunnel after an hour with no traffic. bqto sends an SSH keepalive every 30 seconds, so a quiet session stays open.

bqto and bqto Pro

bqto is free and open source, under the Apache License 2.0. bqto Pro is the paid edition. It is one bqto binary that does everything the free bqto does, and adds more services and features. The free bqto marks the bqto Pro flags (bqto Pro) in its help. If you give it one of them, it stops before it creates anything and exits with code 2.

Next steps

Install bqto

Install the free bqto or bqto Pro.

First connection

Sign in, get the roles, and connect to a private database.

Permissions

The IAM roles and APIs that bqto needs.

GitHub Actions

Run a step against a private service from a workflow.