Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fern/products/cli-api-reference/pages/docs-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ These commands build, preview, and publish a Fern documentation site, and valida

<Accordion title="fern docs dev">

Use `fern docs dev` to run a local development server to preview your docs. The server includes the [role selector and password login](/learn/docs/preview-publish/preview-changes#local-development) for sites that use role-based access control or password protection.
Use `fern docs dev` to run a local development server to preview your docs. The server includes the [role selector and password login](/learn/docs/preview-publish/preview-changes#local-development) for sites that use role-based access control or password protection. The server is for previewing on your own machine, not for hosting docs: to serve docs to readers, publish them with [`fern generate --docs`](#fern-generate---docs).

<CodeBlock title="terminal">
```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Your documentation will be available at `http://localhost:3000` (default) or the

Some features are disabled in local development, including search and SEO (favicon, auto-generated meta tags, etc.).

`fern docs dev` is for previewing on your own machine, not for serving docs to readers. Don't expose it to other people through a reverse proxy, tunnel, or open port: it isn't built for public traffic, and it shows [role-gated content](/learn/docs/authentication/features/rbac#preview-as-a-role) to anyone who can reach it. To host docs, [publish them](/learn/docs/preview-publish/publishing-your-docs) with `fern generate --docs`. To share unpublished changes, use a [preview link](#preview-links).

If your docs use [role-based access control](/learn/docs/authentication/features/rbac#preview-as-a-role), the local server has the same role selector as a preview link, so you can view the site as a specific viewer and check role-gated pages and navigation. With no role selected, it shows all content. To test password protection locally, set `FERN_AUTH_TYPE=password` and `FERN_AUTH_SECRET` to the password before starting the server:

```bash
Expand Down
Loading