---
title: "Deployment options"
description: "Run Baz as SaaS, keep code in your network with private mode, or run the whole platform in your own cloud with a self-hosted or BYOC deployment."
canonical: "https://baz.ai/docs/admin/deployment-options"
---

# Deployment options

Run Baz as SaaS, keep code in your network with private mode, or run the whole platform in your own cloud with a self-hosted or BYOC deployment.

Baz runs as a managed SaaS by default. If your code or data must stay inside your network, you can keep repository storage on your side with private mode, or run the whole platform yourself. The agents, integrations, and dashboards are the same in every option.

## Compare the options

The question is where your code lives and who runs the servers. With **SaaS**, Baz runs everything and you run nothing; it works on every plan and every supported Git provider. **Private mode** (Pro and Enterprise) keeps your repositories in one small service inside your network while Baz runs the rest. **Self-hosted** and **BYOC** (Enterprise) put the whole platform in your own cluster or cloud account; self-hosted is run by you, BYOC is run by Baz inside your account. Private mode, self-hosted, and BYOC support GitHub and GitLab.

To scope a private mode, self-hosted, or BYOC deployment, [contact Baz](https://baz.ai/contact).

## SaaS

Baz hosts everything. Your Git provider sends webhooks to Baz, Baz fetches the files it needs for each review, and the review agents run in Baz's environment. Fixes and other code that runs (for example, setup scripts) execute in isolated sandboxes.

### Zero data retention

For organizations whose data processing agreement requires it, Baz can turn on zero data retention. With it on, model requests go only to providers and routes that honor zero data retention, and agent web searches stay inside Baz's cloud. Ask Baz support to enable it for your organization.

## Private mode

Private mode keeps repository storage in your network while Baz runs the rest. You deploy Baz's file service in your Kubernetes cluster. It clones your repositories with a token you provide and serves files, diffs, and directories to Baz only when a review needs them. Baz reads code transiently during analysis and does not persist it.

How it is set up:

<Steps>
  <Step title="Contact Baz support" icon="message-square">
    Support provides the Helm chart, access to the container image, and the token the file service uses to authenticate Baz (a `baz_` token).
  </Step>
  <Step title="Deploy the file service" icon="layers">
    Install the chart on your cluster with a Git token that has read access to the repositories you will connect.
  </Step>
  <Step title="Expose it" icon="network">
    Route an HTTPS subdomain or path, for example `https://baz.example.com`, to the service through your ingress, and allow inbound traffic only from Baz's IP addresses (support provides them).
  </Step>
  <Step title="Register and connect" icon="plug">
    Give support the URL. Once they confirm the connection, connect your repositories as usual. All repository reads go through your file service.
  </Step>
</Steps>

If the file service is unreachable, reviews wait until it is back.

## Self-hosted

The self-hosted Helm chart runs the full platform in your Kubernetes cluster: the web app, the platform service that processes webhooks and posts reviews, the review agents, the MCP server, the Fixer sandbox, the sandbox builder, and an optional PostgreSQL database. Self-hosted deployments use a license key and send Baz hourly usage counts (comments per agent per day) and deployment health snapshots.

## Bring your own cloud (BYOC)

With BYOC, Baz provisions and operates the self-hosted platform in a cloud project or account you own. You grant access; Baz operators apply the infrastructure and upgrades. On GCP, you give Baz's service account roles on your project, with no keys to hand over, and Baz builds a private GKE cluster, Cloud SQL, and one public load balancer; nothing else gets a public IP. On AWS, you run a CloudFormation stack that creates a role Baz assumes with an external ID, and the exposure details are set during scoping.

## Related

<CardGroup cols={2}>
  <Card title="Data protection" href="/docs/security/data-protection" icon="lock">
    How Baz handles your code and credentials.
  </Card>
  <Card title="How Baz works" href="/docs/how-baz-works" icon="workflow">
    The data flow from webhook to review.
  </Card>
  <Card title="Billing" href="/docs/admin/billing" icon="credit-card">
    Plans and Enterprise terms.
  </Card>
</CardGroup>
