Redocly API Registry vs Static Hosting: Which to Pick
Quick answer: Pick the Redocly API registry when you want a managed source of truth that lints, bundles, and ships a preview for every branch plus a production build for your main branch, with CDN delivery and access control included. Pick static hosting when you want the artifact and infrastructure under your own control: Redocly CLI turns the OpenAPI file into one HTML file, and your CI publishes it to S3, Netlify, or your own server.
What the API registry does
The registry stores the API definition as the single source of truth. You connect GitHub, GitLab, or Bitbucket, or push from CI, and the platform validates and bundles the file on every change. An API holds one or more versions; each maps to an OpenAPI definition and can carry several branches that mirror git. The primary branch maps to the production build, other branches to preview builds. Each bundled definition is saved as a snapshot, and one branch can hold many snapshots, so you can download exactly what shipped.
A primary-branch change runs validation and bundling, then rebuilds connected reference docs and portal projects to production; a working-branch change runs the same pipeline to a preview URL for the pull request. Lint rules, CDN delivery, and access control run on the platform rather than in scripts you maintain. With several microservices registered, the portal references them through the registry, and a production-branch update refreshes every page that uses it.
What static hosting does
Static hosting moves that pipeline into your repo. The CLI build-docs command reads an OpenAPI file and writes one HTML file, redoc-static.html by default, renamed with --output. By default the page loads the Redoc CE renderer from the Redocly CDN; --inlineBundle embeds that script so the page opens from disk and works in an air-gapped network with no outbound call. The renderer also ships as a Docker image, HTML element, and React component.
Your CI then owns the rest: upload to S3 in front of CloudFront, deploy to Netlify or Vercel, publish through GitHub Pages, or copy to a server you run. Domain, TLS, cache invalidation, and who can reach the page are configured where you manage the rest of your infrastructure. The OpenAPI file stays in your repo, and no third party holds the canonical copy.
Side-by-side: where the work lands
| Dimension | API registry | Static hosting |
|---|---|---|
| Source of truth | Managed in Redocly | Your git repository |
| Lint and bundle | Runs on every push, platform-side | You wire CLI commands into CI |
| Branch previews | Automatic URL per pull request | You build and deploy a staging target |
| Production build | Primary branch triggers it | Your pipeline publishes the artifact |
| Versioning and rollback | Snapshots kept per branch | You keep history in git and your host |
| Access control | Native platform controls | Configured in your CDN or server |
| Multiple APIs | Portal links registered services | You assemble and wire references yourself |
| Air-gapped use | Depends on the hosted service | Inline bundle works with no outbound call |
| Cost model | Ongoing subscription tied to plan | Storage and bandwidth plus your CI time |
When each one is right
Reach for the registry when docs are reviewed in the same pull request flow as code, when several teams own APIs in one portal, or when you want lint and preview gates without running a deployment platform. The trade is dependence on a hosted service: build environment, snapshots, and access rules live there, and leaving means rebuilding that workflow.
Static hosting fits when you already run a CDN and CI, when network or regulatory rules require the artifact inside your perimeter, or when one self-contained HTML file is enough. You give up automatic per-pull-request previews and the multi-API link graph, and wire those yourself if needed. For hosted docs without a registry, a service such as Powerduck Cloud turns an OpenAPI file into hosted docs with a view password, version rollback, and a custom domain, covering the lighter end of this choice. The broader comparison hub covers the rest.
Frequently asked questions
Does the registry replace my git repo? No. It connects to your repo or receives CI uploads and keeps snapshots, but the working source still lives in your branches and pull requests.
Can a static build work offline? Yes. build-docs with --inlineBundle embeds the renderer, so the page renders with no outbound request, which suits an air-gapped environment.
Is static hosting cheaper? Not automatically. It skips the subscription, but you pay for storage, bandwidth, and the engineering time to build preview, versioning, and access-control logic.
The bottom line
The registry buys a working pipeline on day one: lint, snapshot, per-pull-request preview, production build, and multi-API linking, in exchange for a subscription and one vendor dependency. Static hosting buys control and portability with one HTML file you can run anywhere, at the cost of maintaining the automation yourself. Choose whether to operate that pipeline or rent it, and keep the OpenAPI file portable so the decision stays reversible.