A self-hosted Buf Schema Registry, in one Go binary.
Drop-in for the official buf CLI. SQLite or PostgreSQL. Local filesystem
or S3/R2/MinIO. An embedded web UI with generated API docs and dependency graphs.
Works with the official CLI: buf registry login (device flow or
--token-stdin), buf push, buf dep update,
buf export, buf breaking, and
buf registry organization create.
One binary, minimal deps
A single static Go binary. SQLite by default (modernc.org/sqlite, no
cgo), or PostgreSQL for metadata. No runtime services required to start.
Built-in web UI + API docs
Owners, modules, commits, labels, a source browser, dependency graphs, and API docs
generated from your .proto files. No JavaScript framework or external
assets.
Real access control
Users, organizations with owner/member roles, bearer
tokens, browser device login, optional OIDC SSO, and private modules.
Quickstart
Build the binary, prepare a database, create an admin user and token, then start the
server.
git clone https://github.com/icycodes/protobay.git
cd protobay
make build # produces bin/protobay (or: go build -o bin/protobay ./cmd/protobay)
cp config.example.yaml protobay.yaml
./bin/protobay migrate --config protobay.yaml # apply DB migrations
./bin/protobay user create admin --admin --config protobay.yaml # create the admin user
./bin/protobay token create --user admin --config protobay.yaml # prints the token once
Start the server, passing the token as the bootstrap admin token:
With no --config, the server runs on its built-in defaults
(:8080, data in ./data). Open
http://localhost:8080/ for the web UI.
Prefer containers? The image runs as a non-root user and migrates on first start:
make docker-build && docker run --rm -p 8080:8080 -v protobay-data:/data -e PROTOBAY_ADMIN_TOKEN=secret protobay:latest
Point buf at it
Name your module in buf.yaml using <public_host>/<owner>/<module>:
version: v2
modules:
- path: proto
name: localhost:8080/acme/weather
buf registry login localhost:8080
buf push --create --create-visibility public
The web UI
The embedded read-only UI ships with the server. Screenshots below are from a running
instance.
Module overview: README, license, file list, and a buf.yaml dependency
snippet.
Home: organizations, users, and recently created public modules.Generated API docs: services, RPCs, messages, enums, and comments.Dependency graph (SVG) and dependency tree.
Works with the buf CLI
The registry speaks the BSR ConnectRPC surface over Connect, gRPC, and gRPC-Web, so the
real buf CLI drives it without a plugin.
Name the module
The name is <public_host>/<owner>/<module>. The host must
match server.public_host exactly, or digest verification breaks.
version: v2
modules:
- path: proto
name: localhost:8080/acme/weather
Log in
Browser-based device flow, or --token-stdin with a token from
protobay token create. The token is stored in ~/.netrc.
buf registry login localhost:8080
Push a module
--create creates the module on first push. Visibility defaults to private,
so pass --create-visibility public for a public module.
buf push --create --create-visibility public
Resolve deps and check breaking changes
Pin dependencies in buf.lock, then check for breaking changes against the
registry's default label.
buf dep update
buf breaking . --against-registry
Features in depth
Protocol and digests
BSR-compatible ConnectRPC surface over Connect, gRPC, and gRPC-Web.
B5 (SHAKE256) module digests computed byte-for-byte the same way as buf, so clients verify digests locally.
FileDescriptorSet generation by compiling uploaded modules.
Storage
Metadata in SQLite (default, no cgo) or PostgreSQL.
Content-addressed blobs on the local filesystem or any S3-compatible store (AWS S3, Cloudflare R2, MinIO).
PostgreSQL plus S3 keeps no local state, so replicas are stateless.
Auth and access
Bearer-token authentication with a bootstrap admin token.
Organizations with owner/member roles and private modules.
Optional anonymous read access to public modules.
Web UI
Owners, modules, commits, labels, and a source browser.
Dependency graph and generated API docs from your .proto files.
Browser sign-in with a local password or API token for private modules.
Operations
TLS directly, or plaintext h2c behind a TLS-terminating reverse proxy.
/healthz and /readyz endpoints, and graceful shutdown.
Docker image; migrations run automatically on startup.
Backup and restore: copy the data directory, or snapshot the database and copy blobs separately.
How protobay compares
Comparison of protobay and the hosted buf.build registry
Aspect
protobay
buf.build
Hosting
Self-hosted, on your infrastructure
Hosted, managed BSR
License
Apache-2.0, open source
Proprietary service
Works with the buf CLI
Yes
Yes
Storage you control
SQLite or PostgreSQL; your local FS or S3/R2/MinIO
Managed by the service
Web UI
Included, embedded (read-only)
Hosted
protobay is an independent project and is not affiliated with Buf Technologies.
Limitations
Known and deliberate limits — worth reading before you deploy.
B4 digests are synthesized. They are self-consistent only and are not
byte-compatible with buf.build's B4 values. Modern buf does not upload
the workspace buf.yaml/buf.lock, so the server cannot
reconstruct buf.build's exact B4 inputs; the digest it generates is meaningful only
within this registry.
No cross-registry dependencies. External modules such as
buf.build/googleapis are not supported. The v1 push protocol carries no
registry host for a dependency, so an external module cannot be named; only the legacy
v1beta1 reference has a registry field, and the v1beta1
UploadService is not mounted. Federation is out of scope.
Two fixed roles. Organizations have owner and
member only — no teams or custom roles.
Web UI OIDC is not supported. The web UI signs in with a local
password or an API token. OpenID Connect is available for
buf registry login (device flow) but not yet for the web UI.
Best-effort web UI sign-out. Sessions are stateless signed cookies:
sign-out revokes a session only in the serving process, so with several replicas (or
after a restart) a copied cookie stays valid until it expires. Deactivating the user
ends all sessions.
No built-in login throttling. The device verify page and the web UI
sign-in page have no lockout beyond a fixed delay after a failed attempt. Put the
registry behind a rate-limiting proxy if it is exposed to the internet.
No blob garbage collection. Orphaned blobs are harmless and can be
cleaned manually.