Reserved share location?

Hi, after creating a reserved share I would like to edit some of its properties. Where is it stored? I can't find it in ~/.zrok/*

1 Like

Welcome to the community, @Morriz!

You're correct that the reservation is tied to the zrok environment that you enabled in ~/.zrok, but there's no information saved in the environment about the reservation. The association exists only in the zrok controller API.

You can inspect all the reservations for all environments that you've enabled with your zrok account in two ways:

  1. the zrok console
  2. the zrok CLI

In the zrok console, you'll see a graph of all your environments and their respective shares, including temporary shares and reserved (permanent) shares.

With the zrok overview command you can see the same information as JSON. Would you be interested in some jq filters that illustrate parsing the JSON for particular values?

With both console and CLI approaches, you're viewing the information provided by the controller's API /overview endpoint.

The only way to modify a reservation currently is to re-create it. You can do this by deleting it in the console or run zrok release {token}, then reserve the same token again with new options.

One thing to be aware of is that you can override one of the reserved share options without recreating it, the "target." The type of target depends on the backend mode you're using. For example, if you're using the default proxy mode, then the target is the URL you're proxying, e.g., 127.0.0.1:3000. This is accomplished with the zrok share reserved --override-endpoint {target} option.

You can leave yourself a reference when you reserve a share token too with the zrok reserve public --json-output option. That option provides JSON to stdout which you could redirect to a file with tee or > if you're using a shell like BASH.

Some of these things are automated for you by zrok frontdoor, in case you're interested: zrok frontdoor | Zrok. It's basically a Linux package or a Docker Compose project which isolate the enabled zrok environment as the system level instead of ~/.zrok.

You can also use zrok in Docker with your same zrok environment in ~/.zrok with a bind mount and run-as container UID matching your logged in user. Let me know if you'd like an example for that.

Good luck, and please let us know how it works for you.

1 Like