Networking

Captain answers on one private IP address inside your Google Cloud network, and people and applications reach it the way they reach any other internal service. The cloud step reserves that address, gives each service a name on it, and issues a certificate for those names from a private certificate authority in your project. An internal load balancer holds the address, ends TLS on port 443 and sends each request to the right service. The address belongs to the network, so it stays the same through every upgrade, and a DNS record or a firewall rule written against it never has to change.

The steps below are for Google Cloud. An install also runs on AWS (EKS): contact your Captain team for that.

Exposing Captain publicly is not natively available. If people outside your network need to reach it, talk to your Captain team.

Names

NameWhat answers there
app.captain.internalThe web app
api.captain.internalThe API. This is the address for API keys
docs.captain.internalThese docs
mcp.captain.internal/mcpThe MCP server for agents

The names live under <install name>.internal, and the install name is captain unless your team chose another. To use your own domain instead, set private_domain in the cloud step, for example to captain.corp.example.com. Run ./install.sh addresses to print your install's address and names, or open the API Keys page in the web app.

Trust the certificate

Clients trust the install's certificate once they have its root certificate, which the installer prints with ./install.sh ca-certificate > captain-root.pem. Browsers usually get it through device management, and API clients through their own trust setting:

ClientHow to trust the root
curl--cacert captain-root.pem, or the system trust store
Python requests and httpxREQUESTS_CA_BUNDLE or SSL_CERT_FILE, or verify="captain-root.pem"
Node.jsNODE_EXTRA_CA_CERTS=/path/to/captain-root.pem
Javakeytool -importcert into the trust store
A container imageCopy it into the image and run update-ca-certificates

If your organization already runs an internal certificate authority, set private_domain and private_tls = "provided", and name a certificate for the four names in Certificate Manager. Your clients then trust it already.

Calling the API

From a virtual machine, a GKE cluster or a Cloud Run service on the install's own network, nothing else is needed:

curl --cacert captain-root.pem \
  -X POST https://api.captain.internal/v3/collections/contracts/query \
  -H "Authorization: Bearer $CAPTAIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "termination notice period", "limit": 5}'

The same request works from every other place below, once the network can route to the address and resolve the names.

From a peered network

Another Google Cloud network reaches the install through VPC Network Peering, created in both directions between it and <install name>-network. Add that network to private_dns = { extra_networks = [...] } and run the cloud step again, so it resolves the names. Peered networks cannot overlap, so check the install's ranges (10.10.0.0/20 for nodes, 10.16.0.0/14 for pods and 10.20.0.0/20 for services by default) before the first install, and change subnet_cidr, pods_cidr or services_cidr if needed.

From another cloud or your data center

Your network team joins your network to <install name>-network with Cloud VPN, Cloud Interconnect, or Cross-Cloud Interconnect for AWS and Azure. The Cloud Router on the Google side advertises the install's node subnet, which holds the address. Then forward the names, as in the next section, and trust the root certificate.

The load balancer serves its own region by default, so put the VPN gateway or the interconnect attachment in the install's region. For clients, tunnels or peered networks in other regions, set global_access = true in terraform.tfvars and run ./install.sh again. It costs nothing and keeps the same address.

To try the install from a laptop before the network path is ready, set private_access_jump_host = true. That adds one small machine with no public address, reached through Google's Identity-Aware Proxy, and the installer prints the commands to open a browser or call the API through it.

DNS forwarding

Inside the install's network the names resolve already. Elsewhere, set private_dns = { inbound_forwarding = true } in the cloud step, list the addresses Google gives you with gcloud compute addresses list --filter='purpose=DNS_RESOLVER', and forward captain.internal to them:

Where the clients areWhat to create
AWSA Route 53 Resolver outbound endpoint and a forwarding rule for captain.internal, associated with each VPC that calls Captain
AzureA DNS Private Resolver outbound endpoint and a forwarding ruleset with a rule for captain.internal., linked to each virtual network that calls Captain
Your data centerA conditional forwarder for captain.internal on your resolvers, for example Add-DnsServerConditionalForwarderZone -Name "captain.internal" -MasterServers <addresses> on Windows Server

The four A records never change, so copying them into your own DNS works too. With private_dns = { existing_zone = "<zone name>" } the install writes its records into a private zone you already have.

Ports

FromToPort
Your clientsThe install's addressTCP 443
Your DNS resolversThe inbound forwarding addressesUDP and TCP 53
Identity-Aware Proxy (35.235.240.0/20)The jump host, when it is onTCP 22. The cloud step creates this rule
Your control plane, when you use oneThe install's control plane endpointTCP 8444

Captain's own network needs no new inbound rule, because the rules between the load balancer and the pods are created with the cluster.

A control plane reads each install at its internal address, so it needs a route to the install's network: the same network, peering, or Private Service Connect.

Outbound connections

Captain's network sends traffic only to private addresses and to Google's private API addresses, so Vertex AI, Cloud Storage, Pub/Sub, Secret Manager and Cloud KMS are all reached without the internet. Each connection below goes out over HTTPS only when your team switches it on:

ConnectionWhat it doesHow to switch it on
SharePoint, Amazon S3 and Azure BlobReads files and changes from your sources, through the install's outbound proxy, which allows only the hosts your sources needAdd the source in the settings file, and set sync_other_clouds = true in the cloud step
Anthropic and OpenAIModel calls with your own keySet model_provider_cidrs in the cloud step
Health reportSends basic health telemetry about the pods to Captain, never logs or dataSet up with your Captain team during the install: healthReport in the settings file and captain_service_cidrs in the cloud step
Update checkReads Captain's signed release list every few hours, so Settings shows when a newer version exists. It sends nothing about the install and downloads no softwareupdates.url in the settings file and captain_service_cidrs in the cloud step. Without it, an Admin uploads the list in Settings
Your mail serverSends invitations and alertsnetworkPolicy.extraCidrs in the settings file

The Security Model lists every destination a pod may reach and the layers that enforce it.

Troubleshooting

  • The name does not resolve. Check that the client's network is listed in private_dns.extra_networks, or that your resolvers forward captain.internal and UDP and TCP 53 are open through the VPN.
  • The certificate is not trusted. Add captain-root.pem to the client's trust store. Python and Node.js programs often need REQUESTS_CA_BUNDLE or NODE_EXTRA_CA_CERTS as well.
  • The request times out. Check that your side routes the node subnet through the VPN or interconnect, and that the connection ends in the install's region or global_access is on.
  • Something else. Run ./install.sh check. It calls every name from inside the cluster, so a pass means the problem is in the path to the install.
Was this page helpful?