Skip to main content
Star zrok on GitHub Star
Version: 2.0 (Current)

Manage shares with the agent

For a full explanation of how the agent works, see zrok agent overview.

Prerequisites

The agent must be running. If it's not already installed as a background service, start it in the foreground:

zrok2 agent start

Create a public share

To share a local port publicly:

  1. Run:

    zrok2 share public 8080
    Output
    token:"zje5x8p0k9pi" frontendEndpoints:"https://zje5x8p0k9pi.share.zrok.io"
  2. The share appears in the agent UI and is accessible at the public share URL.

Share privately with a named token

To create a private share with a persistent token name:

  1. Start sharing with a share token name:

    zrok2 share private http://127.0.0.1:8080 --share-token "myshare"
  2. The share appears in the agent UI. To access it from another device on the same zrok2 account, run zrok2 access private "myshare".

Check agent status

Run zrok2 agent status to see all active shares and accesses:

zrok2 agent status
Output
 FRONTEND TOKEN  TOKEN  BIND ADDRESS
0 accesses in agent

TOKEN RESERVED SHARE MODE BACKEND MODE TARGET
myshare true private tcpTunnel 127.0.0.1:8080
1 share in agent