# Ports

> Open a localhost server running on one of your computers from another computer or your phone, through an end-to-end encrypted tunnel.

An agent, a Bot or you start a server on one computer, for example `npm run dev` on `localhost:5173`. With **Ports**, that same server opens on your other computers and your iPhone, as if it ran there — without clicking anything. It works across networks (home, office, 4G): nothing needs to be opened on your router.

## Automatic sharing

**Automatic** is on by default (switch at the top of the **Ports** panel: **plug** icon in the title bar). Every few seconds, Neoo looks at the servers listening on this computer and shares on its own:

- servers started from Neoo: agents, Bots and the integrated terminals, whatever the program;
- dev servers started elsewhere by `node`, `bun`, `deno`, `python`, `ruby`, `php`, `java`, `dotnet`, `go` and similar runtimes.

Automatically shared ports show an **auto** badge under **This PC**. When the server stops, the share stops too.

Only ports 1024 to 19999 are shared automatically: dev servers use fixed ports there, while higher ports are temporary ports of tools and apps. Never shared automatically either: databases and message brokers (PostgreSQL, MySQL, Redis, MongoDB…), debuggers (Node inspector `9229`, browser DevTools `9222`), remote desktop and Docker ports, browsers and Neoo's own internal processes. You can still share them by hand.

To stop sharing a port, click **Stop**: Neoo does not share it again automatically until you restart Neoo or click **Share**. Turn **Automatic** off to share only by hand. For a port that is not listed, type it in **Other port (e.g. 3000)** and click **Share**.

> [!NOTE]
> Only servers that listen on this computer's loopback (`localhost`, `127.0.0.1`, `::1`) or on all interfaces can be shared. Neoo never forwards to another machine of your network.

## On your other computers

With **Automatic** on, the ports shared by your other computers open on their own: Neoo listens on `localhost` with the **same port number**, so `http://localhost:5173` works right away in any browser. Hot reload, WebSockets, cookies and OAuth callbacks that use `localhost` keep working. If that port is already used here, Neoo picks another one and shows **local port … (the original port is busy here)**.

The **Ports** panel lists them under **My other devices**, with their path: **Direct** (peer-to-peer) or **Encrypted relay** (when a direct connection is impossible), and the round-trip time. Use the buttons to open one in the browser, copy its URL or close it. With **Automatic** off, click **Open** next to a port.

## Open a shared port on your iPhone

1. In the Neoo app, open **Settings** → **Ports**.
2. Your computers that are online appear with their shared ports — nothing to share by hand on the computer. Tap **Open**.

The page opens inside the app, with **Back**, **Reload** and **Close**. The connection stays available while the app is open; it is listed under **Open connections**, where you can close it.

> [!NOTE]
> Ports is available in the iOS app for now. On Android the screen shows **Ports is available in the iOS app for now.**

## Security

- **End-to-end encrypted.** The traffic goes through a QUIC tunnel (TLS 1.3). Each device has its own key, kept in the system keychain. When no direct path exists, the traffic goes through Neoo's relay (`relay.ide.neoo.io`), which only sees encrypted bytes and only accepts signed-in Neoo devices.
- **Your devices only.** A computer accepts a connection only from a device of the same Neoo account that asked for its ports in the last 15 minutes. The addresses and keys are exchanged through Neoo's end-to-end encrypted realtime channel, never through a public directory.
- **Only what is shared.** Other devices reach only the ports shared automatically or by you, only on this computer's loopback. Stopping a share, turning **Automatic** off or signing out cuts the connections at once.
- **Nothing runs without a reason.** The tunnel starts only when this computer has a port to share or another of your devices shares one.

## Troubleshooting

| Symptom | What to do |
| --- | --- |
| **None of your other devices shares a port.** | Start the server on the other computer, or share it by hand if its port is never shared automatically. Both computers must be signed in to the same account, run a Neoo version with Ports, and keep **Automatic** on to open ports on their own. |
| **No server is listening on this port of the other device.** | The server stopped on the other computer. Start it again, then reload the page. |
| **This port is no longer shared by the other device.** | The server or the share was stopped on the other computer. Start it again, or click **Share** there. |
| **The other device refused access. Open Ports again to retry.** | Your device's access expired (15 minutes without opening Ports). Open the Ports panel or screen again. |
| **The other device can't be reached.** | The other computer is offline, asleep, or Neoo is closed there. |
| The path stays on **Encrypted relay** | Some networks block direct connections. The relay keeps working; only latency is higher. |

Source: https://vatoide.com/docs/workspace/ports
