Skip to main content
By the end of this guide a dev server that you or an agent started on a cloud machine has a link you can open, and, if you choose, share with someone else. Each cloud machine has its own preview address: https://<port>-<machine-id>.workspaces.reliantapi.com. It points at whatever is listening on that port inside the machine. A preview link starts private. Only you, and members of the organization that owns the machine, can open it after signing in. Sharing it means changing that port’s access rule.

Before you begin

  • A cloud machine. On your own computer the port is already on your computer, so the URL is plain http://localhost:<port>/ and there is nothing to share.
  • A shell on that machine, either the agent’s or a terminal.
  • The reliant CLI, which is already installed on cloud machines.
1

Start the dev server

Use a port below 32768. Bind it to 127.0.0.1, localhost or all interfaces, because the preview reaches the server through loopback.
terminal
Any server works the same way: npm run dev, a Go API, a docs site. Leave it running.
2

Get its preview URL

In a second shell on the same machine:
terminal
On a cloud machine the URL goes to stdout, and a note about who can open it goes to stderr:
terminal
The URL is built on the machine and the command makes no network call. On a computer you connected yourself, the same command prints the loopback address. This is real output from such a machine, with the server above running:
terminal
--require-listening makes the command exit 1 while nothing is listening yet, which is useful as a readiness check in a script (Preview a running app).
3

Open it yourself

Open the URL in a browser where you are signed in to Reliant. No rule is needed: a port without a rule follows the machine’s default, which is Authenticated unless you changed it.An agent that finishes a task can post the same link: reliant preview-url <port> --json prints the URL, whether the port is listening, and access_level, which is owner on a cloud machine.
4

Share the port

In the app header, open the Detected ports menu, which appears once the machine reports a listening port. Click the lock next to the port to switch it to Public. Anyone with the link can then open it, without signing in.For more control, open the machine in Settings → Machines. Under Port Access, enter the port, choose an Access mode and click Add:A Token caller sends the token as Authorization: Bearer <token> or adds ?rlnt_access_token=<token> to the URL. Copy it right away, because the app does not show it again.
5

Check who can open it

Open the URL in a private window that is not signed in to Reliant. A Public port loads, while an Authenticated or Token port refuses you. A change can take up to about 10 seconds to apply, because the preview proxy caches access decisions for that long.
6

Make it private again

Click Public in the Detected ports menu to switch the port back, or remove its rule under Port Access. A port without a rule returns to the machine’s default. Then stop the dev server when you no longer need it.
The Detected ports menu also sets the Default access for new ports. Setting it to Public makes every listening port without a rule reachable by anyone who has its URL, including ports you open later. Leave it on Authenticated and make single ports public instead.

What this does not do

  • It is not hosting. The link works only while the machine is awake and the server is running. A suspended machine keeps its files but not its processes (Waking and suspending). To publish an app that stays up, deploy it (App hosting).
  • There is no CLI for access rules. reliant preview-url only prints the URL. You change who can open a port in the app.
  • It does not expose your own computer. A connected machine’s preview is its loopback address, reachable only from that computer. Only cloud machines get a workspaces.reliantapi.com address.
How the machine reaches Reliant without opening inbound ports is explained in how a tool call reaches your machine. What runs on the machine and what leaves it is in the daemon security model.

Troubleshooting

The command checks only for listeners bound to loopback or all interfaces, and it skips the kernel’s ephemeral port range, 32768–60999 on most Linux systems. Check that the server has started, that it is not bound to one specific non-loopback address, and that its port is below 32768. The URL is still correct. Only the check is affected.
You passed --require-listening and the check found no listener. The same causes apply as for the warning above.
You ran the command on a computer you connected yourself, not on a cloud machine. Only cloud machines have a shareable preview address.

Next steps

Preview a running app

Every preview-url flag and its output.

Start, stop and resize cloud machines

Manage the machine itself from a terminal.

Cloud machines & plans

Sizes, idle timeouts and what survives a suspend.

Daemon security model

What an agent’s commands can reach on the machine.