-
Notifications
You must be signed in to change notification settings - Fork 224
Description
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 3456Additionally, it would be great if mintlify dev respected the PORT environment variable as a fallback when --port is not provided:
PORT=3456 mintlify devWhy 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-composeor 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