Skip to content

Feature Request: Add --port flag to mintlify dev #4508

@brandensilva

Description

@brandensilva

Feature Request

Add a --port (or -p) flag to the mintlify dev command to allow specifying a custom port for the local preview server.

Current behavior

mintlify dev always starts on port 3000. If port 3000 is occupied, it falls back to 3001, 3002, etc. There is no way to explicitly set the port.

Proposed behavior

mintlify dev --port 3456
# or
mintlify dev -p 3456

Additionally, it would be great if mintlify dev respected the PORT environment variable as a fallback when --port is not provided:

PORT=3456 mintlify dev

Why this matters

Port 3000 is one of the most commonly used ports in local development. It's the default for Next.js, Create React App, Remix, and many other frameworks. Teams running a documentation site alongside their application almost always hit a port collision during local development.

The current fallback behavior (silently incrementing to 3001, 3002, etc.) makes the port unpredictable, which creates friction with:

  • Local reverse proxies (e.g., Portless, nginx, Caddy) that need a stable port to route to
  • docker-compose or monorepo setups where services are configured to communicate on known ports
  • Developer scripts and aliases that hardcode a URL for quick access
  • Browser bookmarks and saved dev environments that rely on a consistent address

Many documentation tools already support this — Docusaurus (--port), Starlight/Astro (--port), VitePress (--port), MkDocs (--dev-addr). Adding --port to Mintlify would bring it in line with the ecosystem and make it much easier to run docs alongside other services in local development.

Environment

  • mintlify CLI: 4.2.434
  • OS: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions