docsget pocketty

Guides

Preview a Dev Server

Open a localhost port on your phone. pocketty finds the dev servers your agents start and forwards them over SSH.

When an agent starts a dev server, such as vite, next dev or Storybook, pocketty finds its port. You open the page on your phone. It loads through the same SSH connection as your terminal, so there is no tunnel to set up and nothing to open to the internet.

Open a Preview

pocketty offers a port in three places:

  • A banner, New preview port available, shows when a Pane opens a new port. Tap open. If more ports open at once, the banner counts them and open shows a menu.
  • In a Pane, the globe button in the top bar opens its port, or a menu when it has more than one.
  • On the host screen, each Pane with ports shows a count and a globe.

The banner hides after 8 seconds, but not while your finger is on it. From the banner, pocketty also opens the Pane that runs the server, behind the preview. When you close the preview, you are in that Pane.

Use the Preview

The preview works like Safari:

  • The bar at the bottom has back, forward, the address, and close. It gets smaller while you scroll down.
  • Tap the address to type a port, a path, or both: 5173, /settings or :5173/settings.
  • Pull down at the top to reload.

The page sees localhost, so dev servers that check their host name work. pocketty uses the same port number as on your computer when it can, so a page that calls a second port, for example an API on 8787, reaches it too. Self-signed HTTPS dev servers open without a warning.

Each host keeps its own cookies and site data.

Which Ports Show

  • With herdr, a port shows when a process in one of your Panes listens on it, and also a process that an agent started from a Pane.
  • On a plain host, a port shows when it opens after you connect.
  • A port shows only after it answers like a web server, over HTTP or HTTPS. Databases and other services stay hidden. A server that is still compiling gets two more tries, after 5 and 15 seconds.
  • Ports that the system picks at random, such as debugger ports, do not show. Type their number in the address bar to open them.

If a Port Does Not Show

  • Check that the server answers on the host: curl -I http://localhost:5173.
  • Check that the SSH server on the host allows port forwarding. AllowTcpForwarding must not be no in /etc/ssh/sshd_config. It is on by default.
  • With herdr, start the server from a Pane, so pocketty knows where it belongs.

    Type to search keys, notifications, the CLI, and more.