How to run several dev servers at once on a Mac
Updated · 2 min read
A frontend and an API, three client sites, a docs site next to the app: sooner or later there are more servers than terminal tabs you want to watch. These are the usual ways, simplest first.
Terminal tabs
One tab per server. Free and obvious. It gets hard when you close a tab without stopping its server, lose track of which tab runs what, or two projects both want port 3000.
concurrently: one project with several parts
npx concurrently -n web,api "npm run dev --prefix web" "npm run dev --prefix api" One command, one terminal, each line of output prefixed with its name. Good for a frontend and a backend that always run together. It works per project, so it doesn't help with several unrelated ones.
tmux
Panes and sessions that outlive the terminal window. Powerful, but you still start each server, choose its port and watch each log yourself.
pm2
pm2 start npm --name shop -- run dev
pm2 ls
pm2 logs shopMade for running Node.js in production, and it works in development too: it keeps servers running, restarts them after a crash and keeps their logs. It lives in the command line, and the ports are still yours to sort out.
What to look for
Whatever you choose, these are the things that get in the way with more than two servers:
- A port per project, so they stop competing for 3000. See Next.js or Vite started on the wrong port.
- One place that shows what runs, so nothing is left behind. See See every dev server running on your Mac.
- Errors you notice, not ones buried in a tab you haven't looked at.
- Addresses you can remember, such as
shop.localhost. See Subdomains on localhost.
How Portroom handles it
A window and a menu bar for all of them
Each project gets its own port, a name.localhost address and its own log, with errors picked out. Start and stop servers from the menu bar, and see in one place what crashed, which port is taken and which server was left running.
Your servers keep running when you quit Portroom. Free for three servers at once; Pro ($49 once) runs any number and adds HTTPS, restart after a crash and the AI agent tools.


Something wrong or out of date on this page? Write to support@portroom.dev.