Export your docs
fern docs export downloads a snapshot of your live Fern-hosted docs site, for readers who can’t reach it, such as air-gapped environments or a compliance archive. After you publish changes, export again to include them.
Prerequisites
- Fern CLI 5.197.0 or later
- A site published to Fern hosting
- A Fern account in the
organizationfromfern.config.json, viafern loginorFERN_TOKENin CI
Export your site
Run the command from your Fern project:
The CLI writes to a folder named after the site, such as docs-acme-com-html. Links in an HTML export are relative file paths, so the folder works on any static host, such as Amazon S3 or nginx, without rewrite rules. To view it locally:
Use --output to choose the destination and --instance to pick an instance when docs.yml lists more than one. For PDF cover, header, and footer options, see the command reference.
Limits
- Each organization can run 150 exports per day across HTML, Markdown, and PDF, from the CLI and the Dashboard.
fern docs exportonly works for Fern-hosted sites. For self-hosted docs, use the container’s static export.
Security
An export has no authentication. Anyone with the files can read every page in them.
If your site uses authentication or role-based access control, the export includes gated pages. Share it only with readers allowed to see all your content.