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:
-
Run:
zrok2 share public 8080 -
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:
-
Start sharing with a share token name:
zrok2 share private http://127.0.0.1:8080 --share-token "myshare" -
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