When you run dbt docs generate, dbt produces a static website. Understanding what that command actually creates helps you make informed decisions about hosting, automation, and when the default frontend stops scaling.
The three output files
The command produces three artifacts in your target/ directory:
-
index.html— The frontend shell. This is a single-page application (SPA) that renders everything client-side. dbt copies this file from its internal templates; you do not write or modify it. -
manifest.json— Your compiled project metadata. Models, sources, tests, macros, exposures, and their relationships. Thecompiled_codefield appears here, showing the fully rendered SQL for each model after Jinja processing. This is the same manifest that powersdbt ls,dbt run --select, and every other project introspection command. -
catalog.json— Database metadata. Column types, row counts, table statistics. This is the only artifact that requires a live database connection, because dbt queries your warehouse’sINFORMATION_SCHEMA(or equivalent) to build it.
Together, the HTML shell loads both JSON files and renders the documentation site entirely in the browser. There is no server-side processing after the initial generation step.
Flags that matter
--select
Limits catalog generation to specific nodes:
dbt docs generate --select marts.*For large projects, this dramatically speeds up generation. The manifest is always complete (it reflects your entire project), but the catalog only includes metadata for selected models. Unselected models still appear in the docs site but without column-level details.
--no-compile
Skips recompilation if your manifest is already current:
dbt docs generate --no-compileUseful in CI pipelines where you have already run dbt compile or dbt run earlier in the same job. The manifest from that step is reused, saving compilation time.
--static
This is the most consequential flag for deployment:
dbt docs generate --staticWithout --static, you get three separate files that require a web server capable of serving the JSON alongside the HTML. The SPA makes requests to load manifest.json and catalog.json at runtime.
With --static, dbt produces a single static_index.html file with both JSON payloads embedded inline. This file is completely self-contained. You can open it directly in a browser, host it on any static file server, or email it as an attachment (though at scale, it can be very large).
For deployment to GitHub Pages, Netlify, or cloud storage, the --static flag simplifies hosting because you only need to serve one file. The trade-off is file size: a project with a large manifest and catalog produces a static_index.html that can be tens of megabytes.
dbt docs serve is a preview tool
dbt docs serve --port 8080This starts a local web server to preview the generated site. dbt’s own documentation explicitly states that dbt docs serve is not intended for production use. It is a development convenience, not a deployment strategy.
The server has no authentication, no caching, no TLS, and no concurrency handling. It serves the files from your target/ directory directly. For anything beyond “I want to check how my docs look right now,” you need a proper hosting solution.
How generation fits into a pipeline
A typical documentation pipeline runs these steps:
dbt run(ordbt build) — materializes models, producingmanifest.jsondbt docs generate— queries the database for catalog metadata, producescatalog.jsonandindex.html- Deploy the
target/contents (orstatic_index.html) to your hosting platform
Step 2 needs database access because it queries warehouse metadata. If you run docs generation in CI, your CI environment needs credentials with at least read access to the schemas your models materialize into. The --select flag can limit which schemas are queried if your CI service account has restricted permissions.
For automated deployment, this pipeline typically runs on merge to main, ensuring the hosted docs always reflect the latest production state of your project.