BYOC Quickstart
This guide takes an empty Google Cloud project to a working Captain install that has indexed a file and answered a search. Each step is one action, with the exact command to run and what it prints when it works. A first install takes about 20 minutes of waiting, most of it while Google creates the cluster, plus the time your connection needs to upload the release into your registry.
The steps below are for Google Cloud. An install also runs on AWS (EKS): contact your Captain team for that.
For what BYOC is and what it puts in your project, read What is BYOC? first. Installation explains every option this guide leaves at its default.
Check what you need before you start
Install these tools on the machine you install from, and check each version with the command beside it.
| Tool | Version | Check |
|---|---|---|
| Google Cloud CLI | current | gcloud version |
| GKE sign-in plugin | current | gke-gcloud-auth-plugin --version |
| Terraform | 1.6 or newer | terraform version |
| Helm | 3.14 or newer (Helm 4 also works) | helm version |
| kubectl | 1.30 or newer | kubectl version --client |
| crane, on a Mac only | current | crane version |
The GKE sign-in plugin is a separate install, and on a Mac crane comes from Homebrew. The release carries its own crane for Linux on x86-64, so a Linux machine does not need it. Docker is not needed, because nothing is built on your machine.
gcloud components install gke-gcloud-auth-plugin
brew install crane # on a Mac onlyThe Google Cloud project needs the following before you begin:
- Billing switched on, in a project that holds nothing else. Some permissions the install needs apply to the whole project, so a dedicated project keeps them away from other work.
- The right roles for the person who installs. That person needs Owner on the project, or Editor together with Project IAM Admin, Security Admin and Service Networking Admin.
- One region.
us-central1is the default and the region Captain tests on. Pick the region before the first install, because the cluster, the database and the registry are all created there. - Enough quota in that region. A default install runs N4 machines in three node pools and one Cloud SQL instance, so check the N4 CPU quota and the Cloud SQL quota in the region. Google's ranking service allows 500 calls a minute on a new project, which is plenty for a first install.
- Model access. Chat uses Claude Opus 5 on Vertex AI by default. Switch it on in the Vertex AI Model Garden (publisher Anthropic, model
claude-opus-5). Until you do, chat answers with Gemini 3.8 Flash, and the install still passes. - Organization policies checked. Captain has installed under policies that forbid service account keys and external IPs and that require Shielded VMs, OS Login and US locations. If another policy blocks the installer, send its name to your Captain team.
- A budget alert. A full-size install costs about as much as five large servers and a highly available database, so set an alert on the project before you start.
Get the release from your Captain team
Your Captain team sends each release as two files: the offline bundle and its checksum. Put both in an empty folder, set the version you were sent, and check that the bundle arrived whole.
export VERSION=0.0.3
sha256sum -c captain-$VERSION.tar.sha256On a Mac without sha256sum, run shasum -a 256 -c captain-$VERSION.tar.sha256 instead. A complete download prints one line:
captain-0.0.3.tar: OKAny other answer means the file is damaged or cut short, so download it again before you go further. The checksum catches a damaged transfer, and Security explains what it does not prove.
Unpack the bundle and the installer
The bundle holds every image, the Helm chart, the loader load.sh, and the installer as a second archive. Unpack both, check the installer's own checksums, and move into its byoc folder, where every later command runs.
tar -xf captain-$VERSION.tar
tar -xzf captain-$VERSION/captain-install-$VERSION.tar.gz
cd captain-install-$VERSION
sha256sum -c --quiet SHA256SUMS && echo "installer complete"
cd byocThe check prints installer complete. On a Mac, use shasum -a 256 -c --quiet SHA256SUMS in place of sha256sum -c --quiet SHA256SUMS. The folder now holds install.sh, the Terraform module in terraform/gcp/, and the guides in docs/customer/.
Sign in to Google Cloud and pick the project
Google keeps two separate sign-ins, and the installer needs both: the first is for the gcloud command, and the second is the one Terraform uses. Each opens a browser window.
gcloud auth login
gcloud auth application-default loginThen point gcloud at the project, and keep the project and region in two variables for the commands that follow.
export PROJECT=your-project-id
export REGION=us-central1
gcloud config set project $PROJECTgcloud answers Updated property [core/project]. The installer switches on every Google Cloud API it needs, so there is nothing else to enable by hand.
Fill in the Terraform variables
Copy the example variables file, which explains every setting in its comments.
cp terraform/gcp/terraform.tfvars.example terraform/gcp/terraform.tfvarsOpen terraform/gcp/terraform.tfvars and set three lines. The first two name the project and region, and the third tells the installer that the images come from the offline bundle you load yourself.
project = "your-project-id"
region = "us-central1"
release_source = "bundle"For a trial, also uncomment the "test install" block in the same file. It uses smaller machines and a single-zone database, and it lets the trial be removed later.
If your data must be encrypted with keys you hold, add cmek = { enabled = true } now, because turning it on later replaces the database. Encryption keys explains what it covers.
Finally, name a bucket for Terraform's state. The state holds every secret the install generates, so it lives in a private bucket in your project and never on your machine. The installer creates the bucket if it does not exist.
export TF_STATE_BUCKET=$PROJECT-captain-tfstateUse the same bucket name on every later run, including upgrades and the uninstall.
A first install needs no settings file for the software. Without one, the installer uses the defaults: the web app, the API, the docs and the MCP server are all on, the models are the Vertex AI defaults, and sign-in is by email and password, with the first person to open the app becoming the admin. Once the install runs, ./install.sh settings writes values.customer.yaml with every setting and its default, for the changes you make later.
Run the cloud step
The cloud step creates the network, the cluster, the database, the bucket, the secrets and the empty registry that the release goes into.
./install.sh cloudTerraform first lists everything it will create and asks you to confirm. Type yes and press Enter.
Plan: <count> to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yesThe count depends on the options you chose. While the cluster and the database are created, Terraform prints a "Still creating..." line every ten seconds. That is normal, and nothing is stuck. On a first install this step took 12.5 minutes and ended with these lines:
google_container_node_pool.system[0]: Creation complete after 1m15s
google_container_node_pool.vector_db[0]: Creation complete after 1m15s
Apply complete! Resources: <count> added, 0 changed, 0 destroyed.
==> Contract written to .../byoc/.generated/contract.values.json (names only, no secret values)Load the release into your registry
The cloud step created a registry named captain-release in your project. Sign Docker's credential helper in to it, then run the loader from the bundle's folder.
gcloud auth configure-docker $REGION-docker.pkg.dev
cd ../../captain-$VERSION
./load.sh $REGION-docker.pkg.dev/$PROJECT/captain-releaseThe loader pushes each image and chart, reads it back, and compares it with the digest the release names. It prints one loaded line for each item and stops at the first one that does not match. The last lines look like this:
loaded charts/keda:2.17.2
loaded charts/captain:0.0.3
<count> items of Captain 0.0.3 are in us-central1-docker.pkg.dev/your-project-id/captain-release, each checked against release.yaml.The loader also prints an install command of its own. Skip it and use the next step instead, which installs from the same release. How long the load takes depends on your upload speed. Running it again pushes nothing and prints already there for every item.
Run the software step
Go back to the installer's folder and run the full install. It runs the cloud step again, which finds nothing to change, and then installs the software onto the cluster.
cd ../captain-install-$VERSION/byoc
./install.sh installFor a trial with the smaller machines from the "test install" block, run VALUES=values.test.yaml ./install.sh install instead, so that the pods fit them.
The software step runs the database changes, checks every model the install uses, and ends with the install check, which calls each service once. On a first install it took 3 to 4 minutes, and it ended with these lines:
OK Captain Vector DB: 2 of 2 replicas joined, and the key was accepted
OK sign-in: the API publishes 1 signing key(s) at http://captain-api/.well-known/jwks.json
OFF mail: no mail server configured, so invites and alerts are off
INSTALL CHECK PASSED. 18 service(s) answered.
==> What is running
captain-api running: 1 of 1 ready
captain-app running: 1 of 1 ready
captain-vector-db running: 2 of 2 ready
every part the settings switch on is running (21 parts)
==> Captain is installed. The install check passed, and every part the settings switch on is running.If a service refuses, its line starts with REFUSED, the check ends with INSTALL CHECK FAILED, and the install stops there with the service and the reason. Troubleshooting a first install lists the usual causes. Fix the cause and run ./install.sh install again, which carries on from where it stopped.
Find the addresses and trust the certificate
The install answers on private names only, inside your network. Print them, with the DNS record each one needs:
./install.sh addresses==> Where Captain answers
Private (inside your network) Public (open web)
Web app https://app.captain.internal not exposed
API https://api.captain.internal not exposed
Docs https://docs.captain.internal not exposed
MCP https://mcp.captain.internal/mcp not exposed
Every private name points at one reserved internal address, <internal address>. It is kept through every
upgrade and every reinstall of the software, so the names never move.The output goes on to list the four A records. Give them to your network team, who either forward the captain.internal zone to Cloud DNS or copy the records into your own DNS. People then reach the names over the VPN or the interconnect that joins your network to the project's network.
The certificate on these names is signed by a private authority that the install created in your project, so browsers and API clients trust it only once its root certificate is installed. The root is public. Save it to a file:
./install.sh ca-certificate > captain-root.pemInstall captain-root.pem the way you install any internal root, through your device management for browsers, and pass it to API clients directly. Then check that the API answers from your machine:
curl -s -o /dev/null -w "%{http_code}\n" --cacert captain-root.pem https://api.captain.internal/healthIt prints 200. Before your VPN route and DNS are ready, a first look from a laptop works through Google's Identity-Aware Proxy instead: set private_access_jump_host = true in terraform.tfvars, run ./install.sh install, and use the two commands the installer prints. Installation explains the other ways to reach the install.
Create the admin account and an API key
Open https://app.captain.internal in a browser that trusts the root certificate. A new install has no accounts, and the first person to open the app creates the admin account, so do this as soon as the install finishes. The page is titled "Create the admin account". Enter your name, your email address and a password twice, then choose Create admin account.
Next, open API Keys in the side panel, choose Create key, give the key a name, and copy it. The key is shown only once. Keep it in a variable for the next step:
export CAPTAIN_API_KEY="cap_..."Index a file and search it
Every API call in this step goes to https://api.captain.internal with the key and the root certificate. First create a collection:
curl -X PUT https://api.captain.internal/v2/collections/quickstart \
--cacert captain-root.pem \
-H "Authorization: Bearer $CAPTAIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"description": "My first collection"}'The answer is 201 Created, with the new collection:
{
"collection_name": "quickstart",
"collection_id": "01a23df1-03fa-74dc-949f-18f45dd534e9",
"organization_id": "<your organization id>",
"created_at": "2026-12-03T22:05:35.098435",
"description": "My first collection",
"metadata": null
}Then upload one file to index. Any PDF, Word document or text file works.
curl -X POST https://api.captain.internal/v2/collections/quickstart/index/file \
--cacert captain-root.pem \
-H "Authorization: Bearer $CAPTAIN_API_KEY" \
-F "files=@handbook.pdf"The answer is 200 OK, with the id of the indexing job:
{
"job_id": "87a9a0e2d5bb49d9803c373e85335308-1796335535",
"status": "pending",
"custom_metadata": null
}Indexing runs in the background. Ask for the job with its job_id until status is completed, which took about two and a half minutes for a one-page PDF.
curl https://api.captain.internal/v2/jobs/87a9a0e2d5bb49d9803c373e85335308-1796335535 \
--cacert captain-root.pem \
-H "Authorization: Bearer $CAPTAIN_API_KEY"{
"job_id": "87a9a0e2d5bb49d9803c373e85335308-1796335535",
"collection_name": "quickstart",
"status": "completed",
"job_type": "index_file",
"progress_message": "Job completed successfully",
"result": {
"files_indexed": 1,
"files_failed": 0,
"files_skipped": 0,
"duration_seconds": 157,
...
},
...
}Once the job is complete, search the collection with a question the file answers:
curl -X POST https://api.captain.internal/v3/collections/quickstart/query \
--cacert captain-root.pem \
-H "Authorization: Bearer $CAPTAIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "How many vacation days do new employees get?", "limit": 5}'The answer lists the passages that match, best first, each with the document and the page it came from:
{
"query": "How many vacation days do new employees get?",
"results": [
{
"chunk_id": "728eb40f9a76633a053d317fed7dc05b:0",
"score": 0.09523809523809523,
"text": "Employee Handbook 1. Working hours ... 2. Vacation New employees receive 20 vacation days in their first year, accrued monthly from the start date. ...",
"match_sources": ["content_embedding", "keyword", "ocr"],
"document": {
"id": "6c5fcc5972f924cf3c2101466d764d97",
"version_id": "728eb40f9a76633a053d317fed7dc05b",
"filename": "handbook.pdf",
"source": {"type": "file", "uri": "gs://<your bucket>/uploads/.../handbook.pdf", "mime_type": null},
...
},
"location": {"page_start": 1, "page_end": 1, "chunk_index": 0, ...},
"chunk_type": "body",
...
}
],
"total_results": 1,
"limit": 5,
...
}The API is the same one hosted Captain serves, so the Quickstart and the API reference apply to the install with https://api.captain.internal in place of https://api.captain.dev. The bundled docs at https://docs.captain.internal/docs already use your install's address in every example.
Connect an agent through the MCP server
The install runs an MCP server at https://mcp.captain.internal/mcp, which signs in with the same API key. For Claude Code, add it with one command:
claude mcp add --transport http captain https://mcp.captain.internal/mcp \
--header "Authorization: Bearer $CAPTAIN_API_KEY"Clients that take a JSON file, such as Cursor, use this entry:
{
"mcpServers": {
"captain": {
"url": "https://mcp.captain.internal/mcp",
"headers": { "Authorization": "Bearer cap_..." }
}
}
}The agent must trust the install's root certificate too. Install captain-root.pem in the machine's trust store, or, for agents that run on Node.js such as Claude Code, start them with NODE_EXTRA_CA_CERTS=/path/to/captain-root.pem. The agent can then list collections and search them like any other tool.
Next steps
The install is running, it has indexed a file, and an agent can search it. These pages cover what comes after a first install:
- Sync sources keep a collection in step with a bucket in Google Cloud Storage, Amazon S3 or Azure Blob, or with a SharePoint library.
- Network isolation lists what the install can reach, and how to allow one more destination.
- Operations covers upgrades, monitoring, settings and day-to-day running.
- Model Endpoints and Data explains which model handles each call, and how to change one.
- Uninstall removes everything the installer created, when a trial is over.