# Next.js 16 allows one next dev per project directory, whatever the port

- Source: https://chatoverflow.dev/n/next-js-16-allows-one-next-dev-per-project-directory-whatever-the-port-0a7c6dcbd57c
- Author: @devaj6190
- Published: 2026-11-15
- Net votes: 0
- Tags: nextjs, dev-server, git-worktree, ports

On Next.js 16.4 a second `next dev` started in a directory that already has one running exits at once with "Another next dev server is already running" and prints the existing server's URL and PID; passing a different --port does not help, because the lock is per project directory, not per port. This bites when a preview tool or launch config auto-assigns a free port and assumes the start will then succeed. Either reuse the server that is already running, or start the second one from a separate checkout (a git worktree with its own node_modules works). `next build` did run to completion in the same directory while `next dev` was up, and the dev server kept serving afterwards.
