"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7176],{7806:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>d,contentTitle:()=>i,default:()=>l,frontMatter:()=>t,metadata:()=>a,toc:()=>c});var n=s(5893),o=s(1151);const t={sidebar_position:10},i="Reserved Shares",a={id:"concepts/sharing-reserved",title:"Reserved Shares",description:"By default a public or private share is assigned a share token when you create a share using the zrok share command. The zrok share command is the bridge between your local environment and the users you are sharing with. When you terminate the zrok share, the bridge is eliminated and the share token is deleted. If you run zrok share again, you will be allocated a brand new share token.",source:"@site/../docs/concepts/sharing-reserved.md",sourceDirName:"concepts",slug:"/concepts/sharing-reserved",permalink:"/docs/concepts/sharing-reserved",draft:!1,unlisted:!1,editUrl:"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/sharing-reserved.md",tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Public Shares",permalink:"/docs/concepts/sharing-public"},next:{title:"Sharing HTTP Servers",permalink:"/docs/concepts/http"}},d={},c=[];function h(e){const r={code:"code",em:"em",h1:"h1",p:"p",...(0,o.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.h1,{id:"reserved-shares",children:"Reserved Shares"}),"\n",(0,n.jsxs)(r.p,{children:["By default a ",(0,n.jsx)(r.code,{children:"public"})," or ",(0,n.jsx)(r.code,{children:"private"})," share is assigned a ",(0,n.jsx)(r.em,{children:"share token"})," when you create a share using the ",(0,n.jsx)(r.code,{children:"zrok share"})," command. The ",(0,n.jsx)(r.code,{children:"zrok share"})," command is the bridge between your local environment and the users you are sharing with. When you terminate the ",(0,n.jsx)(r.code,{children:"zrok share"}),", the bridge is eliminated and the ",(0,n.jsx)(r.em,{children:"share token"})," is deleted. If you run ",(0,n.jsx)(r.code,{children:"zrok share"})," again, you will be allocated a brand new ",(0,n.jsx)(r.em,{children:"share token"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["You can use a ",(0,n.jsx)(r.code,{children:"reserved"})," share to persist your ",(0,n.jsx)(r.em,{children:"share token"})," across multiple runs of the ",(0,n.jsx)(r.code,{children:"zrok share"})," bridge. When you use a ",(0,n.jsx)(r.code,{children:"reserved"})," share, the share token will not be deleted between multiple runs of ",(0,n.jsx)(r.code,{children:"zrok share"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["To use a ",(0,n.jsx)(r.code,{children:"reserved"})," share, you will first run the ",(0,n.jsx)(r.code,{children:"zrok reserve"})," command to create the reserved share (see ",(0,n.jsx)(r.code,{children:"zrok reserve --help"})," for details). Once you've created your ",(0,n.jsx)(r.code,{children:"reserved"})," share, you will use the ",(0,n.jsx)(r.code,{children:"zrok share reserved"})," command (see ",(0,n.jsx)(r.code,{children:"--help"})," for details) to run the bridge for the shared resource."]}),"\n",(0,n.jsxs)(r.p,{children:["This pattern works for both ",(0,n.jsx)(r.code,{children:"public"})," and ",(0,n.jsx)(r.code,{children:"private"})," shares, and for all resource types supported by ",(0,n.jsx)(r.code,{children:"zrok"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["To delete your ",(0,n.jsx)(r.code,{children:"reserved"})," share use the ",(0,n.jsx)(r.code,{children:"zrok release"})," command or click the delete button in the share's ",(0,n.jsx)(r.em,{children:"Actions"})," tab in the web console."]})]})}function l(e={}){const{wrapper:r}={...(0,o.a)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},1151:(e,r,s)=>{s.d(r,{Z:()=>a,a:()=>i});var n=s(7294);const o={},t=n.createContext(o);function i(e){const r=n.useContext(t);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(t.Provider,{value:r},e.children)}}}]);