Open a server running in a project
Open what the agent or a terminal runs in a project's box, a dev server or a static site, at a private address behind Yard's sign-in, with hot reload; or publish it at an address of its own for your team or for anyone.
When the agent starts a server in a project's box (bun run dev, vite dev, python3 -m http.server 4173), you can open it from Yard right away.
Nothing has to be set up: no app, no runner with hosting, no tunnel. The
address is private: only people who can see the project open it, signed in
to Yard. Hot reload works. (On a Windows runner in direct mode, a port counts
as the workspace's when the program listening on it was started from that
workspace's agents or terminals.)
Open it from the chat
While the agent has work running in the background, a process that listens on a port shows an Open :5173 button next to Stop. A port that no row holds (the agent started the server from its own shell, or someone did in a terminal) is listed under the rows with its own Open. Open goes to a new tab, signed in as you.
The Ports view
Listening in the box, under the apps on a project's Apps tab, lists every port something in the project's box listens on, with the process that holds it. Each row has:
- Show here: the page in a frame under the list, with Reload, Open in a new tab and Close. Refresh reads the list again.
- Open in tab: the page in a new tab.
A server that listens on 127.0.0.1 only (Vite's default) opens too; the
row says "this box only" for it. The list follows the box every few seconds.
Publish a port
A private address is enough to look at a change yourself. To hand a quick
server to someone else, or to open it from a phone without signing in,
publish the port: it gets an address of its own on the hosting runner,
such as https://landing-5173.apps.example.com, without setting anything
up as an app.
- When a port starts listening, the chat asks under the background work: Publish…, Open privately, × to dismiss it, or Don't ask in this project (kept on your account, on every device).
- In the Ports view, a port that is not published has Publish….
The dialog asks for:
- Address: a name of its own under the runner's domain, or a free name
on
yrd.shwhen the runner gives those out. The name is kept for the project and port: publish it again and it comes back. - Who can open it: Team (people of the workspace, signed in to Yard) or Public (anyone with the address, no sign-in: the server's own checks are all it has). Team is the default.
- Keep it published until the process stops, the box stops, or you unpublish it. A port kept until you unpublish it answers "not running" while the box is stopped, and comes back with it.
A published port shows its address in the chat ("Public at …") and in the Ports view, with a Team or Public tag, Copy, Change, Unpublish, the runner that serves it, who published it and until when. The Apps tab counts published ports with the apps.
Any member of the project can publish, as Team or as Public; viewers see what is published and change nothing. Closing or deleting the project unpublishes its ports.
Publishing needs hosting on the runner that holds the project's box (an
official runner with hosting on counts, the public edge does not). Without
it, the dialog says so and links to the runner's settings; the private
address still works. Vite answers only hosts it allows: if it refuses the
published address, the agent adds it to server.allowedHosts.
Ask the agent for the link
The agent can list the ports and their addresses with yard preview, and
print one with yard preview <port>, to give you in its reply. Anyone who
opens that link and is not signed in is sent to Yard's sign-in first.
Who can open it
Anyone who can see the project, viewers included, as for a team app. Each
port has its own address (<port>-<project>-<id>.<preview domain>), and the
sign-in for one port opens no other. Someone removed from the workspace
loses access at once: their next request is refused and an open connection
(a dev server's hot reload) closes.
When ports do not open
If port previews are not available where you use Yard, the Ports view still lists the ports, says that previews are not set up, and the Open buttons do nothing. The people who run Yard turn them on.
Limits
- HTTP and WebSockets only; a WebSocket message is at most 1 MiB.
- A stopped box has nothing listening; opening a preview does not start it.
- A preview is not an app: it runs only while the server in the box runs. For a URL that stays up, set the project up as an app.
- A port is published on the runner that holds the box only, not on another hosting runner of the organization.