localhost:8765. If that port is already taken, the setup wizard detects the conflict and picks the next free port automatically — you don’t need to do anything in the common case. If you want explicit control over which port Handshake uses, follow the steps below.
Automatic port detection
When you runhandshake setup, Handshake checks whether port 8765 is free. If it isn’t, the wizard scans upward from 8765 — checking up to 100 ports — and selects the first available one. All agents are then registered with the chosen URL, so everything works without any manual steps on your part.
If a Handshake daemon is already running on 8765, the wizard recognizes it and reuses that address rather than treating it as a conflict. Re-running
handshake setup is safe and won’t migrate you to a different port unexpectedly.Pin a specific port
If you want to choose a port rather than let the wizard pick one, set both environment variables before running setup:HANDSHAKE_ADDR first. When it’s set, the wizard skips the automatic scan and uses that address directly, then auto-derives the MCP URL from it if HANDSHAKE_URL isn’t also set.
Change the port on an existing install (macOS)
If Handshake is already installed as a launchd service and you need to move it to a different port, edit the plist file to set the environment variables, then reload the service:Edit the launchd plist
Open
~/Library/LaunchAgents/com.handshake.serve.plist and add an EnvironmentVariables block: