Can Gemini CLI run self-hosted? What is local and what is Google-hosted
Gemini CLI can be run and governed inside your own environment, but the models are not self-hosted. The client is open source under the Apache License 2.0, so your engineers can install it on their own machines and your team can review the source. You also control the parts around it: the sandbox container image, which the default configuration points to as ghcr.io/google/gemini-cli:latest, and any custom hardened sandbox image you build from the enterprise configuration guidance. Every documented authentication option, Sign in with Google, a Gemini API key and Vertex AI, connects to Google-hosted Gemini models. The supplied sources say nothing about running a model inside your boundary, so treat any proposal to host the model yourself as unsupported until Google confirms it in writing. Ask your Google account team to confirm this in writing before you approve a design that assumes it.
The plan built for enterprise use is Gemini Code Assist Standard or Enterprise, which the Gemini CLI repository names as its target license. Individual access and Google AI Pro and Ultra moved to Antigravity CLI on June 18, 2026, and the Gemini CLI documentation points users of the newest Gemini models to Antigravity. Confirm which license your staff will hold before you write the rollout plan, because the sign-in path and the quota depend on it. The Code Assist overview also notes that Gemini CLI is not optimized for the latest Gemini models, which is a capability gap to raise with Google.
Your network controls therefore come from Google Cloud, not from the CLI. The Gemini Code Assist overview lists VPC Service Controls and Private Google Access in both the Standard and Enterprise editions, so ask your cloud architect to define a service perimeter around the projects that hold Vertex AI calls and to decide how private DNS and egress routes reach Google APIs. Confirm with Google which Gemini CLI traffic paths fall inside those controls, and what your egress proxy must allow. Those answers decide whether a self-hosted deployment is a network design you can build or a constraint you must accept.
Which parts of Gemini CLI run in your environment and which do not
This table separates the Gemini CLI components an organization can run in its own environment from the parts that remain Google-hosted models. Read each row as a question to confirm with Google and your own network team. The main takeaway is that self-hosting covers the client, sandbox and network path, but not the model inference itself.
| Component | Runs in your environment | Where it stays | What to confirm |
|---|---|---|---|
| Gemini CLI client | Yes, the open-source Apache 2.0 client runs on the workstation or build host | Model calls still go to Google-hosted Gemini models | Which version or nightly build your teams pin and how you approve updates |
| Sandbox container image | Yes, the default image ghcr.io/google/gemini-cli:latest can be replaced with an internal build | Image pulls depend on your registry access to the default location | Whether your custom hardened image is built from an approved base and scanned |
| Self-hosted or on-premise model | No, the repository makes no statement about self-hosted models | All three sign-in paths connect to Google-hosted Gemini models | Written confirmation from Google that no alternative model endpoint is supported |
| Vertex AI path | Your Google Cloud project and GOOGLE_CLOUD_LOCATION setting define where calls are configured | Inference runs in Google Cloud, not in your data center | Which region your project uses and whether processing stays in that region |
| Network path to Google | Your egress and proxy rules decide whether traffic reaches Google endpoints | Requests leave your network toward Google services | Whether VPC Service Controls and Private Google Access cover your Code Assist edition |
| Admin settings and policies | Enforced on the endpoint, so a user with local privileges may still circumvent them | Not a server-side control point | Whether your endpoint management can lock the settings file and policy folder |
How the client, sandbox and model calls divide the work
Gemini CLI splits its work across three layers, and each one sits in a different place. The first is the local CLI process on the developer's machine or build host. It reads files, assembles prompts and proposes shell commands. The CLI is open source under the Apache License 2.0, so your team can inspect and build it, but the code that runs on a laptop is still the code that decides what to send out. The second layer is the sandbox that wraps the commands the agent wants to run. The default container image is ghcr.io/google/gemini-cli:latest, which your team can pull, pin and scan. The third layer is the remote model call, which goes to Google-hosted Gemini models whichever sign-in path is used. Nothing in the public repository describes a way to point the CLI at a self-hosted model, so treat the model layer as a Google-hosted service in your risk model.
The authentication choice determines where that model call lands and what your cloud controls can see. Sign in with Google and a Gemini API key both send requests to Google-hosted endpoints outside your Google Cloud project. Vertex AI routes calls through a Google Cloud project, and the CLI needs that project plus a GOOGLE_CLOUD_LOCATION setting to run. That location value is the practical point where your region, project boundary and network controls take effect. Confirm with your Google Cloud team which project will own the calls, which region the location setting names, and whether the Vertex AI path meets your data residency rules before you approve it for production work.
Do not treat admin settings as the security boundary for this layer. Google's enterprise configuration guidance says its admin patterns should not be considered a foolproof security boundary, because a user with local privileges may still circumvent them. Forced sandboxing and tool restrictions therefore reduce accidental or policy-violating behavior but do not stop a determined local administrator. Plan for that by running the CLI from managed images or build hosts where developers lack root, by using custom hardened sandbox images described in the enterprise configuration documentation, and by keeping sensitive repositories out of developer workstations where the threat model requires it.
Decisions that determine how much stays inside your boundary
Gemini CLI can be run from inside your environment, but the models it calls are a Google-hosted service in every documented sign-in path. The cards below separate the parts you control (the client, the sandbox, the network path) from the parts you must accept as external, and list what to confirm before approval.
Open-source client on your machines
The Gemini CLI client is open source under the Apache License 2.0, so your engineers install and run the terminal program on endpoints or build hosts you manage. Reviewers can read the code and pin a version through their own package process. Nothing in the license settles whether a given build is approved, so confirm which release channel your teams may use, since stable releases ship weekly on Tuesdays and nightly builds ship daily.
- Client license
- Apache 2.0
Models remain Google-hosted
Every documented authentication option (Sign in with Google, a Gemini API key, and Vertex AI) connects to Google-hosted Gemini models. The repository makes no statement about self-hosted models, so prompts and code still leave your environment for inference. Treat the model endpoint as an external processor in your data flow diagram and confirm with Google which processing location applies to your account type.
Sandbox image and custom builds
The default sandbox container image is ghcr.io/google/gemini-cli:latest, which is pulled from a public registry and tracks the latest tag. Your platform team can instead build a custom hardened sandbox image, which the enterprise configuration page covers. Decide whether images are mirrored into your own registry, pinned by digest, and scanned before use.
Vertex AI project and region
Vertex AI sign-in requires a Google Cloud project and a GOOGLE_CLOUD_LOCATION setting, which places the usage inside a project you own and govern with IAM and audit logs. This is the path that keeps billing, access and logging under your Google Cloud tenancy. Confirm which region is set, because that setting determines where the Vertex AI calls are served.
VPC Service Controls and Private Google Access
The Gemini Code Assist overview lists VPC Service Controls and Private Google Access in both the Standard and Enterprise editions. These controls can restrict how traffic reaches Google APIs from your network, reducing exposure to public endpoints and data exfiltration paths. Confirm with your Google Cloud team which Gemini surfaces and CLI traffic fall inside a service perimeter, since the overview does not spell that out for the CLI.
Read the Code Assist overviewAdmin settings are not a hard boundary
Google's enterprise configuration page states that its admin patterns should not be considered a foolproof security boundary, because a user with local privileges may still circumvent them. A self-hosted deployment therefore does not by itself stop a developer from changing local settings. Pair admin policy with managed endpoints, restricted local privileges and network-side controls so the boundary does not depend on the client alone.
Read the enterprise docsWhat VPC Service Controls and Private Google Access do for Gemini CLI traffic
VPC Service Controls lets an administrator define a service perimeter around Google Cloud resources and managed APIs, so requests from outside the perimeter can be restricted. The Gemini Code Assist overview lists this control for both the Standard and Enterprise editions, which is the document to cite when a security team asks whether the control is available for the product Gemini CLI is designed to work with. The perimeter is configured on the Google Cloud side, in the project and organization that hold the usage, so the developer does not switch it on from a laptop.
- Perimeter scope: Confirm which projects, APIs and services sit inside the perimeter and whether the endpoints your sign-in method uses are among them.
- Access levels: Check whether access levels can limit traffic to approved networks or identities before you depend on them for CLI users.
- Change control: Decide who can change perimeter settings and record each change in your own change records.
- Observation mode: Ask whether the service offers a dry-run or log-only configuration you can use to see traffic before enforcement.
- Blocked sessions: Test a request from an unapproved network, because a misconfigured perimeter can stop legitimate developer sessions.
Check the perimeter against the exact endpoints your chosen sign-in method calls, because the overview lists the control without mapping it to individual CLI requests.
Private Google Access lets virtual machines and other resources that have only internal IP addresses reach Google APIs and services without an external IP address. It matters for CLI deployments on hosts in private subnets, such as a workspace inside a locked-down network, because the host still needs a path to the Google endpoints that the chosen sign-in method calls. The Code Assist overview lists this control alongside VPC Service Controls for both editions. It controls the network path only, so identity and project permissions still decide what each call is allowed to do.
- Subnet setting: Enable Private Google Access on each subnet that hosts CLI workstations or build runners, and record which subnets you changed.
- Internal-only hosts: Confirm that hosts without external IPs can complete sign-in and reach the model endpoints.
- Name resolution: Verify DNS for the Google API domains from inside the network, because a resolver mismatch can break the path even when the setting is on.
- Sandbox image: Plan a separate route or internal mirror for the sandbox container image, since it is pulled from ghcr.io and Private Google Access does not cover that registry.
- Flow logs: Use network flow logs to confirm which destinations the hosts actually reach.
Test from a host with no external IP before rollout, and confirm each step against the current Google Cloud networking documentation.
Vertex AI authentication requires a Google Cloud project and a GOOGLE_CLOUD_LOCATION setting, as the Gemini CLI authentication page explains. That makes the project the unit where network controls, IAM bindings and location choices meet. The GitHub repository marks Vertex AI for enterprise teams and production workloads. The perimeter governs access to Google service endpoints from your environment, and the models still run on Google's side, so the location setting tells reviewers which region requests are routed to.
- Dedicated project: Place CLI usage in a project created for it so the perimeter and IAM bindings cover a known set of resources.
- Location setting: Set GOOGLE_CLOUD_LOCATION explicitly in managed configuration and record the chosen region for reviewers.
- Service account: Grant only the roles the workflow needs and keep service account keys out of repositories and developer machines.
- Enterprise path: Expect reviewers to ask about this path first, since the repository positions it for enterprise and production use.
- Quota planning: Check project quota for the Gemini models you plan to use, because a network perimeter does not change quota.
Confirm the project, location and service account with your Google Cloud administrator before the first developer signs in.
Network controls are one layer of the design, and they have limits that the approval record should state. All three documented sign-in options connect to Google-hosted Gemini models, and the repository makes no statement about self-hosted models, so network controls cannot make the model run inside your environment. The enterprise configuration page warns that its admin patterns are not a foolproof security boundary, because a user with local privileges may still circumvent them. Those client-side settings sit outside the Google Cloud perimeter.
- No self-hosted model route: None of the documented sign-in options describes a route to a model you run yourself.
- Client-side settings: Admin patterns on the developer machine can be circumvented by a user with local privileges, so network controls work alongside other layers.
- Sandbox image: The default container image is ghcr.io/google/gemini-cli:latest, which sits outside the Google Cloud controls described here.
- Model currency: The Code Assist overview says Gemini CLI is not optimized for the latest Gemini models, so a workflow tested against one model may behave differently on another.
- Unmapped requests: No supplied source maps each CLI request to a specific perimeter service, so ask Google for that mapping in writing.
Record these limits in the risk file so an approver does not assume the network controls cover the sandbox, the local client or the model location.
Before approval, test the network design in a pilot that matches production, and repeat the tests whenever the CLI version changes. The GitHub repository says stable releases ship weekly on Tuesdays and nightly builds ship daily, so a version pinned for production can drift quickly from what developers run. The Gemini CLI documentation also says Gemini CLI was replaced by Antigravity CLI on June 18, 2026, which means the tested tool may need to be re-evaluated before any rollout. Keep the evidence together so an assessor can follow each test from setting to result.
- Pilot project: Build a test project with the same perimeter and subnet settings as production and run the sign-in path there.
- Blocked-path test: Attempt access from an unapproved network and record the denial and the log entry it produced.
- Version pinning: Pin the CLI version used for testing and retest before moving it, given the weekly and daily release cadence.
- Evidence bundle: Keep perimeter configuration exports, subnet settings, flow log samples and test results together.
- Named owners: Name who approves perimeter changes and who tracks the Antigravity CLI transition.
Confirm the current status of Gemini CLI and the Code Assist editions with Google before you finalize the test plan.
Where each request runs: local client, sandbox and Google-hosted model
The diagram starts on the developer's machine, where the open-source Gemini CLI client runs under Apache 2.0 and can hand shell commands to a sandbox. The client then sends each model request across the sign-in boundary to a Google-hosted Gemini model, whichever of the three documented authentication options is in use. The hand-off to check is that step: the model call leaves your environment, and the documentation does not describe a self-hosted model option. Confirm with Google which network controls, such as VPC Service Controls and Private Google Access, apply to your chosen sign-in path.
Client and sandbox run locally, while model requests go to Google.
Where self-hosting stops and what covers each gap
Gemini CLI can be self-hosted only in part. The client, the sandbox image and the network path are yours to run, while the models stay on Google-hosted endpoints reached through one of three sign-in paths. The cards below separate the local pieces from the hosted ones and name the Google Cloud controls that apply to each gap.
Open-source client runs locally
The Gemini CLI client is published under the Apache License 2.0, so your engineers can install and inspect the code that runs on their machines. Because the client is local, reviewers can pin a version and control how it is distributed internally. Stable releases ship weekly and nightly builds ship daily, so the version you approve needs a defined update and re-approval process. Ask your platform team which version is approved and how updates reach workstations.
- Client license
- Apache 2.0
Models remain Google-hosted
All three documented authentication options connect to Google-hosted Gemini models. The repository makes no statement about running models inside your environment, so do not assume a self-hosted model path exists. Prompts, file excerpts and tool output leave the workstation for Google's endpoints in every configuration. Confirm this with Google and in your own network traces before writing the approval decision.
Sandbox image is self-hostable
The default sandbox container image is published as ghcr.io/google/gemini-cli:latest. Your administrators can mirror that image into an internal registry and pin a digest, or build a custom hardened image from the enterprise guidance. The sandbox limits shell commands and file writes, but it does not change where model requests go. Pin the tag you test, and record who rebuilds the image when the upstream changes.
Read sandbox docsVertex AI needs a Google Cloud project
The Vertex AI option requires a Google Cloud project and a GOOGLE_CLOUD_LOCATION setting, so the region and project become governance decisions. Access is granted through IAM on that project, and usage is billed to it. This path is the one the repository marks for enterprise teams and production workloads. Ask which region the requests are served from and who owns the project's IAM bindings.
Read authentication docsVPC Service Controls and Private Google Access
Google Cloud's Gemini Code Assist Standard and Enterprise editions list VPC Service Controls and Private Google Access. These controls can limit which Google APIs are reachable from your networks and reduce data exfiltration paths to projects outside your perimeter. They govern the Google side of the connection, not the workstation. Confirm with your network team whether Gemini CLI traffic reaches the relevant Google APIs through these controls, and whether the Code Assist edition you license covers them.
Read Code Assist overviewAdmin settings are not a hard boundary
Google's enterprise configuration guidance says its admin patterns should not be treated as a foolproof security boundary, because a user with local privileges may still circumvent them. Self-hosting the client does not change this, since the workstation is still where the policy is enforced. Treat managed settings as guardrails and pair them with endpoint controls, restricted local privileges and network egress rules. Ask who can edit the local configuration and whether endpoints are managed.
Read enterprise docsHow the answer changes for air-gapped, regulated and multi-team setups
Gemini CLI can be copied into an isolated environment because its client code is open source under the Apache License 2.0. The model calls are a different matter. All three documented sign-in options connect to Google-hosted Gemini models, and the repository makes no statement about self-hosted models, so a disconnected network needs a route to Google endpoints before the agent can answer anything. Treat the client as software you can mirror and the model as a service you must reach.
- Client source: Mirror the repository internally and build from a tagged release that your team has tested.
- Sandbox image: The default image is
ghcr.io/google/gemini-cli:latest. Pull it through an internal registry or build a custom hardened image, as the enterprise configuration page describes. - Update cadence: Stable releases ship weekly on Tuesdays and nightly builds ship daily, so an intake process must decide which builds enter the isolated environment.
- Model egress: Confirm with Google which endpoints must be reachable and whether any supported path works without internet egress. Do not assume one exists.
Before approving an air-gapped rollout, ask Google in writing whether any model route works without egress, and record the answer with the network design.
In regulated settings the question is less where the client runs and more where prompts, code and tool output travel and which controls surround that path. The Code Assist overview lists VPC Service Controls and Private Google Access in both the Standard and Enterprise editions. These are Google Cloud controls applied to the services in your project, so whether they cover the exact path a Gemini CLI request takes is something to verify, not assume.
- Vertex AI path: Vertex AI use requires a Google Cloud project and a
GOOGLE_CLOUD_LOCATIONsetting, which ties model calls to a project you govern and a location you choose. - Private Google Access: Listed for both editions. Confirm with your network team how it applies to the subnets where developer traffic originates.
- VPC Service Controls: Listed for both editions. Define the perimeter around the projects that hold Gemini access and test whether sign-ins from outside it are blocked.
- Admin settings are not a boundary: The enterprise configuration page says admin patterns should not be considered a foolproof security boundary, because a user with local privileges may circumvent them. Place enforcement at the network and identity layers.
Ask your auditor which control objectives apply to Gemini CLI traffic, then map each one to a network, identity or project control you can evidence.
When several teams share the tool, the rollout becomes a platform decision. Each team's access depends on the Google Cloud project it uses, the sign-in method it relies on and the client version installed on each laptop or runner. Standardizing those three layers usually matters more than any single setting, and each layer needs a named owner.
- Project per team: Separate Google Cloud projects give each team its own IAM grants, usage boundaries and audit scope.
- One sign-in method per population: Mixing Sign in with Google, Gemini API keys and Vertex AI identities makes access reviews harder, so choose one method for each group of users.
- Pinned client versions: With stable releases weekly and nightly builds daily, pin a tested version and move forward on a fixed schedule.
- Shared sandbox image: Publish one hardened image internally so that teams do not each maintain their own build.
- Local configuration drift: Settings on individual machines can be changed by the people who use them, so check configuration centrally rather than trusting each install.
Ask who owns version pinning and image builds, and how each team's configuration is reviewed and audited.
Most of what a reviewer asks about sits in the layer that stays with Google. The three documented sign-in methods all reach Google-hosted Gemini models, so prompts, context and responses leave your environment on every model call. Self-hosting covers the client, the sandbox and any proxy you place in front of traffic. It does not cover the model, and the rollout should be designed around that fact.
- Models: Remain Google-hosted under every documented sign-in path, including Vertex AI.
- Client and sandbox: Can run where your policy allows, using the open-source client and a container image that you control.
- Network path: Requests cross Google Cloud networking, so egress from developer machines and CI runners needs its own controls.
- Model currency: The Code Assist overview says Gemini CLI is not optimized for the latest Gemini models, and the CLI documentation points users of the newest models to Antigravity CLI. Self-hosting the client does not change which models you can use.
Record the model layer in your vendor risk file as an external processing dependency, and confirm the terms that apply to your chosen sign-in method.
Order of work to keep the client and network boundary under control
This sequence fixes the boundary before any rollout: first confirming which Gemini CLI parts run in your environment and which call Google-hosted models, then locking down identity, network paths, sandboxing and admin settings so that the client cannot reach anywhere you have not approved. Each step ends with a record that a reviewer can check.
Confirm the plan and edition before any build
Ask your Google account team which Gemini CLI license applies to your users, given the June 18, 2026 move of free individual access and Google AI Pro and Ultra to Antigravity CLI. Confirm which Gemini Code Assist edition covers your seats and whether Gemini CLI is included in its quota. Your procurement reviewer should hold written confirmation of the license and the model versions it covers. The step is done when the license, the edition and the list of permitted models are on file.
Map every component to where it runs
Build a table with three columns: the open-source client, the sandbox image and any proxies or wrappers you add, and the Gemini models that remain Google-hosted. The client is Apache 2.0 licensed and can be installed on managed workstations or build hosts. The default sandbox image is ghcr.io/google/gemini-cli:latest, which you may replace with an image you build and approve. The models stay with Google, so every prompt that reaches a model leaves your environment. The step closes when the table is signed off by security and engineering.
Choose the authentication path for each use case
Decide, per team, between Sign in with Google, a Gemini API key and Vertex AI. Vertex AI requires a Google Cloud project and a GOOGLE_CLOUD_LOCATION setting, and it is the option the documentation marks for enterprise teams and production workloads. Record which path each group uses and where credentials are stored, and do not allow personal API keys on managed endpoints. The step is complete when each path has a named owner and an approved credential store.
Set network controls in the Google Cloud project
Work with your cloud team to place the Google Cloud projects that Gemini CLI calls inside a VPC Service Controls perimeter and enable Private Google Access, both of which the Gemini Code Assist overview lists for the Standard and Enterprise editions. Confirm with Google whether these controls cover every endpoint Gemini CLI uses in your configuration. Test from a managed workstation that requests outside the perimeter fail. The step is done when a test log shows the blocked and allowed requests.
Build and approve the sandbox image
Follow the enterprise configuration guidance to build a custom hardened sandbox image instead of the default latest tag. Pin the base image to a version your team has tested, remove tools that staff do not need, and record the image digest in your change log. Have the security team scan the image with your standard container tooling before approval. The step is complete when the approved image digest is written into the admin configuration.
Enforce settings with system and admin policy files
Deploy the system settings file and the admin policy folder to every managed install, covering the sandbox mode, the yolo setting, tool allowlists, the MCP server allowlist, proxy and telemetry values. The enterprise configuration documentation states that these patterns are not a foolproof boundary because a user with local privileges may circumvent them, so pair them with endpoint controls that stop users from editing those files. Verify on a test device that a locally edited setting does not take effect. The step is done when the test result and the device management profile are filed together.
Pilot, then pin the client version
Run a limited pilot on a small set of managed devices, using the stable weekly release rather than nightly builds for production. Note that the upstream repository ships stable releases on Tuesdays and nightly builds daily, so pin the version you tested and schedule upgrades through change control. Review the outbound traffic logs from the pilot against the component map from step two. The step closes when the pilot shows no traffic outside the approved paths and the pinned version is recorded.
Document the boundary and schedule re-review
Write a one-page boundary statement that lists the client, sandbox image, proxies, authentication paths, network perimeter and the Google-hosted model endpoints, with the owner of each. Add a review trigger for any change to the plan, edition, model list or client version. Share the statement with the compliance team so that any assessment scope reflects what runs locally and what does not. The step is complete when the signed statement is filed and the review owner is named.
What a security reviewer should ask to see for a self-hosted Gemini CLI setup
This table lists the evidence a reviewer should request for each part of a self-hosted Gemini CLI setup, separating the client and sandbox from the Google-hosted models. Read each row as a question to put to the team that will run the deployment. The main takeaway is that self-hosting covers the client and its runtime, while model inference and the network path to Google still need their own evidence.
| Area | What to ask to see | Where it usually falls short |
|---|---|---|
| Client build | The exact Gemini CLI version, the source it was built from, and the Apache 2.0 license file retained with it | Teams install a release by package name without recording the version or verifying what was pulled |
| Sandbox image | The image reference in use, whether it is the default ghcr.io/google/gemini-cli:latest image or a custom build, and the build recipe for any custom image | The default image is tagged latest, so the version running in production can change without a review |
| Custom hardened sandbox | The Dockerfile or build pipeline, base image provenance, and a record of which tools and packages were removed | Hardening is described in the docs but not written down for this organization, so no one can say what changed |
| Model endpoint | Confirmation that inference runs on Google-hosted Gemini models through the selected sign-in method, with no self-hosted model in the path | Reviewers assume a self-hosted client means self-hosted models, which the documented authentication options do not support |
| Vertex AI project and location | The Google Cloud project, the GOOGLE_CLOUD_LOCATION value, and the IAM role bindings for service accounts | Shared service accounts or keys stored in developer machines outside the project's controls |
| Network controls | VPC Service Controls perimeter definition and Private Google Access configuration covering the projects used for Gemini requests | Perimeters are defined for storage or compute but not for the Gemini API surface, so requests can leave the boundary |
| Local enforcement | The system settings file and admin policy folder deployed to every workstation, with proof of where they are managed | Admin patterns can be bypassed by a user with local privileges, so they are not a security boundary on their own |
| Egress and proxies | Proxy configuration, allowed destination list, and logs showing requests reach only approved Google endpoints | Developers set local proxy or environment overrides that route traffic outside the approved path |
Self-hosting Gemini CLI: questions buyers and reviewers ask
Can we run Gemini CLI entirely inside our own network?
No. The Gemini CLI client is open source under the Apache License 2.0, so you can install, inspect and build it inside your own environment. The models, however, are Google-hosted. All three documented sign-in options, Sign in with Google, a Gemini API key and Vertex AI, connect to Google-hosted Gemini models, and the project makes no statement about running self-hosted models. Each prompt and tool result that the model needs to answer leaves your network for a Google endpoint. Your options for keeping traffic private are the Google Cloud network controls covered below, not a fully on-premise deployment. Confirm this boundary in writing with Google before you describe the setup to your board or regulators.
What exactly can we host ourselves in a Gemini CLI rollout?
The parts you control are the client and the execution environment around it:
- The open-source CLI, which you can pin to a version, review and package for internal distribution.
- The sandbox container. The default image is
ghcr.io/google/gemini-cli:latest, and Google's enterprise configuration documentation covers building custom hardened sandbox images that you can host in your own registry. - Any internal proxy or egress gateway that your policy requires between developer machines and Google endpoints.
Your own admin policy files and MCP servers also run where you place them. Model inference, the sign-in service and the Vertex AI endpoints do not run in your environment. Ask your engineering team to confirm which of these components they will mirror internally before approval.
Does the default sandbox image need to be pulled from the public registry?
Not necessarily, but you should decide that on purpose. The documented default is ghcr.io/google/gemini-cli:latest, which tracks the latest tag. For a controlled environment, most security teams prefer to pin a specific version, scan it, and copy it to an internal registry. Google's enterprise configuration page describes how to build custom hardened images, which lets you remove tools you do not need and set a fixed base. Note that the stable CLI ships weekly on Tuesdays and nightly builds ship daily, so an unpinned latest tag can change without a review. Your change control should cover image updates the same way it covers the client itself.
Can Vertex AI keep Gemini CLI traffic inside our Google Cloud project?
Vertex AI routes requests through your Google Cloud project, which gives you project-level control over who calls the models, what is logged and which region is used. Setting up Vertex AI requires a Google Cloud project and a GOOGLE_CLOUD_LOCATION setting, and the project notes that Vertex AI is the option it marks for enterprise teams and production workloads. This does not make the models self-hosted. The inference still runs on Google-hosted infrastructure. What you gain is the ability to apply Google Cloud network controls to the path. The Gemini Code Assist overview lists VPC Service Controls and Private Google Access in both the Standard and Enterprise editions. Ask your cloud team to confirm whether those controls cover the specific Gemini CLI calls you intend to allow, since the overview does not map them call by call.
What do VPC Service Controls and Private Google Access actually add?
They reduce the network paths that a Gemini CLI session can use, but they do not change where the model runs. VPC Service Controls creates a perimeter around Google Cloud services so that data cannot be copied to projects outside it. Private Google Access lets resources without public IP addresses reach Google APIs through internal routing. The Gemini Code Assist Standard and Enterprise overview lists both controls for each edition. For a reviewer, the practical question is whether developer machines reach Google endpoints only through an approved route, and whether your perimeter blocks exfiltration to unapproved projects. Your network team should test those paths with a non-production project before you write the rule into your standard.
Where should the sign-in and sandbox controls be enforced if the client is self-hosted?
Enforce them on the managed device or in the sandbox image, not only in the client. Google's enterprise configuration page says its admin patterns should not be considered a foolproof security boundary, because a user with local privileges may still circumvent them. For that reason, combine three layers: a centrally managed system settings file, a sandbox image you built and locked down, and network controls that block unapproved endpoints. Restrict local administrator rights so developers cannot edit the policy files. Ask your vendor and your security team to document which layer enforces each rule, so an auditor can see that no single file is the only barrier.
What would a self-hosting engagement cost, and what drives it?
DeployOpen does not publish prices, and no researched figure for Gemini CLI deployment effort is available for this page. The main cost components are your Google Cloud consumption and licensing, which are set by Google's plans and quotas, and the internal work to package the client, build and scan the sandbox image, configure network controls and document the evidence. The scope drives the cost most: the number of environments, whether you need a custom hardened image, how many network paths you must test and whether you want ongoing updates. DeployOpen plans and implements self-hosted platforms in the client's own infrastructure and works from a written, fixed scope. Request a quote that lists each component, the one-time setup work, the recurring update and review work, and which items you can perform internally.
How DeployOpen helps you scope and test a Gemini CLI boundary
DeployOpen starts by separating what your organization can host (the open-source client, sandbox images and proxies) from what remains a Google-hosted model service. We then help you build, test and document the boundary so reviewers can see exactly where prompts and code travel.
How we scope
- We map which Gemini CLI components run on your machines and which calls reach Google-hosted Gemini models.
- We confirm the authentication method in scope, including whether Vertex AI and a Google Cloud project are required.
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before any work starts.
How we build
- We configure the sandbox and network path within your own cloud accounts, data centers or air-gapped network.
- We review Google Cloud network controls such as VPC Service Controls and Private Google Access against your design.
- We test whether admin settings can be bypassed by local users, since Google's own guidance says they are not a foolproof boundary.
How we hand over
- You receive a written boundary diagram showing local components, proxies, and the Google-hosted model endpoints.
- Documentation records the sandbox image version, the pinned Gemini CLI release and the configuration baseline used.
- We prepare evidence and control descriptions for your compliance assessors, who alone issue any audit reports or certifications.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, which matters because releases ship weekly.
- We re-check the boundary when Gemini CLI or its model and product offerings change, including the move to Antigravity CLI.
- We retest after configuration changes so your reviewers see current evidence rather than a snapshot from rollout.

