localhost:

Run frontend and backend together

Run the frontend, backend, worker and database of one project without five terminal tabs: concurrently, Procfile runners and tmux, and what localhost adds.

The quickest way is one command that starts them all in one terminal, with each line labelled. With concurrently:

npx concurrently -n db,api,web \
  "docker compose up postgres" \
  "cd api && uv run fastapi dev" \
  "npm --prefix web run dev"

Or with a Procfile and a Procfile runner (foreman, overmind or honcho):

db: docker compose up postgres
api: cd api && uv run fastapi dev
web: npm --prefix web run dev
worker: cd api && uv run python -m worker
overmind start      # or: foreman start, honcho start

Which tool should I use to run several dev servers at once?

Each one is good at something:

  • concurrently lives in package.json, so npm run dev starts everything for the whole team, in CI too. It runs them side by side in one terminal; it doesn’t wait for one to be ready before the next, so people add wait-on for the database.

  • A Procfile runner reads a Procfile committed with the code, and works on any machine with a terminal, over SSH too. Overmind runs each process in tmux, so you can attach to one or restart it.

  • tmux gives each process its own pane, a real terminal, in a session that survives closing the window:

    tmux new-session -d -s app 'cd api && uv run fastapi dev'
    tmux split-window -t app 'npm --prefix web run dev'
    tmux attach -t app

If one of these covers your day, keep it. They are free, small and scriptable.

Where do one-terminal setups fall short?

  • Everything restarts together. Changing the API’s environment means stopping the frontend too, with most of them.
  • “Started” isn’t “ready”. The API starts before Postgres accepts connections, fails once, and you restart it by hand.
  • A failure scrolls away. Which one crashed, and why, is somewhere up in the shared output.
  • It’s one more tab. Five projects means five of these, each in a tab you have to find again.

How does localhost run a whole project?

localhost is a free, open-source desktop app for exactly this. A Project is your folder; each Service is one of the commands above, run in your login shell, so your PATH and version managers apply. No Docker is required: a Compose service is just one more Service, such as docker compose up postgres.

  • Start All, in order. Make the API start after the database. Start All (⇧⌘R, or Ctrl+Shift+R) starts every Service in dependency order, and each waits until its Dependencies are Running, which, for a Service with a Port, means the port accepts connections.
  • One at a time when you want. Start, stop or restart a single Service (⌘R, ⌘.) and leave the rest running. A Service marked Manual stays out of Start All until you need it.
  • One log, or each one. All services shows every Service’s output in one stream, each line prefixed with its Key. Select one to see only its log, kept per Run.
  • Failures that say why. A Service that crashes is Failed, with the reason and its last lines, and the Services waiting for it don’t start, and say so.
  • Every project in one window. Each Project keeps its Services, Ports and environment, so the next one is a click away, not another tab.

Set it up in a minute: localhost scans the folder and suggests Services from package.json scripts, Compose files, Python apps and Cargo binaries (Quick start). For where each tool wins, side by side: localhost compared to concurrently, to Procfile runners, to tmux and all comparisons.

FAQ

How do I make the backend wait for the database?

With concurrently, prefix the command with wait-on: npx wait-on tcp:5432 && uv run fastapi dev. In localhost, make the API start after the database: it waits until the database is Running, which for a Service with a Port means the port accepts connections.

Can I restart one service without stopping the others?

Not with concurrently, which runs them as one command. Overmind can restart one process (overmind restart web). In localhost, ⌘R restarts the selected Service and ⌘. stops it; the others, and the Services that depend on it, keep running.

Does localhost replace my Procfile or package.json scripts?

No. It runs them: a Service’s command can be npm run dev, overmind start or anything else your terminal runs. It writes nothing into your repository, so the team keeps its own setup.

Edit this page on GitHub

Install localhost for macOS

Two quick steps, usually under a minute.

  1. Drag it to Applications

    Open localhost-0.3.0.dmg and drag localhost to Applications.

    Download localhost-0.3.0.dmg

    Or install it with Homebrew, which also puts the localhost command in your terminal:

    brew install --cask marcellosso/tap/localhost

    Or download it from Terminal, which macOS doesn’t block, so you can skip step 2:

    curl -fLO https://github.com/marcellosso/localhost/releases/download/v0.3.0/localhost-0.3.0.dmg && open localhost-0.3.0.dmg
  2. Open it the first time

    localhost isn’t notarized by Apple yet, so macOS blocks the first launch once:

    1. Click Done in the warning.
    2. Open System Settings › Privacy & Security and scroll to Security.
    3. Click Open Anyway, and confirm with your password or Touch ID.

    Or run this in Terminal, then open localhost:

    xattr -dr com.apple.quarantine /Applications/localhost.app

macOS 15 or later · Apple silicon or Intel

  1. Run the installer

    Open localhost_0.3.0_x64-setup.exe. It installs for your user only, no administrator rights needed.

    Download localhost_0.3.0_x64-setup.exe
  2. Get past SmartScreen

    The installer isn’t signed by a known publisher yet, so Windows says “Windows protected your PC”:

    1. Click More info.
    2. Check that the file is localhost_0.3.0_x64-setup.exe.
    3. Click Run anyway.

Windows 10 or 11 · x64 · WSL 2 for Projects in WSL

  1. Download your package

  2. Install it

    From the folder you downloaded it to:

    sudo apt install ./localhost-app_0.3.0_amd64.deb
    sudo dnf install ./localhost-app-0.3.0-1.x86_64.rpm
    chmod +x localhost-app_0.3.0_amd64.AppImage && ./localhost-app_0.3.0_amd64.AppImage

    Secrets need a Secret Service (GNOME Keyring, KWallet). On stock GNOME the tray icon needs the AppIndicator extension.

x86_64 · Ubuntu 22.04+ · Debian 12+ · Fedora

On another system?Install guide →