Skip to content
BENIBIX Learn

sandbox.network.allowLocalBinding

AI⌨️ Claude CodeConfiguration

Also known as allowLocalBinding

The key that lets fenced commands on a Mac start a server.

Think of it like

It is like letting a child set up a stand in the yard. Now people can come to it.

Example

Lucy's dev server would not start under the sandbox on her Mac. She turns this key on, and npm run dev works.

Why it matters

Many tests start a small server, and they fail when they cannot listen on a port.

Definition

sandbox.network.allowLocalBinding is a settings key for macOS. It lets commands in the sandbox listen on a port, for example to start a dev server. They can also reach any port on localhost. The default is false. It does nothing on Linux and WSL2. There, each command in the sandbox has its own localhost.

Example code

json
{
  "sandbox": {
    "network": {
      "allowLocalBinding": true
    }
  }
}
Let a dev server start on a Mac in the sandbox.

Common mistake

Turning it on for a Linux machine. It only does something on macOS.

Key takeaways

  1. 1
    Listen on a port. Dev servers.
  2. 2
    macOS only. Not Linux.
  3. 3
    Off by default. false.