Migrate to a private BSR instance#
A Buf Pro subscription gives your organization a private BSR instance hosted at <org>.buf.dev, where <org> is the BSR organization name.
This page is for the org admin running the migration from the public BSR at buf.build to that private instance.
Before you start#
- Buf has provisioned the Pro instance; you have admin access on it.
- You know which BSR modules and dependencies in your organization need to move (every published module, plus any internal
buf.yamlfiles that depend on them). - For sign-in details on the new instance, see authentication.
Sign in to the new instance#
Run buf registry login against the private hostname:
The CLI runs a browser flow and saves the resulting token to .netrc.
You can also generate or revoke tokens manually at https://<org>.buf.dev/settings/user.
For non-interactive workloads (CI, scheduled jobs, scripts), generate a bot user and use its token instead of a personal token.
Add members#
The Pro tier supports two ways to provision members on the private instance.
Option 1: Single sign-on#
Configure the private instance to authenticate against your existing identity provider:
Option 2: Use the public BSR as the identity provider#
If you don’t have a separate IdP, the public BSR can stand in.
Identity stays on buf.build; the private instance creates a matching local user (and grants the default access) the first time someone signs in.
- New members sign up on the public BSR.
- The org admin adds them to the public-BSR organization at
https://buf.build/<org>/members. - Each new member then signs in to
<org>.buf.dev. The first sign-in provisions their account on the private instance.
Granting privileges to specific repositories on the private instance is a separate step, configured through private-instance organizations and teams.
Update modules and dependencies#
The migration boils down to: every module name and dependency that currently points at buf.build must point at <org>.buf.dev instead.
Cross-domain dependencies aren’t supported, so the order matters.
-
Inventory dependencies. List every
deps:entry used by the modules you’re moving. Buf-managed modules like googleapis and protoc-gen-validate replicate to the private instance automatically; any other third-party public module has to be mirrored or republished to the private instance before modules that depend on it can move. -
Wait for managed modules to sync. Sync usually takes a few hours after the instance is provisioned. Confirm a managed module resolves on the private instance before continuing:
-
Push upstream dependency modules first. If your organization has modules that other internal modules depend on, push those dependency modules to
<org>.buf.devbefore any module that depends on them. This keeps every push resolvable from the new instance. -
Rewrite
buf.yamlreferences. In everybuf.yaml, replacebuf.buildwith<org>.buf.devin thenamefield and in everydepsentry that points at one of your own modules. Managed-module deps update the same way. -
Push the downstream modules. Run
buf pushagainst the updated modules.
Update CI tokens#
Tokens are scoped to a hostname.
Replace any buf.build entries in .netrc, BUF_TOKEN environment variables, or CI secrets with <org>.buf.dev equivalents (typically a bot user token on the private instance).
For the full token surface, see authentication.
Downgrade: migrate back to the public BSR#
If a Pro subscription ends, the private instance becomes inaccessible after a one-week export window; see the FAQ for the retention policy. Within that window, mirror the migration in reverse:
- In every
buf.yaml, replace<org>.buf.devwithbuf.buildin thenamefield and any internal-moduledepsentries. - Push the modules to the public BSR.
After the export window closes, the private instance is deleted along with its data.
Related#
- Authentication: tokens, bot users,
.netrc, andBUF_TOKEN. - Managed modules: which Buf-maintained modules sync to your private instance.
- Bot users: non-interactive accounts for CI and automation.
- BSR instance setup: the full provisioning surface for Pro and Enterprise.