diff --git a/404.html b/404.html index cfff3b2f..b90fecce 100644 --- a/404.html +++ b/404.html @@ -3,18 +3,18 @@ -Page Not Found | Zrok +Page Not Found | zrok - - - + + + -
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

\ No newline at end of file diff --git a/assets/css/styles.bb90e80b.css b/assets/css/styles.bcccc215.css similarity index 67% rename from assets/css/styles.bb90e80b.css rename to assets/css/styles.bcccc215.css index dad99797..6609a46b 100644 --- a/assets/css/styles.bb90e80b.css +++ b/assets/css/styles.bcccc215.css @@ -1,7 +1,7 @@ @import url(https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap);@import url(https://fonts.googleapis.com/css2?family=Russo+One&display=swap);.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.button,code{vertical-align:middle}.markdown li,body,code{word-wrap:break-word}*,.DocSearch-Container,.DocSearch-Container *,.downloadCard_D_EY{box-sizing:border-box}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:#0000;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:#0000000d;--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 #0000001a;--ifm-global-shadow-md:0 5px 40px #0003;--ifm-global-shadow-tl:0 12px 28px 0 #0003,0 2px 4px 0 #0000001a;--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:#0000;--ifm-table-stripe-background:#00000008;--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:#0000}html{background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;text-size-adjust:100%;letter-spacing:1}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.list_eTzJ article:last-child,.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid #0000001a;border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit;color:var(--code-font-color)}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight)}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_Gvgb,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:#3578e526;--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:#ebedf026;--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:#00a40026;--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:#54c7ec26;--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:#ffba0026;--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:#fa383e26;--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:any-link:hover,.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:#0000;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}[data-theme=dark] -h1,h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color)}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor #0000;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white);--ifm-footer-background-color:#0d0235}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_BuS1>:last-child,.cardContainer_fWXF :last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu{font-weight:var(--ifm-font-weight-semibold);overflow-x:hidden}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;top:0;visibility:hidden;left:0}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.pagination-nav__link,h1,h2,h3,h4,h5,h6{line-height:var(--ifm-heading-line-height)}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{content:"";transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;height:1.25rem;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter)}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.navbar__items--center .navbar__brand,code{margin:0}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;color:var(--ifm-navbar-link-color);display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover,.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color)}.navbar__brand:hover{text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:#ffffff1a;--ifm-navbar-search-input-placeholder-color:#ffffff80;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:#ffffff0d;--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:1rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);overflow-x:hidden;position:fixed;transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:#0009;position:fixed;right:0;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.downloadLinks_thSu,.downloadLinks_thSu:focus,.downloadLinks_thSu:hover,.getting-started-cards a:hover,.pagination__link:hover{text-decoration:none}.pagination-nav{display:grid;grid-gap:var(--ifm-spacing-horizontal);gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:#ffffff0d;--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:#ffffff1a;--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:#ffffff12;--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docsearch-text-color:#f5f6f7;--docsearch-container-background:#090a11cc;--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 #0304094d;--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 #494c6a80,0 -4px 8px 0 #0003;--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-color-primary:#3e2693;--ifm-color-primary-dark:#372284;--ifm-color-primary-darker:#2c196e;--ifm-color-primary-darkest:#211158;--ifm-color-primary-light:#3e2693;--ifm-color-primary-lighter:#5a3cc2;--ifm-color-primary-lightest:#6747d9;--ifm-code-font-size:95%;--docusaurus-highlighted-code-line-bg:#0000001a;--ifm-menu-color:#252525;--code-background-color:#3e26931a;--code-font-color:#252525;--selection-font-color:#0f023b;--selection-background:#9bf316;--ifm-menu-color-background-hover:#6747d955;--sidebar-selected:#6747d955;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--contrasting-background:#c4b7f5;--container-border:1px solid #adadad;--button-background-hover:#9c84f9;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:#656c85cc;--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 #ffffff80,0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px #1e235a66;--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 #1e235a66;--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 #45629b1f;--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:#0000;--docusaurus-collapse-button-bg-hover:#0000001a;--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}[data-theme=dark]{--ifm-color-primary:#9bf316;--ifm-color-primary-dark:#8cdb14;--ifm-color-primary-darker:#80c814;--ifm-color-primary-darkest:#70b409;--ifm-color-primary-light:#9bf316;--ifm-color-primary-lighter:#9af90a;--ifm-color-primary-lightest:#9f0;--docusaurus-highlighted-code-line-bg:#0000004d;--code-background-color:#4c377b87;--code-font-color:#cdb4f7;--selection-color:#0f023b;--ifm-navbar-background-color:#0d0235;--ifm-background-color:unset;--ifm-link-color:#9bf316;--ifm-menu-color:#ffffffd4;--contrasting-background:#4b359f;--container-border:1px solid #6d6d6d;--button-background-hover:#251463}.navbar .navbar__inner{margin:0 auto;max-width:1360px}.main-wrapper{display:flex;flex-direction:column}[data-theme=dark] +h1,h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color)}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor #0000;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white);--ifm-footer-background-color:#0d0235}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_BuS1>:last-child,.cardContainer_fWXF :last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu{font-weight:var(--ifm-font-weight-semibold);overflow-x:hidden}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;top:0;visibility:hidden;left:0}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.pagination-nav__link,h1,h2,h3,h4,h5,h6{line-height:var(--ifm-heading-line-height)}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{content:"";transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;height:1.25rem;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter)}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.navbar__items--center .navbar__brand,code{margin:0}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;color:var(--ifm-navbar-link-color);display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover,.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color)}.navbar__brand:hover{text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:#ffffff1a;--ifm-navbar-search-input-placeholder-color:#ffffff80;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:#ffffff0d;--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:1rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);overflow-x:hidden;position:fixed;transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:#0009;position:fixed;right:0;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.downloadLinks_thSu,.downloadLinks_thSu:focus,.downloadLinks_thSu:hover,.getting-started-cards a:hover,.pagination__link:hover{text-decoration:none}.pagination-nav{display:grid;grid-gap:var(--ifm-spacing-horizontal);gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:#ffffff0d;--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:#ffffff1a;--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:#ffffff12;--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docsearch-text-color:#f5f6f7;--docsearch-container-background:#090a11cc;--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 #0304094d;--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 #494c6a80,0 -4px 8px 0 #0003;--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-color-primary:#3e2693;--ifm-color-primary-dark:#372284;--ifm-color-primary-darker:#2c196e;--ifm-color-primary-darkest:#211158;--ifm-color-primary-light:#3e2693;--ifm-color-primary-lighter:#5a3cc2;--ifm-color-primary-lightest:#6747d9;--ifm-code-font-size:95%;--docusaurus-highlighted-code-line-bg:#0000001a;--ifm-menu-color:#252525;--code-background-color:#3e26931a;--code-font-color:#252525;--selection-font-color:#0f023b;--selection-background:#9bf316;--ifm-menu-color-background-hover:#6747d955;--sidebar-selected:#6747d955;--contrasting-background:#c4b7f5;--container-border:1px solid #adadad;--button-background-hover:#9c84f9;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:#656c85cc;--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 #ffffff80,0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px #1e235a66;--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 #1e235a66;--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 #45629b1f;--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:#0000;--docusaurus-collapse-button-bg-hover:#0000001a;--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}[data-theme=dark]{--ifm-color-primary:#9bf316;--ifm-color-primary-dark:#8cdb14;--ifm-color-primary-darker:#80c814;--ifm-color-primary-darkest:#70b409;--ifm-color-primary-light:#9bf316;--ifm-color-primary-lighter:#9af90a;--ifm-color-primary-lightest:#9f0;--docusaurus-highlighted-code-line-bg:#0000004d;--code-background-color:#4c377b87;--code-font-color:#cdb4f7;--selection-color:#0f023b;--ifm-navbar-background-color:#0d0235;--ifm-background-color:unset;--ifm-link-color:#9bf316;--ifm-menu-color:#ffffffd4;--contrasting-background:#4b359f;--container-border:1px solid #6d6d6d;--button-background-hover:#251463}.navbar .navbar__inner{margin:0 auto;max-width:1360px}.main-wrapper{display:flex;flex-direction:column}[data-theme=dark] #__docusaurus{background:linear-gradient(180deg,#140c42,#231069)}.getting-started-cards .card,.menu__link--active:not(.menu__link--sublist){background-color:var(--sidebar-selected)}h1,h2,h3,h4,h5,h6{font-family:Russo One,sans-serif;font-weight:400;margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}code,html,p{font-family:JetBrains Mono,Consolas,Courier New,monospace}html,p{font-weight:400}.menu__link{color:#252525;font-weight:600}[data-theme=dark] .menu__link{color:#ffffffd4}.navbar__link--active,.navbar__link:hover{font-weight:600;text-decoration:none}code{background-color:#f2f2f2;font-size:85%;font-weight:800;padding:.2em .4em;white-space:break-spaces;color2:#a782d9;border-color:var(--code-background-color);border-radius:6px;border-width:0;color:var(--code-font-color);background-color2:#4c377b87;background-color:var(--code-background-color)}[data-theme=dark] pre{background-color:#0b0031}[data-theme=dark] .docSidebarContainer_node_modules-\@docusaurus-theme-classic-lib-theme-DocPage-Layout-Sidebar-styles-module{border-right:1px solid #9bf316}[data-theme=dark] -.table-of-contents__left-border{border-left:1px solid #9bf316}::selection{background:var(--selection-background);color:var(--selection-font-color)}.navbar__link{color:var(--ifm-navbar-link-color);font-weight:var(--ifm-font-weight-semibold)}.language-buttonless div>button{display:none}.header-discourse-link:hover,.header-github-link:hover{opacity:.6}.header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233C4A5E' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;content:"";display:flex;height:1.25rem;width:1.25rem}[data-theme=dark] .header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2394A3B8' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat}.header-discourse-link:before,[data-theme=dark] .header-discourse-link:before{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgLTEgMTA0IDEwNiI+PGcgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBkYXRhLW5hbWU9IkxheWVyIDMiPjxwYXRoIGQ9Ik01MS44NyAwQzIzLjcxIDAgMCAyMi44MyAwIDUxdjUyLjgxbDUxLjg2LS4wNWMyOC4xNiAwIDUxLTIzLjcxIDUxLTUxLjg3UzgwIDAgNTEuODcgMCIgc3R5bGU9ImZpbGw6IzIzMWYyMCIvPjxwYXRoIGQ9Ik01Mi4zNyAxOS43NGEzMS42MiAzMS42MiAwIDAgMC0yNy43OSA0Ni42N2wtNS43MiAxOC40IDIwLjU0LTQuNjRhMzEuNjEgMzEuNjEgMCAxIDAgMTMtNjAuNDNaIiBzdHlsZT0iZmlsbDojZmZmOWFlIi8+PHBhdGggZD0iTTc3LjQ1IDMyLjEyYTMxLjYgMzEuNiAwIDAgMS0zOC4wNSA0OGwtMjAuNTQgNC43IDIwLjkxLTIuNDdhMzEuNiAzMS42IDAgMCAwIDM3LjY4LTUwLjIzIiBzdHlsZT0iZmlsbDojMDBhZWVmIi8+PHBhdGggZD0iTTcxLjYzIDI2LjI5QTMxLjYgMzEuNiAwIDAgMSAzOC44IDc4bC0xOS45NCA2LjgyIDIwLjU0LTQuNjVhMzEuNiAzMS42IDAgMCAwIDMyLjIzLTUzLjg4IiBzdHlsZT0iZmlsbDojMDBhOTRmIi8+PHBhdGggZD0iTTI2LjQ3IDY3LjExYTMxLjYxIDMxLjYxIDAgMCAxIDUxLTM1IDMxLjYxIDMxLjYxIDAgMCAwLTUyLjg5IDM0LjNsLTUuNzIgMTguNFoiIHN0eWxlPSJmaWxsOiNmMTVkMjIiLz48cGF0aCBkPSJNMjQuNTggNjYuNDFhMzEuNjEgMzEuNjEgMCAwIDEgNDcuMDUtNDAuMTIgMzEuNjEgMzEuNjEgMCAwIDAtNDkgMzkuNjNsLTMuNzYgMTguOVoiIHN0eWxlPSJmaWxsOiNlMzFiMjMiLz48L2c+PC9nPjwvc3ZnPg==) no-repeat;content:"";display:flex;height:1.25rem;width:1.25rem}.getting-started-cards .button{background-color:var(--contrasting-background);border:1px var(--container-border);color:var(--ifm-link-color);font-family:var(--font-family-monospace);transition:background-color .3s}.downloadButtons_NPAP:focus,.downloadButtons_NPAP:hover,.getting-started-cards .button:hover{background-color:var(--button-background-hover);outline:0}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.lastUpdated_JAkA{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.downloadContainer_nNgj{align-items:stretch;display:flex;flex-direction:row;gap:9px;justify-content:center;padding:20px;width:100%}.downloadCard_D_EY{background-color:var(--sidebar-selected);border-radius:18px;display:flex;flex-direction:column;flex-grow:1;text-align:center;width:30%}.cardFooter_Rhom,.downloadButtons_NPAP,.downloadCard_D_EY .imgContainer_r0QA{background-color:var(--contrasting-background)}.downloadCard_D_EY img{display:block;margin:0 auto;max-height:100px;padding:10px;width:auto}.cardFooter_Rhom{border-bottom-left-radius:18px;border-bottom-right-radius:18px;border-top:var(--container-border);margin-top:auto;padding:10px}.downloadCard_D_EY ul{list-style:none;margin:0 0 20px;padding:0}.downloadButtons_NPAP{border:1px var(--container-border);border-radius:18px;display:inline-block;margin:5px;padding:10px 15px;text-align:center;transition:background-color .3s}.downloadCard_D_EY h3{margin-top:10px}.downloadCard_D_EY .imgContainer_r0QA{border-bottom:var(--container-border);border-top-left-radius:18px;border-top-right-radius:18px;display:inline-block;margin-bottom:auto;padding:10px}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow);transform:translate3d(0,1px,0)}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Hit[aria-selected=true] mark,.content_knG7 a{text-decoration:underline}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:#0000;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{animation:.1s ease-in forwards a;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:#0000}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Container,.skipToContent_fXgn{z-index:calc(var(--ifm-z-index-fixed) + 1)}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@keyframes a{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{left:0;position:absolute;top:0;fill:currentColor;height:inherit;opacity:inherit;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:#0000 #0000 #0000 var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}#__docusaurus-base-url-issue-banner-container,.docSidebarContainer_YfHR,.navbarSearchContainer_Bca1:empty,.sidebarLogo_isFc,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}[data-theme=dark]:root{--docusaurus-collapse-button-bg:#ffffff0d;--docusaurus-collapse-button-bg-hover:#ffffff1a}.collapseSidebarButton_PEFL{display:none;margin:0}.iconExternalLink_nPIU{margin-left:.3rem}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.dropdownNavbarItemMobile_S0Fm{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.cardContainer_fWXF{--ifm-link-color:var(--ifm-color-emphasis-800);--ifm-link-hover-color:var(--ifm-color-emphasis-700);--ifm-link-hover-decoration:none;border:1px solid var(--ifm-color-emphasis-200);box-shadow:0 1.5px 3px 0 #00000026;transition:all var(--ifm-transition-fast) ease;transition-property:border,box-shadow}.cardContainer_fWXF:hover{border-color:var(--ifm-color-primary);box-shadow:0 3px 6px 0 #0003}.cardTitle_rnsV{font-size:1.2rem}.cardDescription_PWke{font-size:.8rem}.containsTaskList_mC6p{list-style:none}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{display:inline-block;height:1.6em;width:1.6em;fill:var(--ifm-alert-foreground-color)}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.title_kItE{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-leading)*1.25)}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{color:var(--ifm-color-content-secondary);font-size:.8rem;--ifm-breadcrumb-separator-size-multiplier:1}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{animation:1s linear infinite b;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes b{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:#ffd78e40;color:var(--docsearch-hit-color);padding:.09em 0}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}.lastUpdated_JAkA{text-align:right}.tocMobile_ITEo{display:none}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.navbarSearchContainer_Bca1{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.docItemCol_VOVn,.generatedIndexPage_vN6x{max-width:75%!important}.list_eTzJ article:nth-last-child(-n+2){margin-bottom:0!important}}@media (min-width:1416px){.main-wrapper{align-self:center;max-width:1400px;width:1400px}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block;width:max-content}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.docItemContainer_F8PC{padding:0 .3rem}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.downloadContainer_nNgj{flex-direction:column}.downloadCard_D_EY{max-width:none;width:auto}.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file +.table-of-contents__left-border{border-left:1px solid #9bf316}::selection{background:var(--selection-background);color:var(--selection-font-color)}.navbar__link{color:var(--ifm-navbar-link-color);font-weight:var(--ifm-font-weight-semibold)}.language-buttonless div>button{display:none}.header-discourse-link:hover,.header-github-link:hover{opacity:.6}.header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233C4A5E' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;content:"";display:flex;height:1.25rem;width:1.25rem}[data-theme=dark] .header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2394A3B8' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat}.header-discourse-link:before,[data-theme=dark] .header-discourse-link:before{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgLTEgMTA0IDEwNiI+PGcgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBkYXRhLW5hbWU9IkxheWVyIDMiPjxwYXRoIGQ9Ik01MS44NyAwQzIzLjcxIDAgMCAyMi44MyAwIDUxdjUyLjgxbDUxLjg2LS4wNWMyOC4xNiAwIDUxLTIzLjcxIDUxLTUxLjg3UzgwIDAgNTEuODcgMCIgc3R5bGU9ImZpbGw6IzIzMWYyMCIvPjxwYXRoIGQ9Ik01Mi4zNyAxOS43NGEzMS42MiAzMS42MiAwIDAgMC0yNy43OSA0Ni42N2wtNS43MiAxOC40IDIwLjU0LTQuNjRhMzEuNjEgMzEuNjEgMCAxIDAgMTMtNjAuNDNaIiBzdHlsZT0iZmlsbDojZmZmOWFlIi8+PHBhdGggZD0iTTc3LjQ1IDMyLjEyYTMxLjYgMzEuNiAwIDAgMS0zOC4wNSA0OGwtMjAuNTQgNC43IDIwLjkxLTIuNDdhMzEuNiAzMS42IDAgMCAwIDM3LjY4LTUwLjIzIiBzdHlsZT0iZmlsbDojMDBhZWVmIi8+PHBhdGggZD0iTTcxLjYzIDI2LjI5QTMxLjYgMzEuNiAwIDAgMSAzOC44IDc4bC0xOS45NCA2LjgyIDIwLjU0LTQuNjVhMzEuNiAzMS42IDAgMCAwIDMyLjIzLTUzLjg4IiBzdHlsZT0iZmlsbDojMDBhOTRmIi8+PHBhdGggZD0iTTI2LjQ3IDY3LjExYTMxLjYxIDMxLjYxIDAgMCAxIDUxLTM1IDMxLjYxIDMxLjYxIDAgMCAwLTUyLjg5IDM0LjNsLTUuNzIgMTguNFoiIHN0eWxlPSJmaWxsOiNmMTVkMjIiLz48cGF0aCBkPSJNMjQuNTggNjYuNDFhMzEuNjEgMzEuNjEgMCAwIDEgNDcuMDUtNDAuMTIgMzEuNjEgMzEuNjEgMCAwIDAtNDkgMzkuNjNsLTMuNzYgMTguOVoiIHN0eWxlPSJmaWxsOiNlMzFiMjMiLz48L2c+PC9nPjwvc3ZnPg==) no-repeat;content:"";display:flex;height:1.25rem;width:1.25rem}.getting-started-cards .button{background-color:var(--contrasting-background);border:1px var(--container-border);color:var(--ifm-link-color);font-family:var(--font-family-monospace);transition:background-color .3s}.downloadButtons_NPAP:focus,.downloadButtons_NPAP:hover,.getting-started-cards .button:hover{background-color:var(--button-background-hover);outline:0}.downloadContainer_nNgj{align-items:stretch;display:flex;flex-direction:row;gap:9px;justify-content:center;padding:20px;width:100%}.downloadCard_D_EY{background-color:var(--sidebar-selected);border-radius:18px;display:flex;flex-direction:column;flex-grow:1;text-align:center;width:30%}.downloadButtons_NPAP,.downloadCard_D_EY .imgContainer_r0QA{background-color:var(--contrasting-background);display:inline-block}.downloadCard_D_EY img{display:block;margin:0 auto;max-height:100px;padding:10px;width:auto}.cardFooter_Rhom{background-color:var(--contrasting-background);border-bottom-left-radius:18px;border-bottom-right-radius:18px;border-top:var(--container-border);margin-top:auto;padding:10px}.downloadCard_D_EY ul{list-style:none;margin:0 0 20px;padding:0}.downloadButtons_NPAP{border:1px var(--container-border);border-radius:18px;margin:5px;padding:10px 15px;text-align:center;transition:background-color .3s}.downloadCard_D_EY h3{margin-top:10px}.downloadCard_D_EY .imgContainer_r0QA{border-bottom:var(--container-border);border-top-left-radius:18px;border-top-right-radius:18px;margin-bottom:auto;padding:10px}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.lastUpdated_JAkA{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.DocSearch-Button,.DocSearch-Button-Container{align-items:center;display:flex}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}.DocSearch-Button{background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow);transform:translate3d(0,1px,0)}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Hit[aria-selected=true] mark,.content_knG7 a{text-decoration:underline}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:#0000;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{animation:.1s ease-in forwards a;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:#0000}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Container,.skipToContent_fXgn{z-index:calc(var(--ifm-z-index-fixed) + 1)}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@keyframes a{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{left:0;position:absolute;top:0;fill:currentColor;height:inherit;opacity:inherit;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:#0000 #0000 #0000 var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}#__docusaurus-base-url-issue-banner-container,.docSidebarContainer_YfHR,.navbarSearchContainer_Bca1:empty,.sidebarLogo_isFc,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}[data-theme=dark]:root{--docusaurus-collapse-button-bg:#ffffff0d;--docusaurus-collapse-button-bg-hover:#ffffff1a}.collapseSidebarButton_PEFL{display:none;margin:0}.iconExternalLink_nPIU{margin-left:.3rem}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.dropdownNavbarItemMobile_S0Fm{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.cardContainer_fWXF{--ifm-link-color:var(--ifm-color-emphasis-800);--ifm-link-hover-color:var(--ifm-color-emphasis-700);--ifm-link-hover-decoration:none;border:1px solid var(--ifm-color-emphasis-200);box-shadow:0 1.5px 3px 0 #00000026;transition:all var(--ifm-transition-fast) ease;transition-property:border,box-shadow}.cardContainer_fWXF:hover{border-color:var(--ifm-color-primary);box-shadow:0 3px 6px 0 #0003}.cardTitle_rnsV{font-size:1.2rem}.cardDescription_PWke{font-size:.8rem}.containsTaskList_mC6p{list-style:none}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{display:inline-block;height:1.6em;width:1.6em;fill:var(--ifm-alert-foreground-color)}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.title_kItE{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-leading)*1.25)}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{color:var(--ifm-color-content-secondary);font-size:.8rem;--ifm-breadcrumb-separator-size-multiplier:1}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{animation:1s linear infinite b;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes b{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:#ffd78e40;color:var(--docsearch-hit-color);padding:.09em 0}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}.lastUpdated_JAkA{text-align:right}.tocMobile_ITEo{display:none}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.navbarSearchContainer_Bca1{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.docItemCol_VOVn,.generatedIndexPage_vN6x{max-width:75%!important}.list_eTzJ article:nth-last-child(-n+2){margin-bottom:0!important}}@media (min-width:1416px){.main-wrapper{align-self:center;max-width:1400px;width:1400px}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block;width:max-content}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.docItemContainer_F8PC{padding:0 .3rem}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.downloadContainer_nNgj{flex-direction:column}.downloadCard_D_EY{max-width:none;width:auto}.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/js/01cb08ea.90a8ab9b.js b/assets/js/01cb08ea.90a8ab9b.js deleted file mode 100644 index b838622a..00000000 --- a/assets/js/01cb08ea.90a8ab9b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3747],{2264:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"myzrok/custom-domains/index","title":"Custom Domains","description":"Overview","source":"@site/../docs/myzrok/custom-domains/index.mdx","sourceDirName":"myzrok/custom-domains","slug":"/myzrok/custom-domains/","permalink":"/docs/myzrok/custom-domains/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/myzrok/custom-domains/index.mdx","tags":[],"version":"current","frontMatter":{"title":"Custom Domains"},"sidebar":"tutorialSidebar","previous":{"title":"myzrok","permalink":"/docs/category/myzrok"}}');var r=n(4848),i=n(8453);const s={title:"Custom Domains"},a=void 0,d={},c=[{value:"Overview",id:"overview",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Create Your Custom Domain",id:"create-your-custom-domain",level:3},{value:"Creating DNS Records",id:"creating-dns-records",level:3},{value:"Finalizing Your Custom Domain",id:"finalizing-your-custom-domain",level:3},{value:"Start Sharing!",id:"start-sharing",level:3}];function h(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"myzrok.io"})," is a hosted zrok-as-a-service offering that provides a way for you bring a custom DNS name for zrok shares.\nFor example, let's say you own the domain ",(0,r.jsx)(o.code,{children:"foo.example.io"}),", you can leverage zrok custom domains to\ncreate ephemeral shares such as: ",(0,r.jsx)(o.code,{children:"https://vw8jbg4ijz5g.foo.example.io"}),"\nor ",(0,r.jsx)(o.a,{href:"/docs/concepts/sharing-reserved",children:"reserved shares"})," such as ",(0,r.jsx)(o.code,{children:"https://myshare.foo.example.io"}),"."]}),"\n",(0,r.jsxs)(o.p,{children:["Custom domains require a Pro subscription with ",(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"myzrok.io"}),".\nIf you don't already have an account, you can sign up for one ",(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"here"}),"."]}),"\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"myzrok.io"})," provides a guided setup with just a few easy steps!"]}),"\n",(0,r.jsxs)(o.ol,{children:["\n",(0,r.jsx)(o.li,{children:"Bring your own custom domain name"}),"\n",(0,r.jsx)(o.li,{children:"Create DNS records for certificate validation and traffic routing"}),"\n",(0,r.jsx)(o.li,{children:"Wait for zrok to validate your records and finalize configuration"}),"\n",(0,r.jsx)(o.li,{children:"Start sharing!"}),"\n"]}),"\n",(0,r.jsx)(o.p,{children:"Detailed setup instructions are documented below."}),"\n",(0,r.jsx)(o.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsx)(o.admonition,{type:"note",children:(0,r.jsxs)(o.p,{children:["In order to create a custom domain in zrok, ",(0,r.jsx)(o.strong,{children:"you must already own the domain you want to use."})]})}),"\n",(0,r.jsx)(o.p,{children:"During the setup process you will need to create DNS records to validate ownership and to allow a certificate to be issued\non behalf of your domain. Once you have your domain registered, you can begin the process of setting up your custom\ndomain with zrok."}),"\n",(0,r.jsx)(o.h3,{id:"create-your-custom-domain",children:"Create Your Custom Domain"}),"\n",(0,r.jsx)(o.p,{children:"Log into the myzrok console and access the domains page by clicking on the globe icon in the left navigation menu."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_domains_page",src:n(2956).A+"",width:"1022",height:"581"})}),"\n",(0,r.jsx)(o.p,{children:"Click the CREATE button on the top right of the page to get started.\nWhen you click the create button you\u2019ll be presented with a form to allow you to enable your custom domain.\nEnter your domain into the form field and click CREATE. This will begin the process for setting up your custom domain.\nA new managed TLS certificate will be created to host traffic on your domain's behalf."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_add_domain",src:n(675).A+"",width:"844",height:"344"})}),"\n",(0,r.jsxs)(o.p,{children:["This may take a few minutes.\nYou may close the form at this time and come back when your domain is ",(0,r.jsx)(o.em,{children:"pending validation."}),"\nOnce your certificate is ready, you\u2019ll be presented with instructions on how to set up your DNS records."]}),"\n",(0,r.jsx)(o.h3,{id:"creating-dns-records",children:"Creating DNS Records"}),"\n",(0,r.jsx)(o.p,{children:"zrok will host and manage a TLS certificate for the custom domain on your behalf.\nThis process requires a DNS validation record to be created in order to prove ownership of the domain.\nFollow the prompts in the UI to create a CNAME DNS record with the name and value specified in the UI."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_add_cname",src:n(8881).A+"",width:"847",height:"402"})}),"\n",(0,r.jsx)(o.p,{children:"Next, create an A record to direct all DNS requests for your domain to a set of static IPs that are hosted by zrok."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_add_a_record",src:n(6212).A+"",width:"830",height:"527"})}),"\n",(0,r.jsx)(o.p,{children:"After you\u2019ve created your records, you can verify that they are configured properly using the instructions provided in the form."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_verify_dns",src:n(1752).A+"",width:"829",height:"528"})}),"\n",(0,r.jsxs)(o.p,{children:["If the ",(0,r.jsx)(o.code,{children:"nslookup"})," command returns the IP addresses supplied for the A-record entry, then DNS for your domain is resolving properly."]}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{children:"nslookup test.foo.example.io\nServer:\t\t192.168.86.194\nAddress:\t192.168.86.194#53\n\nNon-authoritative answer:\nName:\ttest.foo.example.io\nAddress: 99.83.220.186\nName:\ttest.foo.example.io\nAddress: 52.223.6.108\n"})}),"\n",(0,r.jsx)(o.p,{children:"Once you have created your DNS records, it will take zrok a few minutes to validate that they exist.\nYou can safely close the form until your certificate has been issued."}),"\n",(0,r.jsx)(o.h3,{id:"finalizing-your-custom-domain",children:"Finalizing Your Custom Domain"}),"\n",(0,r.jsx)(o.p,{children:"After your records have been validated and your certificate has been issued, click the FINALIZE button within 72 hours to complete your custom domain setup."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_finalize",src:n(5101).A+"",width:"818",height:"224"})}),"\n",(0,r.jsx)(o.p,{children:"From here, myzrok.io will complete the last few steps of creating your custom domain.\nThis should only take a minute, but if you need to close the form you can find the instructions on how to share your frontend when you return."}),"\n",(0,r.jsx)(o.h3,{id:"start-sharing",children:"Start Sharing!"}),"\n",(0,r.jsx)(o.p,{children:"Once the Finalize stage has completed, you can start sharing with your custom DNS."}),"\n",(0,r.jsxs)(o.p,{children:["In order to create shares that utilize your custom DNS, you will need to specify the ",(0,r.jsx)(o.code,{children:"--frontend"})," flag when creating a share,\nor update your environment configuration to use this new frontend by default."]}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{children:"zrok share public --frontend foo-example--goPIhgtJtz\n"})}),"\n",(0,r.jsx)(o.p,{children:"You can set the custom frontend as the environment default by running:"}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{children:"zrok config set defaultFrontend foo-example--goPIhgtJtz\n"})}),"\n",(0,r.jsxs)(o.p,{children:["To validate which frontend is being used, use the ",(0,r.jsx)(o.code,{children:"zrok status"})," command, which will identify the default frontend being used:"]}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"zrok_status",src:n(2679).A+"",width:"404",height:"220"})})]})}function l(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},6212:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_add_a_record-550b91f870f6e1df4903220bfa78ae25.png"},8881:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_add_cname-3cbbf4526443142174bab2d22224764a.png"},675:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_add_domain-bcf860ac29b46cfe5981db391bcbc521.png"},2956:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_domains_page-6d92a9076e1bca9640eb301eb6716e5f.png"},5101:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_finalize-71899efbaf429d9be596363607550730.png"},1752:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_verify_dns-2f721e1a96f56f4f09f3b0b16ea8c1c5.png"},2679:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/zrok_status-0ce131c6d8bba0df50b0f2a577707f0a.png"},8453:(e,o,n)=>{n.d(o,{R:()=>s,x:()=>a});var t=n(6540);const r={},i=t.createContext(r);function s(e){const o=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/01cb08ea.95be884d.js b/assets/js/01cb08ea.95be884d.js new file mode 100644 index 00000000..ff21885c --- /dev/null +++ b/assets/js/01cb08ea.95be884d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3747],{2264:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"myzrok/custom-domains/index","title":"Custom Domains","description":"Overview","source":"@site/../docs/myzrok/custom-domains/index.mdx","sourceDirName":"myzrok/custom-domains","slug":"/myzrok/custom-domains/","permalink":"/docs/next/myzrok/custom-domains/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/myzrok/custom-domains/index.mdx","tags":[],"version":"current","frontMatter":{"title":"Custom Domains"},"sidebar":"tutorialSidebar","previous":{"title":"myzrok","permalink":"/docs/next/category/myzrok"}}');var r=n(4848),i=n(8453);const s={title:"Custom Domains"},a=void 0,d={},c=[{value:"Overview",id:"overview",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Create Your Custom Domain",id:"create-your-custom-domain",level:3},{value:"Creating DNS Records",id:"creating-dns-records",level:3},{value:"Finalizing Your Custom Domain",id:"finalizing-your-custom-domain",level:3},{value:"Start Sharing!",id:"start-sharing",level:3}];function h(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"myzrok.io"})," is a hosted zrok-as-a-service offering that provides a way for you bring a custom DNS name for zrok shares.\nFor example, let's say you own the domain ",(0,r.jsx)(o.code,{children:"foo.example.io"}),", you can leverage zrok custom domains to\ncreate ephemeral shares such as: ",(0,r.jsx)(o.code,{children:"https://vw8jbg4ijz5g.foo.example.io"}),"\nor ",(0,r.jsx)(o.a,{href:"/docs/next/concepts/sharing-reserved",children:"reserved shares"})," such as ",(0,r.jsx)(o.code,{children:"https://myshare.foo.example.io"}),"."]}),"\n",(0,r.jsxs)(o.p,{children:["Custom domains require a Pro subscription with ",(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"myzrok.io"}),".\nIf you don't already have an account, you can sign up for one ",(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"here"}),"."]}),"\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"myzrok.io"})," provides a guided setup with just a few easy steps!"]}),"\n",(0,r.jsxs)(o.ol,{children:["\n",(0,r.jsx)(o.li,{children:"Bring your own custom domain name"}),"\n",(0,r.jsx)(o.li,{children:"Create DNS records for certificate validation and traffic routing"}),"\n",(0,r.jsx)(o.li,{children:"Wait for zrok to validate your records and finalize configuration"}),"\n",(0,r.jsx)(o.li,{children:"Start sharing!"}),"\n"]}),"\n",(0,r.jsx)(o.p,{children:"Detailed setup instructions are documented below."}),"\n",(0,r.jsx)(o.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsx)(o.admonition,{type:"note",children:(0,r.jsxs)(o.p,{children:["In order to create a custom domain in zrok, ",(0,r.jsx)(o.strong,{children:"you must already own the domain you want to use."})]})}),"\n",(0,r.jsx)(o.p,{children:"During the setup process you will need to create DNS records to validate ownership and to allow a certificate to be issued\non behalf of your domain. Once you have your domain registered, you can begin the process of setting up your custom\ndomain with zrok."}),"\n",(0,r.jsx)(o.h3,{id:"create-your-custom-domain",children:"Create Your Custom Domain"}),"\n",(0,r.jsx)(o.p,{children:"Log into the myzrok console and access the domains page by clicking on the globe icon in the left navigation menu."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_domains_page",src:n(2956).A+"",width:"1022",height:"581"})}),"\n",(0,r.jsx)(o.p,{children:"Click the CREATE button on the top right of the page to get started.\nWhen you click the create button you\u2019ll be presented with a form to allow you to enable your custom domain.\nEnter your domain into the form field and click CREATE. This will begin the process for setting up your custom domain.\nA new managed TLS certificate will be created to host traffic on your domain's behalf."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_add_domain",src:n(675).A+"",width:"844",height:"344"})}),"\n",(0,r.jsxs)(o.p,{children:["This may take a few minutes.\nYou may close the form at this time and come back when your domain is ",(0,r.jsx)(o.em,{children:"pending validation."}),"\nOnce your certificate is ready, you\u2019ll be presented with instructions on how to set up your DNS records."]}),"\n",(0,r.jsx)(o.h3,{id:"creating-dns-records",children:"Creating DNS Records"}),"\n",(0,r.jsx)(o.p,{children:"zrok will host and manage a TLS certificate for the custom domain on your behalf.\nThis process requires a DNS validation record to be created in order to prove ownership of the domain.\nFollow the prompts in the UI to create a CNAME DNS record with the name and value specified in the UI."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_add_cname",src:n(8881).A+"",width:"847",height:"402"})}),"\n",(0,r.jsx)(o.p,{children:"Next, create an A record to direct all DNS requests for your domain to a set of static IPs that are hosted by zrok."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_add_a_record",src:n(6212).A+"",width:"830",height:"527"})}),"\n",(0,r.jsx)(o.p,{children:"After you\u2019ve created your records, you can verify that they are configured properly using the instructions provided in the form."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_verify_dns",src:n(1752).A+"",width:"829",height:"528"})}),"\n",(0,r.jsxs)(o.p,{children:["If the ",(0,r.jsx)(o.code,{children:"nslookup"})," command returns the IP addresses supplied for the A-record entry, then DNS for your domain is resolving properly."]}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{children:"nslookup test.foo.example.io\nServer:\t\t192.168.86.194\nAddress:\t192.168.86.194#53\n\nNon-authoritative answer:\nName:\ttest.foo.example.io\nAddress: 99.83.220.186\nName:\ttest.foo.example.io\nAddress: 52.223.6.108\n"})}),"\n",(0,r.jsx)(o.p,{children:"Once you have created your DNS records, it will take zrok a few minutes to validate that they exist.\nYou can safely close the form until your certificate has been issued."}),"\n",(0,r.jsx)(o.h3,{id:"finalizing-your-custom-domain",children:"Finalizing Your Custom Domain"}),"\n",(0,r.jsx)(o.p,{children:"After your records have been validated and your certificate has been issued, click the FINALIZE button within 72 hours to complete your custom domain setup."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_finalize",src:n(5101).A+"",width:"818",height:"224"})}),"\n",(0,r.jsx)(o.p,{children:"From here, myzrok.io will complete the last few steps of creating your custom domain.\nThis should only take a minute, but if you need to close the form you can find the instructions on how to share your frontend when you return."}),"\n",(0,r.jsx)(o.h3,{id:"start-sharing",children:"Start Sharing!"}),"\n",(0,r.jsx)(o.p,{children:"Once the Finalize stage has completed, you can start sharing with your custom DNS."}),"\n",(0,r.jsxs)(o.p,{children:["In order to create shares that utilize your custom DNS, you will need to specify the ",(0,r.jsx)(o.code,{children:"--frontend"})," flag when creating a share,\nor update your environment configuration to use this new frontend by default."]}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{children:"zrok share public --frontend foo-example--goPIhgtJtz\n"})}),"\n",(0,r.jsx)(o.p,{children:"You can set the custom frontend as the environment default by running:"}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{children:"zrok config set defaultFrontend foo-example--goPIhgtJtz\n"})}),"\n",(0,r.jsxs)(o.p,{children:["To validate which frontend is being used, use the ",(0,r.jsx)(o.code,{children:"zrok status"})," command, which will identify the default frontend being used:"]}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"zrok_status",src:n(2679).A+"",width:"404",height:"220"})})]})}function l(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},6212:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_add_a_record-550b91f870f6e1df4903220bfa78ae25.png"},8881:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_add_cname-3cbbf4526443142174bab2d22224764a.png"},675:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_add_domain-bcf860ac29b46cfe5981db391bcbc521.png"},2956:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_domains_page-6d92a9076e1bca9640eb301eb6716e5f.png"},5101:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_finalize-71899efbaf429d9be596363607550730.png"},1752:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_verify_dns-2f721e1a96f56f4f09f3b0b16ea8c1c5.png"},2679:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/zrok_status-0ce131c6d8bba0df50b0f2a577707f0a.png"},8453:(e,o,n)=>{n.d(o,{R:()=>s,x:()=>a});var t=n(6540);const r={},i=t.createContext(r);function s(e){const o=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/033e8fc8.c31fdf0c.js b/assets/js/033e8fc8.c31fdf0c.js new file mode 100644 index 00000000..a1544a36 --- /dev/null +++ b/assets/js/033e8fc8.c31fdf0c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6475],{2729:(e,s,i)=>{i.r(s),i.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"guides/self-hosting/self-service-invite","title":"Invitations","description":"This is how to set up self-service invitations for your users to get an account on your self-hosted zrok instance.","source":"@site/versioned_docs/version-0.4/guides/self-hosting/self-service-invite.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/self-service-invite","permalink":"/docs/guides/self-hosting/self-service-invite","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/self-service-invite.mdx","tags":[],"version":"0.4","frontMatter":{"title":"Invitations"},"sidebar":"tutorialSidebar","previous":{"title":"Instance Config","permalink":"/docs/guides/self-hosting/instance-configuration"},"next":{"title":"Drives","permalink":"/docs/guides/drives"}}');var t=i(4848),o=i(8453);const r={title:"Invitations"},c=void 0,l={},a=[{value:"Overview",id:"overview",level:2},{value:"The Self-Service User Experience",id:"the-self-service-user-experience",level:2},{value:"How it Works",id:"how-it-works",level:2}];function d(e){const s={code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"This is how to set up self-service invitations for your users to get an account on your self-hosted zrok instance."}),"\n",(0,t.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["You can create user accounts directly with the ",(0,t.jsx)(s.code,{children:"zrok admin create account"})," CLI or API instead of inviting them."]}),"\n",(0,t.jsx)(s.li,{children:"You can welcome users to invite themselves via email."}),"\n",(0,t.jsx)(s.li,{children:"To enable self-service invitations you must also configure the controller to send email."}),"\n",(0,t.jsx)(s.li,{children:"You can require an invitation token if you want to restrict self-service."}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"the-self-service-user-experience",children:"The Self-Service User Experience"}),"\n",(0,t.jsx)(s.p,{children:"This is what your users will do."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"zrok invite\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-buttonless",metastring:'title="Output"',children:"enter and confirm your email address...\n\n> user@domain.com\n> user@domain.com\n\n[ Submit ]\n\ninvitation sent to 'user@domain.com'!\n"})}),"\n",(0,t.jsx)(s.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.code,{children:"zrok invite"})," command presents a small form that allows you to enter (and then confirm) your email address. Tabbing to the ",(0,t.jsx)(s.code,{children:"[ Submit ]"})," button will start the invitation process."]}),"\n",(0,t.jsxs)(s.p,{children:["Next, check the email where you sent the invite. You should receive a message asking you to click a link to create your ",(0,t.jsx)(s.code,{children:"zrok"})," account. When you click that link, you will be brought to a web page that will allow you to set a password for your new account."]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Enter a Password",src:i(8083).A+"",width:"1791",height:"1362"})}),"\n",(0,t.jsxs)(s.p,{children:["Enter a password and its confirmation, and click the ",(0,t.jsx)(s.code,{children:"Register Account"})," button. You'll see the following:"]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Successful Registration",src:i(4159).A+"",width:"1791",height:"1369"})}),"\n",(0,t.jsxs)(s.p,{children:['For now, we\'ll ignore the "enable your shell for zrok" section. Just click the ',(0,t.jsx)(s.code,{children:"zrok web portal"})," link:"]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Web Login",src:i(6658).A+"",width:"1791",height:"1362"})}),"\n",(0,t.jsxs)(s.p,{children:["After clicking the ",(0,t.jsx)(s.code,{children:"Log In"})," button, you'll be brought into the ",(0,t.jsx)(s.code,{children:"zrok"})," ",(0,t.jsx)(s.em,{children:"web console"}),":"]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Web Console; Empty",src:i(3824).A+"",width:"1791",height:"1362"})}),"\n",(0,t.jsxs)(s.p,{children:["Congratulations! Your ",(0,t.jsx)(s.code,{children:"zrok"})," account is ready to go!"]})]})}function h(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},4159:(e,s,i)=>{i.d(s,{A:()=>n});const n=i.p+"assets/images/zrok_registration_success-05e7e328284f6dc38cd993322698d38b.png"},8083:(e,s,i)=>{i.d(s,{A:()=>n});const n=i.p+"assets/images/zrok_verify-22a26d401b9a77a4278f3c0f54d2a981.png"},3824:(e,s,i)=>{i.d(s,{A:()=>n});const n=i.p+"assets/images/zrok_web_console_empty-cce147eaf8e7bc83abe556336a4aea98.png"},6658:(e,s,i)=>{i.d(s,{A:()=>n});const n=i.p+"assets/images/zrok_web_login-a6161cc79e66932fab76994bdfb8f9c1.png"},8453:(e,s,i)=>{i.d(s,{R:()=>r,x:()=>c});var n=i(6540);const t={},o=n.createContext(t);function r(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/07d0b302.de243ccc.js b/assets/js/07d0b302.de243ccc.js deleted file mode 100644 index ea93c4ae..00000000 --- a/assets/js/07d0b302.de243ccc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7499],{6793:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>l,frontMatter:()=>c,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"concepts/http","title":"Sharing HTTP Servers","description":"zrok can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you can use the zrok share command using the --backend-mode proxy flag.","source":"@site/../docs/concepts/http.md","sourceDirName":"concepts","slug":"/concepts/http","permalink":"/docs/concepts/http","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/http.md","tags":[],"version":"current","sidebarPosition":22,"frontMatter":{"sidebar_position":22},"sidebar":"tutorialSidebar","previous":{"title":"Reserved Shares","permalink":"/docs/concepts/sharing-reserved"},"next":{"title":"Sharing TCP and UDP Servers","permalink":"/docs/concepts/tunnels"}}');var o=t(4848),r=t(8453);const c={sidebar_position:22},i="Sharing HTTP Servers",d={},a=[];function h(e){const n={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"sharing-http-servers",children:"Sharing HTTP Servers"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"zrok"})," can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you can use the ",(0,o.jsx)(n.code,{children:"zrok share"})," command using the ",(0,o.jsx)(n.code,{children:"--backend-mode proxy"})," flag."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"--backend-mode proxy"})," is the default backend mode, so if you do not specify a ",(0,o.jsx)(n.code,{children:"--backend-mode"})," you will get the ",(0,o.jsx)(n.code,{children:"proxy"})," mode by default."]}),"\n",(0,o.jsxs)(n.p,{children:["If you have a web server running on ",(0,o.jsx)(n.code,{children:"localhost"})," that you want to expose to other users using ",(0,o.jsx)(n.code,{children:"zrok"}),", you can execute a command like the following:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"$ zrok share public localhost:8080\n"})}),"\n",(0,o.jsxs)(n.p,{children:["When you execute this command, you'll get a ",(0,o.jsx)(n.code,{children:"zrok"})," bridge like the following:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 http://cht7gj4g5pjf.share.zrok.io \u2502\u2502[PUBLIC] [PROXY]\u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,o.jsxs)(n.p,{children:["The URL shown at the top of the bridge shows the address where you can access your ",(0,o.jsx)(n.code,{children:"public"})," share."]}),"\n",(0,o.jsxs)(n.p,{children:["Hit ",(0,o.jsx)(n.code,{children:"CTRL-C"})," or ",(0,o.jsx)(n.code,{children:"q"})," in the bridge to exit it and delete the ",(0,o.jsx)(n.code,{children:"public"})," share."]})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var s=t(6540);const o={},r=s.createContext(o);function c(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/07d0b302.f677dc01.js b/assets/js/07d0b302.f677dc01.js new file mode 100644 index 00000000..98fef694 --- /dev/null +++ b/assets/js/07d0b302.f677dc01.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7499],{6793:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>l,frontMatter:()=>c,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"concepts/http","title":"Sharing HTTP Servers","description":"zrok can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you can use the zrok share command using the --backend-mode proxy flag.","source":"@site/../docs/concepts/http.md","sourceDirName":"concepts","slug":"/concepts/http","permalink":"/docs/next/concepts/http","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/http.md","tags":[],"version":"current","sidebarPosition":22,"frontMatter":{"sidebar_position":22},"sidebar":"tutorialSidebar","previous":{"title":"Reserved Shares","permalink":"/docs/next/concepts/sharing-reserved"},"next":{"title":"Sharing TCP and UDP Servers","permalink":"/docs/next/concepts/tunnels"}}');var o=t(4848),r=t(8453);const c={sidebar_position:22},i="Sharing HTTP Servers",d={},a=[];function h(e){const n={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"sharing-http-servers",children:"Sharing HTTP Servers"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"zrok"})," can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you can use the ",(0,o.jsx)(n.code,{children:"zrok share"})," command using the ",(0,o.jsx)(n.code,{children:"--backend-mode proxy"})," flag."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"--backend-mode proxy"})," is the default backend mode, so if you do not specify a ",(0,o.jsx)(n.code,{children:"--backend-mode"})," you will get the ",(0,o.jsx)(n.code,{children:"proxy"})," mode by default."]}),"\n",(0,o.jsxs)(n.p,{children:["If you have a web server running on ",(0,o.jsx)(n.code,{children:"localhost"})," that you want to expose to other users using ",(0,o.jsx)(n.code,{children:"zrok"}),", you can execute a command like the following:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"$ zrok share public localhost:8080\n"})}),"\n",(0,o.jsxs)(n.p,{children:["When you execute this command, you'll get a ",(0,o.jsx)(n.code,{children:"zrok"})," bridge like the following:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 http://cht7gj4g5pjf.share.zrok.io \u2502\u2502[PUBLIC] [PROXY]\u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,o.jsxs)(n.p,{children:["The URL shown at the top of the bridge shows the address where you can access your ",(0,o.jsx)(n.code,{children:"public"})," share."]}),"\n",(0,o.jsxs)(n.p,{children:["Hit ",(0,o.jsx)(n.code,{children:"CTRL-C"})," or ",(0,o.jsx)(n.code,{children:"q"})," in the bridge to exit it and delete the ",(0,o.jsx)(n.code,{children:"public"})," share."]})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var s=t(6540);const o={},r=s.createContext(o);function c(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0c1cdb3d.8ace8f3a.js b/assets/js/0c1cdb3d.8ace8f3a.js new file mode 100644 index 00000000..8210c535 --- /dev/null +++ b/assets/js/0c1cdb3d.8ace8f3a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6595],{6762:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"guides/docker-share/index","title":"Getting Started with Docker","description":"Overview","source":"@site/versioned_docs/version-0.4/guides/docker-share/index.mdx","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/","permalink":"/docs/guides/docker-share/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/docker-share/index.mdx","tags":[],"version":"0.4","frontMatter":{"title":"Getting Started with Docker"},"sidebar":"tutorialSidebar","previous":{"title":"Permission Modes","permalink":"/docs/guides/permission-modes"},"next":{"title":"Public Share","permalink":"/docs/guides/docker-share/docker_public_share_guide"}}');var t=r(4848),o=r(8453),i=r(4971);const c={title:"Getting Started with Docker"},a=void 0,l={},d=[{value:"Overview",id:"overview",level:2},{value:"Permanent Public Share",id:"permanent-public-share",level:2},{value:"Temporary Public Share",id:"temporary-public-share",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsxs)(n.p,{children:["To follow the guides in this section you will need ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["You have the option to enable a ",(0,t.jsx)(n.code,{children:"zrok"})," account on the Docker host and mount it on the container or you can use the provided Docker Compose project files (",(0,t.jsx)(n.code,{children:"compose.yml"}),") to enable a separate ",(0,t.jsx)(n.code,{children:"zrok"})," environment for each project."]}),"\n",(0,t.jsxs)(n.p,{children:["This page provides ",(0,t.jsx)(n.code,{children:"docker"})," and ",(0,t.jsx)(n.code,{children:"docker compose"})," examples of mounting the host's ",(0,t.jsx)(n.code,{children:"zrok"})," environment on the container. You'll need to first ",(0,t.jsx)(n.a,{href:"/docs/getting-started/#installing-the-zrok-command",children:"enable zrok on the Docker host"})," to use this approach."]}),"\n",(0,t.jsx)(n.h2,{id:"permanent-public-share",children:"Permanent Public Share"}),"\n",(0,t.jsxs)(n.p,{children:["Let's say you have a ",(0,t.jsx)(n.code,{children:"compose.yml"})," file that defines a web app known within the project's bridge network as ",(0,t.jsx)(n.code,{children:"https://myapp:8080"})," and you want to publish it as a reliable, public site."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Reserve a subdomain by running ",(0,t.jsx)(n.code,{children:'zrok reserve public --unique-name "myapp" https://myapp:8080'})," on the Docker host."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Merge this YAML with ",(0,t.jsx)(n.code,{children:"compose.yml"})," or save it in the same directory as ",(0,t.jsx)(n.code,{children:"compose.override.yml"})," to let ",(0,t.jsx)(n.code,{children:"docker compose up"})," merge it for you."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'services:\n zrok:\n image: openziti/zrok\n restart: unless-stopped\n user: "${UID}"\n volumes:\n - ${HOME}/.zrok:/home/ziggy/.zrok\n environment:\n PFXLOG_NO_JSON: "true"\n command: share reserved "myapp" --headless\n'})}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The reserved share will be available at ",(0,t.jsx)(n.code,{children:"https://myapp.share.zrok.io"})," each time the ",(0,t.jsx)(n.code,{children:"zrok"})," container starts up."]}),"\n",(0,t.jsx)(n.h2,{id:"temporary-public-share",children:"Temporary Public Share"}),"\n",(0,t.jsxs)(n.p,{children:["Let's say you have a web server running on the host's private network at ",(0,t.jsx)(n.code,{children:"https://10.11.12.13:8080"}),". With one additional ",(0,t.jsx)(n.code,{children:"docker"})," command, you can share the web server publicly as long as the ",(0,t.jsx)(n.code,{children:"zrok"})," container stays running."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="BASH"',children:'docker run \\\n --rm \\\n --network=host \\\n --volume ~/.zrok:/home/ziggy/.zrok \\\n --user "${UID:-1000}:${GID:-1000}" \\\n openziti/zrok share public \\\n --headless \\\n https://10.11.12.13:8080\n'})}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsx)("summary",{children:"PowerShell"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-powershell",children:'docker.exe run `\n --rm `\n --network "host" `\n --volume "${env:USERPROFILE}\\.zrok:/.zrok" `\n --user "1000" `\n openziti/zrok share public `\n --headless `\n https://10.11.12.13:8080\n'})})]}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsx)("summary",{children:"Command Prompt (batch)"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-cmd",children:'docker.exe run ^\n --rm ^\n --network "host" ^\n --volume "%USERPROFILE%\\.zrok:/.zrok" ^\n --user "1000" ^\n openziti/zrok share public ^\n --headless ^\n https://10.11.12.13:8080\n'})})]}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsx)("summary",{children:"Windows Subsystem for Linux (WSL)"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'docker run \\\n --rm \\\n --network "host" \\\n --volume "/mnt/c/Users/$(powershell.exe -Command \'Write-Output $env:USERNAME\' | tr -d \'\\r\')/.zrok:/home/ziggy/.zrok" \\\n --user "${UID:-1000}:${GID:-1000}" \\\n openziti/zrok share public \\\n --headless \\\n https://10.11.12.13:8080\n'})})]}),"\n",(0,t.jsx)(n.p,{children:"The public share URL appears near the beginning of the container's log."}),"\n",(0,t.jsx)(n.p,{children:"Let's break down those options and arguments."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--rm"})," don't save this container because it's providing a temporary public share that's destroyed when the container stops"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--network=host"})," shares the host's network with the container so that the container can reach the web server directly. This is always necessary when the web server is listening only on the host's loopback interface, e.g., ",(0,t.jsx)(n.code,{children:"https://::1:8080"}),", and may not be strictly necessary if the target is routeable from the default Docker bridge."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--volume ~/.zrok:/home/ziggy/.zrok"})," mounts the ",(0,t.jsx)(n.code,{children:"zrok"})," configuration from the Docker host into the container."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'--user "${UID:-1000}:${GID:-1000}"'})," sets the container's user to the current user on the Docker host to avoid permission issues with reading the mounted ",(0,t.jsx)(n.code,{children:"zrok"})," configuration (defaults to ",(0,t.jsx)(n.code,{children:"1000:1000"}),")."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"openziti/zrok"})," is the ",(0,t.jsx)(n.code,{children:"zrok"})," Docker image."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"share public"})," is the ",(0,t.jsx)(n.code,{children:"zrok"})," command to share the target publicly until zrok exits."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--headless"})," runs the ",(0,t.jsx)(n.code,{children:"zrok"})," command without the interactive terminal UI."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"https://10.11.12.13:8080"})," is the target web server to share."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},4971:(e,n,r)=>{r.d(n,{A:()=>k});var s=r(6540),t=r(8215),o=r(5066),i=r(3427),c=r(2303),a=r(1422);const l={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};var d=r(4848);function h(e){return!!e&&("SUMMARY"===e.tagName||h(e.parentElement))}function u(e,n){return!!e&&(e===n||u(e.parentElement,n))}function p(e){let{summary:n,children:r,...t}=e;(0,i.A)().collectAnchor(t.id);const p=(0,c.A)(),m=(0,s.useRef)(null),{collapsed:x,setCollapsed:j}=(0,a.u)({initialState:!t.open}),[k,g]=(0,s.useState)(t.open),v=s.isValidElement(n)?n:(0,d.jsx)("summary",{children:n??"Details"});return(0,d.jsxs)("details",{...t,ref:m,open:k,"data-collapsed":x,className:(0,o.A)(l.details,p&&l.isBrowser,t.className),onMouseDown:e=>{h(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const n=e.target;h(n)&&u(n,m.current)&&(e.preventDefault(),x?(j(!1),g(!0)):j(!0))},children:[v,(0,d.jsx)(a.N,{lazy:!1,collapsed:x,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{j(e),g(!e)},children:(0,d.jsx)("div",{className:l.collapsibleContent,children:r})})]})}const m={details:"details_b_Ee"},x="alert alert--info";function j(e){let{...n}=e;return(0,d.jsx)(p,{...n,className:(0,t.A)(x,m.details,n.className)})}function k(e){const n=s.Children.toArray(e.children),r=n.find((e=>s.isValidElement(e)&&"summary"===e.type)),t=(0,d.jsx)(d.Fragment,{children:n.filter((e=>e!==r))});return(0,d.jsx)(j,{...e,summary:r,children:t})}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>c});var s=r(6540);const t={},o=s.createContext(t);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0c66edb9.2c9d24dc.js b/assets/js/0c66edb9.2c9d24dc.js new file mode 100644 index 00000000..18bfe009 --- /dev/null +++ b/assets/js/0c66edb9.2c9d24dc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7216],{4291:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>t,default:()=>l,frontMatter:()=>a,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"guides/permission-modes","title":"Permission Modes","description":"Shares created in zrok v0.4.26 and newer now include a choice of permission mode.","source":"@site/../docs/guides/permission-modes.md","sourceDirName":"guides","slug":"/guides/permission-modes","permalink":"/docs/next/guides/permission-modes","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/permission-modes.md","tags":[],"version":"current","sidebarPosition":22,"frontMatter":{"sidebar_position":22,"sidebar_label":"Permission Modes"},"sidebar":"tutorialSidebar","previous":{"title":"frontdoor","permalink":"/docs/next/guides/frontdoor"},"next":{"title":"Getting Started with Docker","permalink":"/docs/next/guides/docker-share/"}}');var o=n(4848),i=n(8453);const a={sidebar_position:22,sidebar_label:"Permission Modes"},t="Permission Modes",c={},d=[{value:"Creating a Share with Closed Permission Mode",id:"creating-a-share-with-closed-permission-mode",level:2},{value:"Adding and Removing Access Grants for Existing Shares",id:"adding-and-removing-access-grants-for-existing-shares",level:2},{value:"Limitations",id:"limitations",level:2}];function h(e){const s={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"permission-modes",children:"Permission Modes"})}),"\n",(0,o.jsxs)(s.p,{children:["Shares created in zrok ",(0,o.jsx)(s.code,{children:"v0.4.26"})," and newer now include a choice of ",(0,o.jsx)(s.em,{children:"permission mode"}),"."]}),"\n",(0,o.jsxs)(s.p,{children:["Shares created with zrok ",(0,o.jsx)(s.code,{children:"v0.4.25"})," and older were created using what is now called the ",(0,o.jsx)(s.em,{children:"open permission mode"}),". Whether ",(0,o.jsx)(s.em,{children:"public"})," or ",(0,o.jsx)(s.em,{children:"private"}),", these shares can be accessed by any user of the zrok service instance, as long as they know the ",(0,o.jsx)(s.em,{children:"share token"})," of the share. Effectively shares with the ",(0,o.jsx)(s.em,{children:"open permission mode"})," are accessible by any user of the zrok service instance."]}),"\n",(0,o.jsxs)(s.p,{children:["zrok now supports a ",(0,o.jsx)(s.em,{children:"closed permission mode"}),", which allows for more fine-grained control over which zrok users are allowed to privately access your shares using ",(0,o.jsx)(s.code,{children:"zrok access private"}),"."]}),"\n",(0,o.jsxs)(s.p,{children:["zrok defaults to continuing to create shares with the ",(0,o.jsx)(s.em,{children:"open permission mode"}),". This will likely change in a future release. We're leaving the default behavior in place to allow users a period of time to get comfortable with the new permission modes."]}),"\n",(0,o.jsx)(s.h2,{id:"creating-a-share-with-closed-permission-mode",children:"Creating a Share with Closed Permission Mode"}),"\n",(0,o.jsxs)(s.p,{children:["Adding the ",(0,o.jsx)(s.code,{children:"--closed"})," flag to the ",(0,o.jsx)(s.code,{children:"zrok share"})," or ",(0,o.jsx)(s.code,{children:"zrok reserve"})," commands will create shares using the ",(0,o.jsx)(s.em,{children:"closed permission mode"}),":"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok share private --headless --closed -b web .\n[ 0.066] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private 0vzwzodf0c7g\n"})}),"\n",(0,o.jsxs)(s.p,{children:["By default any environment owned by the account that created the share is ",(0,o.jsx)(s.em,{children:"allowed"})," to access the new share. But a user trying to access the share from an environment owned by a different account will enounter the following error message:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok access private 0vzwzodf0c7g\n[ERROR]: unable to access ([POST /access][401] accessUnauthorized)\n"})}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"zrok share"})," and ",(0,o.jsx)(s.code,{children:"zrok reserve"})," commands now include an ",(0,o.jsx)(s.code,{children:"--access-grant"})," flag, which allows you to specify additional zrok accounts that are allowed to access your shares:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok share private --headless --closed --access-grant anotheruser@test.com -b web .\n[ 0.062] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private y6h4at5xvn6o\n"})}),"\n",(0,o.jsxs)(s.p,{children:["And now ",(0,o.jsx)(s.code,{children:"anotheruser@test.com"})," will be allowed to access the share:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok access private --headless y6h4at5xvn6o\n[ 0.049] INFO main.(*accessPrivateCommand).run: allocated frontend 'VyvrJihAOEHD'\n[ 0.051] INFO main.(*accessPrivateCommand).run: access the zrok share at the following endpoint: http://127.0.0.1:9191\n"})}),"\n",(0,o.jsx)(s.h2,{id:"adding-and-removing-access-grants-for-existing-shares",children:"Adding and Removing Access Grants for Existing Shares"}),"\n",(0,o.jsxs)(s.p,{children:["If you've created a share (either reserved or ephemeral) and you forgot to include an access grant, or want to remove an access grant that was mistakenly added, you can use the ",(0,o.jsx)(s.code,{children:"zrok modify share"})," command to make the adjustments:"]}),"\n",(0,o.jsx)(s.p,{children:"Create a share:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok share private --headless --closed -b web .\n[ 0.064] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private s4czjylwk7wa\n"})}),"\n",(0,o.jsx)(s.p,{children:"In another shell in the same environment you can execute:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok modify share s4czjylwk7wa --add-access-grant anotheruser@test.com\nupdated\n"})}),"\n",(0,o.jsx)(s.p,{children:"And to remove the grant:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok modify share s4czjylwk7wa --remove-access-grant anotheruser@test.com\nupdated\n"})}),"\n",(0,o.jsx)(s.h2,{id:"limitations",children:"Limitations"}),"\n",(0,o.jsxs)(s.p,{children:["As of ",(0,o.jsx)(s.code,{children:"v0.4.26"})," there is currently no way to ",(0,o.jsx)(s.em,{children:"list"})," the current access grants. This will be addressed shortly in a subsequent update."]})]})}function l(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>t});var r=n(6540);const o={},i=r.createContext(o);function a(e){const s=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0c66edb9.a1604a49.js b/assets/js/0c66edb9.a1604a49.js deleted file mode 100644 index b48f8391..00000000 --- a/assets/js/0c66edb9.a1604a49.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7216],{4291:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>t,default:()=>l,frontMatter:()=>a,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"guides/permission-modes","title":"Permission Modes","description":"Shares created in zrok v0.4.26 and newer now include a choice of permission mode.","source":"@site/../docs/guides/permission-modes.md","sourceDirName":"guides","slug":"/guides/permission-modes","permalink":"/docs/guides/permission-modes","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/permission-modes.md","tags":[],"version":"current","sidebarPosition":22,"frontMatter":{"sidebar_position":22,"sidebar_label":"Permission Modes"},"sidebar":"tutorialSidebar","previous":{"title":"frontdoor","permalink":"/docs/guides/frontdoor"},"next":{"title":"Getting Started with Docker","permalink":"/docs/guides/docker-share/"}}');var o=n(4848),i=n(8453);const a={sidebar_position:22,sidebar_label:"Permission Modes"},t="Permission Modes",c={},d=[{value:"Creating a Share with Closed Permission Mode",id:"creating-a-share-with-closed-permission-mode",level:2},{value:"Adding and Removing Access Grants for Existing Shares",id:"adding-and-removing-access-grants-for-existing-shares",level:2},{value:"Limitations",id:"limitations",level:2}];function h(e){const s={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"permission-modes",children:"Permission Modes"})}),"\n",(0,o.jsxs)(s.p,{children:["Shares created in zrok ",(0,o.jsx)(s.code,{children:"v0.4.26"})," and newer now include a choice of ",(0,o.jsx)(s.em,{children:"permission mode"}),"."]}),"\n",(0,o.jsxs)(s.p,{children:["Shares created with zrok ",(0,o.jsx)(s.code,{children:"v0.4.25"})," and older were created using what is now called the ",(0,o.jsx)(s.em,{children:"open permission mode"}),". Whether ",(0,o.jsx)(s.em,{children:"public"})," or ",(0,o.jsx)(s.em,{children:"private"}),", these shares can be accessed by any user of the zrok service instance, as long as they know the ",(0,o.jsx)(s.em,{children:"share token"})," of the share. Effectively shares with the ",(0,o.jsx)(s.em,{children:"open permission mode"})," are accessible by any user of the zrok service instance."]}),"\n",(0,o.jsxs)(s.p,{children:["zrok now supports a ",(0,o.jsx)(s.em,{children:"closed permission mode"}),", which allows for more fine-grained control over which zrok users are allowed to privately access your shares using ",(0,o.jsx)(s.code,{children:"zrok access private"}),"."]}),"\n",(0,o.jsxs)(s.p,{children:["zrok defaults to continuing to create shares with the ",(0,o.jsx)(s.em,{children:"open permission mode"}),". This will likely change in a future release. We're leaving the default behavior in place to allow users a period of time to get comfortable with the new permission modes."]}),"\n",(0,o.jsx)(s.h2,{id:"creating-a-share-with-closed-permission-mode",children:"Creating a Share with Closed Permission Mode"}),"\n",(0,o.jsxs)(s.p,{children:["Adding the ",(0,o.jsx)(s.code,{children:"--closed"})," flag to the ",(0,o.jsx)(s.code,{children:"zrok share"})," or ",(0,o.jsx)(s.code,{children:"zrok reserve"})," commands will create shares using the ",(0,o.jsx)(s.em,{children:"closed permission mode"}),":"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok share private --headless --closed -b web .\n[ 0.066] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private 0vzwzodf0c7g\n"})}),"\n",(0,o.jsxs)(s.p,{children:["By default any environment owned by the account that created the share is ",(0,o.jsx)(s.em,{children:"allowed"})," to access the new share. But a user trying to access the share from an environment owned by a different account will enounter the following error message:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok access private 0vzwzodf0c7g\n[ERROR]: unable to access ([POST /access][401] accessUnauthorized)\n"})}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"zrok share"})," and ",(0,o.jsx)(s.code,{children:"zrok reserve"})," commands now include an ",(0,o.jsx)(s.code,{children:"--access-grant"})," flag, which allows you to specify additional zrok accounts that are allowed to access your shares:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok share private --headless --closed --access-grant anotheruser@test.com -b web .\n[ 0.062] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private y6h4at5xvn6o\n"})}),"\n",(0,o.jsxs)(s.p,{children:["And now ",(0,o.jsx)(s.code,{children:"anotheruser@test.com"})," will be allowed to access the share:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok access private --headless y6h4at5xvn6o\n[ 0.049] INFO main.(*accessPrivateCommand).run: allocated frontend 'VyvrJihAOEHD'\n[ 0.051] INFO main.(*accessPrivateCommand).run: access the zrok share at the following endpoint: http://127.0.0.1:9191\n"})}),"\n",(0,o.jsx)(s.h2,{id:"adding-and-removing-access-grants-for-existing-shares",children:"Adding and Removing Access Grants for Existing Shares"}),"\n",(0,o.jsxs)(s.p,{children:["If you've created a share (either reserved or ephemeral) and you forgot to include an access grant, or want to remove an access grant that was mistakenly added, you can use the ",(0,o.jsx)(s.code,{children:"zrok modify share"})," command to make the adjustments:"]}),"\n",(0,o.jsx)(s.p,{children:"Create a share:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok share private --headless --closed -b web .\n[ 0.064] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private s4czjylwk7wa\n"})}),"\n",(0,o.jsx)(s.p,{children:"In another shell in the same environment you can execute:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok modify share s4czjylwk7wa --add-access-grant anotheruser@test.com\nupdated\n"})}),"\n",(0,o.jsx)(s.p,{children:"And to remove the grant:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok modify share s4czjylwk7wa --remove-access-grant anotheruser@test.com\nupdated\n"})}),"\n",(0,o.jsx)(s.h2,{id:"limitations",children:"Limitations"}),"\n",(0,o.jsxs)(s.p,{children:["As of ",(0,o.jsx)(s.code,{children:"v0.4.26"})," there is currently no way to ",(0,o.jsx)(s.em,{children:"list"})," the current access grants. This will be addressed shortly in a subsequent update."]})]})}function l(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>t});var r=n(6540);const o={},i=r.createContext(o);function a(e){const s=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0efac3c3.0e8dff20.js b/assets/js/0efac3c3.0e8dff20.js new file mode 100644 index 00000000..ca9969b0 --- /dev/null +++ b/assets/js/0efac3c3.0e8dff20.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8173],{898:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>u,default:()=>g,frontMatter:()=>p,metadata:()=>r,toc:()=>m});const r=JSON.parse('{"id":"guides/install/linux","title":"Install zrok in Linux","description":"Linux Binary","source":"@site/versioned_docs/version-0.4/guides/install/linux.mdx","sourceDirName":"guides/install","slug":"/guides/install/linux","permalink":"/docs/guides/install/linux","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/install/linux.mdx","tags":[],"version":"0.4","frontMatter":{"title":"Install zrok in Linux","sidebar_label":"Linux"},"sidebar":"tutorialSidebar","previous":{"title":"Install","permalink":"/docs/guides/install/"},"next":{"title":"macOS","permalink":"/docs/guides/install/macos"}}');var t=s(4848),i=s(8453),a=s(8151),o=s(595),l=s(1342),c=s(6559),d=s(3902);const p={title:"Install zrok in Linux",sidebar_label:"Linux"},u=void 0,h={},m=[{value:"Linux Binary",id:"linux-binary",level:2},{value:"Install zrok from the Repository",id:"install-zrok-from-the-repository",level:2}];function x(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"linux-binary",children:"Linux Binary"}),"\n",(0,t.jsx)(a.F,{children:(0,t.jsx)("div",{className:l.A.downloadContainer,children:(0,t.jsx)(o.A,{osName:"Linux",osLogo:"/img/logo-linux.svg"})})}),"\n",(0,t.jsxs)(n.p,{children:["Download the binary distribution for your Linux distribution's architecture or run the install script below to pick the correct CPU architecture automatically. For Intel and AMD 64-bit machines use the ",(0,t.jsx)(n.code,{children:"amd64"})," distribution. For Raspberry Pi use the ",(0,t.jsx)(n.code,{children:"arm64"})," distribution."]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsxs)("summary",{children:["Manually install in ",(0,t.jsx)(n.code,{children:"~/bin/zrok"})]}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Unarchive the distribution in a temporary directory."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"mkdir /tmp/zrok && tar -xf ./zrok*linux*.tar.gz -C /tmp/zrok\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the ",(0,t.jsx)(n.code,{children:"zrok"})," executable."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"mkdir -p ~/bin && install /tmp/zrok/zrok ~/bin/\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Add ",(0,t.jsx)(n.code,{children:"~/bin"})," to your shell's executable search path. Optionally add this to your ~/.zshenv to persist the change."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"PATH=~/bin:$PATH\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["With the ",(0,t.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,t.jsx)(n.code,{children:"zrok"})," command from your shell:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:" _ \n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | < \n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]})]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsxs)("summary",{children:["Script to install binary in ",(0,t.jsx)(n.code,{children:"/usr/local/bin/zrok"})]}),(0,t.jsx)(n.p,{children:"This script auto-selects the correct architecture and may be helpful for Raspberry Pi users."}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"cd $(mktemp -d);\n\nZROK_VERSION=$(\n curl -sSf https://api.github.com/repos/openziti/zrok/releases/latest \\\n | jq -r '.tag_name'\n);\n\ncase $(uname -m) in\n x86_64) GOXARCH=amd64\n ;;\n aarch64|arm64) GOXARCH=arm64\n ;;\n arm*) GOXARCH=armv7\n ;;\n *) echo \"ERROR: unknown arch '$(uname -m)'\" >&2\n exit 1\n ;;\nesac;\n\ncurl -sSfL \\\n \"https://github.com/openziti/zrok/releases/download/${ZROK_VERSION}/zrok_${ZROK_VERSION#v}_linux_${GOXARCH}.tar.gz\" \\\n | tar -xz -f -;\n\nsudo install -o root -g root ./zrok /usr/local/bin/;\n\nzrok version;\n"})})]}),"\n",(0,t.jsxs)(n.h2,{id:"install-zrok-from-the-repository",children:["Install ",(0,t.jsx)(n.code,{children:"zrok"})," from the Repository"]}),"\n",(0,t.jsxs)(n.p,{children:["We recommend that you install ",(0,t.jsx)(n.code,{children:"zrok"})," from the Linux package repository with the manual steps or the setup script. DEB and RPM packages are available for amd64, arm64, and armv7 architectures."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["Check out ",(0,t.jsx)(n.a,{href:"/docs/guides/frontdoor?os=Linux",children:"zrok frontdoor"})," for running ",(0,t.jsx)(n.code,{children:"zrok"})," as an always-on service."]})}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"Manually set up DEB repository"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"(set -euo pipefail;\n\ncurl -sSLf https://get.openziti.io/tun/package-repos.gpg \\\n| sudo gpg --dearmor --output /usr/share/keyrings/openziti.gpg;\nsudo chmod a+r /usr/share/keyrings/openziti.gpg;\n\nsudo tee /etc/apt/sources.list.d/openziti-release.list >/dev/null </dev/null <<\\EOF;\n[OpenZitiRelease]\nname=OpenZiti Release\nbaseurl=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch\nenabled=1\ngpgcheck=0\ngpgkey=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key\nrepo_gpgcheck=1\nEOF\n\nsudo dnf update;\nsudo dnf install zrok;\nzrok version;\n)\n"})})]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"Script to set up DEB or RPM repository"}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Download the zrok install script."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"curl -sSLfo ./zrok-install.bash https://get.openziti.io/install.bash\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Inspect the script to ensure it is suitable to run as root on your system."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"less ./zrok-install.bash\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Run the script as root to add the package repo and install the ",(0,t.jsx)(n.code,{children:"zrok"})," package."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"sudo bash ./zrok-install.bash zrok\n"})}),"\n"]}),"\n"]})]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"Ansible Playbook"}),(0,t.jsxs)(d.A,{title:"Set up package repository and install zrok",children:[c.A,"\n- name: Install zrok package\ngather_facts: false\nhosts: all \nbecome: true\ntasks:\n- name: Install zrok\n ansible.builtin.package:\n name: zrok\n state: present\n"]})]})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(x,{...e})}):x(e)}},8151:(e,n,s)=>{s.d(n,{F:()=>o,d:()=>a});var r=s(6540),t=s(4848);const i=(0,r.createContext)([]),a=()=>(0,r.useContext)(i),o=e=>{let{children:n}=e;const[s,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),a(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,t.jsx)(i.Provider,{value:s,children:n})}},3902:(e,n,s)=>{s.d(n,{A:()=>a});s(6540);var r=s(382),t=s(1432),i=s(4848);const a=e=>{let{title:n,children:s}=e;const a=s.map((e=>"string"==typeof e?e.trim():r.Ay.dump(e).trim())).join("\n\n");return(0,i.jsx)("div",{children:(0,i.jsx)(t.A,{language:"yaml",title:n,children:a})})}},595:(e,n,s)=>{s.d(n,{A:()=>l});s(6540);var r=s(8151),t=s(1342),i=s(5293),a=s(4848);const o=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:s,infoText:l,guideLink:c}=e;const{colorMode:d}=(0,i.G)(),p=(0,r.d)();console.log("Assets in DownloadCard:",p);const u=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),h=p.filter((e=>e.name.includes(u)));return console.log("Filtered assets for",n,"in DownloadCard:",h),(0,a.jsxs)("div",{className:t.A.downloadCard,children:[(0,a.jsx)("div",{className:t.A.imgContainer,children:(0,a.jsx)("img",{src:s,alt:`${n} logo`})}),(0,a.jsx)("h3",{children:n}),h.length>0&&(0,a.jsx)("ul",{children:h.map(((e,n)=>(0,a.jsx)("li",{className:t.A.downloadButtons,children:(0,a.jsx)("a",{href:e.url,className:t.A.downloadLinks,children:o(e.arch)})},n)))}),c&&(0,a.jsxs)("div",{className:t.A.cardFooter,children:[(0,a.jsx)("p",{children:l}),(0,a.jsx)("a",{href:c,children:"GUIDE"}),(0,a.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},6559:(e,n,s)=>{s.d(n,{A:()=>r});const r=[{name:"Set up zrok Package Repo",gather_facts:!0,hosts:"all",become:!0,tasks:[{name:"Set up apt repo",when:'ansible_os_family == "Debian"',block:[{name:"Install playbook dependencies","ansible.builtin.package":{name:["gnupg"],state:"present"}},{name:"Fetch armored pubkey","ansible.builtin.uri":{url:"https://get.openziti.io/tun/package-repos.gpg",return_content:"yes"},register:"armored_pubkey"},{name:"Dearmor pubkey","ansible.builtin.shell":'gpg --dearmor --output /usr/share/keyrings/openziti.gpg <<< "{{ armored_pubkey.content }}"\n',args:{creates:"/usr/share/keyrings/openziti.gpg",executable:"/bin/bash"}},{name:"Set pubkey filemode","ansible.builtin.file":{path:"/usr/share/keyrings/openziti.gpg",mode:"a+rX"}},{name:"Install OpenZiti repo deb source","ansible.builtin.copy":{dest:"/etc/apt/sources.list.d/openziti-release.list",content:"deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main\n"}},{name:"Refresh Repo Sources","ansible.builtin.apt":{update_cache:"yes",cache_valid_time:3600}}]},{name:"Set up yum repo",when:'ansible_os_family == "RedHat"',block:[{name:"Install OpenZiti repo rpm source","ansible.builtin.yum_repository":{name:"OpenZitiRelease",description:"OpenZiti Release",baseurl:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch",enabled:"yes",gpgkey:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key",repo_gpgcheck:"yes",gpgcheck:"no"}}]}]}]}}]); \ No newline at end of file diff --git a/assets/js/11b43341.ad70473c.js b/assets/js/11b43341.ad70473c.js new file mode 100644 index 00000000..79fff7ef --- /dev/null +++ b/assets/js/11b43341.ad70473c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2256],{7674:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"0.4","label":"0.4","banner":null,"badge":true,"noIndex":false,"className":"docs-version-0.4","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Getting Started","href":"/docs/getting-started","docId":"getting-started","unlisted":false},{"type":"category","label":"Concepts","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Private Shares","href":"/docs/concepts/sharing-private","docId":"concepts/sharing-private","unlisted":false},{"type":"link","label":"Public Shares","href":"/docs/concepts/sharing-public","docId":"concepts/sharing-public","unlisted":false},{"type":"link","label":"Reserved Shares","href":"/docs/concepts/sharing-reserved","docId":"concepts/sharing-reserved","unlisted":false},{"type":"link","label":"Sharing HTTP Servers","href":"/docs/concepts/http","docId":"concepts/http","unlisted":false},{"type":"link","label":"Sharing TCP and UDP Servers","href":"/docs/concepts/tunnels","docId":"concepts/tunnels","unlisted":false},{"type":"link","label":"Sharing Websites and Files","href":"/docs/concepts/files","docId":"concepts/files","unlisted":false},{"type":"link","label":"Open Source","href":"/docs/concepts/opensource","docId":"concepts/opensource","unlisted":false},{"type":"link","label":"Hosting","href":"/docs/concepts/hosting","docId":"concepts/hosting","unlisted":false}],"href":"/docs/concepts/"},{"type":"category","label":"Guides","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Install","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Linux","href":"/docs/guides/install/linux","docId":"guides/install/linux","unlisted":false},{"type":"link","label":"macOS","href":"/docs/guides/install/macos","docId":"guides/install/macos","unlisted":false},{"type":"link","label":"Windows","href":"/docs/guides/install/windows","docId":"guides/install/windows","unlisted":false}],"href":"/docs/guides/install/"},{"type":"link","label":"frontdoor","href":"/docs/guides/frontdoor","docId":"guides/frontdoor","unlisted":false},{"type":"link","label":"Permission Modes","href":"/docs/guides/permission-modes","docId":"guides/permission-modes","unlisted":false},{"type":"category","label":"Docker Share","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Public Share","href":"/docs/guides/docker-share/docker_public_share_guide","docId":"guides/docker-share/docker_public_share_guide","unlisted":false},{"type":"link","label":"Private Share","href":"/docs/guides/docker-share/docker_private_share_guide","docId":"guides/docker-share/docker_private_share_guide","unlisted":false}],"href":"/docs/guides/docker-share/"},{"type":"link","label":"Linux User Share","href":"/docs/guides/linux-user-share/","docId":"guides/linux-user-share/index","unlisted":false},{"type":"category","label":"Self Hosting","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Linux","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"NGINX TLS","href":"/docs/guides/self-hosting/linux/nginx","docId":"guides/self-hosting/linux/nginx","unlisted":false}],"href":"/docs/guides/self-hosting/linux/"},{"type":"link","label":"Interstitial Pages","href":"/docs/guides/self-hosting/interstitial-page","docId":"guides/self-hosting/interstitial-page","unlisted":false},{"type":"link","label":"Organizations","href":"/docs/guides/self-hosting/organizations","docId":"guides/self-hosting/organizations","unlisted":false},{"type":"link","label":"Personalized Frontend","href":"/docs/guides/self-hosting/personalized-frontend","docId":"guides/self-hosting/personalized-frontend","unlisted":false},{"type":"link","label":"Docker","href":"/docs/guides/self-hosting/docker","docId":"guides/self-hosting/docker","unlisted":false},{"type":"link","label":"Kubernetes","href":"/docs/guides/self-hosting/kubernetes","docId":"guides/self-hosting/kubernetes","unlisted":false},{"type":"category","label":"Metrics and Limits","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Configuring Metrics","href":"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics","docId":"guides/self-hosting/metrics-and-limits/configuring-metrics","unlisted":false},{"type":"link","label":"Configuring Limits","href":"/docs/guides/self-hosting/metrics-and-limits/configuring-limits","docId":"guides/self-hosting/metrics-and-limits/configuring-limits","unlisted":false}],"href":"/docs/category/metrics-and-limits"},{"type":"category","label":"OAuth","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"OAuth Public Frontend Configuration","href":"/docs/guides/self-hosting/oauth/configuring-oauth","docId":"guides/self-hosting/oauth/configuring-oauth","unlisted":false}],"href":"/docs/category/oauth"},{"type":"link","label":"Instance Config","href":"/docs/guides/self-hosting/instance-configuration","docId":"guides/self-hosting/instance-configuration","unlisted":false},{"type":"link","label":"Invitations","href":"/docs/guides/self-hosting/self-service-invite","docId":"guides/self-hosting/self-service-invite","unlisted":false}],"href":"/docs/category/self-hosting"},{"type":"link","label":"Drives","href":"/docs/guides/drives","docId":"guides/drives","unlisted":false},{"type":"link","label":"VPN","href":"/docs/guides/vpn/","docId":"guides/vpn/vpn","unlisted":false}],"href":"/docs/category/guides"},{"type":"category","label":"myzrok","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Custom Domains","href":"/docs/myzrok/custom-domains/","docId":"myzrok/custom-domains/index","unlisted":false}],"href":"/docs/category/myzrok"}]},"docs":{"concepts/files":{"id":"concepts/files","title":"Sharing Websites and Files","description":"With zrok it is possible to share files quickly and easily as well. To share files using zrok use","sidebar":"tutorialSidebar"},"concepts/hosting":{"id":"concepts/hosting","title":"Hosting","description":"Self-Hosted","sidebar":"tutorialSidebar"},"concepts/http":{"id":"concepts/http","title":"Sharing HTTP Servers","description":"zrok can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you can use the zrok share command using the --backend-mode proxy flag.","sidebar":"tutorialSidebar"},"concepts/index":{"id":"concepts/index","title":"Concepts","description":"zrok was designed to make sharing local resources both secure and easy. In this section of the zrok documentation, we\'ll tour through all of the most important features.","sidebar":"tutorialSidebar"},"concepts/opensource":{"id":"concepts/opensource","title":"Open Source","description":"It\'s important to the zrok project that it remain free and open source software. The code is available on GitHub","sidebar":"tutorialSidebar"},"concepts/sharing-private":{"id":"concepts/sharing-private","title":"Private Shares","description":"zrok was built to share and access digital resources. A private share allows a resource to be","sidebar":"tutorialSidebar"},"concepts/sharing-public":{"id":"concepts/sharing-public","title":"Public Shares","description":"zrok supports public sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points.","sidebar":"tutorialSidebar"},"concepts/sharing-reserved":{"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.","sidebar":"tutorialSidebar"},"concepts/tunnels":{"id":"concepts/tunnels","title":"Sharing TCP and UDP Servers","description":"zrok includes support for sharing low-level TCP and UDP network resources using the tcpTunnel and udpTunnel backend modes.","sidebar":"tutorialSidebar"},"getting-started":{"id":"getting-started","title":"Getting Started","description":"Your Secure Internet Sharing Perimeter","sidebar":"tutorialSidebar"},"guides/docker-share/docker_private_share_guide":{"id":"guides/docker-share/docker_private_share_guide","title":"Docker Private Share","description":"Goal","sidebar":"tutorialSidebar"},"guides/docker-share/docker_public_share_guide":{"id":"guides/docker-share/docker_public_share_guide","title":"Docker Compose Public Share","description":"Goal","sidebar":"tutorialSidebar"},"guides/docker-share/index":{"id":"guides/docker-share/index","title":"Getting Started with Docker","description":"Overview","sidebar":"tutorialSidebar"},"guides/drives":{"id":"guides/drives","title":"Drives","description":"The zrok drives CLI tools allow for simple, ergonomic management and synchronization of local and remote files.","sidebar":"tutorialSidebar"},"guides/frontdoor":{"id":"guides/frontdoor","title":"zrok frontdoor","description":"zrok frontdoor is the heavy-duty front door to your app or site. It makes your website or app available to your online audience through the shield of zrok.io\'s hardened, managed frontends.","sidebar":"tutorialSidebar"},"guides/install/index":{"id":"guides/install/index","title":"Install","description":"{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Getting Started","href":"/docs/getting-started","docId":"getting-started","unlisted":false},{"type":"category","label":"Concepts","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Private Shares","href":"/docs/concepts/sharing-private","docId":"concepts/sharing-private","unlisted":false},{"type":"link","label":"Public Shares","href":"/docs/concepts/sharing-public","docId":"concepts/sharing-public","unlisted":false},{"type":"link","label":"Reserved Shares","href":"/docs/concepts/sharing-reserved","docId":"concepts/sharing-reserved","unlisted":false},{"type":"link","label":"Sharing HTTP Servers","href":"/docs/concepts/http","docId":"concepts/http","unlisted":false},{"type":"link","label":"Sharing TCP and UDP Servers","href":"/docs/concepts/tunnels","docId":"concepts/tunnels","unlisted":false},{"type":"link","label":"Sharing Websites and Files","href":"/docs/concepts/files","docId":"concepts/files","unlisted":false},{"type":"link","label":"Open Source","href":"/docs/concepts/opensource","docId":"concepts/opensource","unlisted":false},{"type":"link","label":"Hosting","href":"/docs/concepts/hosting","docId":"concepts/hosting","unlisted":false}],"href":"/docs/concepts/"},{"type":"category","label":"Guides","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Install","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Linux","href":"/docs/guides/install/linux","docId":"guides/install/linux","unlisted":false},{"type":"link","label":"macOS","href":"/docs/guides/install/macos","docId":"guides/install/macos","unlisted":false},{"type":"link","label":"Windows","href":"/docs/guides/install/windows","docId":"guides/install/windows","unlisted":false}],"href":"/docs/guides/install/"},{"type":"link","label":"frontdoor","href":"/docs/guides/frontdoor","docId":"guides/frontdoor","unlisted":false},{"type":"link","label":"Permission Modes","href":"/docs/guides/permission-modes","docId":"guides/permission-modes","unlisted":false},{"type":"category","label":"Docker Share","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Public Share","href":"/docs/guides/docker-share/docker_public_share_guide","docId":"guides/docker-share/docker_public_share_guide","unlisted":false},{"type":"link","label":"Private Share","href":"/docs/guides/docker-share/docker_private_share_guide","docId":"guides/docker-share/docker_private_share_guide","unlisted":false}],"href":"/docs/guides/docker-share/"},{"type":"link","label":"Linux User Share","href":"/docs/guides/linux-user-share/","docId":"guides/linux-user-share/index","unlisted":false},{"type":"category","label":"Self Hosting","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Linux","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"NGINX TLS","href":"/docs/guides/self-hosting/linux/nginx","docId":"guides/self-hosting/linux/nginx","unlisted":false}],"href":"/docs/guides/self-hosting/linux/"},{"type":"link","label":"Interstitial Pages","href":"/docs/guides/self-hosting/interstitial-page","docId":"guides/self-hosting/interstitial-page","unlisted":false},{"type":"link","label":"Organizations","href":"/docs/guides/self-hosting/organizations","docId":"guides/self-hosting/organizations","unlisted":false},{"type":"link","label":"Personalized Frontend","href":"/docs/guides/self-hosting/personalized-frontend","docId":"guides/self-hosting/personalized-frontend","unlisted":false},{"type":"link","label":"Docker","href":"/docs/guides/self-hosting/docker","docId":"guides/self-hosting/docker","unlisted":false},{"type":"link","label":"Kubernetes","href":"/docs/guides/self-hosting/kubernetes","docId":"guides/self-hosting/kubernetes","unlisted":false},{"type":"category","label":"Metrics and Limits","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Configuring Metrics","href":"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics","docId":"guides/self-hosting/metrics-and-limits/configuring-metrics","unlisted":false},{"type":"link","label":"Configuring Limits","href":"/docs/guides/self-hosting/metrics-and-limits/configuring-limits","docId":"guides/self-hosting/metrics-and-limits/configuring-limits","unlisted":false}],"href":"/docs/category/metrics-and-limits"},{"type":"category","label":"OAuth","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"OAuth Public Frontend Configuration","href":"/docs/guides/self-hosting/oauth/configuring-oauth","docId":"guides/self-hosting/oauth/configuring-oauth","unlisted":false}],"href":"/docs/category/oauth"},{"type":"link","label":"Instance Config","href":"/docs/guides/self-hosting/instance-configuration","docId":"guides/self-hosting/instance-configuration","unlisted":false},{"type":"link","label":"Invitations","href":"/docs/guides/self-hosting/self-service-invite","docId":"guides/self-hosting/self-service-invite","unlisted":false}],"href":"/docs/category/self-hosting"},{"type":"link","label":"Drives","href":"/docs/guides/drives","docId":"guides/drives","unlisted":false},{"type":"link","label":"VPN","href":"/docs/guides/vpn/","docId":"guides/vpn/vpn","unlisted":false}],"href":"/docs/category/guides"},{"type":"category","label":"myzrok","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Custom Domains","href":"/docs/myzrok/custom-domains/","docId":"myzrok/custom-domains/index","unlisted":false}],"href":"/docs/category/myzrok"}]},"docs":{"concepts/files":{"id":"concepts/files","title":"Sharing Websites and Files","description":"With zrok it is possible to share files quickly and easily as well. To share files using zrok use","sidebar":"tutorialSidebar"},"concepts/hosting":{"id":"concepts/hosting","title":"Hosting","description":"Self-Hosted","sidebar":"tutorialSidebar"},"concepts/http":{"id":"concepts/http","title":"Sharing HTTP Servers","description":"zrok can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you can use the zrok share command using the --backend-mode proxy flag.","sidebar":"tutorialSidebar"},"concepts/index":{"id":"concepts/index","title":"Concepts","description":"zrok was designed to make sharing local resources both secure and easy. In this section of the zrok documentation, we\'ll tour through all of the most important features.","sidebar":"tutorialSidebar"},"concepts/opensource":{"id":"concepts/opensource","title":"Open Source","description":"It\'s important to the zrok project that it remain free and open source software. The code is available on GitHub","sidebar":"tutorialSidebar"},"concepts/sharing-private":{"id":"concepts/sharing-private","title":"Private Shares","description":"zrok was built to share and access digital resources. A private share allows a resource to be","sidebar":"tutorialSidebar"},"concepts/sharing-public":{"id":"concepts/sharing-public","title":"Public Shares","description":"zrok supports public sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points.","sidebar":"tutorialSidebar"},"concepts/sharing-reserved":{"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.","sidebar":"tutorialSidebar"},"concepts/tunnels":{"id":"concepts/tunnels","title":"Sharing TCP and UDP Servers","description":"zrok includes support for sharing low-level TCP and UDP network resources using the tcpTunnel and udpTunnel backend modes.","sidebar":"tutorialSidebar"},"getting-started":{"id":"getting-started","title":"Getting Started","description":"Your Secure Internet Sharing Perimeter","sidebar":"tutorialSidebar"},"guides/docker-share/docker_private_share_guide":{"id":"guides/docker-share/docker_private_share_guide","title":"Docker Private Share","description":"Goal","sidebar":"tutorialSidebar"},"guides/docker-share/docker_public_share_guide":{"id":"guides/docker-share/docker_public_share_guide","title":"Docker Compose Public Share","description":"Goal","sidebar":"tutorialSidebar"},"guides/docker-share/index":{"id":"guides/docker-share/index","title":"Getting Started with Docker","description":"Overview","sidebar":"tutorialSidebar"},"guides/drives":{"id":"guides/drives","title":"Drives","description":"The zrok drives CLI tools allow for simple, ergonomic management and synchronization of local and remote files.","sidebar":"tutorialSidebar"},"guides/frontdoor":{"id":"guides/frontdoor","title":"zrok frontdoor","description":"zrok frontdoor is the heavy-duty front door to your app or site. It makes your website or app available to your online audience through the shield of zrok.io\'s hardened, managed frontends.","sidebar":"tutorialSidebar"},"guides/install/index":{"id":"guides/install/index","title":"Install","description":"{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>d,default:()=>x,frontMatter:()=>c,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"guides/install/macos","title":"Install zrok in macOS","description":"Darwin Binary","source":"@site/versioned_docs/version-0.4/guides/install/macos.mdx","sourceDirName":"guides/install","slug":"/guides/install/macos","permalink":"/docs/guides/install/macos","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/install/macos.mdx","tags":[],"version":"0.4","frontMatter":{"title":"Install zrok in macOS","sidebar_label":"macOS"},"sidebar":"tutorialSidebar","previous":{"title":"Linux","permalink":"/docs/guides/install/linux"},"next":{"title":"Windows","permalink":"/docs/guides/install/windows"}}');var t=s(4848),o=s(8453),a=s(8151),i=s(595),l=s(1342);const c={title:"Install zrok in macOS",sidebar_label:"macOS"},d=void 0,u={},h=[{value:"Darwin Binary",id:"darwin-binary",level:2}];function m(e){const n={code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"darwin-binary",children:"Darwin Binary"}),"\n",(0,t.jsx)(a.F,{children:(0,t.jsx)("div",{className:l.A.downloadContainer,children:(0,t.jsx)(i.A,{osName:"macOS",osLogo:"/img/logo-apple.svg"})})}),"\n",(0,t.jsxs)(n.p,{children:["Download the binary distribution for your macOS architecture. For Intel Macs use the ",(0,t.jsx)(n.code,{children:"amd64"})," distribution. For Apple Silicon Macs use the ",(0,t.jsx)(n.code,{children:"arm64"})," distribution."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Unarchive the distribution in a temporary directory."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"cd ~/Downloads && mkdir -p /tmp/zrok && tar -xf ./zrok*darwin*.tar.gz -C /tmp/zrok\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the ",(0,t.jsx)(n.code,{children:"zrok"})," executable."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"mkdir -p ~/bin && install /tmp/zrok/zrok ~/bin/\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Add ",(0,t.jsx)(n.code,{children:"~/bin"})," to your shell's executable search path. Optionally add this to your ~/.zshenv to persist the change."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"PATH=~/bin:$PATH\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["With the ",(0,t.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,t.jsx)(n.code,{children:"zrok"})," command from your shell:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:" _ \n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | < \n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8151:(e,n,s)=>{s.d(n,{F:()=>i,d:()=>a});var r=s(6540),t=s(4848);const o=(0,r.createContext)([]),a=()=>(0,r.useContext)(o),i=e=>{let{children:n}=e;const[s,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),a(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,t.jsx)(o.Provider,{value:s,children:n})}},595:(e,n,s)=>{s.d(n,{A:()=>l});s(6540);var r=s(8151),t=s(1342),o=s(5293),a=s(4848);const i=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:s,infoText:l,guideLink:c}=e;const{colorMode:d}=(0,o.G)(),u=(0,r.d)();console.log("Assets in DownloadCard:",u);const h=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=u.filter((e=>e.name.includes(h)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,a.jsxs)("div",{className:t.A.downloadCard,children:[(0,a.jsx)("div",{className:t.A.imgContainer,children:(0,a.jsx)("img",{src:s,alt:`${n} logo`})}),(0,a.jsx)("h3",{children:n}),m.length>0&&(0,a.jsx)("ul",{children:m.map(((e,n)=>(0,a.jsx)("li",{className:t.A.downloadButtons,children:(0,a.jsx)("a",{href:e.url,className:t.A.downloadLinks,children:i(e.arch)})},n)))}),c&&(0,a.jsxs)("div",{className:t.A.cardFooter,children:[(0,a.jsx)("p",{children:l}),(0,a.jsx)("a",{href:c,children:"GUIDE"}),(0,a.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>i});var r=s(6540);const t={},o=r.createContext(t);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ba5bc99.b1be5922.js b/assets/js/1ba5bc99.b1be5922.js deleted file mode 100644 index 37d31eab..00000000 --- a/assets/js/1ba5bc99.b1be5922.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2759],{3865:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>d,default:()=>x,frontMatter:()=>c,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"guides/install/macos","title":"Install zrok in macOS","description":"Darwin Binary","source":"@site/../docs/guides/install/macos.mdx","sourceDirName":"guides/install","slug":"/guides/install/macos","permalink":"/docs/guides/install/macos","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/install/macos.mdx","tags":[],"version":"current","frontMatter":{"title":"Install zrok in macOS","sidebar_label":"macOS"},"sidebar":"tutorialSidebar","previous":{"title":"Linux","permalink":"/docs/guides/install/linux"},"next":{"title":"Windows","permalink":"/docs/guides/install/windows"}}');var t=s(4848),o=s(8453),a=s(8151),i=s(595),l=s(1342);const c={title:"Install zrok in macOS",sidebar_label:"macOS"},d=void 0,u={},h=[{value:"Darwin Binary",id:"darwin-binary",level:2}];function m(e){const n={code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"darwin-binary",children:"Darwin Binary"}),"\n",(0,t.jsx)(a.F,{children:(0,t.jsx)("div",{className:l.A.downloadContainer,children:(0,t.jsx)(i.A,{osName:"macOS",osLogo:"/img/logo-apple.svg"})})}),"\n",(0,t.jsxs)(n.p,{children:["Download the binary distribution for your macOS architecture. For Intel Macs use the ",(0,t.jsx)(n.code,{children:"amd64"})," distribution. For Apple Silicon Macs use the ",(0,t.jsx)(n.code,{children:"arm64"})," distribution."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Unarchive the distribution in a temporary directory."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"cd ~/Downloads && mkdir -p /tmp/zrok && tar -xf ./zrok*darwin*.tar.gz -C /tmp/zrok\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the ",(0,t.jsx)(n.code,{children:"zrok"})," executable."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"mkdir -p ~/bin && install /tmp/zrok/zrok ~/bin/\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Add ",(0,t.jsx)(n.code,{children:"~/bin"})," to your shell's executable search path. Optionally add this to your ~/.zshenv to persist the change."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"PATH=~/bin:$PATH\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["With the ",(0,t.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,t.jsx)(n.code,{children:"zrok"})," command from your shell:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:" _ \n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | < \n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8151:(e,n,s)=>{s.d(n,{F:()=>i,d:()=>a});var r=s(6540),t=s(4848);const o=(0,r.createContext)([]),a=()=>(0,r.useContext)(o),i=e=>{let{children:n}=e;const[s,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),a(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,t.jsx)(o.Provider,{value:s,children:n})}},595:(e,n,s)=>{s.d(n,{A:()=>l});s(6540);var r=s(8151),t=s(1342),o=s(5293),a=s(4848);const i=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:s,infoText:l,guideLink:c}=e;const{colorMode:d}=(0,o.G)(),u=(0,r.d)();console.log("Assets in DownloadCard:",u);const h=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=u.filter((e=>e.name.includes(h)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,a.jsxs)("div",{className:t.A.downloadCard,children:[(0,a.jsx)("div",{className:t.A.imgContainer,children:(0,a.jsx)("img",{src:s,alt:`${n} logo`})}),(0,a.jsx)("h3",{children:n}),m.length>0&&(0,a.jsx)("ul",{children:m.map(((e,n)=>(0,a.jsx)("li",{className:t.A.downloadButtons,children:(0,a.jsx)("a",{href:e.url,className:t.A.downloadLinks,children:i(e.arch)})},n)))}),c&&(0,a.jsxs)("div",{className:t.A.cardFooter,children:[(0,a.jsx)("p",{children:l}),(0,a.jsx)("a",{href:c,children:"GUIDE"}),(0,a.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>i});var r=s(6540);const t={},o=r.createContext(t);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ba5bc99.b4a65344.js b/assets/js/1ba5bc99.b4a65344.js new file mode 100644 index 00000000..72f49ab3 --- /dev/null +++ b/assets/js/1ba5bc99.b4a65344.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2759],{3865:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>d,default:()=>x,frontMatter:()=>c,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"guides/install/macos","title":"Install zrok in macOS","description":"Darwin Binary","source":"@site/../docs/guides/install/macos.mdx","sourceDirName":"guides/install","slug":"/guides/install/macos","permalink":"/docs/next/guides/install/macos","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/install/macos.mdx","tags":[],"version":"current","frontMatter":{"title":"Install zrok in macOS","sidebar_label":"macOS"},"sidebar":"tutorialSidebar","previous":{"title":"Linux","permalink":"/docs/next/guides/install/linux"},"next":{"title":"Windows","permalink":"/docs/next/guides/install/windows"}}');var r=s(4848),o=s(8453),a=s(8151),i=s(595),l=s(1342);const c={title:"Install zrok in macOS",sidebar_label:"macOS"},d=void 0,u={},h=[{value:"Darwin Binary",id:"darwin-binary",level:2}];function m(e){const n={code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"darwin-binary",children:"Darwin Binary"}),"\n",(0,r.jsx)(a.F,{children:(0,r.jsx)("div",{className:l.A.downloadContainer,children:(0,r.jsx)(i.A,{osName:"macOS",osLogo:"/img/logo-apple.svg"})})}),"\n",(0,r.jsxs)(n.p,{children:["Download the binary distribution for your macOS architecture. For Intel Macs use the ",(0,r.jsx)(n.code,{children:"amd64"})," distribution. For Apple Silicon Macs use the ",(0,r.jsx)(n.code,{children:"arm64"})," distribution."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Unarchive the distribution in a temporary directory."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:"cd ~/Downloads && mkdir -p /tmp/zrok && tar -xf ./zrok*darwin*.tar.gz -C /tmp/zrok\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Install the ",(0,r.jsx)(n.code,{children:"zrok"})," executable."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:"mkdir -p ~/bin && install /tmp/zrok/zrok ~/bin/\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add ",(0,r.jsx)(n.code,{children:"~/bin"})," to your shell's executable search path. Optionally add this to your ~/.zshenv to persist the change."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:"PATH=~/bin:$PATH\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["With the ",(0,r.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,r.jsx)(n.code,{children:"zrok"})," command from your shell:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:" _ \n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | < \n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}},8151:(e,n,s)=>{s.d(n,{F:()=>i,d:()=>a});var t=s(6540),r=s(4848);const o=(0,t.createContext)([]),a=()=>(0,t.useContext)(o),i=e=>{let{children:n}=e;const[s,a]=(0,t.useState)([]);return(0,t.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),a(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,r.jsx)(o.Provider,{value:s,children:n})}},595:(e,n,s)=>{s.d(n,{A:()=>l});s(6540);var t=s(8151),r=s(1342),o=s(5293),a=s(4848);const i=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:s,infoText:l,guideLink:c}=e;const{colorMode:d}=(0,o.G)(),u=(0,t.d)();console.log("Assets in DownloadCard:",u);const h=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=u.filter((e=>e.name.includes(h)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,a.jsxs)("div",{className:r.A.downloadCard,children:[(0,a.jsx)("div",{className:r.A.imgContainer,children:(0,a.jsx)("img",{src:s,alt:`${n} logo`})}),(0,a.jsx)("h3",{children:n}),m.length>0&&(0,a.jsx)("ul",{children:m.map(((e,n)=>(0,a.jsx)("li",{className:r.A.downloadButtons,children:(0,a.jsx)("a",{href:e.url,className:r.A.downloadLinks,children:i(e.arch)})},n)))}),c&&(0,a.jsxs)("div",{className:r.A.cardFooter,children:[(0,a.jsx)("p",{children:l}),(0,a.jsx)("a",{href:c,children:"GUIDE"}),(0,a.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>t});const t={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>i});var t=s(6540);const r={},o=t.createContext(r);function a(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1c085663.9606709e.js b/assets/js/1c085663.9606709e.js new file mode 100644 index 00000000..5826df66 --- /dev/null +++ b/assets/js/1c085663.9606709e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2239],{578:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Metrics and Limits","slug":"/category/metrics-and-limits","permalink":"/docs/next/category/metrics-and-limits","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"Kubernetes","permalink":"/docs/next/guides/self-hosting/kubernetes"},"next":{"title":"Configuring Metrics","permalink":"/docs/next/guides/self-hosting/metrics-and-limits/configuring-metrics"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/1dd31738.4d70842c.js b/assets/js/1dd31738.4d70842c.js new file mode 100644 index 00000000..8783cd34 --- /dev/null +++ b/assets/js/1dd31738.4d70842c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6878],{7394:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>l,frontMatter:()=>c,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"concepts/http","title":"Sharing HTTP Servers","description":"zrok can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you can use the zrok share command using the --backend-mode proxy flag.","source":"@site/versioned_docs/version-0.4/concepts/http.md","sourceDirName":"concepts","slug":"/concepts/http","permalink":"/docs/concepts/http","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/concepts/http.md","tags":[],"version":"0.4","sidebarPosition":22,"frontMatter":{"sidebar_position":22},"sidebar":"tutorialSidebar","previous":{"title":"Reserved Shares","permalink":"/docs/concepts/sharing-reserved"},"next":{"title":"Sharing TCP and UDP Servers","permalink":"/docs/concepts/tunnels"}}');var o=s(4848),r=s(8453);const c={sidebar_position:22},i="Sharing HTTP Servers",d={},a=[];function h(e){const n={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"sharing-http-servers",children:"Sharing HTTP Servers"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"zrok"})," can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you can use the ",(0,o.jsx)(n.code,{children:"zrok share"})," command using the ",(0,o.jsx)(n.code,{children:"--backend-mode proxy"})," flag."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"--backend-mode proxy"})," is the default backend mode, so if you do not specify a ",(0,o.jsx)(n.code,{children:"--backend-mode"})," you will get the ",(0,o.jsx)(n.code,{children:"proxy"})," mode by default."]}),"\n",(0,o.jsxs)(n.p,{children:["If you have a web server running on ",(0,o.jsx)(n.code,{children:"localhost"})," that you want to expose to other users using ",(0,o.jsx)(n.code,{children:"zrok"}),", you can execute a command like the following:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"$ zrok share public localhost:8080\n"})}),"\n",(0,o.jsxs)(n.p,{children:["When you execute this command, you'll get a ",(0,o.jsx)(n.code,{children:"zrok"})," bridge like the following:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 http://cht7gj4g5pjf.share.zrok.io \u2502\u2502[PUBLIC] [PROXY]\u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,o.jsxs)(n.p,{children:["The URL shown at the top of the bridge shows the address where you can access your ",(0,o.jsx)(n.code,{children:"public"})," share."]}),"\n",(0,o.jsxs)(n.p,{children:["Hit ",(0,o.jsx)(n.code,{children:"CTRL-C"})," or ",(0,o.jsx)(n.code,{children:"q"})," in the bridge to exit it and delete the ",(0,o.jsx)(n.code,{children:"public"})," share."]})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>i});var t=s(6540);const o={},r=t.createContext(o);function c(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ddd36f2.caf00b1b.js b/assets/js/1ddd36f2.caf00b1b.js new file mode 100644 index 00000000..818b6a95 --- /dev/null +++ b/assets/js/1ddd36f2.caf00b1b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1595],{6974:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>u,contentTitle:()=>c,default:()=>x,frontMatter:()=>d,metadata:()=>o,toc:()=>m});const o=JSON.parse('{"id":"guides/install/index","title":"Install","description":"{n.d(s,{F:()=>r,d:()=>i});var o=n(6540),t=n(4848);const a=(0,o.createContext)([]),i=()=>(0,o.useContext)(a),r=e=>{let{children:s}=e;const[n,i]=(0,o.useState)([]);return(0,o.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const s=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",s),i(s)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,t.jsx)(a.Provider,{value:n,children:s})}},595:(e,s,n)=>{n.d(s,{A:()=>l});n(6540);var o=n(8151),t=n(1342),a=n(5293),i=n(4848);const r=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:s,osLogo:n,infoText:l,guideLink:d}=e;const{colorMode:c}=(0,a.G)(),u=(0,o.d)();console.log("Assets in DownloadCard:",u);const m=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(s),g=u.filter((e=>e.name.includes(m)));return console.log("Filtered assets for",s,"in DownloadCard:",g),(0,i.jsxs)("div",{className:t.A.downloadCard,children:[(0,i.jsx)("div",{className:t.A.imgContainer,children:(0,i.jsx)("img",{src:n,alt:`${s} logo`})}),(0,i.jsx)("h3",{children:s}),g.length>0&&(0,i.jsx)("ul",{children:g.map(((e,s)=>(0,i.jsx)("li",{className:t.A.downloadButtons,children:(0,i.jsx)("a",{href:e.url,className:t.A.downloadLinks,children:r(e.arch)})},s)))}),d&&(0,i.jsxs)("div",{className:t.A.cardFooter,children:[(0,i.jsx)("p",{children:l}),(0,i.jsx)("a",{href:d,children:"GUIDE"}),(0,i.jsx)("p",{})]})]})}},1342:(e,s,n)=>{n.d(s,{A:()=>o});const o={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>r});var o=n(6540);const t={},a=o.createContext(t);function i(e){const s=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),o.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/20595907.3e569479.js b/assets/js/20595907.3e569479.js deleted file mode 100644 index 56dd49f2..00000000 --- a/assets/js/20595907.3e569479.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8582],{7445:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"guides/self-hosting/kubernetes","title":"Self-host a zrok Instance in Kubernetes","description":"The Helm chart for zrok is available from the main OpenZiti charts repo.","source":"@site/../docs/guides/self-hosting/kubernetes.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/kubernetes","permalink":"/docs/guides/self-hosting/kubernetes","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/kubernetes.mdx","tags":[],"version":"current","sidebarPosition":55,"frontMatter":{"title":"Self-host a zrok Instance in Kubernetes","sidebar_label":"Kubernetes","sidebar_position":55},"sidebar":"tutorialSidebar","previous":{"title":"Docker","permalink":"/docs/guides/self-hosting/docker"},"next":{"title":"Metrics and Limits","permalink":"/docs/category/metrics-and-limits"}}');var i=s(4848),r=s(8453);const o={title:"Self-host a zrok Instance in Kubernetes",sidebar_label:"Kubernetes",sidebar_position:55},a=void 0,c={},l=[];function u(e){const t={a:"a",p:"p",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"The Helm chart for zrok is available from the main OpenZiti charts repo."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"https://github.com/openziti/helm-charts/tree/main/charts/zrok#readme",children:"Link to README in GitHub"})})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>a});var n=s(6540);const i={},r=n.createContext(i);function o(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/20595907.df38437a.js b/assets/js/20595907.df38437a.js new file mode 100644 index 00000000..fccca225 --- /dev/null +++ b/assets/js/20595907.df38437a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8582],{7445:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"guides/self-hosting/kubernetes","title":"Self-host a zrok Instance in Kubernetes","description":"The Helm chart for zrok is available from the main OpenZiti charts repo.","source":"@site/../docs/guides/self-hosting/kubernetes.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/kubernetes","permalink":"/docs/next/guides/self-hosting/kubernetes","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/kubernetes.mdx","tags":[],"version":"current","sidebarPosition":55,"frontMatter":{"title":"Self-host a zrok Instance in Kubernetes","sidebar_label":"Kubernetes","sidebar_position":55},"sidebar":"tutorialSidebar","previous":{"title":"Docker","permalink":"/docs/next/guides/self-hosting/docker"},"next":{"title":"Metrics and Limits","permalink":"/docs/next/category/metrics-and-limits"}}');var i=n(4848),r=n(8453);const o={title:"Self-host a zrok Instance in Kubernetes",sidebar_label:"Kubernetes",sidebar_position:55},a=void 0,c={},l=[];function u(e){const t={a:"a",p:"p",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"The Helm chart for zrok is available from the main OpenZiti charts repo."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"https://github.com/openziti/helm-charts/tree/main/charts/zrok#readme",children:"Link to README in GitHub"})})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var s=n(6540);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/21880a4d.2545a6d9.js b/assets/js/21880a4d.2545a6d9.js deleted file mode 100644 index fbe1bee4..00000000 --- a/assets/js/21880a4d.2545a6d9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[749],{7392:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>t,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"guides/vpn/vpn","title":"zrok VPN Guide","description":"zrok VPN backend allows for simple host-to-host VPN setup.","source":"@site/../docs/guides/vpn/vpn.md","sourceDirName":"guides/vpn","slug":"/guides/vpn/","permalink":"/docs/guides/vpn/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/vpn/vpn.md","tags":[],"version":"current","frontMatter":{"sidebar_label":"VPN"},"sidebar":"tutorialSidebar","previous":{"title":"Drives","permalink":"/docs/guides/drives"},"next":{"title":"myzrok","permalink":"/docs/category/myzrok"}}');var a=s(4848),o=s(8453);const t={sidebar_label:"VPN"},i="zrok VPN Guide",c={},d=[{value:"Operating System Requirements",id:"operating-system-requirements",level:2},{value:"Windows",id:"windows",level:3},{value:"Linux",id:"linux",level:3},{value:"macOS",id:"macos",level:3},{value:"Start the VPN Server",id:"start-the-vpn-server",level:2},{value:"Reserve a VPN Share Token",id:"reserve-a-vpn-share-token",level:2},{value:"Access the VPN Share",id:"access-the-vpn-share",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"zrok-vpn-guide",children:"zrok VPN Guide"})}),"\n",(0,a.jsx)(n.p,{children:"zrok VPN backend allows for simple host-to-host VPN setup."}),"\n",(0,a.jsx)(n.h2,{id:"operating-system-requirements",children:"Operating System Requirements"}),"\n",(0,a.jsx)(n.p,{children:"zrok VPN requires elevated privileges to manage network devices."}),"\n",(0,a.jsx)(n.h3,{id:"windows",children:"Windows"}),"\n",(0,a.jsxs)(n.p,{children:["On Windows, you must run zrok VPN commands as an administrator and install Wintun by placing ",(0,a.jsx)(n.code,{children:"wintun.dll"})," (",(0,a.jsx)(n.a,{href:"https://www.wintun.net/",children:"download link"}),") in the same directory as the ",(0,a.jsx)(n.code,{children:"zrok.exe"})," executable."]}),"\n",(0,a.jsx)(n.h3,{id:"linux",children:"Linux"}),"\n",(0,a.jsxs)(n.p,{children:["On Linux, the simplest way to grant the necessary privileges is to run zrok VPN commands as root. You can enable a separate environment for root by also running ",(0,a.jsx)(n.code,{children:"zrok enable"})," as the root user, or you can prefix the commands like ",(0,a.jsx)(n.code,{children:"sudo -E"})," to allow zrok running as root to use the zrok environment owned by the current user. The minimum privilege is runing zrok VPN commands and the ",(0,a.jsx)(n.code,{children:"ip"})," command with the ",(0,a.jsx)(n.code,{children:"NET_ADMIN"})," kernel capability. The ",(0,a.jsx)(n.code,{children:"zrok-share.service"})," unit has a commented example to grant ",(0,a.jsx)(n.code,{children:"NET_ADMIN"})," as an Ambient Capability."]}),"\n",(0,a.jsx)(n.h3,{id:"macos",children:"macOS"}),"\n",(0,a.jsxs)(n.p,{children:["On macOS, you must run zrok VPN commands as root. You can prefix the zrok command with ",(0,a.jsx)(n.code,{children:"sudo -E"})," to allow zrok running as root to use the zrok environment owned by the current user."]}),"\n",(0,a.jsx)(n.h2,{id:"start-the-vpn-server",children:"Start the VPN Server"}),"\n",(0,a.jsxs)(n.p,{children:["VPN is shared through the ",(0,a.jsx)(n.code,{children:"vpn"})," backend of ",(0,a.jsx)(n.code,{children:"zrok"})," command."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@hermes $ sudo -E zrok share private --headless --backend-mode vpn\n[ 0.542] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[589d443c-f59d-4fc8-8c48-76609b7fb402]} new service session\n[ 0.705] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private 3rq7torslq3n\n[ 0.705] INFO zrok/endpoints/vpn.(*Backend).Run: started\n"})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"VPN share",src:s(1171).A+"",width:"1626",height:"1314"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"sudo"})," or equivalent invocation is required because VPN mode needs to create a virtual network device (",(0,a.jsx)(n.code,{children:"tun"}),")\n",(0,a.jsx)(n.code,{children:"-E"})," option allows ",(0,a.jsx)(n.code,{children:"zrok"})," to find your zrok configuration files (in your ",(0,a.jsx)(n.code,{children:"$HOME/.zrok"}),")"]}),"\n",(0,a.jsxs)(n.p,{children:["By default ",(0,a.jsx)(n.code,{children:"vpn"})," backend uses subnet ",(0,a.jsx)(n.code,{children:"10.122.0.0/16"})," and assigns ",(0,a.jsx)(n.code,{children:"10.122.0.1"})," to the host that stared VPN share."]}),"\n",(0,a.jsxs)(n.p,{children:["Example output from ",(0,a.jsx)(n.code,{children:"ifconfig"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-text",children:"tun0: flags=4305 mtu 16384\n inet 10.122.0.1 netmask 255.255.0.0 destination 10.122.0.1\n inet6 fe80::705f:24e4:dcfc:a6b2 prefixlen 64 scopeid 0x20\n inet6 fd00:7a72:6f6b::1 prefixlen 64 scopeid 0x0\n unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)\n RX packets 0 bytes 0 (0.0 B)\n RX errors 0 dropped 0 overruns 0 frame 0\n TX packets 27 bytes 3236 (3.2 KB)\n TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Default IP/subnet setting can be overridden by adding ",(0,a.jsx)(n.code,{children:""})," parameter:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sudo -E zrok share private --headless --backend-mode vpn 192.168.42.12/24\n"})}),"\n",(0,a.jsx)(n.h2,{id:"reserve-a-vpn-share-token",children:"Reserve a VPN Share Token"}),"\n",(0,a.jsx)(n.p,{children:"As with all backend modes, you can reserve a share token for a VPN share."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@hermes $ zrok reserve private --backend-mode vpn\n[ 0.297] INFO main.(*reserveCommand).run: your reserved share token is 'k77y2cl7jmjl'\n\neugene@hermes $ sudo -E zrok share reserved k77y2cl7jmjl --headless\n[ 0.211] INFO main.(*shareReservedCommand).run: sharing target: '10.122.0.1/16'\n[ 0.211] INFO main.(*shareReservedCommand).run: using existing backend target: 10.122.0.1/16\n[ 0.463] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[22c5708d-e2f2-41aa-a507-454055f8bfcc]} new service session\n[ 0.641] INFO main.(*shareReservedCommand).run: use this command to access your zrok share: 'zrok access private k77y2cl7jmjl'\n[\n"})}),"\n",(0,a.jsx)(n.h2,{id:"access-the-vpn-share",children:"Access the VPN Share"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@calculon % sudo -E zrok access private --headless k77y2cl7jmjl\n[ 0.201] INFO main.(*accessPrivateCommand).run: allocated frontend '50B5hloP1s1X'\n[ 0.662] INFO main.(*accessPrivateCommand).run: access the zrok share at the following endpoint: VPN:\n[ 0.662] INFO main.(*accessPrivateCommand).run: 10.122.0.1 -> CONNECTED Welcome to zrok VPN\n[ 0.662] INFO zrok/endpoints/vpn.(*Frontend).Run: connected:Welcome to zrok VPN\n"})}),"\n",(0,a.jsxs)(n.p,{children:['zrok creates a virtual network device, i.e., a "tun" interface, when you run ',(0,a.jsx)(n.code,{children:"zrok access"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Example output from ",(0,a.jsx)(n.code,{children:"ifconfig"})," run on a VPN client device:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"utun5: flags=8051 mtu 1500\n inet 10.122.0.3 --\x3e 10.122.0.1 netmask 0xff000000\n inet6 fe80::ce08:faff:fe8a:7b25%utun5 prefixlen 64 scopeid 0x14\n nd6 options=201\n"})}),"\n",(0,a.jsxs)(n.p,{children:["At this point a VPN tunnel is active between your server and client.\nIn the example above server is ",(0,a.jsx)(n.code,{children:"hermes(10.122.0.1)"})," and client is ",(0,a.jsx)(n.code,{children:"calculon(10.122.0.3)"}),".\nAll devices in the VPN can access one another by IP address."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@calculon ~ % ssh eugene@10.122.0.1\nWelcome to Ubuntu 23.10 (GNU/Linux 6.5.0-27-generic x86_64)\n\n * Documentation: https://help.ubuntu.com\n * Management: https://landscape.canonical.com\n * Support: https://ubuntu.com/pro\n\n0 updates can be applied immediately.\n\nLast login: Tue Apr 16 09:27:13 2024 from 127.0.0.1\n\neugene@hermes:~$ who am i\neugene pts/8 2024-04-16 10:04 (10.122.0.3)\n\neugene@hermes:~$\n"})}),"\n",(0,a.jsx)(n.p,{children:"You can also make a reverse(server-to-client) connection:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@hermes:~$ ssh 10.122.0.3\nLast login: Tue Apr 16 09:57:28 2024\n\neugene@calculon ~ % who am i\neugene ttys008 Apr 16 10:06 (10.122.0.1)\n"})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},1171:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/vpn-share-077094eabd79a2e072ee4c40f8e0fd31.png"},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>i});var r=s(6540);const a={},o=r.createContext(a);function t(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/21880a4d.752cd72c.js b/assets/js/21880a4d.752cd72c.js new file mode 100644 index 00000000..8ec941d0 --- /dev/null +++ b/assets/js/21880a4d.752cd72c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[749],{7392:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>t,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"guides/vpn/vpn","title":"zrok VPN Guide","description":"zrok VPN backend allows for simple host-to-host VPN setup.","source":"@site/../docs/guides/vpn/vpn.md","sourceDirName":"guides/vpn","slug":"/guides/vpn/","permalink":"/docs/next/guides/vpn/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/vpn/vpn.md","tags":[],"version":"current","frontMatter":{"sidebar_label":"VPN"},"sidebar":"tutorialSidebar","previous":{"title":"Drives","permalink":"/docs/next/guides/drives"},"next":{"title":"myzrok","permalink":"/docs/next/category/myzrok"}}');var a=s(4848),o=s(8453);const t={sidebar_label:"VPN"},i="zrok VPN Guide",c={},d=[{value:"Operating System Requirements",id:"operating-system-requirements",level:2},{value:"Windows",id:"windows",level:3},{value:"Linux",id:"linux",level:3},{value:"macOS",id:"macos",level:3},{value:"Start the VPN Server",id:"start-the-vpn-server",level:2},{value:"Reserve a VPN Share Token",id:"reserve-a-vpn-share-token",level:2},{value:"Access the VPN Share",id:"access-the-vpn-share",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"zrok-vpn-guide",children:"zrok VPN Guide"})}),"\n",(0,a.jsx)(n.p,{children:"zrok VPN backend allows for simple host-to-host VPN setup."}),"\n",(0,a.jsx)(n.h2,{id:"operating-system-requirements",children:"Operating System Requirements"}),"\n",(0,a.jsx)(n.p,{children:"zrok VPN requires elevated privileges to manage network devices."}),"\n",(0,a.jsx)(n.h3,{id:"windows",children:"Windows"}),"\n",(0,a.jsxs)(n.p,{children:["On Windows, you must run zrok VPN commands as an administrator and install Wintun by placing ",(0,a.jsx)(n.code,{children:"wintun.dll"})," (",(0,a.jsx)(n.a,{href:"https://www.wintun.net/",children:"download link"}),") in the same directory as the ",(0,a.jsx)(n.code,{children:"zrok.exe"})," executable."]}),"\n",(0,a.jsx)(n.h3,{id:"linux",children:"Linux"}),"\n",(0,a.jsxs)(n.p,{children:["On Linux, the simplest way to grant the necessary privileges is to run zrok VPN commands as root. You can enable a separate environment for root by also running ",(0,a.jsx)(n.code,{children:"zrok enable"})," as the root user, or you can prefix the commands like ",(0,a.jsx)(n.code,{children:"sudo -E"})," to allow zrok running as root to use the zrok environment owned by the current user. The minimum privilege is runing zrok VPN commands and the ",(0,a.jsx)(n.code,{children:"ip"})," command with the ",(0,a.jsx)(n.code,{children:"NET_ADMIN"})," kernel capability. The ",(0,a.jsx)(n.code,{children:"zrok-share.service"})," unit has a commented example to grant ",(0,a.jsx)(n.code,{children:"NET_ADMIN"})," as an Ambient Capability."]}),"\n",(0,a.jsx)(n.h3,{id:"macos",children:"macOS"}),"\n",(0,a.jsxs)(n.p,{children:["On macOS, you must run zrok VPN commands as root. You can prefix the zrok command with ",(0,a.jsx)(n.code,{children:"sudo -E"})," to allow zrok running as root to use the zrok environment owned by the current user."]}),"\n",(0,a.jsx)(n.h2,{id:"start-the-vpn-server",children:"Start the VPN Server"}),"\n",(0,a.jsxs)(n.p,{children:["VPN is shared through the ",(0,a.jsx)(n.code,{children:"vpn"})," backend of ",(0,a.jsx)(n.code,{children:"zrok"})," command."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@hermes $ sudo -E zrok share private --headless --backend-mode vpn\n[ 0.542] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[589d443c-f59d-4fc8-8c48-76609b7fb402]} new service session\n[ 0.705] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private 3rq7torslq3n\n[ 0.705] INFO zrok/endpoints/vpn.(*Backend).Run: started\n"})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"VPN share",src:s(1171).A+"",width:"1626",height:"1314"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"sudo"})," or equivalent invocation is required because VPN mode needs to create a virtual network device (",(0,a.jsx)(n.code,{children:"tun"}),")\n",(0,a.jsx)(n.code,{children:"-E"})," option allows ",(0,a.jsx)(n.code,{children:"zrok"})," to find your zrok configuration files (in your ",(0,a.jsx)(n.code,{children:"$HOME/.zrok"}),")"]}),"\n",(0,a.jsxs)(n.p,{children:["By default ",(0,a.jsx)(n.code,{children:"vpn"})," backend uses subnet ",(0,a.jsx)(n.code,{children:"10.122.0.0/16"})," and assigns ",(0,a.jsx)(n.code,{children:"10.122.0.1"})," to the host that stared VPN share."]}),"\n",(0,a.jsxs)(n.p,{children:["Example output from ",(0,a.jsx)(n.code,{children:"ifconfig"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-text",children:"tun0: flags=4305 mtu 16384\n inet 10.122.0.1 netmask 255.255.0.0 destination 10.122.0.1\n inet6 fe80::705f:24e4:dcfc:a6b2 prefixlen 64 scopeid 0x20\n inet6 fd00:7a72:6f6b::1 prefixlen 64 scopeid 0x0\n unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)\n RX packets 0 bytes 0 (0.0 B)\n RX errors 0 dropped 0 overruns 0 frame 0\n TX packets 27 bytes 3236 (3.2 KB)\n TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Default IP/subnet setting can be overridden by adding ",(0,a.jsx)(n.code,{children:""})," parameter:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sudo -E zrok share private --headless --backend-mode vpn 192.168.42.12/24\n"})}),"\n",(0,a.jsx)(n.h2,{id:"reserve-a-vpn-share-token",children:"Reserve a VPN Share Token"}),"\n",(0,a.jsx)(n.p,{children:"As with all backend modes, you can reserve a share token for a VPN share."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@hermes $ zrok reserve private --backend-mode vpn\n[ 0.297] INFO main.(*reserveCommand).run: your reserved share token is 'k77y2cl7jmjl'\n\neugene@hermes $ sudo -E zrok share reserved k77y2cl7jmjl --headless\n[ 0.211] INFO main.(*shareReservedCommand).run: sharing target: '10.122.0.1/16'\n[ 0.211] INFO main.(*shareReservedCommand).run: using existing backend target: 10.122.0.1/16\n[ 0.463] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[22c5708d-e2f2-41aa-a507-454055f8bfcc]} new service session\n[ 0.641] INFO main.(*shareReservedCommand).run: use this command to access your zrok share: 'zrok access private k77y2cl7jmjl'\n[\n"})}),"\n",(0,a.jsx)(n.h2,{id:"access-the-vpn-share",children:"Access the VPN Share"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@calculon % sudo -E zrok access private --headless k77y2cl7jmjl\n[ 0.201] INFO main.(*accessPrivateCommand).run: allocated frontend '50B5hloP1s1X'\n[ 0.662] INFO main.(*accessPrivateCommand).run: access the zrok share at the following endpoint: VPN:\n[ 0.662] INFO main.(*accessPrivateCommand).run: 10.122.0.1 -> CONNECTED Welcome to zrok VPN\n[ 0.662] INFO zrok/endpoints/vpn.(*Frontend).Run: connected:Welcome to zrok VPN\n"})}),"\n",(0,a.jsxs)(n.p,{children:['zrok creates a virtual network device, i.e., a "tun" interface, when you run ',(0,a.jsx)(n.code,{children:"zrok access"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Example output from ",(0,a.jsx)(n.code,{children:"ifconfig"})," run on a VPN client device:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"utun5: flags=8051 mtu 1500\n inet 10.122.0.3 --\x3e 10.122.0.1 netmask 0xff000000\n inet6 fe80::ce08:faff:fe8a:7b25%utun5 prefixlen 64 scopeid 0x14\n nd6 options=201\n"})}),"\n",(0,a.jsxs)(n.p,{children:["At this point a VPN tunnel is active between your server and client.\nIn the example above server is ",(0,a.jsx)(n.code,{children:"hermes(10.122.0.1)"})," and client is ",(0,a.jsx)(n.code,{children:"calculon(10.122.0.3)"}),".\nAll devices in the VPN can access one another by IP address."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@calculon ~ % ssh eugene@10.122.0.1\nWelcome to Ubuntu 23.10 (GNU/Linux 6.5.0-27-generic x86_64)\n\n * Documentation: https://help.ubuntu.com\n * Management: https://landscape.canonical.com\n * Support: https://ubuntu.com/pro\n\n0 updates can be applied immediately.\n\nLast login: Tue Apr 16 09:27:13 2024 from 127.0.0.1\n\neugene@hermes:~$ who am i\neugene pts/8 2024-04-16 10:04 (10.122.0.3)\n\neugene@hermes:~$\n"})}),"\n",(0,a.jsx)(n.p,{children:"You can also make a reverse(server-to-client) connection:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@hermes:~$ ssh 10.122.0.3\nLast login: Tue Apr 16 09:57:28 2024\n\neugene@calculon ~ % who am i\neugene ttys008 Apr 16 10:06 (10.122.0.1)\n"})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},1171:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/vpn-share-077094eabd79a2e072ee4c40f8e0fd31.png"},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>i});var r=s(6540);const a={},o=r.createContext(a);function t(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/25ef1bb8.e116fa89.js b/assets/js/25ef1bb8.e116fa89.js new file mode 100644 index 00000000..5126ca10 --- /dev/null +++ b/assets/js/25ef1bb8.e116fa89.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8746],{4505:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>t,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"guides/docker-share/docker_private_share_guide","title":"Docker Private Share","description":"Goal","source":"@site/versioned_docs/version-0.4/guides/docker-share/docker_private_share_guide.md","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/docker_private_share_guide","permalink":"/docs/guides/docker-share/docker_private_share_guide","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/docker-share/docker_private_share_guide.md","tags":[],"version":"0.4","sidebarPosition":20,"frontMatter":{"title":"Docker Private Share","sidebar_position":20,"sidebar_label":"Private Share"},"sidebar":"tutorialSidebar","previous":{"title":"Public Share","permalink":"/docs/guides/docker-share/docker_public_share_guide"},"next":{"title":"Linux User Share","permalink":"/docs/guides/linux-user-share/"}}');var i=n(4848),o=n(8453);const t={title:"Docker Private Share",sidebar_position:20,sidebar_label:"Private Share"},a=void 0,c={},l=[{value:"Goal",id:"goal",level:2},{value:"Overview",id:"overview",level:2},{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"How it Works",id:"how-it-works",level:2},{value:"Before You Begin",id:"before-you-begin",level:2},{value:"Begin Sharing Privately with zrok in Docker",id:"begin-sharing-privately-with-zrok-in-docker",level:2},{value:"Access the Private Share",id:"access-the-private-share",level:2},{value:"Closed Permission Mode",id:"closed-permission-mode",level:2},{value:"Going Further with Private Access",id:"going-further-with-private-access",level:2},{value:"Cleaning Up",id:"cleaning-up",level:2}];function h(e){const r={a:"a",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h2,{id:"goal",children:"Goal"}),"\n",(0,i.jsx)(r.p,{children:"Privately share a Docker Compose service with a separate zrok environment and a permanent zrok share token."}),"\n",(0,i.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsx)(r.p,{children:"With zrok, you can privately share a service that's running in Docker. You need a zrok private share running somewhere that it can reach the service you're sharing, and a zrok private access running somewhere else where you want to use the private share. Together, the private share and private access form a private point-to-point tunnel."}),"\n",(0,i.jsxs)(r.p,{children:["Here's a short article with an overview of ",(0,i.jsx)(r.a,{href:"/docs/concepts/sharing-private",children:"private sharing with zrok"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,i.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/HxyvtFAvwUE",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,i.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,i.jsx)(r.p,{children:"The Docker Compose project uses your zrok account token to reserve a private share token and keep sharing the backend target."}),"\n",(0,i.jsx)(r.p,{children:"When the project runs it will:"}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["enable a zrok environment unless ",(0,i.jsx)(r.code,{children:"/mnt/.zrok/environment.json"})," exists in the ",(0,i.jsx)(r.code,{children:"zrok_env"})," volume"]}),"\n",(0,i.jsxs)(r.li,{children:["reserve a private share token for the service unless ",(0,i.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," exists"]}),"\n",(0,i.jsxs)(r.li,{children:["start sharing the target specified in the ",(0,i.jsx)(r.code,{children:"ZROK_TARGET"})," environment variable"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"before-you-begin",children:"Before You Begin"}),"\n",(0,i.jsxs)(r.p,{children:["To follow this guide you will need ",(0,i.jsx)(r.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"}),"."]}),"\n",(0,i.jsx)(r.p,{children:"If you have installed Docker Desktop on macOS or Windows then you are all set."}),"\n",(0,i.jsx)(r.h2,{id:"begin-sharing-privately-with-zrok-in-docker",children:"Begin Sharing Privately with zrok in Docker"}),"\n",(0,i.jsx)(r.p,{children:"First, let's create the private share."}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private share."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Download ",(0,i.jsx)(r.a,{href:"pathname:///zrok-private-share/compose.yml",children:"the zrok-private-share Docker Compose project file"})," into your new project folder and make sure it's named ",(0,i.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,i.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"If you are self-hosting zrok then it's important to set your API endpoint URL too. If you're using the hosted zrok service then you can skip this step."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_API_ENDPOINT="https://zrok.example.com"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Run your Compose project to start sharing the built-in demo web server:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose up\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Read the private share token from the output. One of the last lines is like this:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"zrok-private-share-1 | zrok access private wr3hpf2z5fiy\n"})}),"\n",(0,i.jsx)(r.p,{children:"Keep track of this token so you can use it in your zrok private access project."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"access-the-private-share",children:"Access the Private Share"}),"\n",(0,i.jsx)(r.p,{children:"Now that we have a private share we can access it with the zrok command or by running a separate Docker Compose project."}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private access."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Download ",(0,i.jsx)(r.a,{href:"pathname:///zrok-private-access/compose.yml",children:"the zrok-private-access Docker Compose project file"})," into your new project folder and make sure it's named ",(0,i.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,i.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Now copy the zrok private access token from the zrok private share project's output to your clipboard and paste it in the same file named ",(0,i.jsx)(r.code,{children:".env"})," here in your private share project folder like this:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\nZROK_ACCESS_TOKEN="wr3hpf2z5fiy"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Run your Compose project to start accessing the private share:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose up zrok-access\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Now your zrok private access proxy is ready on ",(0,i.jsx)(r.a,{href:"http://127.0.0.1:9191",children:"http://127.0.0.1:9191"}),". You can visit the demo web server in your browser."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"closed-permission-mode",children:"Closed Permission Mode"}),"\n",(0,i.jsx)(r.p,{children:'Normally, you need only the share token to access a private share. You can further restrict access with "closed" permission mode.'}),"\n",(0,i.jsx)(r.p,{children:"You must set the permission mode before you reserve the share."}),"\n",(0,i.jsx)(r.p,{children:"Only your own account can access the private share."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'ZROK_PERMISSION_MODE="closed"\n'})}),"\n",(0,i.jsx)(r.p,{children:"Grant access to additional zrok accounts."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'ZROK_ACCESS_GRANTS="bob@example.com alice@example.org"\n'})}),"\n",(0,i.jsxs)(r.p,{children:["You can adjust the access grants by running the CLI inside the ",(0,i.jsx)(r.code,{children:"zrok-share"})," container."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose exec zrok-share zrok modify ${ZROK_UNIQUE_NAME} --remove-access-grant bob@example.com\n"})}),"\n",(0,i.jsx)(r.h2,{id:"going-further-with-private-access",children:"Going Further with Private Access"}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Try changing the demo web server used in the private share project. One alternative demo server is provided: ",(0,i.jsx)(r.code,{children:"httpbin"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Try accessing the private share from ",(0,i.jsx)(r.em,{children:"inside"})," a container running in the private access project. One demo client is provided: ",(0,i.jsx)(r.code,{children:"demo-client"}),". You can run it like this."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose up demo-client\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["You'll see in the terminal output that the demo-client container is getting a response from the private share indicating the source IP of the request from the perspective of the demo server: ",(0,i.jsx)(r.code,{children:"httpbin"})," that's running in the private share project."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"cleaning-up",children:"Cleaning Up"}),"\n",(0,i.jsx)(r.p,{children:'Run the "down" command in both Compose projects to destroy them when you\'re all done. This will stop the running containers and delete zrok environments\' storage volumes. Then delete the selected zrok environment by clicking "Actions" in the web console.'}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose down --remove-orphans --volumes\n"})})]})}function d(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>a});var s=n(6540);const i={},o=s.createContext(i);function t(e){const r=s.useContext(o);return s.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(i):e.components||i:t(e.components),s.createElement(o.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/27b0284c.d6f0d1f4.js b/assets/js/27b0284c.d6f0d1f4.js new file mode 100644 index 00000000..44754415 --- /dev/null +++ b/assets/js/27b0284c.d6f0d1f4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4277],{5269:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>d,contentTitle:()=>i,default:()=>l,frontMatter:()=>a,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"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/versioned_docs/version-0.4/concepts/sharing-reserved.md","sourceDirName":"concepts","slug":"/concepts/sharing-reserved","permalink":"/docs/concepts/sharing-reserved","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/concepts/sharing-reserved.md","tags":[],"version":"0.4","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"}}');var o=s(4848),t=s(8453);const a={sidebar_position:10},i="Reserved Shares",d={},h=[{value:"Unique Names",id:"unique-names",level:2}];function c(e){const r={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"reserved-shares",children:"Reserved Shares"})}),"\n",(0,o.jsxs)(r.p,{children:["By default, a ",(0,o.jsx)(r.code,{children:"public"})," or ",(0,o.jsx)(r.code,{children:"private"})," share is assigned a ",(0,o.jsx)(r.em,{children:"share token"})," when you create a share using the ",(0,o.jsx)(r.code,{children:"zrok share"})," command. The ",(0,o.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,o.jsx)(r.code,{children:"zrok share"}),", the bridge is eliminated and the ",(0,o.jsx)(r.em,{children:"share token"})," is deleted. If you run ",(0,o.jsx)(r.code,{children:"zrok share"})," again, you will be allocated a brand new ",(0,o.jsx)(r.em,{children:"share token"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:["You can use a ",(0,o.jsx)(r.code,{children:"reserved"})," share to persist your ",(0,o.jsx)(r.em,{children:"share token"})," across multiple runs of the ",(0,o.jsx)(r.code,{children:"zrok share"})," bridge. When you use a ",(0,o.jsx)(r.code,{children:"reserved"})," share, the share token will not be deleted between multiple runs of ",(0,o.jsx)(r.code,{children:"zrok share"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:["To use a ",(0,o.jsx)(r.code,{children:"reserved"})," share, you will first run the ",(0,o.jsx)(r.code,{children:"zrok reserve"})," command to create the reserved share (see ",(0,o.jsx)(r.code,{children:"zrok reserve --help"})," for details). Once you've created your ",(0,o.jsx)(r.code,{children:"reserved"})," share, you will use the ",(0,o.jsx)(r.code,{children:"zrok share reserved"})," command (see ",(0,o.jsx)(r.code,{children:"--help"})," for details) to run the bridge for the shared resource."]}),"\n",(0,o.jsxs)(r.p,{children:["This pattern works for both ",(0,o.jsx)(r.code,{children:"public"})," and ",(0,o.jsx)(r.code,{children:"private"})," shares, and for all resource types supported by ",(0,o.jsx)(r.code,{children:"zrok"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:["To delete your ",(0,o.jsx)(r.code,{children:"reserved"})," share use the ",(0,o.jsx)(r.code,{children:"zrok release"})," command or click the delete button in the share's ",(0,o.jsx)(r.em,{children:"Actions"})," tab in the web console."]}),"\n",(0,o.jsx)(r.h2,{id:"unique-names",children:"Unique Names"}),"\n",(0,o.jsxs)(r.p,{children:["The default is to generate a random ",(0,o.jsx)(r.em,{children:"share token"})," and you may specify a ",(0,o.jsx)(r.em,{children:"unique name"}),"."]}),"\n",(0,o.jsx)(r.p,{children:'This reserves public share token "myshare."'}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title="Reserve with the Command Line"',children:'zrok reserve public 80 --unique-name "myshare"\n'})}),"\n",(0,o.jsxs)(r.p,{children:["This shares ",(0,o.jsx)(r.code,{children:"127.0.0.1:80"})," as ",(0,o.jsx)(r.code,{children:"https://myshare.zrok.example.com"})," where ",(0,o.jsx)(r.code,{children:"https://{token}.zrok.example.com"})," is the frontend's template."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title="Share a Reserved Token"',children:'zrok share reserved "myshare"\n'})})]})}function l(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},8453:(e,r,s)=>{s.d(r,{R:()=>a,x:()=>i});var n=s(6540);const o={},t=n.createContext(o);function a(e){const r=n.useContext(t);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),n.createElement(t.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/288b1075.070e3fad.js b/assets/js/288b1075.070e3fad.js new file mode 100644 index 00000000..e06d794b --- /dev/null +++ b/assets/js/288b1075.070e3fad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3588],{3998:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"guides/self-hosting/metrics-and-limits/configuring-metrics","title":"Configuring Metrics","description":"A fully configured, production-scale zrok service instance looks like this:","source":"@site/../docs/guides/self-hosting/metrics-and-limits/configuring-metrics.md","sourceDirName":"guides/self-hosting/metrics-and-limits","slug":"/guides/self-hosting/metrics-and-limits/configuring-metrics","permalink":"/docs/next/guides/self-hosting/metrics-and-limits/configuring-metrics","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/metrics-and-limits/configuring-metrics.md","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"sidebar_position":20},"sidebar":"tutorialSidebar","previous":{"title":"Metrics and Limits","permalink":"/docs/next/category/metrics-and-limits"},"next":{"title":"Configuring Limits","permalink":"/docs/next/guides/self-hosting/metrics-and-limits/configuring-limits"}}');var r=i(4848),o=i(8453);const s={sidebar_position:20},c="Configuring Metrics",l={},a=[{value:"Configuring the OpenZiti Controller",id:"configuring-the-openziti-controller",level:2},{value:"Configuring the zrok Metrics Bridge",id:"configuring-the-zrok-metrics-bridge",level:2},{value:"RabbitMQ",id:"rabbitmq",level:3},{value:"Configuring zrok Metrics",id:"configuring-zrok-metrics",level:2},{value:"Testing Metrics",id:"testing-metrics",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"configuring-metrics",children:"Configuring Metrics"})}),"\n",(0,r.jsxs)(n.p,{children:["A fully configured, production-scale ",(0,r.jsx)(n.code,{children:"zrok"})," service instance looks like this:"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"zrok Metrics Architecture",src:i(4923).A+"",width:"381",height:"492"})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"zrok"})," metrics builds on top of the ",(0,r.jsx)(n.code,{children:"fabric.usage"})," event type from OpenZiti. The OpenZiti controller has a number of way to emit events. The ",(0,r.jsx)(n.code,{children:"zrok"})," controller has several ways to consume ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events. Smaller installations could be configured in these ways:"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"zrok simplified metrics architecture",src:i(7292).A+"",width:"522",height:"322"})}),"\n",(0,r.jsxs)(n.p,{children:["Environments that horizontally scale the ",(0,r.jsx)(n.code,{children:"zrok"}),' control plane with multiple controllers should use an AMQP-based queue to "fan out" the metrics workload across the entire control plane. Simpler installations that use a single ',(0,r.jsx)(n.code,{children:"zrok"})," controller can collect ",(0,r.jsx)(n.code,{children:"fabric.usage"}),' events from the OpenZiti controller by "tailing" the events log file, or collecting them from the OpenZiti controller\'s websocket implementation.']}),"\n",(0,r.jsx)(n.h2,{id:"configuring-the-openziti-controller",children:"Configuring the OpenZiti Controller"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:["This requires a version of OpenZiti with a ",(0,r.jsx)(n.code,{children:"fabric"})," dependency of ",(0,r.jsx)(n.code,{children:"v0.22.52"})," or newer, which is satisfed by the ",(0,r.jsx)(n.code,{children:"v0.27.6"})," release of OpenZiti Controller."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Emitting ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events to a file is currently the most reliable mechanism to capture usage events into ",(0,r.jsx)(n.code,{children:"zrok"}),". We're going to configure the OpenZiti controller to append ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events to a file, by adding this stanza to the OpenZiti controller configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"events:\n jsonLogger:\n subscriptions:\n - type: fabric.usage\n version: 3\n handler:\n type: file\n format: json\n path: /tmp/fabric-usage.json\n"})}),"\n",(0,r.jsxs)(n.p,{children:["You'll want to adjust the ",(0,r.jsx)(n.code,{children:"events/jsonLogger/handler/path"})," to wherever you would like to send these events for ingestion into ",(0,r.jsx)(n.code,{children:"zrok"}),". There are additional OpenZiti options that control file rotation. Be sure to consult the OpenZiti docs to tune these settings to be appropriate for your environment."]}),"\n",(0,r.jsxs)(n.p,{children:["By default, the OpenZiti events infrastructure reports and batches events in 1 minute buckets. 1 minute is too large of an interval to provide a snappy ",(0,r.jsx)(n.code,{children:"zrok"})," metrics experience. So, let's increase the frequency to every 5 seconds. Add this to the ",(0,r.jsx)(n.code,{children:"network"})," stanza of your OpenZiti controller's configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"network:\n intervalAgeThreshold: 5s \n metricsReportInterval: 5s\n"})}),"\n",(0,r.jsx)(n.p,{children:"And you'll want to add this stanza to the tail-end of the router configuration for every router on your OpenZiti network:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"metrics:\n reportInterval: 5s\n intervalAgeThreshold: 5s\n"})}),"\n",(0,r.jsx)(n.p,{children:"Be sure to restart all of the components of your OpenZiti network after making these configuration changes."}),"\n",(0,r.jsx)(n.h2,{id:"configuring-the-zrok-metrics-bridge",children:"Configuring the zrok Metrics Bridge"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"zrok"}),' currently uses a "metrics bridge" component (running as a separate process) to consume the ',(0,r.jsx)(n.code,{children:"fabric.usage"})," events from the OpenZiti controller, and publish them onto an AMQP queue. Add a stanza like the following to your ",(0,r.jsx)(n.code,{children:"zrok"})," controller configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"bridge:\n source:\n type: fileSource\n path: /tmp/fabric-usage.json\n sink:\n type: amqpSink\n url: amqp://guest:guest@localhost:5672\n queue_name: events\n"})}),"\n",(0,r.jsxs)(n.p,{children:["This configuration consumes the ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events from the file we previously specified in our OpenZiti controller configuration, and publishes them onto an AMQP queue."]}),"\n",(0,r.jsx)(n.h3,{id:"rabbitmq",children:"RabbitMQ"}),"\n",(0,r.jsxs)(n.p,{children:["For this example, we're going to use RabbitMQ as our AMQP implementation. The stock, default RabbitMQ configuration, launched as a ",(0,r.jsx)(n.code,{children:"docker"})," container will work just fine:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.11-management\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Once RabbitMQ is running, you can start the ",(0,r.jsx)(n.code,{children:"zrok"})," metrics bridge by pointing it at your ",(0,r.jsx)(n.code,{children:"zrok"})," controller configuration, like this:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ zrok ctrl metrics bridge \n"})}),"\n",(0,r.jsx)(n.h2,{id:"configuring-zrok-metrics",children:"Configuring zrok Metrics"}),"\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.code,{children:"metrics"})," section of your ",(0,r.jsx)(n.code,{children:"zrok"})," controller. Here is an example:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:'metrics:\n agent:\n source:\n type: amqpSource\n url: amqp://guest:guest@localhost:5672\n queue_name: events\n influx:\n url: "http://127.0.0.1:8086"\n bucket: zrok # the bucket and org must be\n org: zrok # created in advance in InfluxDB\n token: ""\n'})}),"\n",(0,r.jsxs)(n.p,{children:["This configures the ",(0,r.jsx)(n.code,{children:"zrok"})," controller to consume usage events from the AMQP queue, and configures the InfluxDB metrics store. The InfluxDB organization and bucket must be created in advance. The ",(0,r.jsx)(n.code,{children:"zrok"})," controller will not create these for you."]}),"\n",(0,r.jsx)(n.h2,{id:"testing-metrics",children:"Testing Metrics"}),"\n",(0,r.jsxs)(n.p,{children:["With all of the components configured and running, either use ",(0,r.jsx)(n.code,{children:"zrok test loop"})," or manually create share(s) to generate traffic on the ",(0,r.jsx)(n.code,{children:"zrok"})," instance. If everything is working correctly, you should see log messages from the controller like the following, which indicate that that the controller is processing OpenZiti usage events, and generating ",(0,r.jsx)(n.code,{children:"zrok"})," metrics:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"[5339.658] INFO zrok/controller/metrics.(*influxWriter).Handle: share: 736z80mr4syu, circuit: Ad1V-6y48 backend {rx: 4.5 kB, tx: 4.6 kB} frontend {rx: 4.6 kB, tx: 4.5 kB}\n[5349.652] INFO zrok/controller/metrics.(*influxWriter).Handle: share: 736z80mr4syu, circuit: Ad1V-6y48 backend {rx: 2.5 kB, tx: 2.6 kB} frontend {rx: 2.6 kB, tx: 2.5 kB}\n[5354.657] INFO zrok/controller/metrics.(*influxWriter).Handle: share: 5a4u7lqxb7pa, circuit: iG1--6H4S backend {rx: 13.2 kB, tx: 13.3 kB} frontend {rx: 13.3 kB, tx: 13.2 kB}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"zrok"})," web console should also be showing activity for your share(s) like the following:"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"zrok web console activity",src:i(5472).A+"",width:"1920",height:"1230"})}),"\n",(0,r.jsxs)(n.p,{children:["With metrics configured, you might be interested in ",(0,r.jsx)(n.a,{href:"/docs/next/guides/self-hosting/metrics-and-limits/configuring-limits",children:"configuring limits"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},7292:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/metrics-architecture-simple-15902678f75b6a41fc6d26c1b6165d48.png"},4923:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/metrics-architecture-abc07e1548198a0d2176bbfea70521fa.png"},5472:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/zrok-console-activity-5e11ec1f9f3e58b54566c42a213e4ee5.png"},8453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>c});var t=i(6540);const r={},o=t.createContext(r);function s(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/288b1075.7fdf1033.js b/assets/js/288b1075.7fdf1033.js deleted file mode 100644 index c5988cae..00000000 --- a/assets/js/288b1075.7fdf1033.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3588],{3998:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"guides/self-hosting/metrics-and-limits/configuring-metrics","title":"Configuring Metrics","description":"A fully configured, production-scale zrok service instance looks like this:","source":"@site/../docs/guides/self-hosting/metrics-and-limits/configuring-metrics.md","sourceDirName":"guides/self-hosting/metrics-and-limits","slug":"/guides/self-hosting/metrics-and-limits/configuring-metrics","permalink":"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/metrics-and-limits/configuring-metrics.md","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"sidebar_position":20},"sidebar":"tutorialSidebar","previous":{"title":"Metrics and Limits","permalink":"/docs/category/metrics-and-limits"},"next":{"title":"Configuring Limits","permalink":"/docs/guides/self-hosting/metrics-and-limits/configuring-limits"}}');var r=i(4848),o=i(8453);const s={sidebar_position:20},c="Configuring Metrics",l={},a=[{value:"Configuring the OpenZiti Controller",id:"configuring-the-openziti-controller",level:2},{value:"Configuring the zrok Metrics Bridge",id:"configuring-the-zrok-metrics-bridge",level:2},{value:"RabbitMQ",id:"rabbitmq",level:3},{value:"Configuring zrok Metrics",id:"configuring-zrok-metrics",level:2},{value:"Testing Metrics",id:"testing-metrics",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"configuring-metrics",children:"Configuring Metrics"})}),"\n",(0,r.jsxs)(n.p,{children:["A fully configured, production-scale ",(0,r.jsx)(n.code,{children:"zrok"})," service instance looks like this:"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"zrok Metrics Architecture",src:i(4923).A+"",width:"381",height:"492"})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"zrok"})," metrics builds on top of the ",(0,r.jsx)(n.code,{children:"fabric.usage"})," event type from OpenZiti. The OpenZiti controller has a number of way to emit events. The ",(0,r.jsx)(n.code,{children:"zrok"})," controller has several ways to consume ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events. Smaller installations could be configured in these ways:"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"zrok simplified metrics architecture",src:i(7292).A+"",width:"522",height:"322"})}),"\n",(0,r.jsxs)(n.p,{children:["Environments that horizontally scale the ",(0,r.jsx)(n.code,{children:"zrok"}),' control plane with multiple controllers should use an AMQP-based queue to "fan out" the metrics workload across the entire control plane. Simpler installations that use a single ',(0,r.jsx)(n.code,{children:"zrok"})," controller can collect ",(0,r.jsx)(n.code,{children:"fabric.usage"}),' events from the OpenZiti controller by "tailing" the events log file, or collecting them from the OpenZiti controller\'s websocket implementation.']}),"\n",(0,r.jsx)(n.h2,{id:"configuring-the-openziti-controller",children:"Configuring the OpenZiti Controller"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:["This requires a version of OpenZiti with a ",(0,r.jsx)(n.code,{children:"fabric"})," dependency of ",(0,r.jsx)(n.code,{children:"v0.22.52"})," or newer, which is satisfed by the ",(0,r.jsx)(n.code,{children:"v0.27.6"})," release of OpenZiti Controller."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Emitting ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events to a file is currently the most reliable mechanism to capture usage events into ",(0,r.jsx)(n.code,{children:"zrok"}),". We're going to configure the OpenZiti controller to append ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events to a file, by adding this stanza to the OpenZiti controller configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"events:\n jsonLogger:\n subscriptions:\n - type: fabric.usage\n version: 3\n handler:\n type: file\n format: json\n path: /tmp/fabric-usage.json\n"})}),"\n",(0,r.jsxs)(n.p,{children:["You'll want to adjust the ",(0,r.jsx)(n.code,{children:"events/jsonLogger/handler/path"})," to wherever you would like to send these events for ingestion into ",(0,r.jsx)(n.code,{children:"zrok"}),". There are additional OpenZiti options that control file rotation. Be sure to consult the OpenZiti docs to tune these settings to be appropriate for your environment."]}),"\n",(0,r.jsxs)(n.p,{children:["By default, the OpenZiti events infrastructure reports and batches events in 1 minute buckets. 1 minute is too large of an interval to provide a snappy ",(0,r.jsx)(n.code,{children:"zrok"})," metrics experience. So, let's increase the frequency to every 5 seconds. Add this to the ",(0,r.jsx)(n.code,{children:"network"})," stanza of your OpenZiti controller's configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"network:\n intervalAgeThreshold: 5s \n metricsReportInterval: 5s\n"})}),"\n",(0,r.jsx)(n.p,{children:"And you'll want to add this stanza to the tail-end of the router configuration for every router on your OpenZiti network:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"metrics:\n reportInterval: 5s\n intervalAgeThreshold: 5s\n"})}),"\n",(0,r.jsx)(n.p,{children:"Be sure to restart all of the components of your OpenZiti network after making these configuration changes."}),"\n",(0,r.jsx)(n.h2,{id:"configuring-the-zrok-metrics-bridge",children:"Configuring the zrok Metrics Bridge"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"zrok"}),' currently uses a "metrics bridge" component (running as a separate process) to consume the ',(0,r.jsx)(n.code,{children:"fabric.usage"})," events from the OpenZiti controller, and publish them onto an AMQP queue. Add a stanza like the following to your ",(0,r.jsx)(n.code,{children:"zrok"})," controller configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"bridge:\n source:\n type: fileSource\n path: /tmp/fabric-usage.json\n sink:\n type: amqpSink\n url: amqp://guest:guest@localhost:5672\n queue_name: events\n"})}),"\n",(0,r.jsxs)(n.p,{children:["This configuration consumes the ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events from the file we previously specified in our OpenZiti controller configuration, and publishes them onto an AMQP queue."]}),"\n",(0,r.jsx)(n.h3,{id:"rabbitmq",children:"RabbitMQ"}),"\n",(0,r.jsxs)(n.p,{children:["For this example, we're going to use RabbitMQ as our AMQP implementation. The stock, default RabbitMQ configuration, launched as a ",(0,r.jsx)(n.code,{children:"docker"})," container will work just fine:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.11-management\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Once RabbitMQ is running, you can start the ",(0,r.jsx)(n.code,{children:"zrok"})," metrics bridge by pointing it at your ",(0,r.jsx)(n.code,{children:"zrok"})," controller configuration, like this:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ zrok ctrl metrics bridge \n"})}),"\n",(0,r.jsx)(n.h2,{id:"configuring-zrok-metrics",children:"Configuring zrok Metrics"}),"\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.code,{children:"metrics"})," section of your ",(0,r.jsx)(n.code,{children:"zrok"})," controller. Here is an example:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:'metrics:\n agent:\n source:\n type: amqpSource\n url: amqp://guest:guest@localhost:5672\n queue_name: events\n influx:\n url: "http://127.0.0.1:8086"\n bucket: zrok # the bucket and org must be\n org: zrok # created in advance in InfluxDB\n token: ""\n'})}),"\n",(0,r.jsxs)(n.p,{children:["This configures the ",(0,r.jsx)(n.code,{children:"zrok"})," controller to consume usage events from the AMQP queue, and configures the InfluxDB metrics store. The InfluxDB organization and bucket must be created in advance. The ",(0,r.jsx)(n.code,{children:"zrok"})," controller will not create these for you."]}),"\n",(0,r.jsx)(n.h2,{id:"testing-metrics",children:"Testing Metrics"}),"\n",(0,r.jsxs)(n.p,{children:["With all of the components configured and running, either use ",(0,r.jsx)(n.code,{children:"zrok test loop"})," or manually create share(s) to generate traffic on the ",(0,r.jsx)(n.code,{children:"zrok"})," instance. If everything is working correctly, you should see log messages from the controller like the following, which indicate that that the controller is processing OpenZiti usage events, and generating ",(0,r.jsx)(n.code,{children:"zrok"})," metrics:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"[5339.658] INFO zrok/controller/metrics.(*influxWriter).Handle: share: 736z80mr4syu, circuit: Ad1V-6y48 backend {rx: 4.5 kB, tx: 4.6 kB} frontend {rx: 4.6 kB, tx: 4.5 kB}\n[5349.652] INFO zrok/controller/metrics.(*influxWriter).Handle: share: 736z80mr4syu, circuit: Ad1V-6y48 backend {rx: 2.5 kB, tx: 2.6 kB} frontend {rx: 2.6 kB, tx: 2.5 kB}\n[5354.657] INFO zrok/controller/metrics.(*influxWriter).Handle: share: 5a4u7lqxb7pa, circuit: iG1--6H4S backend {rx: 13.2 kB, tx: 13.3 kB} frontend {rx: 13.3 kB, tx: 13.2 kB}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"zrok"})," web console should also be showing activity for your share(s) like the following:"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"zrok web console activity",src:i(5472).A+"",width:"1920",height:"1230"})}),"\n",(0,r.jsxs)(n.p,{children:["With metrics configured, you might be interested in ",(0,r.jsx)(n.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-limits",children:"configuring limits"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},7292:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/metrics-architecture-simple-15902678f75b6a41fc6d26c1b6165d48.png"},4923:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/metrics-architecture-abc07e1548198a0d2176bbfea70521fa.png"},5472:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/zrok-console-activity-5e11ec1f9f3e58b54566c42a213e4ee5.png"},8453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>c});var t=i(6540);const r={},o=t.createContext(r);function s(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2cc2e835.f361f3c1.js b/assets/js/2cc2e835.f361f3c1.js new file mode 100644 index 00000000..59970f3d --- /dev/null +++ b/assets/js/2cc2e835.f361f3c1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6946],{1613:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>w,frontMatter:()=>d,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"guides/install/windows","title":"Install zrok in Windows","description":"Windows Binary","source":"@site/versioned_docs/version-0.4/guides/install/windows.mdx","sourceDirName":"guides/install","slug":"/guides/install/windows","permalink":"/docs/guides/install/windows","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/install/windows.mdx","tags":[],"version":"0.4","frontMatter":{"title":"Install zrok in Windows","sidebar_label":"Windows"},"sidebar":"tutorialSidebar","previous":{"title":"macOS","permalink":"/docs/guides/install/macos"},"next":{"title":"frontdoor","permalink":"/docs/guides/frontdoor"}}');var s=t(4848),o=t(8453),i=t(8151),a=t(595),l=t(1342);const d={title:"Install zrok in Windows",sidebar_label:"Windows"},c=void 0,u={},h=[{value:"Windows Binary",id:"windows-binary",level:2},{value:"Wintun for zrok VPN",id:"wintun-for-zrok-vpn",level:2}];function m(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"windows-binary",children:"Windows Binary"}),"\n",(0,s.jsx)(i.F,{children:(0,s.jsx)("div",{className:l.A.downloadContainer,children:(0,s.jsx)(a.A,{osName:"Windows",osLogo:"/img/logo-windows.svg"})})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"In PowerShell, change to the directory where you downloaded zrok."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:'cd "$env:USERPROFILE\\Downloads"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In PowerShell, install zrok in your home directory (",(0,s.jsx)(n.code,{children:"bin\\zrok.exe"}),"), and permanently set the executable search path."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:'$binDir = Join-Path -Path $env:USERPROFILE -ChildPath "bin"\nNew-Item -Path $binDir -ItemType Directory -ErrorAction SilentlyContinue\n$latest = Get-ChildItem -Path .\\zrok*windows*.tar.gz | Sort-Object LastWriteTime | Select-Object -Last 1\ntar -xf $latest.FullName -C $binDir zrok.exe\n$currentPath = [System.Environment]::GetEnvironmentVariable(\'PATH\', [System.EnvironmentVariableTarget]::User)\nif ($currentPath -notlike "*$binDir*") {\n $newPath = "$currentPath;$binDir"\n [System.Environment]::SetEnvironmentVariable(\'PATH\', $newPath, [System.EnvironmentVariableTarget]::User)\n $env:Path = $newPath\n}\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["With the ",(0,s.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,s.jsx)(n.code,{children:"zrok"})," directly."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"\n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | <\n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"wintun-for-zrok-vpn",children:"Wintun for zrok VPN"}),"\n",(0,s.jsxs)(n.p,{children:["On Windows, you must install Wintun to use zrok's VPN backend mode. See the ",(0,s.jsx)(n.a,{href:"/docs/guides/vpn/",children:"VPN guide"})," for more details."]})]})}function w(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},8151:(e,n,t)=>{t.d(n,{F:()=>a,d:()=>i});var r=t(6540),s=t(4848);const o=(0,r.createContext)([]),i=()=>(0,r.useContext)(o),a=e=>{let{children:n}=e;const[t,i]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),i(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,s.jsx)(o.Provider,{value:t,children:n})}},595:(e,n,t)=>{t.d(n,{A:()=>l});t(6540);var r=t(8151),s=t(1342),o=t(5293),i=t(4848);const a=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:t,infoText:l,guideLink:d}=e;const{colorMode:c}=(0,o.G)(),u=(0,r.d)();console.log("Assets in DownloadCard:",u);const h=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=u.filter((e=>e.name.includes(h)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,i.jsxs)("div",{className:s.A.downloadCard,children:[(0,i.jsx)("div",{className:s.A.imgContainer,children:(0,i.jsx)("img",{src:t,alt:`${n} logo`})}),(0,i.jsx)("h3",{children:n}),m.length>0&&(0,i.jsx)("ul",{children:m.map(((e,n)=>(0,i.jsx)("li",{className:s.A.downloadButtons,children:(0,i.jsx)("a",{href:e.url,className:s.A.downloadLinks,children:a(e.arch)})},n)))}),d&&(0,i.jsxs)("div",{className:s.A.cardFooter,children:[(0,i.jsx)("p",{children:l}),(0,i.jsx)("a",{href:d,children:"GUIDE"}),(0,i.jsx)("p",{})]})]})}},1342:(e,n,t)=>{t.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var r=t(6540);const s={},o=r.createContext(s);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2da89d45.2c84f779.js b/assets/js/2da89d45.2c84f779.js deleted file mode 100644 index 15e3e9d6..00000000 --- a/assets/js/2da89d45.2c84f779.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6332],{2452:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"guides/docker-share/index","title":"Getting Started with Docker","description":"Overview","source":"@site/../docs/guides/docker-share/index.mdx","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/","permalink":"/docs/guides/docker-share/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/docker-share/index.mdx","tags":[],"version":"current","frontMatter":{"title":"Getting Started with Docker"},"sidebar":"tutorialSidebar","previous":{"title":"Permission Modes","permalink":"/docs/guides/permission-modes"},"next":{"title":"Public Share","permalink":"/docs/guides/docker-share/docker_public_share_guide"}}');var t=r(4848),o=r(8453),i=r(4971);const c={title:"Getting Started with Docker"},a=void 0,l={},d=[{value:"Overview",id:"overview",level:2},{value:"Permanent Public Share",id:"permanent-public-share",level:2},{value:"Temporary Public Share",id:"temporary-public-share",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsxs)(n.p,{children:["To follow the guides in this section you will need ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["You have the option to enable a ",(0,t.jsx)(n.code,{children:"zrok"})," account on the Docker host and mount it on the container or you can use the provided Docker Compose project files (",(0,t.jsx)(n.code,{children:"compose.yml"}),") to enable a separate ",(0,t.jsx)(n.code,{children:"zrok"})," environment for each project."]}),"\n",(0,t.jsxs)(n.p,{children:["This page provides ",(0,t.jsx)(n.code,{children:"docker"})," and ",(0,t.jsx)(n.code,{children:"docker compose"})," examples of mounting the host's ",(0,t.jsx)(n.code,{children:"zrok"})," environment on the container. You'll need to first ",(0,t.jsx)(n.a,{href:"/docs/getting-started/#installing-the-zrok-command",children:"enable zrok on the Docker host"})," to use this approach."]}),"\n",(0,t.jsx)(n.h2,{id:"permanent-public-share",children:"Permanent Public Share"}),"\n",(0,t.jsxs)(n.p,{children:["Let's say you have a ",(0,t.jsx)(n.code,{children:"compose.yml"})," file that defines a web app known within the project's bridge network as ",(0,t.jsx)(n.code,{children:"https://myapp:8080"})," and you want to publish it as a reliable, public site."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Reserve a subdomain by running ",(0,t.jsx)(n.code,{children:'zrok reserve public --unique-name "myapp" https://myapp:8080'})," on the Docker host."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Merge this YAML with ",(0,t.jsx)(n.code,{children:"compose.yml"})," or save it in the same directory as ",(0,t.jsx)(n.code,{children:"compose.override.yml"})," to let ",(0,t.jsx)(n.code,{children:"docker compose up"})," merge it for you."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'services:\n zrok:\n image: openziti/zrok\n restart: unless-stopped\n user: "${UID}"\n volumes:\n - ${HOME}/.zrok:/home/ziggy/.zrok\n environment:\n PFXLOG_NO_JSON: "true"\n command: share reserved "myapp" --headless\n'})}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The reserved share will be available at ",(0,t.jsx)(n.code,{children:"https://myapp.share.zrok.io"})," each time the ",(0,t.jsx)(n.code,{children:"zrok"})," container starts up."]}),"\n",(0,t.jsx)(n.h2,{id:"temporary-public-share",children:"Temporary Public Share"}),"\n",(0,t.jsxs)(n.p,{children:["Let's say you have a web server running on the host's private network at ",(0,t.jsx)(n.code,{children:"https://10.11.12.13:8080"}),". With one additional ",(0,t.jsx)(n.code,{children:"docker"})," command, you can share the web server publicly as long as the ",(0,t.jsx)(n.code,{children:"zrok"})," container stays running."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="BASH"',children:'docker run \\\n --rm \\\n --network=host \\\n --volume ~/.zrok:/home/ziggy/.zrok \\\n --user "${UID:-1000}:${GID:-1000}" \\\n openziti/zrok share public \\\n --headless \\\n https://10.11.12.13:8080\n'})}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsx)("summary",{children:"PowerShell"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-powershell",children:'docker.exe run `\n --rm `\n --network "host" `\n --volume "${env:USERPROFILE}\\.zrok:/.zrok" `\n --user "1000" `\n openziti/zrok share public `\n --headless `\n https://10.11.12.13:8080\n'})})]}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsx)("summary",{children:"Command Prompt (batch)"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-cmd",children:'docker.exe run ^\n --rm ^\n --network "host" ^\n --volume "%USERPROFILE%\\.zrok:/.zrok" ^\n --user "1000" ^\n openziti/zrok share public ^\n --headless ^\n https://10.11.12.13:8080\n'})})]}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsx)("summary",{children:"Windows Subsystem for Linux (WSL)"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'docker run \\\n --rm \\\n --network "host" \\\n --volume "/mnt/c/Users/$(powershell.exe -Command \'Write-Output $env:USERNAME\' | tr -d \'\\r\')/.zrok:/home/ziggy/.zrok" \\\n --user "${UID:-1000}:${GID:-1000}" \\\n openziti/zrok share public \\\n --headless \\\n https://10.11.12.13:8080\n'})})]}),"\n",(0,t.jsx)(n.p,{children:"The public share URL appears near the beginning of the container's log."}),"\n",(0,t.jsx)(n.p,{children:"Let's break down those options and arguments."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--rm"})," don't save this container because it's providing a temporary public share that's destroyed when the container stops"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--network=host"})," shares the host's network with the container so that the container can reach the web server directly. This is always necessary when the web server is listening only on the host's loopback interface, e.g., ",(0,t.jsx)(n.code,{children:"https://::1:8080"}),", and may not be strictly necessary if the target is routeable from the default Docker bridge."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--volume ~/.zrok:/home/ziggy/.zrok"})," mounts the ",(0,t.jsx)(n.code,{children:"zrok"})," configuration from the Docker host into the container."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'--user "${UID:-1000}:${GID:-1000}"'})," sets the container's user to the current user on the Docker host to avoid permission issues with reading the mounted ",(0,t.jsx)(n.code,{children:"zrok"})," configuration (defaults to ",(0,t.jsx)(n.code,{children:"1000:1000"}),")."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"openziti/zrok"})," is the ",(0,t.jsx)(n.code,{children:"zrok"})," Docker image."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"share public"})," is the ",(0,t.jsx)(n.code,{children:"zrok"})," command to share the target publicly until zrok exits."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--headless"})," runs the ",(0,t.jsx)(n.code,{children:"zrok"})," command without the interactive terminal UI."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"https://10.11.12.13:8080"})," is the target web server to share."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},4971:(e,n,r)=>{r.d(n,{A:()=>k});var s=r(6540),t=r(8215),o=r(5066),i=r(3427),c=r(2303),a=r(1422);const l={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};var d=r(4848);function h(e){return!!e&&("SUMMARY"===e.tagName||h(e.parentElement))}function u(e,n){return!!e&&(e===n||u(e.parentElement,n))}function p(e){let{summary:n,children:r,...t}=e;(0,i.A)().collectAnchor(t.id);const p=(0,c.A)(),m=(0,s.useRef)(null),{collapsed:x,setCollapsed:j}=(0,a.u)({initialState:!t.open}),[k,g]=(0,s.useState)(t.open),b=s.isValidElement(n)?n:(0,d.jsx)("summary",{children:n??"Details"});return(0,d.jsxs)("details",{...t,ref:m,open:k,"data-collapsed":x,className:(0,o.A)(l.details,p&&l.isBrowser,t.className),onMouseDown:e=>{h(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const n=e.target;h(n)&&u(n,m.current)&&(e.preventDefault(),x?(j(!1),g(!0)):j(!0))},children:[b,(0,d.jsx)(a.N,{lazy:!1,collapsed:x,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{j(e),g(!e)},children:(0,d.jsx)("div",{className:l.collapsibleContent,children:r})})]})}const m={details:"details_b_Ee"},x="alert alert--info";function j(e){let{...n}=e;return(0,d.jsx)(p,{...n,className:(0,t.A)(x,m.details,n.className)})}function k(e){const n=s.Children.toArray(e.children),r=n.find((e=>s.isValidElement(e)&&"summary"===e.type)),t=(0,d.jsx)(d.Fragment,{children:n.filter((e=>e!==r))});return(0,d.jsx)(j,{...e,summary:r,children:t})}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>c});var s=r(6540);const t={},o=s.createContext(t);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2da89d45.75451235.js b/assets/js/2da89d45.75451235.js new file mode 100644 index 00000000..a4da11be --- /dev/null +++ b/assets/js/2da89d45.75451235.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6332],{2452:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"guides/docker-share/index","title":"Getting Started with Docker","description":"Overview","source":"@site/../docs/guides/docker-share/index.mdx","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/","permalink":"/docs/next/guides/docker-share/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/docker-share/index.mdx","tags":[],"version":"current","frontMatter":{"title":"Getting Started with Docker"},"sidebar":"tutorialSidebar","previous":{"title":"Permission Modes","permalink":"/docs/next/guides/permission-modes"},"next":{"title":"Public Share","permalink":"/docs/next/guides/docker-share/docker_public_share_guide"}}');var t=r(4848),o=r(8453),i=r(4971);const c={title:"Getting Started with Docker"},a=void 0,l={},d=[{value:"Overview",id:"overview",level:2},{value:"Permanent Public Share",id:"permanent-public-share",level:2},{value:"Temporary Public Share",id:"temporary-public-share",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsxs)(n.p,{children:["To follow the guides in this section you will need ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["You have the option to enable a ",(0,t.jsx)(n.code,{children:"zrok"})," account on the Docker host and mount it on the container or you can use the provided Docker Compose project files (",(0,t.jsx)(n.code,{children:"compose.yml"}),") to enable a separate ",(0,t.jsx)(n.code,{children:"zrok"})," environment for each project."]}),"\n",(0,t.jsxs)(n.p,{children:["This page provides ",(0,t.jsx)(n.code,{children:"docker"})," and ",(0,t.jsx)(n.code,{children:"docker compose"})," examples of mounting the host's ",(0,t.jsx)(n.code,{children:"zrok"})," environment on the container. You'll need to first ",(0,t.jsx)(n.a,{href:"/docs/getting-started/#installing-the-zrok-command",children:"enable zrok on the Docker host"})," to use this approach."]}),"\n",(0,t.jsx)(n.h2,{id:"permanent-public-share",children:"Permanent Public Share"}),"\n",(0,t.jsxs)(n.p,{children:["Let's say you have a ",(0,t.jsx)(n.code,{children:"compose.yml"})," file that defines a web app known within the project's bridge network as ",(0,t.jsx)(n.code,{children:"https://myapp:8080"})," and you want to publish it as a reliable, public site."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Reserve a subdomain by running ",(0,t.jsx)(n.code,{children:'zrok reserve public --unique-name "myapp" https://myapp:8080'})," on the Docker host."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Merge this YAML with ",(0,t.jsx)(n.code,{children:"compose.yml"})," or save it in the same directory as ",(0,t.jsx)(n.code,{children:"compose.override.yml"})," to let ",(0,t.jsx)(n.code,{children:"docker compose up"})," merge it for you."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'services:\n zrok:\n image: openziti/zrok\n restart: unless-stopped\n user: "${UID}"\n volumes:\n - ${HOME}/.zrok:/home/ziggy/.zrok\n environment:\n PFXLOG_NO_JSON: "true"\n command: share reserved "myapp" --headless\n'})}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The reserved share will be available at ",(0,t.jsx)(n.code,{children:"https://myapp.share.zrok.io"})," each time the ",(0,t.jsx)(n.code,{children:"zrok"})," container starts up."]}),"\n",(0,t.jsx)(n.h2,{id:"temporary-public-share",children:"Temporary Public Share"}),"\n",(0,t.jsxs)(n.p,{children:["Let's say you have a web server running on the host's private network at ",(0,t.jsx)(n.code,{children:"https://10.11.12.13:8080"}),". With one additional ",(0,t.jsx)(n.code,{children:"docker"})," command, you can share the web server publicly as long as the ",(0,t.jsx)(n.code,{children:"zrok"})," container stays running."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="BASH"',children:'docker run \\\n --rm \\\n --network=host \\\n --volume ~/.zrok:/home/ziggy/.zrok \\\n --user "${UID:-1000}:${GID:-1000}" \\\n openziti/zrok share public \\\n --headless \\\n https://10.11.12.13:8080\n'})}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsx)("summary",{children:"PowerShell"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-powershell",children:'docker.exe run `\n --rm `\n --network "host" `\n --volume "${env:USERPROFILE}\\.zrok:/.zrok" `\n --user "1000" `\n openziti/zrok share public `\n --headless `\n https://10.11.12.13:8080\n'})})]}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsx)("summary",{children:"Command Prompt (batch)"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-cmd",children:'docker.exe run ^\n --rm ^\n --network "host" ^\n --volume "%USERPROFILE%\\.zrok:/.zrok" ^\n --user "1000" ^\n openziti/zrok share public ^\n --headless ^\n https://10.11.12.13:8080\n'})})]}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsx)("summary",{children:"Windows Subsystem for Linux (WSL)"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'docker run \\\n --rm \\\n --network "host" \\\n --volume "/mnt/c/Users/$(powershell.exe -Command \'Write-Output $env:USERNAME\' | tr -d \'\\r\')/.zrok:/home/ziggy/.zrok" \\\n --user "${UID:-1000}:${GID:-1000}" \\\n openziti/zrok share public \\\n --headless \\\n https://10.11.12.13:8080\n'})})]}),"\n",(0,t.jsx)(n.p,{children:"The public share URL appears near the beginning of the container's log."}),"\n",(0,t.jsx)(n.p,{children:"Let's break down those options and arguments."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--rm"})," don't save this container because it's providing a temporary public share that's destroyed when the container stops"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--network=host"})," shares the host's network with the container so that the container can reach the web server directly. This is always necessary when the web server is listening only on the host's loopback interface, e.g., ",(0,t.jsx)(n.code,{children:"https://::1:8080"}),", and may not be strictly necessary if the target is routeable from the default Docker bridge."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--volume ~/.zrok:/home/ziggy/.zrok"})," mounts the ",(0,t.jsx)(n.code,{children:"zrok"})," configuration from the Docker host into the container."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:'--user "${UID:-1000}:${GID:-1000}"'})," sets the container's user to the current user on the Docker host to avoid permission issues with reading the mounted ",(0,t.jsx)(n.code,{children:"zrok"})," configuration (defaults to ",(0,t.jsx)(n.code,{children:"1000:1000"}),")."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"openziti/zrok"})," is the ",(0,t.jsx)(n.code,{children:"zrok"})," Docker image."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"share public"})," is the ",(0,t.jsx)(n.code,{children:"zrok"})," command to share the target publicly until zrok exits."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"--headless"})," runs the ",(0,t.jsx)(n.code,{children:"zrok"})," command without the interactive terminal UI."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"https://10.11.12.13:8080"})," is the target web server to share."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},4971:(e,n,r)=>{r.d(n,{A:()=>k});var s=r(6540),t=r(8215),o=r(5066),i=r(3427),c=r(2303),a=r(1422);const l={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};var d=r(4848);function h(e){return!!e&&("SUMMARY"===e.tagName||h(e.parentElement))}function u(e,n){return!!e&&(e===n||u(e.parentElement,n))}function p(e){let{summary:n,children:r,...t}=e;(0,i.A)().collectAnchor(t.id);const p=(0,c.A)(),m=(0,s.useRef)(null),{collapsed:x,setCollapsed:j}=(0,a.u)({initialState:!t.open}),[k,g]=(0,s.useState)(t.open),b=s.isValidElement(n)?n:(0,d.jsx)("summary",{children:n??"Details"});return(0,d.jsxs)("details",{...t,ref:m,open:k,"data-collapsed":x,className:(0,o.A)(l.details,p&&l.isBrowser,t.className),onMouseDown:e=>{h(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const n=e.target;h(n)&&u(n,m.current)&&(e.preventDefault(),x?(j(!1),g(!0)):j(!0))},children:[b,(0,d.jsx)(a.N,{lazy:!1,collapsed:x,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{j(e),g(!e)},children:(0,d.jsx)("div",{className:l.collapsibleContent,children:r})})]})}const m={details:"details_b_Ee"},x="alert alert--info";function j(e){let{...n}=e;return(0,d.jsx)(p,{...n,className:(0,t.A)(x,m.details,n.className)})}function k(e){const n=s.Children.toArray(e.children),r=n.find((e=>s.isValidElement(e)&&"summary"===e.type)),t=(0,d.jsx)(d.Fragment,{children:n.filter((e=>e!==r))});return(0,d.jsx)(j,{...e,summary:r,children:t})}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>c});var s=r(6540);const t={},o=s.createContext(t);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2e812224.77794a5c.js b/assets/js/2e812224.77794a5c.js deleted file mode 100644 index 462710a6..00000000 --- a/assets/js/2e812224.77794a5c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8471],{8611:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"guides/docker-share/docker_public_share_guide","title":"Docker Compose Public Share","description":"Goal","source":"@site/../docs/guides/docker-share/docker_public_share_guide.md","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/docker_public_share_guide","permalink":"/docs/guides/docker-share/docker_public_share_guide","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/docker-share/docker_public_share_guide.md","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"title":"Docker Compose Public Share","sidebar_position":10,"sidebar_label":"Public Share"},"sidebar":"tutorialSidebar","previous":{"title":"Getting Started with Docker","permalink":"/docs/guides/docker-share/"},"next":{"title":"Private Share","permalink":"/docs/guides/docker-share/docker_private_share_guide"}}');var o=n(4848),i=n(8453);const t={title:"Docker Compose Public Share",sidebar_position:10,sidebar_label:"Public Share"},a=void 0,c={},d=[{value:"Goal",id:"goal",level:2},{value:"Overview",id:"overview",level:2},{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"How it Works",id:"how-it-works",level:2},{value:"Create the Docker Project",id:"create-the-docker-project",level:2},{value:"Proxy Any Web Server",id:"proxy-any-web-server",level:2},{value:"Require Authentication",id:"require-authentication",level:2},{value:"OAuth Email",id:"oauth-email",level:3},{value:"Caddy is Powerful",id:"caddy-is-powerful",level:2}];function l(e){const r={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.h2,{id:"goal",children:"Goal"}),"\n",(0,o.jsx)(r.p,{children:"Publicly share a Docker Compose service with a separate zrok environment and a permanent zrok share URL."}),"\n",(0,o.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(r.p,{children:"With zrok, you can publicly share a service that's running in Docker. You need a zrok public share running somewhere that it can reach the service you're sharing. As long as that public share is running and your service is available, anyone with the address can use your service."}),"\n",(0,o.jsxs)(r.p,{children:["Here's a short article with an overview of ",(0,o.jsx)(r.a,{href:"/docs/concepts/sharing-public",children:"public sharing with zrok"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,o.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/ycov--9ZtB4",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,o.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,o.jsx)(r.p,{children:"The Docker Compose project uses your zrok account token to reserve a public subdomain and keep sharing the backend\ntarget."}),"\n",(0,o.jsx)(r.p,{children:"When the project runs it will:"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["enable a zrok environment unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/environment.json"})," exists in the ",(0,o.jsx)(r.code,{children:"zrok_env"})," volume"]}),"\n",(0,o.jsxs)(r.li,{children:["reserve a public subdomain for the service unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," exists"]}),"\n",(0,o.jsxs)(r.li,{children:["start sharing the target specified in the ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," environment variable"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"create-the-docker-project",children:"Create the Docker Project"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok public share with a reserved subdomain and switch to the new directory in your terminal."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Download ",(0,o.jsxs)(r.a,{href:"pathname:///zrok-public-reserved/compose.yml",children:["the reserved public share ",(0,o.jsx)(r.code,{children:"compose.yml"})," project file"]})," into the same directory."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Copy your zrok account's enable token from the zrok web console to your clipboard and paste it in a file named ",(0,o.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Name the Share"}),"\n",(0,o.jsxs)(r.p,{children:["This unique name becomes part of the domain name of the share, e.g. ",(0,o.jsx)(r.code,{children:"https://my-prod-app.in.zrok.io"}),". A random name is generated if you don't specify one."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_UNIQUE_NAME="my-prod-app"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Run the Compose project to start sharing the built-in demo web server. Be sure to ",(0,o.jsx)(r.code,{children:"--detach"})," so the project runs in the background if you want it to auto-restart when your computer reboots."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up --detach\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Get the public share URL from the output of the ",(0,o.jsx)(r.code,{children:"zrok-share"})," service or by peeking in the zrok console where the share will appear in the graph."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose logs zrok-share\n"})}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-buttonless",metastring:'title="Output"',children:"zrok-public-share-1 | https://w6r1vesearkj.in.zrok.io/\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.p,{children:"This concludes the minimum steps to begin sharing the demo web server. Read on to learn how to pivot to sharing any website or web service by leveraging additional zrok backend modes."}),"\n",(0,o.jsx)(r.h2,{id:"proxy-any-web-server",children:"Proxy Any Web Server"}),"\n",(0,o.jsxs)(r.p,{children:["The simplest way to share your existing HTTP server is to set ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," (e.g. ",(0,o.jsx)(r.code,{children:"https://example.com"}),") in the environment of the ",(0,o.jsx)(r.code,{children:"docker compose up"})," command. When you restart the share will auto-configure for that URL."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_TARGET="http://example.com:8080"\n'})}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose down && docker compose up\n"})}),"\n",(0,o.jsx)(r.h2,{id:"require-authentication",children:"Require Authentication"}),"\n",(0,o.jsx)(r.p,{children:"You can require a password or an OAuth login with certain email addresses."}),"\n",(0,o.jsx)(r.h3,{id:"oauth-email",children:"OAuth Email"}),"\n",(0,o.jsxs)(r.p,{children:["You can allow specific email addresse patterns by setting ",(0,o.jsx)(r.code,{children:"ZROK_OAUTH_PROVIDER"})," to ",(0,o.jsx)(r.code,{children:"github"})," or ",(0,o.jsx)(r.code,{children:"google"})," and\n",(0,o.jsx)(r.code,{children:"ZROK_OAUTH_EMAILS"}),". Read more about the OAuth features in ",(0,o.jsx)(r.a,{href:"https://blog.openziti.io/the-zrok-oauth-public-frontend",children:"this blog\npost"}),"."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_OAUTH_PROVIDER="github"\nZROK_OAUTH_EMAILS="alice@example.com *@acme.example.com"\n'})}),"\n",(0,o.jsx)(r.h2,{id:"caddy-is-powerful",children:"Caddy is Powerful"}),"\n",(0,o.jsxs)(r.p,{children:["The reserved public share project uses zrok's default backend mode, ",(0,o.jsx)(r.code,{children:"proxy"}),". Another backend mode, ",(0,o.jsx)(r.code,{children:"caddy"}),", accepts a path to ",(0,o.jsx)(r.a,{href:"https://caddyserver.com/docs/caddyfile",children:"a Caddyfile"})," as the value of ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," (",(0,o.jsx)(r.a,{href:"https://github.com/openziti/zrok/tree/main/etc/caddy",children:"zrok Caddyfile examples"}),")."]}),"\n",(0,o.jsxs)(r.p,{children:["Caddy is the most powerful and flexible backend mode in zrok. You must reserve a new public subdomain whenever you switch the backend mode, so using ",(0,o.jsx)(r.code,{children:"caddy"})," reduces the risk that you'll have to share a new frontend URL with your users."]}),"\n",(0,o.jsx)(r.p,{children:"With Caddy, you can balance the workload for websites or web services or share static sites and files or all of the above at the same time. You can update the Caddyfile and restart the Docker Compose project to start sharing the new configuration with the same reserved public subdomain."}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Create a Caddyfile. This example demonstrates proxying two HTTP servers with a weighted round-robin load balancer."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-console",metastring:'title="Caddyfile"',children:"http:// {\n # zrok requires this bind address template\n bind {{ .ZrokBindAddress }}\n reverse_proxy /* {\n to http://httpbin1:8080 http://httpbin2:8080\n lb_policy weighted_round_robin 3 2\n }\n}\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Create a file ",(0,o.jsx)(r.code,{children:"compose.override.yml"}),". This example adds two ",(0,o.jsx)(r.code,{children:"httpbin"})," containers for load balancing, and mounts the Caddyfile into the container."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-yaml",metastring:'title="compose.override.yml"',children:"services:\n httpbin1:\n image: mccutchen/go-httpbin\n expose: 8080\n httpbin2:\n image: mccutchen/go-httpbin\n expose: 8080\n zrok-share:\n volumes:\n - ./Caddyfile:/mnt/.zrok/Caddyfile\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Start a new Docker Compose project or delete the existing state volume."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose down --volumes\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(r.p,{children:["If you prefer to keep using the same zrok environment with the new share then delete ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," instead of the entire volume."]}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Run the project to load the new configuration."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up --detach\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Note the new reserved share URL from the log."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose logs zrok-share\n"})}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-buttonless",metastring:'title="Output"',children:"INFO: zrok public URL: https://88s803f2qvao.in.zrok.io/\n"})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>a});var s=n(6540);const o={},i=s.createContext(o);function t(e){const r=s.useContext(i);return s.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:t(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2e812224.9cfd84f0.js b/assets/js/2e812224.9cfd84f0.js new file mode 100644 index 00000000..ecac32da --- /dev/null +++ b/assets/js/2e812224.9cfd84f0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8471],{8611:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"guides/docker-share/docker_public_share_guide","title":"Docker Compose Public Share","description":"Goal","source":"@site/../docs/guides/docker-share/docker_public_share_guide.md","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/docker_public_share_guide","permalink":"/docs/next/guides/docker-share/docker_public_share_guide","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/docker-share/docker_public_share_guide.md","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"title":"Docker Compose Public Share","sidebar_position":10,"sidebar_label":"Public Share"},"sidebar":"tutorialSidebar","previous":{"title":"Getting Started with Docker","permalink":"/docs/next/guides/docker-share/"},"next":{"title":"Private Share","permalink":"/docs/next/guides/docker-share/docker_private_share_guide"}}');var o=n(4848),i=n(8453);const t={title:"Docker Compose Public Share",sidebar_position:10,sidebar_label:"Public Share"},a=void 0,c={},d=[{value:"Goal",id:"goal",level:2},{value:"Overview",id:"overview",level:2},{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"How it Works",id:"how-it-works",level:2},{value:"Create the Docker Project",id:"create-the-docker-project",level:2},{value:"Proxy Any Web Server",id:"proxy-any-web-server",level:2},{value:"Require Authentication",id:"require-authentication",level:2},{value:"OAuth Email",id:"oauth-email",level:3},{value:"Caddy is Powerful",id:"caddy-is-powerful",level:2}];function l(e){const r={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.h2,{id:"goal",children:"Goal"}),"\n",(0,o.jsx)(r.p,{children:"Publicly share a Docker Compose service with a separate zrok environment and a permanent zrok share URL."}),"\n",(0,o.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(r.p,{children:"With zrok, you can publicly share a service that's running in Docker. You need a zrok public share running somewhere that it can reach the service you're sharing. As long as that public share is running and your service is available, anyone with the address can use your service."}),"\n",(0,o.jsxs)(r.p,{children:["Here's a short article with an overview of ",(0,o.jsx)(r.a,{href:"/docs/next/concepts/sharing-public",children:"public sharing with zrok"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,o.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/ycov--9ZtB4",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,o.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,o.jsx)(r.p,{children:"The Docker Compose project uses your zrok account token to reserve a public subdomain and keep sharing the backend\ntarget."}),"\n",(0,o.jsx)(r.p,{children:"When the project runs it will:"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["enable a zrok environment unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/environment.json"})," exists in the ",(0,o.jsx)(r.code,{children:"zrok_env"})," volume"]}),"\n",(0,o.jsxs)(r.li,{children:["reserve a public subdomain for the service unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," exists"]}),"\n",(0,o.jsxs)(r.li,{children:["start sharing the target specified in the ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," environment variable"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"create-the-docker-project",children:"Create the Docker Project"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok public share with a reserved subdomain and switch to the new directory in your terminal."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Download ",(0,o.jsxs)(r.a,{href:"pathname:///zrok-public-reserved/compose.yml",children:["the reserved public share ",(0,o.jsx)(r.code,{children:"compose.yml"})," project file"]})," into the same directory."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Copy your zrok account's enable token from the zrok web console to your clipboard and paste it in a file named ",(0,o.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Name the Share"}),"\n",(0,o.jsxs)(r.p,{children:["This unique name becomes part of the domain name of the share, e.g. ",(0,o.jsx)(r.code,{children:"https://my-prod-app.in.zrok.io"}),". A random name is generated if you don't specify one."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_UNIQUE_NAME="my-prod-app"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Run the Compose project to start sharing the built-in demo web server. Be sure to ",(0,o.jsx)(r.code,{children:"--detach"})," so the project runs in the background if you want it to auto-restart when your computer reboots."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up --detach\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Get the public share URL from the output of the ",(0,o.jsx)(r.code,{children:"zrok-share"})," service or by peeking in the zrok console where the share will appear in the graph."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose logs zrok-share\n"})}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-buttonless",metastring:'title="Output"',children:"zrok-public-share-1 | https://w6r1vesearkj.in.zrok.io/\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.p,{children:"This concludes the minimum steps to begin sharing the demo web server. Read on to learn how to pivot to sharing any website or web service by leveraging additional zrok backend modes."}),"\n",(0,o.jsx)(r.h2,{id:"proxy-any-web-server",children:"Proxy Any Web Server"}),"\n",(0,o.jsxs)(r.p,{children:["The simplest way to share your existing HTTP server is to set ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," (e.g. ",(0,o.jsx)(r.code,{children:"https://example.com"}),") in the environment of the ",(0,o.jsx)(r.code,{children:"docker compose up"})," command. When you restart the share will auto-configure for that URL."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_TARGET="http://example.com:8080"\n'})}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose down && docker compose up\n"})}),"\n",(0,o.jsx)(r.h2,{id:"require-authentication",children:"Require Authentication"}),"\n",(0,o.jsx)(r.p,{children:"You can require a password or an OAuth login with certain email addresses."}),"\n",(0,o.jsx)(r.h3,{id:"oauth-email",children:"OAuth Email"}),"\n",(0,o.jsxs)(r.p,{children:["You can allow specific email addresse patterns by setting ",(0,o.jsx)(r.code,{children:"ZROK_OAUTH_PROVIDER"})," to ",(0,o.jsx)(r.code,{children:"github"})," or ",(0,o.jsx)(r.code,{children:"google"})," and\n",(0,o.jsx)(r.code,{children:"ZROK_OAUTH_EMAILS"}),". Read more about the OAuth features in ",(0,o.jsx)(r.a,{href:"https://blog.openziti.io/the-zrok-oauth-public-frontend",children:"this blog\npost"}),"."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_OAUTH_PROVIDER="github"\nZROK_OAUTH_EMAILS="alice@example.com *@acme.example.com"\n'})}),"\n",(0,o.jsx)(r.h2,{id:"caddy-is-powerful",children:"Caddy is Powerful"}),"\n",(0,o.jsxs)(r.p,{children:["The reserved public share project uses zrok's default backend mode, ",(0,o.jsx)(r.code,{children:"proxy"}),". Another backend mode, ",(0,o.jsx)(r.code,{children:"caddy"}),", accepts a path to ",(0,o.jsx)(r.a,{href:"https://caddyserver.com/docs/caddyfile",children:"a Caddyfile"})," as the value of ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," (",(0,o.jsx)(r.a,{href:"https://github.com/openziti/zrok/tree/main/etc/caddy",children:"zrok Caddyfile examples"}),")."]}),"\n",(0,o.jsxs)(r.p,{children:["Caddy is the most powerful and flexible backend mode in zrok. You must reserve a new public subdomain whenever you switch the backend mode, so using ",(0,o.jsx)(r.code,{children:"caddy"})," reduces the risk that you'll have to share a new frontend URL with your users."]}),"\n",(0,o.jsx)(r.p,{children:"With Caddy, you can balance the workload for websites or web services or share static sites and files or all of the above at the same time. You can update the Caddyfile and restart the Docker Compose project to start sharing the new configuration with the same reserved public subdomain."}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Create a Caddyfile. This example demonstrates proxying two HTTP servers with a weighted round-robin load balancer."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-console",metastring:'title="Caddyfile"',children:"http:// {\n # zrok requires this bind address template\n bind {{ .ZrokBindAddress }}\n reverse_proxy /* {\n to http://httpbin1:8080 http://httpbin2:8080\n lb_policy weighted_round_robin 3 2\n }\n}\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Create a file ",(0,o.jsx)(r.code,{children:"compose.override.yml"}),". This example adds two ",(0,o.jsx)(r.code,{children:"httpbin"})," containers for load balancing, and mounts the Caddyfile into the container."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-yaml",metastring:'title="compose.override.yml"',children:"services:\n httpbin1:\n image: mccutchen/go-httpbin\n expose: 8080\n httpbin2:\n image: mccutchen/go-httpbin\n expose: 8080\n zrok-share:\n volumes:\n - ./Caddyfile:/mnt/.zrok/Caddyfile\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Start a new Docker Compose project or delete the existing state volume."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose down --volumes\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(r.p,{children:["If you prefer to keep using the same zrok environment with the new share then delete ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," instead of the entire volume."]}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Run the project to load the new configuration."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up --detach\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Note the new reserved share URL from the log."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose logs zrok-share\n"})}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-buttonless",metastring:'title="Output"',children:"INFO: zrok public URL: https://88s803f2qvao.in.zrok.io/\n"})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>a});var s=n(6540);const o={},i=s.createContext(o);function t(e){const r=s.useContext(i);return s.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:t(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/339d500a.749f941d.js b/assets/js/339d500a.749f941d.js deleted file mode 100644 index afe3a6f1..00000000 --- a/assets/js/339d500a.749f941d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7752],{82:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"concepts/tunnels","title":"Sharing TCP and UDP Servers","description":"zrok includes support for sharing low-level TCP and UDP network resources using the tcpTunnel and udpTunnel backend modes.","source":"@site/../docs/concepts/tunnels.md","sourceDirName":"concepts","slug":"/concepts/tunnels","permalink":"/docs/concepts/tunnels","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/tunnels.md","tags":[],"version":"current","sidebarPosition":25,"frontMatter":{"sidebar_position":25},"sidebar":"tutorialSidebar","previous":{"title":"Sharing HTTP Servers","permalink":"/docs/concepts/http"},"next":{"title":"Sharing Websites and Files","permalink":"/docs/concepts/files"}}');var c=s(4848),t=s(8453);const o={sidebar_position:25},i="Sharing TCP and UDP Servers",d={},a=[];function l(e){const n={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.header,{children:(0,c.jsx)(n.h1,{id:"sharing-tcp-and-udp-servers",children:"Sharing TCP and UDP Servers"})}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"zrok"})," includes support for sharing low-level TCP and UDP network resources using the ",(0,c.jsx)(n.code,{children:"tcpTunnel"})," and ",(0,c.jsx)(n.code,{children:"udpTunnel"})," backend modes."]}),"\n",(0,c.jsxs)(n.p,{children:["As of version ",(0,c.jsx)(n.code,{children:"v0.4"}),", ",(0,c.jsx)(n.code,{children:"zrok"})," supports sharing TCP and UDP network resources using ",(0,c.jsx)(n.code,{children:"private"})," sharing."]}),"\n",(0,c.jsxs)(n.p,{children:["To share a raw network resource using ",(0,c.jsx)(n.code,{children:"zrok"}),", you'll want to use the ",(0,c.jsx)(n.code,{children:"zrok share private"})," command from your ",(0,c.jsx)(n.code,{children:"enable"}),"-d environment, like this:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"$ zrok share private --backend-mode tcpTunnel 192.168.9.1:22\n"})}),"\n",(0,c.jsx)(n.p,{children:"This will result in a share client starting, which looks like this:"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 access your share with: zrok access private 5adagwfl888k \u2502\u2502[PRIVATE][TCPTUNNEL]\u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsxs)(n.p,{children:["Then on the system where you want to access your shared resource (an SSH endpoint in this case), you'll need an ",(0,c.jsx)(n.code,{children:"enable"}),"-d ",(0,c.jsx)(n.code,{children:"zrok"})," environment. Run the following command (shown in the banner at the top of the ",(0,c.jsx)(n.code,{children:"zrok share"})," client above):"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"$ zrok access private 5adagwfl888k\n"})}),"\n",(0,c.jsxs)(n.p,{children:["This will start an ",(0,c.jsx)(n.code,{children:"access"})," client on this system:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 tcp://127.0.0.1:9191 -> 5adagwfl888k \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"access"})," client shows the endpoint at the top where the service can be accessed. In this case, you'll want to connect your SSH client to ",(0,c.jsx)(n.code,{children:"127.0.0.1:9191"}),". We'll just use ",(0,c.jsx)(n.code,{children:"nc"})," (netcat) to access the shared TCP port:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"$ nc 127.0.0.1 9191\nSSH-2.0-OpenSSH_9.2 FreeBSD-openssh-portable-9.2.p1,1\n"})}),"\n",(0,c.jsxs)(n.p,{children:["And both the ",(0,c.jsx)(n.code,{children:"share"})," client and the ",(0,c.jsx)(n.code,{children:"access"})," client show the traffic:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 access your share with: zrok access private 5adagwfl888k \u2502\u2502[PRIVATE] [TCPTUNNEL]\u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502Friday, 23-Jun-23 15:33:10 EDT ziti-edge-router \u2502\n\u2502connId=2147483648, logical=ziti- \u2502\n\u2502sdk[router=tls:ziti-lx:3022] -> ACCEPT 192.168.9.1:22 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 tcp://127.0.0.1:9191 -> 5adagwfl888k \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502Friday, 23-Jun-23 15:33:10 EDT 127.0.0.1:42312 -> ACCEPT 5adagwfl888k \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsxs)(n.p,{children:["Exit the ",(0,c.jsx)(n.code,{children:"access"})," client to remove the local access to the shared TCP port. Exit the ",(0,c.jsx)(n.code,{children:"share"})," client to disable further accesses to the shared resource."]}),"\n",(0,c.jsxs)(n.p,{children:["For UDP network resources just use the ",(0,c.jsx)(n.code,{children:"zrok share private --backend-mode udpTunnel"})," instead of ",(0,c.jsx)(n.code,{children:"tcpTunnel"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>i});var r=s(6540);const c={},t=r.createContext(c);function o(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/339d500a.ebc3a8b0.js b/assets/js/339d500a.ebc3a8b0.js new file mode 100644 index 00000000..639a8789 --- /dev/null +++ b/assets/js/339d500a.ebc3a8b0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7752],{82:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"concepts/tunnels","title":"Sharing TCP and UDP Servers","description":"zrok includes support for sharing low-level TCP and UDP network resources using the tcpTunnel and udpTunnel backend modes.","source":"@site/../docs/concepts/tunnels.md","sourceDirName":"concepts","slug":"/concepts/tunnels","permalink":"/docs/next/concepts/tunnels","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/tunnels.md","tags":[],"version":"current","sidebarPosition":25,"frontMatter":{"sidebar_position":25},"sidebar":"tutorialSidebar","previous":{"title":"Sharing HTTP Servers","permalink":"/docs/next/concepts/http"},"next":{"title":"Sharing Websites and Files","permalink":"/docs/next/concepts/files"}}');var c=s(4848),t=s(8453);const o={sidebar_position:25},i="Sharing TCP and UDP Servers",d={},a=[];function l(e){const n={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.header,{children:(0,c.jsx)(n.h1,{id:"sharing-tcp-and-udp-servers",children:"Sharing TCP and UDP Servers"})}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"zrok"})," includes support for sharing low-level TCP and UDP network resources using the ",(0,c.jsx)(n.code,{children:"tcpTunnel"})," and ",(0,c.jsx)(n.code,{children:"udpTunnel"})," backend modes."]}),"\n",(0,c.jsxs)(n.p,{children:["As of version ",(0,c.jsx)(n.code,{children:"v0.4"}),", ",(0,c.jsx)(n.code,{children:"zrok"})," supports sharing TCP and UDP network resources using ",(0,c.jsx)(n.code,{children:"private"})," sharing."]}),"\n",(0,c.jsxs)(n.p,{children:["To share a raw network resource using ",(0,c.jsx)(n.code,{children:"zrok"}),", you'll want to use the ",(0,c.jsx)(n.code,{children:"zrok share private"})," command from your ",(0,c.jsx)(n.code,{children:"enable"}),"-d environment, like this:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"$ zrok share private --backend-mode tcpTunnel 192.168.9.1:22\n"})}),"\n",(0,c.jsx)(n.p,{children:"This will result in a share client starting, which looks like this:"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 access your share with: zrok access private 5adagwfl888k \u2502\u2502[PRIVATE][TCPTUNNEL]\u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsxs)(n.p,{children:["Then on the system where you want to access your shared resource (an SSH endpoint in this case), you'll need an ",(0,c.jsx)(n.code,{children:"enable"}),"-d ",(0,c.jsx)(n.code,{children:"zrok"})," environment. Run the following command (shown in the banner at the top of the ",(0,c.jsx)(n.code,{children:"zrok share"})," client above):"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"$ zrok access private 5adagwfl888k\n"})}),"\n",(0,c.jsxs)(n.p,{children:["This will start an ",(0,c.jsx)(n.code,{children:"access"})," client on this system:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 tcp://127.0.0.1:9191 -> 5adagwfl888k \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"access"})," client shows the endpoint at the top where the service can be accessed. In this case, you'll want to connect your SSH client to ",(0,c.jsx)(n.code,{children:"127.0.0.1:9191"}),". We'll just use ",(0,c.jsx)(n.code,{children:"nc"})," (netcat) to access the shared TCP port:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"$ nc 127.0.0.1 9191\nSSH-2.0-OpenSSH_9.2 FreeBSD-openssh-portable-9.2.p1,1\n"})}),"\n",(0,c.jsxs)(n.p,{children:["And both the ",(0,c.jsx)(n.code,{children:"share"})," client and the ",(0,c.jsx)(n.code,{children:"access"})," client show the traffic:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 access your share with: zrok access private 5adagwfl888k \u2502\u2502[PRIVATE] [TCPTUNNEL]\u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502Friday, 23-Jun-23 15:33:10 EDT ziti-edge-router \u2502\n\u2502connId=2147483648, logical=ziti- \u2502\n\u2502sdk[router=tls:ziti-lx:3022] -> ACCEPT 192.168.9.1:22 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 tcp://127.0.0.1:9191 -> 5adagwfl888k \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502Friday, 23-Jun-23 15:33:10 EDT 127.0.0.1:42312 -> ACCEPT 5adagwfl888k \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsxs)(n.p,{children:["Exit the ",(0,c.jsx)(n.code,{children:"access"})," client to remove the local access to the shared TCP port. Exit the ",(0,c.jsx)(n.code,{children:"share"})," client to disable further accesses to the shared resource."]}),"\n",(0,c.jsxs)(n.p,{children:["For UDP network resources just use the ",(0,c.jsx)(n.code,{children:"zrok share private --backend-mode udpTunnel"})," instead of ",(0,c.jsx)(n.code,{children:"tcpTunnel"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>i});var r=s(6540);const c={},t=r.createContext(c);function o(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/35a60099.e8708e46.js b/assets/js/35a60099.e8708e46.js new file mode 100644 index 00000000..addebc84 --- /dev/null +++ b/assets/js/35a60099.e8708e46.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9148],{9429:(e,s,r)=>{r.d(s,{Ay:()=>t,RM:()=>i});var n=r(4848),c=r(8453);const i=[];function o(e){const s={a:"a",code:"code",li:"li",ul:"ul",...(0,c.R)(),...e.components};return(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"proxy"})," mode forwards requests received by the frontend to the target server (",(0,n.jsx)(s.a,{href:"/docs/next/concepts/http",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"web"})," mode serves a target folder as a file index web page (",(0,n.jsx)(s.a,{href:"/docs/next/concepts/files",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"drive"})," mode serves a target folder with WebDAV (",(0,n.jsx)(s.a,{href:"/docs/next/guides/drives",children:"guide"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"caddy"})," mode runs the built-in Caddy server with the targeted Caddyfile (",(0,n.jsx)(s.a,{href:"pathname:///simple_reverse_proxy.Caddyfile",children:"example"}),")"]}),"\n"]})}function t(e={}){const{wrapper:s}={...(0,c.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},8808:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>a,contentTitle:()=>d,default:()=>p,frontMatter:()=>t,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"concepts/sharing-public","title":"Public Shares","description":"zrok supports public sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points.","source":"@site/versioned_docs/version-0.4/concepts/sharing-public.mdx","sourceDirName":"concepts","slug":"/concepts/sharing-public","permalink":"/docs/concepts/sharing-public","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/concepts/sharing-public.mdx","tags":[],"version":"0.4","sidebarPosition":10,"frontMatter":{"sidebar_position":10},"sidebar":"tutorialSidebar","previous":{"title":"Private Shares","permalink":"/docs/concepts/sharing-private"},"next":{"title":"Reserved Shares","permalink":"/docs/concepts/sharing-reserved"}}');var c=r(4848),i=r(8453),o=r(9429);const t={sidebar_position:10},d="Public Shares",a={},l=[{value:"Peer to Public",id:"peer-to-public",level:2},{value:"Public Backend Modes",id:"public-backend-modes",level:2},...o.RM];function h(e){const s={code:"code",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.header,{children:(0,c.jsx)(s.h1,{id:"public-shares",children:"Public Shares"})}),"\n",(0,c.jsxs)(s.p,{children:[(0,c.jsx)(s.code,{children:"zrok"})," supports ",(0,c.jsx)(s.code,{children:"public"})," sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points."]}),"\n",(0,c.jsx)(s.h2,{id:"peer-to-public",children:"Peer to Public"}),"\n",(0,c.jsx)(s.p,{children:(0,c.jsx)(s.img,{alt:"zrok_public_share",src:r(2935).A+"",width:"2200",height:"916"})}),"\n",(0,c.jsxs)(s.p,{children:[(0,c.jsx)(s.code,{children:"public"})," sharing is most useful when the person or service accessing your resources does not have ",(0,c.jsx)(s.code,{children:"zrok"})," running locally and cannot make use of the ",(0,c.jsx)(s.code,{children:"private"})," sharing mode built into ",(0,c.jsx)(s.code,{children:"zrok"}),". Many users share development web servers, webhooks, and other HTTP/HTTPS resources."]}),"\n",(0,c.jsxs)(s.p,{children:["As with ",(0,c.jsx)(s.code,{children:"private"})," sharing, ",(0,c.jsx)(s.code,{children:"public"})," sharing does not require you to open any firewall ports or otherwise compromise the security of your local environments. A ",(0,c.jsx)(s.code,{children:"public"})," share goes away as soon as you terminate the ",(0,c.jsx)(s.code,{children:"zrok share"})," command."]}),"\n",(0,c.jsxs)(s.p,{children:["Using ",(0,c.jsx)(s.code,{children:"public"})," shares is easy and is accomplished using the ",(0,c.jsx)(s.code,{children:"zrok share public"})," command. Run ",(0,c.jsx)(s.code,{children:"zrok share public"})," to see the command-line help and to learn how to use ",(0,c.jsx)(s.code,{children:"public"})," shares."]}),"\n",(0,c.jsx)(s.h2,{id:"public-backend-modes",children:"Public Backend Modes"}),"\n",(0,c.jsxs)(s.p,{children:["The default backend mode is ",(0,c.jsx)(s.code,{children:"proxy"})," which targets an HTTP URL that must be reachable by the backend."]}),"\n",(0,c.jsx)(s.pre,{children:(0,c.jsx)(s.code,{className:"language-bash",metastring:'title="proxy example"',children:"zrok share public 80\n"})}),"\n",(0,c.jsx)(o.Ay,{})]})}function p(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,c.jsx)(s,{...e,children:(0,c.jsx)(h,{...e})}):h(e)}},2935:(e,s,r)=>{r.d(s,{A:()=>n});const n=r.p+"assets/images/zrok_public_share-1eec22cb798395c2bcd3ac10465f62ca.png"},8453:(e,s,r)=>{r.d(s,{R:()=>o,x:()=>t});var n=r(6540);const c={},i=n.createContext(c);function o(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/36b94792.32458398.js b/assets/js/36b94792.32458398.js new file mode 100644 index 00000000..3fea0fac --- /dev/null +++ b/assets/js/36b94792.32458398.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3921],{3160:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"guides/drives","title":"Drives","description":"The zrok drives CLI tools allow for simple, ergonomic management and synchronization of local and remote files.","source":"@site/../docs/guides/drives.mdx","sourceDirName":"guides","slug":"/guides/drives","permalink":"/docs/next/guides/drives","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/drives.mdx","tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Invitations","permalink":"/docs/next/guides/self-hosting/self-service-invite"},"next":{"title":"VPN","permalink":"/docs/next/guides/vpn/"}}');var s=r(4848),o=r(8453);const t={},c="Drives",a={},d=[{value:"Sharing a Drive",id:"sharing-a-drive",level:2},{value:"Working with a Private Drive Share",id:"working-with-a-private-drive-share",level:2},{value:"Working with Public Shares",id:"working-with-public-shares",level:2},{value:"One-way Synchronization",id:"one-way-synchronization",level:2},{value:"Drive-to-Drive Copies and Synchronization",id:"drive-to-drive-copies-and-synchronization",level:2},{value:"Copying from Drives to the Local Filesystem",id:"copying-from-drives-to-the-local-filesystem",level:2},{value:"Unique Names and Reserved Shares",id:"unique-names-and-reserved-shares",level:2},{value:"Future Enhancements",id:"future-enhancements",level:2}];function l(e){const n={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"drives",children:"Drives"})}),"\n",(0,s.jsx)(n.p,{children:"The zrok drives CLI tools allow for simple, ergonomic management and synchronization of local and remote files."}),"\n",(0,s.jsx)(n.h2,{id:"sharing-a-drive",children:"Sharing a Drive"}),"\n",(0,s.jsxs)(n.p,{children:["Virtual drives are shared through the ",(0,s.jsx)(n.code,{children:"zrok"})," CLI using the ",(0,s.jsx)(n.code,{children:"--backend-mode drive"})," flag through the ",(0,s.jsx)(n.code,{children:"zrok share"})," command, using either the ",(0,s.jsx)(n.code,{children:"public"})," or ",(0,s.jsx)(n.code,{children:"private"})," sharing modes. We'll use the ",(0,s.jsx)(n.code,{children:"private"})," sharing mode for this example:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ mkdir /tmp/junk\n$ zrok share private --headless --backend-mode drive /tmp/junk\n[ 0.124] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[cf640aac-2706-49ae-9cc9-9a497d67d9c5]} new service session\n[ 0.145] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private wkcfb58vj51l\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The command shown above creates an ephemeral, ",(0,s.jsx)(n.code,{children:"private"})," drive share pointed at the local ",(0,s.jsx)(n.code,{children:"/tmp/junk"})," folder."]}),"\n",(0,s.jsxs)(n.p,{children:["Notice that the share token allocated by ",(0,s.jsx)(n.code,{children:"zrok"})," is ",(0,s.jsx)(n.code,{children:"wkcfb58vj51l"}),". We'll use that share token to identify our virtual drive in the following operations."]}),"\n",(0,s.jsx)(n.h2,{id:"working-with-a-private-drive-share",children:"Working with a Private Drive Share"}),"\n",(0,s.jsxs)(n.p,{children:["First, let's copy a file into our virtual drive using the ",(0,s.jsx)(n.code,{children:"zrok copy"})," command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy LICENSE zrok://wkcfb58vj51l\n[ 0.119] INFO zrok/drives/sync.OneWay: => /LICENSE\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["We used the URL scheme ",(0,s.jsx)(n.code,{children:"zrok://"})," to refer to the private virtual drive we allocated above using the ",(0,s.jsx)(n.code,{children:"zrok share private"})," command. Use ",(0,s.jsx)(n.code,{children:"zrok://"})," URLs with the drives CLI tools to refer to contents of private virtual drives."]}),"\n",(0,s.jsx)(n.p,{children:"Next, let's get a directory listing of the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2024-01-19 12:16:46 -0500 EST \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.p,{children:"We can make directories on the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok mkdir zrok://wkcfb58vj51l/stuff\n$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2024-01-19 12:16:46 -0500 EST \u2502\n\u2502 DIR \u2502 stuff \u2502 \u2502 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.p,{children:"We can copy the contents of a local directory into the new directory on the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ ls -l util/\ntotal 20\n-rw-rw-r-- 1 michael michael 329 Jul 21 13:17 email.go\n-rw-rw-r-- 1 michael michael 456 Jul 21 13:17 headers.go\n-rw-rw-r-- 1 michael michael 609 Jul 21 13:17 proxy.go\n-rw-rw-r-- 1 michael michael 361 Jul 21 13:17 size.go\n-rw-rw-r-- 1 michael michael 423 Jan 2 11:57 uniqueName.go\n$ zrok copy util/ zrok://wkcfb58vj51l/stuff\n[ 0.123] INFO zrok/drives/sync.OneWay: => /email.go\n[ 0.194] INFO zrok/drives/sync.OneWay: => /headers.go\n[ 0.267] INFO zrok/drives/sync.OneWay: => /proxy.go\n[ 0.337] INFO zrok/drives/sync.OneWay: => /size.go\n[ 0.408] INFO zrok/drives/sync.OneWay: => /uniqueName.go\ncopy complete!\n$ zrok ls zrok://wkcfb58vj51l/stuff\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 email.go \u2502 329 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 headers.go \u2502 456 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 proxy.go \u2502 609 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 size.go \u2502 361 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 uniqueName.go \u2502 423 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.p,{children:"And we can remove files and directories from the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok rm zrok://wkcfb58vj51l/LICENSE\n$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 DIR \u2502 stuff \u2502 \u2502 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n$ zrok rm zrok://wkcfb58vj51l/stuff\n$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.h2,{id:"working-with-public-shares",children:"Working with Public Shares"}),"\n",(0,s.jsx)(n.p,{children:"Public shares work very similarly to private shares, they just use a different URL scheme:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok share public --headless --backend-mode drive /tmp/junk\n[ 0.708] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[05e0f48b-242b-4fd9-8edb-259488535c47]} new service session\n[ 0.878] INFO main.(*sharePublicCommand).run: access your zrok share at the following endpoints:\n https://6kiww4bn7iok.share.zrok.io\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The same commands, with a different URL scheme work with the ",(0,s.jsx)(n.code,{children:"zrok"})," drives CLI:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy util/ https://6kiww4bn7iok.share.zrok.io\n[ 0.268] INFO zrok/drives/sync.OneWay: => /email.go\n[ 0.406] INFO zrok/drives/sync.OneWay: => /headers.go\n[ 0.530] INFO zrok/drives/sync.OneWay: => /proxy.go\n[ 0.655] INFO zrok/drives/sync.OneWay: => /size.go\n[ 0.714] INFO zrok/drives/sync.OneWay: => /uniqueName.go\ncopy complete!\nmichael@fourtyfour Fri Jan 19 12:42:52 ~/Repos/nf/zrok \n$ zrok ls https://6kiww4bn7iok.share.zrok.io\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 email.go \u2502 329 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 headers.go \u2502 456 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 proxy.go \u2502 609 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 size.go \u2502 361 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 uniqueName.go \u2502 423 B \u2502 2024-01-02 11:57:14 -0500 EST \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsxs)(n.p,{children:["For basic authentication provided by public shares, the ",(0,s.jsx)(n.code,{children:"zrok"})," drives CLI offers the ",(0,s.jsx)(n.code,{children:"--basic-auth"})," flag, which accepts a ",(0,s.jsx)(n.code,{children:":"})," parameter to specify the authentication for the public virtual drive (if it's required)."]}),"\n",(0,s.jsxs)(n.p,{children:["Alternatively, the authentication can be set using the ",(0,s.jsx)(n.code,{children:"ZROK_DRIVES_BASIC_AUTH"})," environment variable:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ export ZROK_DRIVES_BASIC_AUTH=username:password\n"})}),"\n",(0,s.jsx)(n.h2,{id:"one-way-synchronization",children:"One-way Synchronization"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok copy"})," command includes a ",(0,s.jsx)(n.code,{children:"--sync"})," flag, which only copies files detected as ",(0,s.jsx)(n.em,{children:"modified"}),". ",(0,s.jsx)(n.code,{children:"zrok"})," considers a file with the same modification timestamp and size to be the same. Of course, this is not a strong guarantee that the files are equivalent. Future ",(0,s.jsx)(n.code,{children:"zrok"})," drives versions will provide a cryptographically strong mechanism (a-la ",(0,s.jsx)(n.code,{children:"rsync"})," and friends) to guarantee that files and trees of files are synchronized."]}),"\n",(0,s.jsxs)(n.p,{children:["For now, the ",(0,s.jsx)(n.code,{children:"--sync"})," flag provides a convenience mechanism to allow resuming copies of large file trees and provide a reasonable guarantee that the trees are in sync."]}),"\n",(0,s.jsxs)(n.p,{children:["Let's take a look at ",(0,s.jsx)(n.code,{children:"zrok copy --sync"})," in action:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync docs/ https://glmv049c62p7.share.zrok.io\n[ 0.636] INFO zrok/drives/sync.OneWay: => /_attic/\n[ 0.760] INFO zrok/drives/sync.OneWay: => /_attic/network/\n[ 0.816] INFO zrok/drives/sync.OneWay: => /_attic/network/_category_.json\n[ 0.928] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/\n[ 0.987] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-ctrl.service\n[ 1.048] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-ctrl.yml\n[ 1.107] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-router0.service\n[ 1.167] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-router0.yml\n[ 1.218] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok-access-public.service\n[ 1.273] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok-ctrl.service\n[ 1.328] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok-ctrl.yml\n[ 1.382] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok.io-network-skeleton.md\n[ 1.447] INFO zrok/drives/sync.OneWay: => /_attic/overview.md\n[ 1.572] INFO zrok/drives/sync.OneWay: => /_attic/sharing/\n[ 1.622] INFO zrok/drives/sync.OneWay: => /_attic/sharing/_category_.json\n[ 1.673] INFO zrok/drives/sync.OneWay: => /_attic/sharing/reserved_services.md\n[ 1.737] INFO zrok/drives/sync.OneWay: => /_attic/sharing/sharing_modes.md\n[ 1.793] INFO zrok/drives/sync.OneWay: => /_attic/v0.2_account_requests.md\n[ 1.902] INFO zrok/drives/sync.OneWay: => /_attic/v0.4_limits.md\n...\n[ 9.691] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_empty_shares.png\n[ 9.812] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_new_environment.png\n[ 9.870] INFO zrok/drives/sync.OneWay: => /images/zrok_zoom_to_fit.png\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Because the target drive was empty, ",(0,s.jsx)(n.code,{children:"zrok copy --sync"})," copied the entire contents of the local ",(0,s.jsx)(n.code,{children:"docs/"})," tree into the virtual drive. However, if we run that command again, we get:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync docs/ https://glmv049c62p7.share.zrok.io\ncopy complete!\n"})}),"\n",(0,s.jsx)(n.p,{children:"The virtual drive contents are already in sync with the local filesystem tree, so there is nothing for it to copy."}),"\n",(0,s.jsxs)(n.p,{children:["Let's alter the contents of the drive and run the ",(0,s.jsx)(n.code,{children:"--sync"})," again:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok rm https://glmv049c62p7.share.zrok.io/images\n$ zrok copy --sync docs/ https://glmv049c62p7.share.zrok.io\n[ 0.364] INFO zrok/drives/sync.OneWay: => /images/\n[ 0.456] INFO zrok/drives/sync.OneWay: => /images/zrok.png\n[ 0.795] INFO zrok/drives/sync.OneWay: => /images/zrok_cover.png\n[ 0.866] INFO zrok/drives/sync.OneWay: => /images/zrok_deployment.drawio\n...\n[ 2.254] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_empty_shares.png\n[ 2.340] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_new_environment.png\n[ 2.391] INFO zrok/drives/sync.OneWay: => /images/zrok_zoom_to_fit.png\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Because we removed the ",(0,s.jsx)(n.code,{children:"images/"})," tree from the virtual drive, ",(0,s.jsx)(n.code,{children:"zrok copy --sync"})," detected this and copied the local ",(0,s.jsx)(n.code,{children:"images/"})," tree back onto the virtual drive."]}),"\n",(0,s.jsx)(n.h2,{id:"drive-to-drive-copies-and-synchronization",children:"Drive-to-Drive Copies and Synchronization"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok copy"})," CLI can operate on pairs of virtual drives remotely, without ever having to store files locally. This allow for drive-to-drive copies and synchronization."]}),"\n",(0,s.jsx)(n.p,{children:"Here are a couple of examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync https://glmv049c62p7.share.zrok.io https://glmv049c62p7.share.zrok.io\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Specifying the same URL for both the source and the target of a ",(0,s.jsx)(n.code,{children:"--sync"})," operation should always result in nothing being copied... they are the same drive with the same state."]}),"\n",(0,s.jsx)(n.p,{children:"We can copy files between two virtual drives with a single command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync https://glmv049c62p7.share.zrok.io zrok://hsml272j3xzf\n[ 1.396] INFO zrok/drives/sync.OneWay: => /_attic/\n[ 2.083] INFO zrok/drives/sync.OneWay: => /_attic/overview.md\n[ 2.704] INFO zrok/drives/sync.OneWay: => /_attic/sharing/\n...\n[ 118.240] INFO zrok/drives/sync.OneWay: => /images/zrok_web_console_empty.png\n[ 118.920] INFO zrok/drives/sync.OneWay: => /images/zrok_enable_modal.png\n[ 119.589] INFO zrok/drives/sync.OneWay: => /images/zrok_cover.png\n[ 120.214] INFO zrok/drives/sync.OneWay: => /getting-started.mdx\ncopy complete!\n$ zrok copy --sync https://glmv049c62p7.share.zrok.io zrok://hsml272j3xzf\ncopy complete!\n"})}),"\n",(0,s.jsx)(n.h2,{id:"copying-from-drives-to-the-local-filesystem",children:"Copying from Drives to the Local Filesystem"}),"\n",(0,s.jsxs)(n.p,{children:["In the current version of the drives CLI, ",(0,s.jsx)(n.code,{children:"zrok copy"})," always assumes the destination is a directory. There is currently no way to do:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy somefile someotherfile\n"})}),"\n",(0,s.jsx)(n.p,{children:"What you'll end up with on the local filesystem is:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"somefile\nsomeotherfile/somefile\n"})}),"\n",(0,s.jsxs)(n.p,{children:["It's in the backlog to support file destinations in a future release of ",(0,s.jsx)(n.code,{children:"zrok"}),". So, when using ",(0,s.jsx)(n.code,{children:"zrok copy"}),", always take note of the destination."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"zrok copy"})," supports a default destination of ",(0,s.jsx)(n.code,{children:"file://."}),", so you can do single parameter ",(0,s.jsx)(n.code,{children:"zrok copy"})," commands like this:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok ls https://azc47r3cwjds.share.zrok.io\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n$ zrok copy https://azc47r3cwjds.share.zrok.io/LICENSE\n[ 0.260] INFO zrok/drives/sync.OneWay: => /LICENSE\ncopy complete!\n$ ls -l\ntotal 12\n-rw-rw-r-- 1 michael michael 11346 Jan 19 13:29 LICENSE\n"})}),"\n",(0,s.jsx)(n.p,{children:"You can also specify a local folder as the destination for your copy:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy https://azc47r3cwjds.share.zrok.io/LICENSE /tmp/inbox\n[ 0.221] INFO zrok/drives/sync.OneWay: => /LICENSE\ncopy complete! \n$ l /tmp/inbox\ntotal 12\n-rw-rw-r-- 1 michael michael 11346 Jan 19 13:30 LICENSE\n"})}),"\n",(0,s.jsx)(n.h2,{id:"unique-names-and-reserved-shares",children:"Unique Names and Reserved Shares"}),"\n",(0,s.jsx)(n.p,{children:"Private reserved shares with unque names can be particularly useful with the drives CLI:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok reserve private -b drive --unique-name mydrive /tmp/junk\n[ 0.315] INFO main.(*reserveCommand).run: your reserved share token is 'mydrive'\n$ zrok share reserved --headless mydrive\n[ 0.289] INFO main.(*shareReservedCommand).run: sharing target: '/tmp/junk'\n[ 0.289] INFO main.(*shareReservedCommand).run: using existing backend target: /tmp/junk\n[ 0.767] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[d519a436-9fb5-4207-afd5-7cbc28fb779a]} new service session\n[ 0.927] INFO main.(*shareReservedCommand).run: use this command to access your zrok share: 'zrok access private mydrive'\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This makes working with ",(0,s.jsx)(n.code,{children:"zrok://"})," URLs particularly convenient:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok ls zrok://mydrive\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.h2,{id:"future-enhancements",children:"Future Enhancements"}),"\n",(0,s.jsxs)(n.p,{children:["Coming in a future release of ",(0,s.jsx)(n.code,{children:"zrok"})," drives are features like:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:'two-way synchronization between multiple hosts... allowing for shared "dropbox-like" usage scenarios between multiple environments'}),"\n",(0,s.jsx)(n.li,{children:"better ergonomics for single-file destinations"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>c});var i=r(6540);const s={},o=i.createContext(s);function t(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/36b94792.799856c4.js b/assets/js/36b94792.799856c4.js deleted file mode 100644 index 2299e35b..00000000 --- a/assets/js/36b94792.799856c4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3921],{3160:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"guides/drives","title":"Drives","description":"The zrok drives CLI tools allow for simple, ergonomic management and synchronization of local and remote files.","source":"@site/../docs/guides/drives.mdx","sourceDirName":"guides","slug":"/guides/drives","permalink":"/docs/guides/drives","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/drives.mdx","tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Invitations","permalink":"/docs/guides/self-hosting/self-service-invite"},"next":{"title":"VPN","permalink":"/docs/guides/vpn/"}}');var s=r(4848),o=r(8453);const t={},c="Drives",a={},d=[{value:"Sharing a Drive",id:"sharing-a-drive",level:2},{value:"Working with a Private Drive Share",id:"working-with-a-private-drive-share",level:2},{value:"Working with Public Shares",id:"working-with-public-shares",level:2},{value:"One-way Synchronization",id:"one-way-synchronization",level:2},{value:"Drive-to-Drive Copies and Synchronization",id:"drive-to-drive-copies-and-synchronization",level:2},{value:"Copying from Drives to the Local Filesystem",id:"copying-from-drives-to-the-local-filesystem",level:2},{value:"Unique Names and Reserved Shares",id:"unique-names-and-reserved-shares",level:2},{value:"Future Enhancements",id:"future-enhancements",level:2}];function l(e){const n={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"drives",children:"Drives"})}),"\n",(0,s.jsx)(n.p,{children:"The zrok drives CLI tools allow for simple, ergonomic management and synchronization of local and remote files."}),"\n",(0,s.jsx)(n.h2,{id:"sharing-a-drive",children:"Sharing a Drive"}),"\n",(0,s.jsxs)(n.p,{children:["Virtual drives are shared through the ",(0,s.jsx)(n.code,{children:"zrok"})," CLI using the ",(0,s.jsx)(n.code,{children:"--backend-mode drive"})," flag through the ",(0,s.jsx)(n.code,{children:"zrok share"})," command, using either the ",(0,s.jsx)(n.code,{children:"public"})," or ",(0,s.jsx)(n.code,{children:"private"})," sharing modes. We'll use the ",(0,s.jsx)(n.code,{children:"private"})," sharing mode for this example:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ mkdir /tmp/junk\n$ zrok share private --headless --backend-mode drive /tmp/junk\n[ 0.124] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[cf640aac-2706-49ae-9cc9-9a497d67d9c5]} new service session\n[ 0.145] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private wkcfb58vj51l\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The command shown above creates an ephemeral, ",(0,s.jsx)(n.code,{children:"private"})," drive share pointed at the local ",(0,s.jsx)(n.code,{children:"/tmp/junk"})," folder."]}),"\n",(0,s.jsxs)(n.p,{children:["Notice that the share token allocated by ",(0,s.jsx)(n.code,{children:"zrok"})," is ",(0,s.jsx)(n.code,{children:"wkcfb58vj51l"}),". We'll use that share token to identify our virtual drive in the following operations."]}),"\n",(0,s.jsx)(n.h2,{id:"working-with-a-private-drive-share",children:"Working with a Private Drive Share"}),"\n",(0,s.jsxs)(n.p,{children:["First, let's copy a file into our virtual drive using the ",(0,s.jsx)(n.code,{children:"zrok copy"})," command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy LICENSE zrok://wkcfb58vj51l\n[ 0.119] INFO zrok/drives/sync.OneWay: => /LICENSE\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["We used the URL scheme ",(0,s.jsx)(n.code,{children:"zrok://"})," to refer to the private virtual drive we allocated above using the ",(0,s.jsx)(n.code,{children:"zrok share private"})," command. Use ",(0,s.jsx)(n.code,{children:"zrok://"})," URLs with the drives CLI tools to refer to contents of private virtual drives."]}),"\n",(0,s.jsx)(n.p,{children:"Next, let's get a directory listing of the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2024-01-19 12:16:46 -0500 EST \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.p,{children:"We can make directories on the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok mkdir zrok://wkcfb58vj51l/stuff\n$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2024-01-19 12:16:46 -0500 EST \u2502\n\u2502 DIR \u2502 stuff \u2502 \u2502 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.p,{children:"We can copy the contents of a local directory into the new directory on the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ ls -l util/\ntotal 20\n-rw-rw-r-- 1 michael michael 329 Jul 21 13:17 email.go\n-rw-rw-r-- 1 michael michael 456 Jul 21 13:17 headers.go\n-rw-rw-r-- 1 michael michael 609 Jul 21 13:17 proxy.go\n-rw-rw-r-- 1 michael michael 361 Jul 21 13:17 size.go\n-rw-rw-r-- 1 michael michael 423 Jan 2 11:57 uniqueName.go\n$ zrok copy util/ zrok://wkcfb58vj51l/stuff\n[ 0.123] INFO zrok/drives/sync.OneWay: => /email.go\n[ 0.194] INFO zrok/drives/sync.OneWay: => /headers.go\n[ 0.267] INFO zrok/drives/sync.OneWay: => /proxy.go\n[ 0.337] INFO zrok/drives/sync.OneWay: => /size.go\n[ 0.408] INFO zrok/drives/sync.OneWay: => /uniqueName.go\ncopy complete!\n$ zrok ls zrok://wkcfb58vj51l/stuff\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 email.go \u2502 329 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 headers.go \u2502 456 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 proxy.go \u2502 609 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 size.go \u2502 361 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 uniqueName.go \u2502 423 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.p,{children:"And we can remove files and directories from the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok rm zrok://wkcfb58vj51l/LICENSE\n$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 DIR \u2502 stuff \u2502 \u2502 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n$ zrok rm zrok://wkcfb58vj51l/stuff\n$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.h2,{id:"working-with-public-shares",children:"Working with Public Shares"}),"\n",(0,s.jsx)(n.p,{children:"Public shares work very similarly to private shares, they just use a different URL scheme:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok share public --headless --backend-mode drive /tmp/junk\n[ 0.708] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[05e0f48b-242b-4fd9-8edb-259488535c47]} new service session\n[ 0.878] INFO main.(*sharePublicCommand).run: access your zrok share at the following endpoints:\n https://6kiww4bn7iok.share.zrok.io\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The same commands, with a different URL scheme work with the ",(0,s.jsx)(n.code,{children:"zrok"})," drives CLI:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy util/ https://6kiww4bn7iok.share.zrok.io\n[ 0.268] INFO zrok/drives/sync.OneWay: => /email.go\n[ 0.406] INFO zrok/drives/sync.OneWay: => /headers.go\n[ 0.530] INFO zrok/drives/sync.OneWay: => /proxy.go\n[ 0.655] INFO zrok/drives/sync.OneWay: => /size.go\n[ 0.714] INFO zrok/drives/sync.OneWay: => /uniqueName.go\ncopy complete!\nmichael@fourtyfour Fri Jan 19 12:42:52 ~/Repos/nf/zrok \n$ zrok ls https://6kiww4bn7iok.share.zrok.io\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 email.go \u2502 329 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 headers.go \u2502 456 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 proxy.go \u2502 609 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 size.go \u2502 361 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 uniqueName.go \u2502 423 B \u2502 2024-01-02 11:57:14 -0500 EST \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsxs)(n.p,{children:["For basic authentication provided by public shares, the ",(0,s.jsx)(n.code,{children:"zrok"})," drives CLI offers the ",(0,s.jsx)(n.code,{children:"--basic-auth"})," flag, which accepts a ",(0,s.jsx)(n.code,{children:":"})," parameter to specify the authentication for the public virtual drive (if it's required)."]}),"\n",(0,s.jsxs)(n.p,{children:["Alternatively, the authentication can be set using the ",(0,s.jsx)(n.code,{children:"ZROK_DRIVES_BASIC_AUTH"})," environment variable:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ export ZROK_DRIVES_BASIC_AUTH=username:password\n"})}),"\n",(0,s.jsx)(n.h2,{id:"one-way-synchronization",children:"One-way Synchronization"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok copy"})," command includes a ",(0,s.jsx)(n.code,{children:"--sync"})," flag, which only copies files detected as ",(0,s.jsx)(n.em,{children:"modified"}),". ",(0,s.jsx)(n.code,{children:"zrok"})," considers a file with the same modification timestamp and size to be the same. Of course, this is not a strong guarantee that the files are equivalent. Future ",(0,s.jsx)(n.code,{children:"zrok"})," drives versions will provide a cryptographically strong mechanism (a-la ",(0,s.jsx)(n.code,{children:"rsync"})," and friends) to guarantee that files and trees of files are synchronized."]}),"\n",(0,s.jsxs)(n.p,{children:["For now, the ",(0,s.jsx)(n.code,{children:"--sync"})," flag provides a convenience mechanism to allow resuming copies of large file trees and provide a reasonable guarantee that the trees are in sync."]}),"\n",(0,s.jsxs)(n.p,{children:["Let's take a look at ",(0,s.jsx)(n.code,{children:"zrok copy --sync"})," in action:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync docs/ https://glmv049c62p7.share.zrok.io\n[ 0.636] INFO zrok/drives/sync.OneWay: => /_attic/\n[ 0.760] INFO zrok/drives/sync.OneWay: => /_attic/network/\n[ 0.816] INFO zrok/drives/sync.OneWay: => /_attic/network/_category_.json\n[ 0.928] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/\n[ 0.987] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-ctrl.service\n[ 1.048] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-ctrl.yml\n[ 1.107] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-router0.service\n[ 1.167] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-router0.yml\n[ 1.218] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok-access-public.service\n[ 1.273] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok-ctrl.service\n[ 1.328] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok-ctrl.yml\n[ 1.382] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok.io-network-skeleton.md\n[ 1.447] INFO zrok/drives/sync.OneWay: => /_attic/overview.md\n[ 1.572] INFO zrok/drives/sync.OneWay: => /_attic/sharing/\n[ 1.622] INFO zrok/drives/sync.OneWay: => /_attic/sharing/_category_.json\n[ 1.673] INFO zrok/drives/sync.OneWay: => /_attic/sharing/reserved_services.md\n[ 1.737] INFO zrok/drives/sync.OneWay: => /_attic/sharing/sharing_modes.md\n[ 1.793] INFO zrok/drives/sync.OneWay: => /_attic/v0.2_account_requests.md\n[ 1.902] INFO zrok/drives/sync.OneWay: => /_attic/v0.4_limits.md\n...\n[ 9.691] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_empty_shares.png\n[ 9.812] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_new_environment.png\n[ 9.870] INFO zrok/drives/sync.OneWay: => /images/zrok_zoom_to_fit.png\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Because the target drive was empty, ",(0,s.jsx)(n.code,{children:"zrok copy --sync"})," copied the entire contents of the local ",(0,s.jsx)(n.code,{children:"docs/"})," tree into the virtual drive. However, if we run that command again, we get:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync docs/ https://glmv049c62p7.share.zrok.io\ncopy complete!\n"})}),"\n",(0,s.jsx)(n.p,{children:"The virtual drive contents are already in sync with the local filesystem tree, so there is nothing for it to copy."}),"\n",(0,s.jsxs)(n.p,{children:["Let's alter the contents of the drive and run the ",(0,s.jsx)(n.code,{children:"--sync"})," again:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok rm https://glmv049c62p7.share.zrok.io/images\n$ zrok copy --sync docs/ https://glmv049c62p7.share.zrok.io\n[ 0.364] INFO zrok/drives/sync.OneWay: => /images/\n[ 0.456] INFO zrok/drives/sync.OneWay: => /images/zrok.png\n[ 0.795] INFO zrok/drives/sync.OneWay: => /images/zrok_cover.png\n[ 0.866] INFO zrok/drives/sync.OneWay: => /images/zrok_deployment.drawio\n...\n[ 2.254] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_empty_shares.png\n[ 2.340] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_new_environment.png\n[ 2.391] INFO zrok/drives/sync.OneWay: => /images/zrok_zoom_to_fit.png\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Because we removed the ",(0,s.jsx)(n.code,{children:"images/"})," tree from the virtual drive, ",(0,s.jsx)(n.code,{children:"zrok copy --sync"})," detected this and copied the local ",(0,s.jsx)(n.code,{children:"images/"})," tree back onto the virtual drive."]}),"\n",(0,s.jsx)(n.h2,{id:"drive-to-drive-copies-and-synchronization",children:"Drive-to-Drive Copies and Synchronization"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok copy"})," CLI can operate on pairs of virtual drives remotely, without ever having to store files locally. This allow for drive-to-drive copies and synchronization."]}),"\n",(0,s.jsx)(n.p,{children:"Here are a couple of examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync https://glmv049c62p7.share.zrok.io https://glmv049c62p7.share.zrok.io\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Specifying the same URL for both the source and the target of a ",(0,s.jsx)(n.code,{children:"--sync"})," operation should always result in nothing being copied... they are the same drive with the same state."]}),"\n",(0,s.jsx)(n.p,{children:"We can copy files between two virtual drives with a single command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync https://glmv049c62p7.share.zrok.io zrok://hsml272j3xzf\n[ 1.396] INFO zrok/drives/sync.OneWay: => /_attic/\n[ 2.083] INFO zrok/drives/sync.OneWay: => /_attic/overview.md\n[ 2.704] INFO zrok/drives/sync.OneWay: => /_attic/sharing/\n...\n[ 118.240] INFO zrok/drives/sync.OneWay: => /images/zrok_web_console_empty.png\n[ 118.920] INFO zrok/drives/sync.OneWay: => /images/zrok_enable_modal.png\n[ 119.589] INFO zrok/drives/sync.OneWay: => /images/zrok_cover.png\n[ 120.214] INFO zrok/drives/sync.OneWay: => /getting-started.mdx\ncopy complete!\n$ zrok copy --sync https://glmv049c62p7.share.zrok.io zrok://hsml272j3xzf\ncopy complete!\n"})}),"\n",(0,s.jsx)(n.h2,{id:"copying-from-drives-to-the-local-filesystem",children:"Copying from Drives to the Local Filesystem"}),"\n",(0,s.jsxs)(n.p,{children:["In the current version of the drives CLI, ",(0,s.jsx)(n.code,{children:"zrok copy"})," always assumes the destination is a directory. There is currently no way to do:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy somefile someotherfile\n"})}),"\n",(0,s.jsx)(n.p,{children:"What you'll end up with on the local filesystem is:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"somefile\nsomeotherfile/somefile\n"})}),"\n",(0,s.jsxs)(n.p,{children:["It's in the backlog to support file destinations in a future release of ",(0,s.jsx)(n.code,{children:"zrok"}),". So, when using ",(0,s.jsx)(n.code,{children:"zrok copy"}),", always take note of the destination."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"zrok copy"})," supports a default destination of ",(0,s.jsx)(n.code,{children:"file://."}),", so you can do single parameter ",(0,s.jsx)(n.code,{children:"zrok copy"})," commands like this:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok ls https://azc47r3cwjds.share.zrok.io\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n$ zrok copy https://azc47r3cwjds.share.zrok.io/LICENSE\n[ 0.260] INFO zrok/drives/sync.OneWay: => /LICENSE\ncopy complete!\n$ ls -l\ntotal 12\n-rw-rw-r-- 1 michael michael 11346 Jan 19 13:29 LICENSE\n"})}),"\n",(0,s.jsx)(n.p,{children:"You can also specify a local folder as the destination for your copy:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy https://azc47r3cwjds.share.zrok.io/LICENSE /tmp/inbox\n[ 0.221] INFO zrok/drives/sync.OneWay: => /LICENSE\ncopy complete! \n$ l /tmp/inbox\ntotal 12\n-rw-rw-r-- 1 michael michael 11346 Jan 19 13:30 LICENSE\n"})}),"\n",(0,s.jsx)(n.h2,{id:"unique-names-and-reserved-shares",children:"Unique Names and Reserved Shares"}),"\n",(0,s.jsx)(n.p,{children:"Private reserved shares with unque names can be particularly useful with the drives CLI:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok reserve private -b drive --unique-name mydrive /tmp/junk\n[ 0.315] INFO main.(*reserveCommand).run: your reserved share token is 'mydrive'\n$ zrok share reserved --headless mydrive\n[ 0.289] INFO main.(*shareReservedCommand).run: sharing target: '/tmp/junk'\n[ 0.289] INFO main.(*shareReservedCommand).run: using existing backend target: /tmp/junk\n[ 0.767] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[d519a436-9fb5-4207-afd5-7cbc28fb779a]} new service session\n[ 0.927] INFO main.(*shareReservedCommand).run: use this command to access your zrok share: 'zrok access private mydrive'\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This makes working with ",(0,s.jsx)(n.code,{children:"zrok://"})," URLs particularly convenient:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok ls zrok://mydrive\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.h2,{id:"future-enhancements",children:"Future Enhancements"}),"\n",(0,s.jsxs)(n.p,{children:["Coming in a future release of ",(0,s.jsx)(n.code,{children:"zrok"})," drives are features like:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:'two-way synchronization between multiple hosts... allowing for shared "dropbox-like" usage scenarios between multiple environments'}),"\n",(0,s.jsx)(n.li,{children:"better ergonomics for single-file destinations"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>c});var i=r(6540);const s={},o=i.createContext(s);function t(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/392083ed.4b3eee0a.js b/assets/js/392083ed.4b3eee0a.js new file mode 100644 index 00000000..a3fbda88 --- /dev/null +++ b/assets/js/392083ed.4b3eee0a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4717],{9471:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"guides/self-hosting/linux/index","title":"Self-Hosting Guide for Linux","description":"Walkthrough Video","source":"@site/versioned_docs/version-0.4/guides/self-hosting/linux/index.mdx","sourceDirName":"guides/self-hosting/linux","slug":"/guides/self-hosting/linux/","permalink":"/docs/guides/self-hosting/linux/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/linux/index.mdx","tags":[],"version":"0.4","sidebarPosition":40,"frontMatter":{"sidebar_position":40,"title":"Self-Hosting Guide for Linux","sidebar_label":"Linux"},"sidebar":"tutorialSidebar","previous":{"title":"Self Hosting","permalink":"/docs/category/self-hosting"},"next":{"title":"NGINX TLS","permalink":"/docs/guides/self-hosting/linux/nginx"}}');var t=r(4848),i=r(8453);const s={sidebar_position:40,title:"Self-Hosting Guide for Linux",sidebar_label:"Linux"},l=void 0,c={},d=[{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"Before you Begin",id:"before-you-begin",level:2},{value:"OpenZiti",id:"openziti",level:2},{value:"Install zrok",id:"install-zrok",level:2},{value:"Configure the Controller",id:"configure-the-controller",level:2},{value:"Environment Variables",id:"environment-variables",level:2},{value:"Bootstrap OpenZiti for zrok",id:"bootstrap-openziti-for-zrok",level:2},{value:"Run zrok Controller",id:"run-zrok-controller",level:2},{value:"Create zrok Frontend",id:"create-zrok-frontend",level:2},{value:"Configure the Public Frontend",id:"configure-the-public-frontend",level:2},{value:"Start Public Frontend",id:"start-public-frontend",level:2},{value:"Create a User Account",id:"create-a-user-account",level:2},{value:"Invite Additional Users",id:"invite-additional-users",level:2},{value:"Enable Your Environment",id:"enable-your-environment",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,t.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/870A5dke_u4",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,t.jsx)(n.h2,{id:"before-you-begin",children:"Before you Begin"}),"\n",(0,t.jsxs)(n.p,{children:["This will get you up and running with a self-hosted instance of ",(0,t.jsx)(n.code,{children:"zrok"}),". I'll assume you have the following:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"a Linux server with a public IP"}),"\n",(0,t.jsxs)(n.li,{children:["a wildcard DNS record like ",(0,t.jsx)(n.code,{children:"*.zrok.quigley.com"})," that resolves to the server IP"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"openziti",children:"OpenZiti"}),"\n",(0,t.jsxs)(n.p,{children:['OpenZiti (a.k.a. "Ziti") provides secure network backhaul for ',(0,t.jsx)(n.code,{children:"zrok"})," public and private shares. You need a Ziti Controller and a Ziti Router. You can run everything on the same Linux VPS."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the Ziti Controller package by following the ",(0,t.jsx)(n.a,{href:"https://openziti.io/docs/category/deployments",children:"Linux controller deployment guide"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Ensure your answer file (",(0,t.jsx)(n.code,{children:"/opt/openziti/etc/controller/bootstrap.env"}),") has the FQDN of your Linux server and an admin password defined."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Ensure your firewall allows the controller port from the answer file."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start the controller service (",(0,t.jsx)(n.code,{children:"ziti-controller.service"}),") and check the status."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Log in to the Ziti Controller"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"ziti edge login localhost:1280 -u admin -p \n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Administratively Create a Ziti Router"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'ziti edge create edge-router "router1" -o /tmp/router1.jwt\n'})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the Ziti Router package by following ",(0,t.jsx)(n.a,{href:"https://openziti.io/docs/category/deployments",children:"the Linux router deployment guide"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Ensure your answer file (",(0,t.jsx)(n.code,{children:"/opt/openziti/etc/router/bootstrap.env"}),") has the FQDN of your Linux server for both controller and router addresses and the enrollment token from the previous step."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Ensure your firewall allows the router port from the answer file."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start the router service (",(0,t.jsx)(n.code,{children:"ziti-router.service"}),") and check the status."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Verify the new router is online."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"ziti edge list edge-routers\n"})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"install-zrok",children:"Install zrok"}),"\n",(0,t.jsxs)(n.p,{children:["Debian and RPM packages are available for ",(0,t.jsx)(n.code,{children:"zrok"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo apt install zrok\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Follow ",(0,t.jsx)(n.a,{href:"/docs/guides/install/linux",children:"the Linux installation guide"})," to install the ",(0,t.jsx)(n.code,{children:"zrok"})," package from the repository or manually install the binary for your platform."]}),"\n",(0,t.jsx)(n.h2,{id:"configure-the-controller",children:"Configure the Controller"}),"\n",(0,t.jsxs)(n.p,{children:["Create a ",(0,t.jsx)(n.code,{children:"zrok"})," controller configuration file in ",(0,t.jsx)(n.code,{children:"etc/ctrl.yml"}),". The controller can terminate TLS or you may front the server with a reverse proxy that continually renews the necessary wildcard certificate (e.g., Caddy w/ a DNS provider plugin). This example will expose the non-TLS listener for the controller."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# _____ __ ___ | | __\n# |_ / \'__/ _ \\| |/ /\n# / /| | | (_) | <\n# /___|_| \\___/|_|\\_\\\n# controller configuration\n\nv: 3\n\nadmin:\n # generate these admin tokens from a source of randomness, e.g. \n # LC_ALL=C tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c32\n secrets:\n - Q8V0LqnNb5wNX9kE1fgQ0H6VlcvJybB1 # be sure to change this!\n\nendpoint:\n host: 0.0.0.0\n port: 18080\n\ninvites:\n invites_open: true\n\nstore:\n path: zrok.db\n type: sqlite3\n\nziti:\n api_endpoint: "https://127.0.0.1:1280"\n username: admin\n password: "XO0xHp75uuyeireO2xmmVlK91T7B9fpD"\n\n# you can use certbot to renew the wildcard cert for the controller with a DNS provider API token or front this `zrok` # controller with Caddy\n#tls:\n# cert_path: "/Path/To/Cert/zrok.crt"\n# key_path: "/Path/To/Cert/zrok.key"\n\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"admin"})," section defines privileged administrative credentials and must be set in the ",(0,t.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," environment variable in shells where you want to run ",(0,t.jsx)(n.code,{children:"zrok admin"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"endpoint"})," section defines where your ",(0,t.jsx)(n.code,{children:"zrok"})," controller will listen."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"store"})," section defines the local ",(0,t.jsx)(n.code,{children:"sqlite3"})," database used by the controller."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"ziti"})," section defines how the ",(0,t.jsx)(n.code,{children:"zrok"})," controller should communicate with your OpenZiti installation. When using the OpenZiti quickstart, an administrative password will be generated; the ",(0,t.jsx)(n.code,{children:"password"})," in the ",(0,t.jsx)(n.code,{children:"ziti"})," stanza should reflect this password."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.p,{children:["Be sure to see the ",(0,t.jsxs)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:r(9873).A+"",children:["reference configuration at ",(0,t.jsx)(n.code,{children:"etc/ctrl.yml"})]})," for the complete documentation of the current configuration file format for the ",(0,t.jsx)(n.code,{children:"zrok"})," controller and service instance components."]}),(0,t.jsxs)(n.p,{children:["See the separate guides on ",(0,t.jsx)(n.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics",children:"configuring metrics"})," and ",(0,t.jsx)(n.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-limits",children:"configuring limits"})," for details about both of these specialized areas of service instance configuration."]})]}),"\n",(0,t.jsx)(n.h2,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok"})," binaries are configured to work with the global ",(0,t.jsx)(n.code,{children:"zrok.io"})," service, and default to using ",(0,t.jsx)(n.code,{children:"api.zrok.io"})," as the endpoint for communicating with the service."]}),"\n",(0,t.jsxs)(n.p,{children:["To work with a self-hosted ",(0,t.jsx)(n.code,{children:"zrok"})," deployment, you'll need to set the ",(0,t.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," environment variable to point to the address where your ",(0,t.jsx)(n.code,{children:"zrok"})," controller will be listening, according to ",(0,t.jsx)(n.code,{children:"endpoint"})," in the configuration file above."]}),"\n",(0,t.jsx)(n.p,{children:"In my case, I've set:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"export ZROK_API_ENDPOINT=http://127.0.0.1:18080\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsxs)(n.a,{href:"/docs/guides/self-hosting/instance-configuration",children:["Read more about configuring your self-hosted ",(0,t.jsx)(n.code,{children:"zrok"})," instance"]}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"bootstrap-openziti-for-zrok",children:"Bootstrap OpenZiti for zrok"}),"\n",(0,t.jsxs)(n.p,{children:["With your OpenZiti network running and your configuration saved to a local file (I refer to mine as ",(0,t.jsx)(n.code,{children:"etc/ctrl.yml"})," in these examples), you're ready to bootstrap the Ziti network."]}),"\n",(0,t.jsxs)(n.p,{children:["Use the ",(0,t.jsx)(n.code,{children:"zrok admin bootstrap"})," command to bootstrap like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok admin bootstrap etc/ctrl.yml\n[ 0.002] INFO main.(*adminBootstrap).run: {\n\t...\n}\n[ 0.002] INFO zrok/controller/store.Open: database connected\n[ 0.006] INFO zrok/controller/store.(*Store).migrate: applied 0 migrations\n[ 0.006] INFO zrok/controller.Bootstrap: connecting to the ziti edge management api\n[ 0.039] INFO zrok/controller.Bootstrap: creating identity for controller ziti access\n[ 0.071] INFO zrok/controller.Bootstrap: controller identity: jKd8AINSz\n[ 0.082] INFO zrok/controller.assertIdentity: asserted identity 'jKd8AINSz'\n[ 0.085] INFO zrok/controller.assertErpForIdentity: asserted erps for 'ctrl' (jKd8AINSz)\n[ 0.085] INFO zrok/controller.Bootstrap: creating identity for frontend ziti access\n[ 0.118] INFO zrok/controller.Bootstrap: frontend identity: sqJRAINSiB\n[ 0.119] INFO zrok/controller.assertIdentity: asserted identity 'sqJRAINSiB'\n[ 0.120] INFO zrok/controller.assertErpForIdentity: asserted erps for 'frontend' (sqJRAINSiB)\n[ 0.120] WARNING zrok/controller.Bootstrap: missing public frontend for ziti id 'sqJRAINSiB'; please use 'zrok admin create frontend sqJRAINSiB public https://{token}.your.dns.name' to create a frontend instance\n[ 0.123] INFO zrok/controller.assertZrokProxyConfigType: found 'zrok.proxy.v1' config type with id '33CyjNbIepkXHN5VzGDA8L'\n[ 0.124] INFO zrok/controller.assertMetricsService: creating 'metrics' service\n[ 0.126] INFO zrok/controller.assertMetricsService: asserted 'metrics' service (5RpPZZ7T8bZf1ENjwGiPc3)\n[ 0.128] INFO zrok/controller.assertMetricsSerp: creating 'metrics' serp\n[ 0.130] INFO zrok/controller.assertMetricsSerp: asserted 'metrics' serp\n[ 0.134] INFO zrok/controller.assertCtrlMetricsBind: creating 'ctrl-metrics-bind' service policy\n[ 0.135] INFO zrok/controller.assertCtrlMetricsBind: asserted 'ctrl-metrics-bind' service policy\n[ 0.138] INFO zrok/controller.assertFrontendMetricsDial: creating 'frontend-metrics-dial' service policy\n[ 0.140] INFO zrok/controller.assertFrontendMetricsDial: asserted 'frontend-metrics-dial' service policy\n[ 0.140] INFO main.(*adminBootstrap).run: bootstrap complete!\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok admin bootstrap"})," command configures the ",(0,t.jsx)(n.code,{children:"zrok"})," database, the necessary OpenZiti identities, and all of the OpenZiti policies required to run a ",(0,t.jsx)(n.code,{children:"zrok"})," service."]}),"\n",(0,t.jsx)(n.p,{children:"Notice this warning:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[ 0.120] WARNING zrok/controller.Bootstrap: missing public frontend for ziti id 'sqJRAINSiB'; please use 'zrok admin create frontend sqJRAINSiB public https://{token}.your.dns.name' to create a frontend instance\n"})}),"\n",(0,t.jsxs)(n.p,{children:["If you find it necessary to re-run the ",(0,t.jsx)(n.code,{children:"zrok admin bootstrap"})," command, you may need to add the ",(0,t.jsx)(n.code,{children:"--skip-frontend"})," flag to avoid re-creating the default ",(0,t.jsx)(n.code,{children:"public"})," frontend's Ziti identity and router policy."]}),"\n",(0,t.jsx)(n.h2,{id:"run-zrok-controller",children:"Run zrok Controller"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok"}),' bootstrap process wants us to create a "public frontend" for our service. ',(0,t.jsx)(n.code,{children:"zrok"})," uses public frontends to allow users to specify where they would like public traffic to ingress from."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok admin create frontend"})," command requires a running ",(0,t.jsx)(n.code,{children:"zrok"})," controller, so let's start that up first:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok controller etc/ctrl.yml \n[ 0.003] INFO main.(*controllerCommand).run: {\n\t...\n}\n[ 0.016] INFO zrok/controller.inspectZiti: inspecting ziti controller configuration\n[ 0.048] INFO zrok/controller.findZrokProxyConfigType: found 'zrok.proxy.v1' config type with id '33CyjNbIepkXHN5VzGDA8L'\n[ 0.048] INFO zrok/controller/store.Open: database connected\n[ 0.048] INFO zrok/controller/store.(*Store).migrate: applied 0 migrations\n[ 0.049] INFO zrok/controller.(*metricsAgent).run: starting\n[ 0.064] INFO zrok/rest_server_zrok.setupGlobalMiddleware: configuring\n[ 0.064] INFO zrok/ui.StaticBuilder: building\n[ 0.065] INFO zrok/rest_server_zrok.(*Server).Logf: Serving zrok at http://[::]:18080\n[ 0.085] INFO zrok/controller.(*metricsAgent).listen: started\n"})}),"\n",(0,t.jsx)(n.h2,{id:"create-zrok-frontend",children:"Create zrok Frontend"}),"\n",(0,t.jsxs)(n.p,{children:["With our ",(0,t.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," and ",(0,t.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," environment variables set, we can create our public frontend like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok admin create frontend sqJRAINSiB public http://{token}.zrok.quigley.com:8080\n[ 0.037] INFO main.(*adminCreateFrontendCommand).run: created global public frontend 'WEirJNHVlcW9'\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The id of the frontend was emitted earlier in by the ",(0,t.jsx)(n.code,{children:"zrok"})," controller when we ran the bootstrap command. If you don't have that log message the you can find the id again with the ",(0,t.jsx)(n.code,{children:"ziti"})," CLI like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# log in as admin (example)\nziti edge login localhost:1280 -u admin -p XO0xHp75uuyeireO2xmmVlK91T7B9fpD\n\n# list Ziti identities created by the quickstart and bootstrap\nziti edge list identities\n"})}),"\n",(0,t.jsx)(n.p,{children:'The id is shown for the frontend identity named "public."'}),"\n",(0,t.jsxs)(n.p,{children:["Nice work! The ",(0,t.jsx)(n.code,{children:"zrok"})," controller is fully configured now that you have created the ",(0,t.jsx)(n.code,{children:"zrok"})," frontend."]}),"\n",(0,t.jsx)(n.h2,{id:"configure-the-public-frontend",children:"Configure the Public Frontend"}),"\n",(0,t.jsxs)(n.p,{children:["Create an http frontend configuration file in ",(0,t.jsx)(n.code,{children:"etc/http-frontend.yml"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"v: 3\nhost_match: zrok.quigley.com\naddress: 0.0.0.0:8080\n"})}),"\n",(0,t.jsxs)(n.p,{children:["This frontend config file has a ",(0,t.jsx)(n.code,{children:"host_match"})," pattern that represents the DNS zone you're using with this instance of ",(0,t.jsx)(n.code,{children:"zrok"}),". Incoming HTTP requests with a matching ",(0,t.jsx)(n.code,{children:"Host"})," header will be handled by this frontend. You may also specify the interface address where the frontend will listen for public access requests."]}),"\n",(0,t.jsxs)(n.p,{children:["The frontend does not provide server TLS, but you may front the server with a reverse proxy. The reverse proxy must forward the ",(0,t.jsx)(n.code,{children:"Host"})," header supplied by the viewer. This example will expose the non-TLS listener for the frontend."]}),"\n",(0,t.jsxs)(n.p,{children:["You can also specify an ",(0,t.jsx)(n.code,{children:"oauth"})," configuration in this file, full details of are found in ",(0,t.jsx)(n.a,{href:"/docs/guides/self-hosting/oauth/configuring-oauth#configuring-your-public-frontend",children:"OAuth Public Frontend Configuration"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"start-public-frontend",children:"Start Public Frontend"}),"\n",(0,t.jsx)(n.p,{children:"In another terminal window, run:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok access public etc/http-frontend.yml\n[ 0.002] INFO main.(*accessPublicCommand).run: {\n\t...\n}\n[ 0.002] INFO zrok/endpoints/public_frontend.newMetricsAgent: loaded 'public' identity\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok"})," frontend uses the ",(0,t.jsx)(n.code,{children:"public"})," identity created during the bootstrap process to securely access zrok backends. to provide public access for the ",(0,t.jsx)(n.code,{children:"zrok"})," deployment. It is expected that the configured listener for this frontend corresponds to the DNS template specified when creating the public frontend record above."]}),"\n",(0,t.jsx)(n.h2,{id:"create-a-user-account",children:"Create a User Account"}),"\n",(0,t.jsxs)(n.p,{children:["With our ",(0,t.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," and ",(0,t.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," environment variables set, we can create our first user account."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"zrok admin create account \n"})}),"\n",(0,t.jsx)(n.p,{children:"The output is the account token you will use to enable each device's zrok environment."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"SuGzRPjVDIcF\n"})}),"\n",(0,t.jsx)(n.h2,{id:"invite-additional-users",children:"Invite Additional Users"}),"\n",(0,t.jsxs)(n.p,{children:["Offer this onboarding method to your users if you have configured an email-sending service in your ",(0,t.jsx)(n.code,{children:"zrok"})," controller configuration."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok invite\nNew Email: user@domain.com\nConfirm Email: user@domain.com\ninvitation sent to 'user@domain.com'!\n"})}),"\n",(0,t.jsxs)(n.p,{children:["If you look at the console output from your ",(0,t.jsx)(n.code,{children:"zrok"})," controller, you'll see a message like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[ 238.168] INFO zrok/controller.(*inviteHandler).Handle: account request for 'user@domain.com' has registration token 'U2Ewt1UCn3ql'\n"})}),"\n",(0,t.jsxs)(n.p,{children:["You can access your ",(0,t.jsx)(n.code,{children:"zrok"})," controller's registration UI by pointing a web browser at:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"http://localhost:18080/register/U2Ewt1UCn3ql\n"})}),"\n",(0,t.jsx)(n.p,{children:"The UI will ask you to set a password for your new account. Go ahead and do that."}),"\n",(0,t.jsx)(n.p,{children:"After doing that, I see the following output in my controller console:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[ 516.778] INFO zrok/controller.(*registerHandler).Handle: created account 'user@domain.com' with token 'SuGzRPjVDIcF'\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Keep track of the token listed above (",(0,t.jsx)(n.code,{children:"SuGzRPjVDIcF"}),"). We'll use this to enable our shell for this ",(0,t.jsx)(n.code,{children:"zrok"})," deployment."]}),"\n",(0,t.jsx)(n.h2,{id:"enable-your-environment",children:"Enable Your Environment"}),"\n",(0,t.jsx)(n.p,{children:"On another device that can reach your Linux server by FQDN, configure the API endpoint and enable the environment with the account token you received when you created the first user account."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"export ZROK_API_ENDPOINT=https://zrok.quigley.com\n# or\nzrok config set apiEndpoint https://zrok.quigley.com\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"zrok enable SuGzRPjVDIcF\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"zrok environment '2AS1WZ3Sz' enabled for 'SuGzRPjVDIcF'\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"zrok status --secrets\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"Config:\n\n CONFIG VALUE SOURCE\n apiEndpoint https://zrok.quigley.com env\n\nEnvironment:\n\n PROPERTY VALUE\n Secret Token SuGzRPjVDIcF\n Ziti Identity 2AS1WZ3Sz\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Congratulations. You have a working ",(0,t.jsx)(n.code,{children:"zrok"})," environment!"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},9873:(e,n,r)=>{r.d(n,{A:()=>o});const o=r.p+"assets/files/ctrl-8eb59af1ca236b4f04e9461ebb345a53.yml"},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>l});var o=r(6540);const t={},i=o.createContext(t);function s(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3fab0acb.bd91a220.js b/assets/js/3fab0acb.bd91a220.js new file mode 100644 index 00000000..1b74d1f2 --- /dev/null +++ b/assets/js/3fab0acb.bd91a220.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[351],{3822:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"myzrok/custom-domains/index","title":"Custom Domains","description":"Overview","source":"@site/versioned_docs/version-0.4/myzrok/custom-domains/index.mdx","sourceDirName":"myzrok/custom-domains","slug":"/myzrok/custom-domains/","permalink":"/docs/myzrok/custom-domains/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/myzrok/custom-domains/index.mdx","tags":[],"version":"0.4","frontMatter":{"title":"Custom Domains"},"sidebar":"tutorialSidebar","previous":{"title":"myzrok","permalink":"/docs/category/myzrok"}}');var r=n(4848),i=n(8453);const s={title:"Custom Domains"},a=void 0,d={},c=[{value:"Overview",id:"overview",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Create Your Custom Domain",id:"create-your-custom-domain",level:3},{value:"Creating DNS Records",id:"creating-dns-records",level:3},{value:"Finalizing Your Custom Domain",id:"finalizing-your-custom-domain",level:3},{value:"Start Sharing!",id:"start-sharing",level:3}];function h(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"myzrok.io"})," is a hosted zrok-as-a-service offering that provides a way for you bring a custom DNS name for zrok shares.\nFor example, let's say you own the domain ",(0,r.jsx)(o.code,{children:"foo.example.io"}),", you can leverage zrok custom domains to\ncreate ephemeral shares such as: ",(0,r.jsx)(o.code,{children:"https://vw8jbg4ijz5g.foo.example.io"}),"\nor ",(0,r.jsx)(o.a,{href:"/docs/concepts/sharing-reserved",children:"reserved shares"})," such as ",(0,r.jsx)(o.code,{children:"https://myshare.foo.example.io"}),"."]}),"\n",(0,r.jsxs)(o.p,{children:["Custom domains require a Pro subscription with ",(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"myzrok.io"}),".\nIf you don't already have an account, you can sign up for one ",(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"here"}),"."]}),"\n",(0,r.jsxs)(o.p,{children:[(0,r.jsx)(o.a,{href:"https://myzrok.io",children:"myzrok.io"})," provides a guided setup with just a few easy steps!"]}),"\n",(0,r.jsxs)(o.ol,{children:["\n",(0,r.jsx)(o.li,{children:"Bring your own custom domain name"}),"\n",(0,r.jsx)(o.li,{children:"Create DNS records for certificate validation and traffic routing"}),"\n",(0,r.jsx)(o.li,{children:"Wait for zrok to validate your records and finalize configuration"}),"\n",(0,r.jsx)(o.li,{children:"Start sharing!"}),"\n"]}),"\n",(0,r.jsx)(o.p,{children:"Detailed setup instructions are documented below."}),"\n",(0,r.jsx)(o.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsx)(o.admonition,{type:"note",children:(0,r.jsxs)(o.p,{children:["In order to create a custom domain in zrok, ",(0,r.jsx)(o.strong,{children:"you must already own the domain you want to use."})]})}),"\n",(0,r.jsx)(o.p,{children:"During the setup process you will need to create DNS records to validate ownership and to allow a certificate to be issued\non behalf of your domain. Once you have your domain registered, you can begin the process of setting up your custom\ndomain with zrok."}),"\n",(0,r.jsx)(o.h3,{id:"create-your-custom-domain",children:"Create Your Custom Domain"}),"\n",(0,r.jsx)(o.p,{children:"Log into the myzrok console and access the domains page by clicking on the globe icon in the left navigation menu."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_domains_page",src:n(1364).A+"",width:"1022",height:"581"})}),"\n",(0,r.jsx)(o.p,{children:"Click the CREATE button on the top right of the page to get started.\nWhen you click the create button you\u2019ll be presented with a form to allow you to enable your custom domain.\nEnter your domain into the form field and click CREATE. This will begin the process for setting up your custom domain.\nA new managed TLS certificate will be created to host traffic on your domain's behalf."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_add_domain",src:n(3691).A+"",width:"844",height:"344"})}),"\n",(0,r.jsxs)(o.p,{children:["This may take a few minutes.\nYou may close the form at this time and come back when your domain is ",(0,r.jsx)(o.em,{children:"pending validation."}),"\nOnce your certificate is ready, you\u2019ll be presented with instructions on how to set up your DNS records."]}),"\n",(0,r.jsx)(o.h3,{id:"creating-dns-records",children:"Creating DNS Records"}),"\n",(0,r.jsx)(o.p,{children:"zrok will host and manage a TLS certificate for the custom domain on your behalf.\nThis process requires a DNS validation record to be created in order to prove ownership of the domain.\nFollow the prompts in the UI to create a CNAME DNS record with the name and value specified in the UI."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_add_cname",src:n(3001).A+"",width:"847",height:"402"})}),"\n",(0,r.jsx)(o.p,{children:"Next, create an A record to direct all DNS requests for your domain to a set of static IPs that are hosted by zrok."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_add_a_record",src:n(3516).A+"",width:"830",height:"527"})}),"\n",(0,r.jsx)(o.p,{children:"After you\u2019ve created your records, you can verify that they are configured properly using the instructions provided in the form."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_verify_dns",src:n(96).A+"",width:"829",height:"528"})}),"\n",(0,r.jsxs)(o.p,{children:["If the ",(0,r.jsx)(o.code,{children:"nslookup"})," command returns the IP addresses supplied for the A-record entry, then DNS for your domain is resolving properly."]}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{children:"nslookup test.foo.example.io\nServer:\t\t192.168.86.194\nAddress:\t192.168.86.194#53\n\nNon-authoritative answer:\nName:\ttest.foo.example.io\nAddress: 99.83.220.186\nName:\ttest.foo.example.io\nAddress: 52.223.6.108\n"})}),"\n",(0,r.jsx)(o.p,{children:"Once you have created your DNS records, it will take zrok a few minutes to validate that they exist.\nYou can safely close the form until your certificate has been issued."}),"\n",(0,r.jsx)(o.h3,{id:"finalizing-your-custom-domain",children:"Finalizing Your Custom Domain"}),"\n",(0,r.jsx)(o.p,{children:"After your records have been validated and your certificate has been issued, click the FINALIZE button within 72 hours to complete your custom domain setup."}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"myzrok_finalize",src:n(9461).A+"",width:"818",height:"224"})}),"\n",(0,r.jsx)(o.p,{children:"From here, myzrok.io will complete the last few steps of creating your custom domain.\nThis should only take a minute, but if you need to close the form you can find the instructions on how to share your frontend when you return."}),"\n",(0,r.jsx)(o.h3,{id:"start-sharing",children:"Start Sharing!"}),"\n",(0,r.jsx)(o.p,{children:"Once the Finalize stage has completed, you can start sharing with your custom DNS."}),"\n",(0,r.jsxs)(o.p,{children:["In order to create shares that utilize your custom DNS, you will need to specify the ",(0,r.jsx)(o.code,{children:"--frontend"})," flag when creating a share,\nor update your environment configuration to use this new frontend by default."]}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{children:"zrok share public --frontend foo-example--goPIhgtJtz\n"})}),"\n",(0,r.jsx)(o.p,{children:"You can set the custom frontend as the environment default by running:"}),"\n",(0,r.jsx)(o.pre,{children:(0,r.jsx)(o.code,{children:"zrok config set defaultFrontend foo-example--goPIhgtJtz\n"})}),"\n",(0,r.jsxs)(o.p,{children:["To validate which frontend is being used, use the ",(0,r.jsx)(o.code,{children:"zrok status"})," command, which will identify the default frontend being used:"]}),"\n",(0,r.jsx)(o.p,{children:(0,r.jsx)(o.img,{alt:"zrok_status",src:n(1679).A+"",width:"404",height:"220"})})]})}function l(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},3516:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_add_a_record-550b91f870f6e1df4903220bfa78ae25.png"},3001:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_add_cname-3cbbf4526443142174bab2d22224764a.png"},3691:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_add_domain-bcf860ac29b46cfe5981db391bcbc521.png"},1364:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_domains_page-6d92a9076e1bca9640eb301eb6716e5f.png"},9461:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_finalize-71899efbaf429d9be596363607550730.png"},96:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/myzrok_verify_dns-2f721e1a96f56f4f09f3b0b16ea8c1c5.png"},1679:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/zrok_status-0ce131c6d8bba0df50b0f2a577707f0a.png"},8453:(e,o,n)=>{n.d(o,{R:()=>s,x:()=>a});var t=n(6540);const r={},i=t.createContext(r);function s(e){const o=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4277b6a0.c2ad90e7.js b/assets/js/4277b6a0.c2ad90e7.js new file mode 100644 index 00000000..e9ad91a1 --- /dev/null +++ b/assets/js/4277b6a0.c2ad90e7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8436],{7552:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>t,default:()=>l,frontMatter:()=>a,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"guides/permission-modes","title":"Permission Modes","description":"Shares created in zrok v0.4.26 and newer now include a choice of permission mode.","source":"@site/versioned_docs/version-0.4/guides/permission-modes.md","sourceDirName":"guides","slug":"/guides/permission-modes","permalink":"/docs/guides/permission-modes","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/permission-modes.md","tags":[],"version":"0.4","sidebarPosition":22,"frontMatter":{"sidebar_position":22,"sidebar_label":"Permission Modes"},"sidebar":"tutorialSidebar","previous":{"title":"frontdoor","permalink":"/docs/guides/frontdoor"},"next":{"title":"Getting Started with Docker","permalink":"/docs/guides/docker-share/"}}');var o=n(4848),i=n(8453);const a={sidebar_position:22,sidebar_label:"Permission Modes"},t="Permission Modes",c={},d=[{value:"Creating a Share with Closed Permission Mode",id:"creating-a-share-with-closed-permission-mode",level:2},{value:"Adding and Removing Access Grants for Existing Shares",id:"adding-and-removing-access-grants-for-existing-shares",level:2},{value:"Limitations",id:"limitations",level:2}];function h(e){const s={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"permission-modes",children:"Permission Modes"})}),"\n",(0,o.jsxs)(s.p,{children:["Shares created in zrok ",(0,o.jsx)(s.code,{children:"v0.4.26"})," and newer now include a choice of ",(0,o.jsx)(s.em,{children:"permission mode"}),"."]}),"\n",(0,o.jsxs)(s.p,{children:["Shares created with zrok ",(0,o.jsx)(s.code,{children:"v0.4.25"})," and older were created using what is now called the ",(0,o.jsx)(s.em,{children:"open permission mode"}),". Whether ",(0,o.jsx)(s.em,{children:"public"})," or ",(0,o.jsx)(s.em,{children:"private"}),", these shares can be accessed by any user of the zrok service instance, as long as they know the ",(0,o.jsx)(s.em,{children:"share token"})," of the share. Effectively shares with the ",(0,o.jsx)(s.em,{children:"open permission mode"})," are accessible by any user of the zrok service instance."]}),"\n",(0,o.jsxs)(s.p,{children:["zrok now supports a ",(0,o.jsx)(s.em,{children:"closed permission mode"}),", which allows for more fine-grained control over which zrok users are allowed to privately access your shares using ",(0,o.jsx)(s.code,{children:"zrok access private"}),"."]}),"\n",(0,o.jsxs)(s.p,{children:["zrok defaults to continuing to create shares with the ",(0,o.jsx)(s.em,{children:"open permission mode"}),". This will likely change in a future release. We're leaving the default behavior in place to allow users a period of time to get comfortable with the new permission modes."]}),"\n",(0,o.jsx)(s.h2,{id:"creating-a-share-with-closed-permission-mode",children:"Creating a Share with Closed Permission Mode"}),"\n",(0,o.jsxs)(s.p,{children:["Adding the ",(0,o.jsx)(s.code,{children:"--closed"})," flag to the ",(0,o.jsx)(s.code,{children:"zrok share"})," or ",(0,o.jsx)(s.code,{children:"zrok reserve"})," commands will create shares using the ",(0,o.jsx)(s.em,{children:"closed permission mode"}),":"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok share private --headless --closed -b web .\n[ 0.066] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private 0vzwzodf0c7g\n"})}),"\n",(0,o.jsxs)(s.p,{children:["By default any environment owned by the account that created the share is ",(0,o.jsx)(s.em,{children:"allowed"})," to access the new share. But a user trying to access the share from an environment owned by a different account will enounter the following error message:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok access private 0vzwzodf0c7g\n[ERROR]: unable to access ([POST /access][401] accessUnauthorized)\n"})}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"zrok share"})," and ",(0,o.jsx)(s.code,{children:"zrok reserve"})," commands now include an ",(0,o.jsx)(s.code,{children:"--access-grant"})," flag, which allows you to specify additional zrok accounts that are allowed to access your shares:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok share private --headless --closed --access-grant anotheruser@test.com -b web .\n[ 0.062] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private y6h4at5xvn6o\n"})}),"\n",(0,o.jsxs)(s.p,{children:["And now ",(0,o.jsx)(s.code,{children:"anotheruser@test.com"})," will be allowed to access the share:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok access private --headless y6h4at5xvn6o\n[ 0.049] INFO main.(*accessPrivateCommand).run: allocated frontend 'VyvrJihAOEHD'\n[ 0.051] INFO main.(*accessPrivateCommand).run: access the zrok share at the following endpoint: http://127.0.0.1:9191\n"})}),"\n",(0,o.jsx)(s.h2,{id:"adding-and-removing-access-grants-for-existing-shares",children:"Adding and Removing Access Grants for Existing Shares"}),"\n",(0,o.jsxs)(s.p,{children:["If you've created a share (either reserved or ephemeral) and you forgot to include an access grant, or want to remove an access grant that was mistakenly added, you can use the ",(0,o.jsx)(s.code,{children:"zrok modify share"})," command to make the adjustments:"]}),"\n",(0,o.jsx)(s.p,{children:"Create a share:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok share private --headless --closed -b web .\n[ 0.064] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private s4czjylwk7wa\n"})}),"\n",(0,o.jsx)(s.p,{children:"In another shell in the same environment you can execute:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok modify share s4czjylwk7wa --add-access-grant anotheruser@test.com\nupdated\n"})}),"\n",(0,o.jsx)(s.p,{children:"And to remove the grant:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{children:"$ zrok modify share s4czjylwk7wa --remove-access-grant anotheruser@test.com\nupdated\n"})}),"\n",(0,o.jsx)(s.h2,{id:"limitations",children:"Limitations"}),"\n",(0,o.jsxs)(s.p,{children:["As of ",(0,o.jsx)(s.code,{children:"v0.4.26"})," there is currently no way to ",(0,o.jsx)(s.em,{children:"list"})," the current access grants. This will be addressed shortly in a subsequent update."]})]})}function l(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>t});var r=n(6540);const o={},i=r.createContext(o);function a(e){const s=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/47881d5c.87752858.js b/assets/js/47881d5c.87752858.js deleted file mode 100644 index ba58b043..00000000 --- a/assets/js/47881d5c.87752858.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4927],{1574:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>u,default:()=>g,frontMatter:()=>p,metadata:()=>r,toc:()=>m});const r=JSON.parse('{"id":"guides/install/linux","title":"Install zrok in Linux","description":"Linux Binary","source":"@site/../docs/guides/install/linux.mdx","sourceDirName":"guides/install","slug":"/guides/install/linux","permalink":"/docs/guides/install/linux","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/install/linux.mdx","tags":[],"version":"current","frontMatter":{"title":"Install zrok in Linux","sidebar_label":"Linux"},"sidebar":"tutorialSidebar","previous":{"title":"Install","permalink":"/docs/guides/install/"},"next":{"title":"macOS","permalink":"/docs/guides/install/macos"}}');var t=s(4848),i=s(8453),a=s(8151),o=s(595),l=s(1342),c=s(397),d=s(3902);const p={title:"Install zrok in Linux",sidebar_label:"Linux"},u=void 0,h={},m=[{value:"Linux Binary",id:"linux-binary",level:2},{value:"Install zrok from the Repository",id:"install-zrok-from-the-repository",level:2}];function x(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"linux-binary",children:"Linux Binary"}),"\n",(0,t.jsx)(a.F,{children:(0,t.jsx)("div",{className:l.A.downloadContainer,children:(0,t.jsx)(o.A,{osName:"Linux",osLogo:"/img/logo-linux.svg"})})}),"\n",(0,t.jsxs)(n.p,{children:["Download the binary distribution for your Linux distribution's architecture or run the install script below to pick the correct CPU architecture automatically. For Intel and AMD 64-bit machines use the ",(0,t.jsx)(n.code,{children:"amd64"})," distribution. For Raspberry Pi use the ",(0,t.jsx)(n.code,{children:"arm64"})," distribution."]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsxs)("summary",{children:["Manually install in ",(0,t.jsx)(n.code,{children:"~/bin/zrok"})]}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Unarchive the distribution in a temporary directory."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"mkdir /tmp/zrok && tar -xf ./zrok*linux*.tar.gz -C /tmp/zrok\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the ",(0,t.jsx)(n.code,{children:"zrok"})," executable."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"mkdir -p ~/bin && install /tmp/zrok/zrok ~/bin/\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Add ",(0,t.jsx)(n.code,{children:"~/bin"})," to your shell's executable search path. Optionally add this to your ~/.zshenv to persist the change."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"PATH=~/bin:$PATH\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["With the ",(0,t.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,t.jsx)(n.code,{children:"zrok"})," command from your shell:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:" _ \n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | < \n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]})]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsxs)("summary",{children:["Script to install binary in ",(0,t.jsx)(n.code,{children:"/usr/local/bin/zrok"})]}),(0,t.jsx)(n.p,{children:"This script auto-selects the correct architecture and may be helpful for Raspberry Pi users."}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"cd $(mktemp -d);\n\nZROK_VERSION=$(\n curl -sSf https://api.github.com/repos/openziti/zrok/releases/latest \\\n | jq -r '.tag_name'\n);\n\ncase $(uname -m) in\n x86_64) GOXARCH=amd64\n ;;\n aarch64|arm64) GOXARCH=arm64\n ;;\n arm*) GOXARCH=armv7\n ;;\n *) echo \"ERROR: unknown arch '$(uname -m)'\" >&2\n exit 1\n ;;\nesac;\n\ncurl -sSfL \\\n \"https://github.com/openziti/zrok/releases/download/${ZROK_VERSION}/zrok_${ZROK_VERSION#v}_linux_${GOXARCH}.tar.gz\" \\\n | tar -xz -f -;\n\nsudo install -o root -g root ./zrok /usr/local/bin/;\n\nzrok version;\n"})})]}),"\n",(0,t.jsxs)(n.h2,{id:"install-zrok-from-the-repository",children:["Install ",(0,t.jsx)(n.code,{children:"zrok"})," from the Repository"]}),"\n",(0,t.jsxs)(n.p,{children:["We recommend that you install ",(0,t.jsx)(n.code,{children:"zrok"})," from the Linux package repository with the manual steps or the setup script. DEB and RPM packages are available for amd64, arm64, and armv7 architectures."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["Check out ",(0,t.jsx)(n.a,{href:"/docs/guides/frontdoor?os=Linux",children:"zrok frontdoor"})," for running ",(0,t.jsx)(n.code,{children:"zrok"})," as an always-on service."]})}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"Manually set up DEB repository"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"(set -euo pipefail;\n\ncurl -sSLf https://get.openziti.io/tun/package-repos.gpg \\\n| sudo gpg --dearmor --output /usr/share/keyrings/openziti.gpg;\nsudo chmod a+r /usr/share/keyrings/openziti.gpg;\n\nsudo tee /etc/apt/sources.list.d/openziti-release.list >/dev/null </dev/null <<\\EOF;\n[OpenZitiRelease]\nname=OpenZiti Release\nbaseurl=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch\nenabled=1\ngpgcheck=0\ngpgkey=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key\nrepo_gpgcheck=1\nEOF\n\nsudo dnf update;\nsudo dnf install zrok;\nzrok version;\n)\n"})})]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"Script to set up DEB or RPM repository"}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Download the zrok install script."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"curl -sSLfo ./zrok-install.bash https://get.openziti.io/install.bash\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Inspect the script to ensure it is suitable to run as root on your system."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"less ./zrok-install.bash\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Run the script as root to add the package repo and install the ",(0,t.jsx)(n.code,{children:"zrok"})," package."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"sudo bash ./zrok-install.bash zrok\n"})}),"\n"]}),"\n"]})]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"Ansible Playbook"}),(0,t.jsxs)(d.A,{title:"Set up package repository and install zrok",children:[c.A,"\n- name: Install zrok package\ngather_facts: false\nhosts: all \nbecome: true\ntasks:\n- name: Install zrok\n ansible.builtin.package:\n name: zrok\n state: present\n"]})]})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(x,{...e})}):x(e)}},8151:(e,n,s)=>{s.d(n,{F:()=>o,d:()=>a});var r=s(6540),t=s(4848);const i=(0,r.createContext)([]),a=()=>(0,r.useContext)(i),o=e=>{let{children:n}=e;const[s,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),a(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,t.jsx)(i.Provider,{value:s,children:n})}},3902:(e,n,s)=>{s.d(n,{A:()=>a});s(6540);var r=s(382),t=s(1432),i=s(4848);const a=e=>{let{title:n,children:s}=e;const a=s.map((e=>"string"==typeof e?e.trim():r.Ay.dump(e).trim())).join("\n\n");return(0,i.jsx)("div",{children:(0,i.jsx)(t.A,{language:"yaml",title:n,children:a})})}},595:(e,n,s)=>{s.d(n,{A:()=>l});s(6540);var r=s(8151),t=s(1342),i=s(5293),a=s(4848);const o=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:s,infoText:l,guideLink:c}=e;const{colorMode:d}=(0,i.G)(),p=(0,r.d)();console.log("Assets in DownloadCard:",p);const u=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),h=p.filter((e=>e.name.includes(u)));return console.log("Filtered assets for",n,"in DownloadCard:",h),(0,a.jsxs)("div",{className:t.A.downloadCard,children:[(0,a.jsx)("div",{className:t.A.imgContainer,children:(0,a.jsx)("img",{src:s,alt:`${n} logo`})}),(0,a.jsx)("h3",{children:n}),h.length>0&&(0,a.jsx)("ul",{children:h.map(((e,n)=>(0,a.jsx)("li",{className:t.A.downloadButtons,children:(0,a.jsx)("a",{href:e.url,className:t.A.downloadLinks,children:o(e.arch)})},n)))}),c&&(0,a.jsxs)("div",{className:t.A.cardFooter,children:[(0,a.jsx)("p",{children:l}),(0,a.jsx)("a",{href:c,children:"GUIDE"}),(0,a.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},397:(e,n,s)=>{s.d(n,{A:()=>r});const r=[{name:"Set up zrok Package Repo",gather_facts:!0,hosts:"all",become:!0,tasks:[{name:"Set up apt repo",when:'ansible_os_family == "Debian"',block:[{name:"Install playbook dependencies","ansible.builtin.package":{name:["gnupg"],state:"present"}},{name:"Fetch armored pubkey","ansible.builtin.uri":{url:"https://get.openziti.io/tun/package-repos.gpg",return_content:"yes"},register:"armored_pubkey"},{name:"Dearmor pubkey","ansible.builtin.shell":'gpg --dearmor --output /usr/share/keyrings/openziti.gpg <<< "{{ armored_pubkey.content }}"\n',args:{creates:"/usr/share/keyrings/openziti.gpg",executable:"/bin/bash"}},{name:"Set pubkey filemode","ansible.builtin.file":{path:"/usr/share/keyrings/openziti.gpg",mode:"a+rX"}},{name:"Install OpenZiti repo deb source","ansible.builtin.copy":{dest:"/etc/apt/sources.list.d/openziti-release.list",content:"deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main\n"}},{name:"Refresh Repo Sources","ansible.builtin.apt":{update_cache:"yes",cache_valid_time:3600}}]},{name:"Set up yum repo",when:'ansible_os_family == "RedHat"',block:[{name:"Install OpenZiti repo rpm source","ansible.builtin.yum_repository":{name:"OpenZitiRelease",description:"OpenZiti Release",baseurl:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch",enabled:"yes",gpgkey:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key",repo_gpgcheck:"yes",gpgcheck:"no"}}]}]}]}}]); \ No newline at end of file diff --git a/assets/js/47881d5c.b488e2d0.js b/assets/js/47881d5c.b488e2d0.js new file mode 100644 index 00000000..e74e8890 --- /dev/null +++ b/assets/js/47881d5c.b488e2d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4927],{1574:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>u,default:()=>g,frontMatter:()=>p,metadata:()=>r,toc:()=>m});const r=JSON.parse('{"id":"guides/install/linux","title":"Install zrok in Linux","description":"Linux Binary","source":"@site/../docs/guides/install/linux.mdx","sourceDirName":"guides/install","slug":"/guides/install/linux","permalink":"/docs/next/guides/install/linux","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/install/linux.mdx","tags":[],"version":"current","frontMatter":{"title":"Install zrok in Linux","sidebar_label":"Linux"},"sidebar":"tutorialSidebar","previous":{"title":"Install","permalink":"/docs/next/guides/install/"},"next":{"title":"macOS","permalink":"/docs/next/guides/install/macos"}}');var t=s(4848),i=s(8453),a=s(8151),o=s(595),l=s(1342),c=s(397),d=s(3902);const p={title:"Install zrok in Linux",sidebar_label:"Linux"},u=void 0,h={},m=[{value:"Linux Binary",id:"linux-binary",level:2},{value:"Install zrok from the Repository",id:"install-zrok-from-the-repository",level:2}];function x(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"linux-binary",children:"Linux Binary"}),"\n",(0,t.jsx)(a.F,{children:(0,t.jsx)("div",{className:l.A.downloadContainer,children:(0,t.jsx)(o.A,{osName:"Linux",osLogo:"/img/logo-linux.svg"})})}),"\n",(0,t.jsxs)(n.p,{children:["Download the binary distribution for your Linux distribution's architecture or run the install script below to pick the correct CPU architecture automatically. For Intel and AMD 64-bit machines use the ",(0,t.jsx)(n.code,{children:"amd64"})," distribution. For Raspberry Pi use the ",(0,t.jsx)(n.code,{children:"arm64"})," distribution."]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsxs)("summary",{children:["Manually install in ",(0,t.jsx)(n.code,{children:"~/bin/zrok"})]}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Unarchive the distribution in a temporary directory."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"mkdir /tmp/zrok && tar -xf ./zrok*linux*.tar.gz -C /tmp/zrok\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the ",(0,t.jsx)(n.code,{children:"zrok"})," executable."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"mkdir -p ~/bin && install /tmp/zrok/zrok ~/bin/\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Add ",(0,t.jsx)(n.code,{children:"~/bin"})," to your shell's executable search path. Optionally add this to your ~/.zshenv to persist the change."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"PATH=~/bin:$PATH\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["With the ",(0,t.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,t.jsx)(n.code,{children:"zrok"})," command from your shell:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:" _ \n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | < \n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]})]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsxs)("summary",{children:["Script to install binary in ",(0,t.jsx)(n.code,{children:"/usr/local/bin/zrok"})]}),(0,t.jsx)(n.p,{children:"This script auto-selects the correct architecture and may be helpful for Raspberry Pi users."}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"cd $(mktemp -d);\n\nZROK_VERSION=$(\n curl -sSf https://api.github.com/repos/openziti/zrok/releases/latest \\\n | jq -r '.tag_name'\n);\n\ncase $(uname -m) in\n x86_64) GOXARCH=amd64\n ;;\n aarch64|arm64) GOXARCH=arm64\n ;;\n arm*) GOXARCH=armv7\n ;;\n *) echo \"ERROR: unknown arch '$(uname -m)'\" >&2\n exit 1\n ;;\nesac;\n\ncurl -sSfL \\\n \"https://github.com/openziti/zrok/releases/download/${ZROK_VERSION}/zrok_${ZROK_VERSION#v}_linux_${GOXARCH}.tar.gz\" \\\n | tar -xz -f -;\n\nsudo install -o root -g root ./zrok /usr/local/bin/;\n\nzrok version;\n"})})]}),"\n",(0,t.jsxs)(n.h2,{id:"install-zrok-from-the-repository",children:["Install ",(0,t.jsx)(n.code,{children:"zrok"})," from the Repository"]}),"\n",(0,t.jsxs)(n.p,{children:["We recommend that you install ",(0,t.jsx)(n.code,{children:"zrok"})," from the Linux package repository with the manual steps or the setup script. DEB and RPM packages are available for amd64, arm64, and armv7 architectures."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["Check out ",(0,t.jsx)(n.a,{href:"/docs/next/guides/frontdoor?os=Linux",children:"zrok frontdoor"})," for running ",(0,t.jsx)(n.code,{children:"zrok"})," as an always-on service."]})}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"Manually set up DEB repository"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"(set -euo pipefail;\n\ncurl -sSLf https://get.openziti.io/tun/package-repos.gpg \\\n| sudo gpg --dearmor --output /usr/share/keyrings/openziti.gpg;\nsudo chmod a+r /usr/share/keyrings/openziti.gpg;\n\nsudo tee /etc/apt/sources.list.d/openziti-release.list >/dev/null </dev/null <<\\EOF;\n[OpenZitiRelease]\nname=OpenZiti Release\nbaseurl=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch\nenabled=1\ngpgcheck=0\ngpgkey=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key\nrepo_gpgcheck=1\nEOF\n\nsudo dnf update;\nsudo dnf install zrok;\nzrok version;\n)\n"})})]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"Script to set up DEB or RPM repository"}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Download the zrok install script."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"curl -sSLfo ./zrok-install.bash https://get.openziti.io/install.bash\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Inspect the script to ensure it is suitable to run as root on your system."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"less ./zrok-install.bash\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Run the script as root to add the package repo and install the ",(0,t.jsx)(n.code,{children:"zrok"})," package."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",children:"sudo bash ./zrok-install.bash zrok\n"})}),"\n"]}),"\n"]})]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"Ansible Playbook"}),(0,t.jsxs)(d.A,{title:"Set up package repository and install zrok",children:[c.A,"\n- name: Install zrok package\ngather_facts: false\nhosts: all \nbecome: true\ntasks:\n- name: Install zrok\n ansible.builtin.package:\n name: zrok\n state: present\n"]})]})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(x,{...e})}):x(e)}},8151:(e,n,s)=>{s.d(n,{F:()=>o,d:()=>a});var r=s(6540),t=s(4848);const i=(0,r.createContext)([]),a=()=>(0,r.useContext)(i),o=e=>{let{children:n}=e;const[s,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),a(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,t.jsx)(i.Provider,{value:s,children:n})}},3902:(e,n,s)=>{s.d(n,{A:()=>a});s(6540);var r=s(382),t=s(1432),i=s(4848);const a=e=>{let{title:n,children:s}=e;const a=s.map((e=>"string"==typeof e?e.trim():r.Ay.dump(e).trim())).join("\n\n");return(0,i.jsx)("div",{children:(0,i.jsx)(t.A,{language:"yaml",title:n,children:a})})}},595:(e,n,s)=>{s.d(n,{A:()=>l});s(6540);var r=s(8151),t=s(1342),i=s(5293),a=s(4848);const o=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:s,infoText:l,guideLink:c}=e;const{colorMode:d}=(0,i.G)(),p=(0,r.d)();console.log("Assets in DownloadCard:",p);const u=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),h=p.filter((e=>e.name.includes(u)));return console.log("Filtered assets for",n,"in DownloadCard:",h),(0,a.jsxs)("div",{className:t.A.downloadCard,children:[(0,a.jsx)("div",{className:t.A.imgContainer,children:(0,a.jsx)("img",{src:s,alt:`${n} logo`})}),(0,a.jsx)("h3",{children:n}),h.length>0&&(0,a.jsx)("ul",{children:h.map(((e,n)=>(0,a.jsx)("li",{className:t.A.downloadButtons,children:(0,a.jsx)("a",{href:e.url,className:t.A.downloadLinks,children:o(e.arch)})},n)))}),c&&(0,a.jsxs)("div",{className:t.A.cardFooter,children:[(0,a.jsx)("p",{children:l}),(0,a.jsx)("a",{href:c,children:"GUIDE"}),(0,a.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},397:(e,n,s)=>{s.d(n,{A:()=>r});const r=[{name:"Set up zrok Package Repo",gather_facts:!0,hosts:"all",become:!0,tasks:[{name:"Set up apt repo",when:'ansible_os_family == "Debian"',block:[{name:"Install playbook dependencies","ansible.builtin.package":{name:["gnupg"],state:"present"}},{name:"Fetch armored pubkey","ansible.builtin.uri":{url:"https://get.openziti.io/tun/package-repos.gpg",return_content:"yes"},register:"armored_pubkey"},{name:"Dearmor pubkey","ansible.builtin.shell":'gpg --dearmor --output /usr/share/keyrings/openziti.gpg <<< "{{ armored_pubkey.content }}"\n',args:{creates:"/usr/share/keyrings/openziti.gpg",executable:"/bin/bash"}},{name:"Set pubkey filemode","ansible.builtin.file":{path:"/usr/share/keyrings/openziti.gpg",mode:"a+rX"}},{name:"Install OpenZiti repo deb source","ansible.builtin.copy":{dest:"/etc/apt/sources.list.d/openziti-release.list",content:"deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main\n"}},{name:"Refresh Repo Sources","ansible.builtin.apt":{update_cache:"yes",cache_valid_time:3600}}]},{name:"Set up yum repo",when:'ansible_os_family == "RedHat"',block:[{name:"Install OpenZiti repo rpm source","ansible.builtin.yum_repository":{name:"OpenZitiRelease",description:"OpenZiti Release",baseurl:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch",enabled:"yes",gpgkey:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key",repo_gpgcheck:"yes",gpgcheck:"no"}}]}]}]}}]); \ No newline at end of file diff --git a/assets/js/48341697.1ab25181.js b/assets/js/48341697.1ab25181.js new file mode 100644 index 00000000..8b1a0a85 --- /dev/null +++ b/assets/js/48341697.1ab25181.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9471],{4392:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"guides/vpn/vpn","title":"zrok VPN Guide","description":"zrok VPN backend allows for simple host-to-host VPN setup.","source":"@site/versioned_docs/version-0.4/guides/vpn/vpn.md","sourceDirName":"guides/vpn","slug":"/guides/vpn/","permalink":"/docs/guides/vpn/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/vpn/vpn.md","tags":[],"version":"0.4","frontMatter":{"sidebar_label":"VPN"},"sidebar":"tutorialSidebar","previous":{"title":"Drives","permalink":"/docs/guides/drives"},"next":{"title":"myzrok","permalink":"/docs/category/myzrok"}}');var a=s(4848),o=s(8453);const i={sidebar_label:"VPN"},t="zrok VPN Guide",c={},d=[{value:"Operating System Requirements",id:"operating-system-requirements",level:2},{value:"Windows",id:"windows",level:3},{value:"Linux",id:"linux",level:3},{value:"macOS",id:"macos",level:3},{value:"Start the VPN Server",id:"start-the-vpn-server",level:2},{value:"Reserve a VPN Share Token",id:"reserve-a-vpn-share-token",level:2},{value:"Access the VPN Share",id:"access-the-vpn-share",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"zrok-vpn-guide",children:"zrok VPN Guide"})}),"\n",(0,a.jsx)(n.p,{children:"zrok VPN backend allows for simple host-to-host VPN setup."}),"\n",(0,a.jsx)(n.h2,{id:"operating-system-requirements",children:"Operating System Requirements"}),"\n",(0,a.jsx)(n.p,{children:"zrok VPN requires elevated privileges to manage network devices."}),"\n",(0,a.jsx)(n.h3,{id:"windows",children:"Windows"}),"\n",(0,a.jsxs)(n.p,{children:["On Windows, you must run zrok VPN commands as an administrator and install Wintun by placing ",(0,a.jsx)(n.code,{children:"wintun.dll"})," (",(0,a.jsx)(n.a,{href:"https://www.wintun.net/",children:"download link"}),") in the same directory as the ",(0,a.jsx)(n.code,{children:"zrok.exe"})," executable."]}),"\n",(0,a.jsx)(n.h3,{id:"linux",children:"Linux"}),"\n",(0,a.jsxs)(n.p,{children:["On Linux, the simplest way to grant the necessary privileges is to run zrok VPN commands as root. You can enable a separate environment for root by also running ",(0,a.jsx)(n.code,{children:"zrok enable"})," as the root user, or you can prefix the commands like ",(0,a.jsx)(n.code,{children:"sudo -E"})," to allow zrok running as root to use the zrok environment owned by the current user. The minimum privilege is runing zrok VPN commands and the ",(0,a.jsx)(n.code,{children:"ip"})," command with the ",(0,a.jsx)(n.code,{children:"NET_ADMIN"})," kernel capability. The ",(0,a.jsx)(n.code,{children:"zrok-share.service"})," unit has a commented example to grant ",(0,a.jsx)(n.code,{children:"NET_ADMIN"})," as an Ambient Capability."]}),"\n",(0,a.jsx)(n.h3,{id:"macos",children:"macOS"}),"\n",(0,a.jsxs)(n.p,{children:["On macOS, you must run zrok VPN commands as root. You can prefix the zrok command with ",(0,a.jsx)(n.code,{children:"sudo -E"})," to allow zrok running as root to use the zrok environment owned by the current user."]}),"\n",(0,a.jsx)(n.h2,{id:"start-the-vpn-server",children:"Start the VPN Server"}),"\n",(0,a.jsxs)(n.p,{children:["VPN is shared through the ",(0,a.jsx)(n.code,{children:"vpn"})," backend of ",(0,a.jsx)(n.code,{children:"zrok"})," command."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@hermes $ sudo -E zrok share private --headless --backend-mode vpn\n[ 0.542] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[589d443c-f59d-4fc8-8c48-76609b7fb402]} new service session\n[ 0.705] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private 3rq7torslq3n\n[ 0.705] INFO zrok/endpoints/vpn.(*Backend).Run: started\n"})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"VPN share",src:s(7224).A+"",width:"1626",height:"1314"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"sudo"})," or equivalent invocation is required because VPN mode needs to create a virtual network device (",(0,a.jsx)(n.code,{children:"tun"}),")\n",(0,a.jsx)(n.code,{children:"-E"})," option allows ",(0,a.jsx)(n.code,{children:"zrok"})," to find your zrok configuration files (in your ",(0,a.jsx)(n.code,{children:"$HOME/.zrok"}),")"]}),"\n",(0,a.jsxs)(n.p,{children:["By default ",(0,a.jsx)(n.code,{children:"vpn"})," backend uses subnet ",(0,a.jsx)(n.code,{children:"10.122.0.0/16"})," and assigns ",(0,a.jsx)(n.code,{children:"10.122.0.1"})," to the host that stared VPN share."]}),"\n",(0,a.jsxs)(n.p,{children:["Example output from ",(0,a.jsx)(n.code,{children:"ifconfig"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-text",children:"tun0: flags=4305 mtu 16384\n inet 10.122.0.1 netmask 255.255.0.0 destination 10.122.0.1\n inet6 fe80::705f:24e4:dcfc:a6b2 prefixlen 64 scopeid 0x20\n inet6 fd00:7a72:6f6b::1 prefixlen 64 scopeid 0x0\n unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)\n RX packets 0 bytes 0 (0.0 B)\n RX errors 0 dropped 0 overruns 0 frame 0\n TX packets 27 bytes 3236 (3.2 KB)\n TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0\n"})}),"\n",(0,a.jsxs)(n.p,{children:["Default IP/subnet setting can be overridden by adding ",(0,a.jsx)(n.code,{children:""})," parameter:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sudo -E zrok share private --headless --backend-mode vpn 192.168.42.12/24\n"})}),"\n",(0,a.jsx)(n.h2,{id:"reserve-a-vpn-share-token",children:"Reserve a VPN Share Token"}),"\n",(0,a.jsx)(n.p,{children:"As with all backend modes, you can reserve a share token for a VPN share."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@hermes $ zrok reserve private --backend-mode vpn\n[ 0.297] INFO main.(*reserveCommand).run: your reserved share token is 'k77y2cl7jmjl'\n\neugene@hermes $ sudo -E zrok share reserved k77y2cl7jmjl --headless\n[ 0.211] INFO main.(*shareReservedCommand).run: sharing target: '10.122.0.1/16'\n[ 0.211] INFO main.(*shareReservedCommand).run: using existing backend target: 10.122.0.1/16\n[ 0.463] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[22c5708d-e2f2-41aa-a507-454055f8bfcc]} new service session\n[ 0.641] INFO main.(*shareReservedCommand).run: use this command to access your zrok share: 'zrok access private k77y2cl7jmjl'\n[\n"})}),"\n",(0,a.jsx)(n.h2,{id:"access-the-vpn-share",children:"Access the VPN Share"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@calculon % sudo -E zrok access private --headless k77y2cl7jmjl\n[ 0.201] INFO main.(*accessPrivateCommand).run: allocated frontend '50B5hloP1s1X'\n[ 0.662] INFO main.(*accessPrivateCommand).run: access the zrok share at the following endpoint: VPN:\n[ 0.662] INFO main.(*accessPrivateCommand).run: 10.122.0.1 -> CONNECTED Welcome to zrok VPN\n[ 0.662] INFO zrok/endpoints/vpn.(*Frontend).Run: connected:Welcome to zrok VPN\n"})}),"\n",(0,a.jsxs)(n.p,{children:['zrok creates a virtual network device, i.e., a "tun" interface, when you run ',(0,a.jsx)(n.code,{children:"zrok access"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Example output from ",(0,a.jsx)(n.code,{children:"ifconfig"})," run on a VPN client device:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"utun5: flags=8051 mtu 1500\n inet 10.122.0.3 --\x3e 10.122.0.1 netmask 0xff000000\n inet6 fe80::ce08:faff:fe8a:7b25%utun5 prefixlen 64 scopeid 0x14\n nd6 options=201\n"})}),"\n",(0,a.jsxs)(n.p,{children:["At this point a VPN tunnel is active between your server and client.\nIn the example above server is ",(0,a.jsx)(n.code,{children:"hermes(10.122.0.1)"})," and client is ",(0,a.jsx)(n.code,{children:"calculon(10.122.0.3)"}),".\nAll devices in the VPN can access one another by IP address."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@calculon ~ % ssh eugene@10.122.0.1\nWelcome to Ubuntu 23.10 (GNU/Linux 6.5.0-27-generic x86_64)\n\n * Documentation: https://help.ubuntu.com\n * Management: https://landscape.canonical.com\n * Support: https://ubuntu.com/pro\n\n0 updates can be applied immediately.\n\nLast login: Tue Apr 16 09:27:13 2024 from 127.0.0.1\n\neugene@hermes:~$ who am i\neugene pts/8 2024-04-16 10:04 (10.122.0.3)\n\neugene@hermes:~$\n"})}),"\n",(0,a.jsx)(n.p,{children:"You can also make a reverse(server-to-client) connection:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"eugene@hermes:~$ ssh 10.122.0.3\nLast login: Tue Apr 16 09:57:28 2024\n\neugene@calculon ~ % who am i\neugene ttys008 Apr 16 10:06 (10.122.0.1)\n"})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},7224:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/vpn-share-077094eabd79a2e072ee4c40f8e0fd31.png"},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>t});var r=s(6540);const a={},o=r.createContext(a);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4f1777fd.7a01d5ed.js b/assets/js/4f1777fd.7a01d5ed.js deleted file mode 100644 index e689e6cf..00000000 --- a/assets/js/4f1777fd.7a01d5ed.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[277],{7513:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"guides/self-hosting/self-service-invite","title":"Invitations","description":"This is how to set up self-service invitations for your users to get an account on your self-hosted zrok instance.","source":"@site/../docs/guides/self-hosting/self-service-invite.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/self-service-invite","permalink":"/docs/guides/self-hosting/self-service-invite","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/self-service-invite.mdx","tags":[],"version":"current","frontMatter":{"title":"Invitations"},"sidebar":"tutorialSidebar","previous":{"title":"Instance Config","permalink":"/docs/guides/self-hosting/instance-configuration"},"next":{"title":"Drives","permalink":"/docs/guides/drives"}}');var t=n(4848),o=n(8453);const r={title:"Invitations"},c=void 0,l={},a=[{value:"Overview",id:"overview",level:2},{value:"The Self-Service User Experience",id:"the-self-service-user-experience",level:2},{value:"How it Works",id:"how-it-works",level:2}];function d(e){const s={code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"This is how to set up self-service invitations for your users to get an account on your self-hosted zrok instance."}),"\n",(0,t.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["You can create user accounts directly with the ",(0,t.jsx)(s.code,{children:"zrok admin create account"})," CLI or API instead of inviting them."]}),"\n",(0,t.jsx)(s.li,{children:"You can welcome users to invite themselves via email."}),"\n",(0,t.jsx)(s.li,{children:"To enable self-service invitations you must also configure the controller to send email."}),"\n",(0,t.jsx)(s.li,{children:"You can require an invitation token if you want to restrict self-service."}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"the-self-service-user-experience",children:"The Self-Service User Experience"}),"\n",(0,t.jsx)(s.p,{children:"This is what your users will do."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"zrok invite\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-buttonless",metastring:'title="Output"',children:"enter and confirm your email address...\n\n> user@domain.com\n> user@domain.com\n\n[ Submit ]\n\ninvitation sent to 'user@domain.com'!\n"})}),"\n",(0,t.jsx)(s.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.code,{children:"zrok invite"})," command presents a small form that allows you to enter (and then confirm) your email address. Tabbing to the ",(0,t.jsx)(s.code,{children:"[ Submit ]"})," button will start the invitation process."]}),"\n",(0,t.jsxs)(s.p,{children:["Next, check the email where you sent the invite. You should receive a message asking you to click a link to create your ",(0,t.jsx)(s.code,{children:"zrok"})," account. When you click that link, you will be brought to a web page that will allow you to set a password for your new account."]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Enter a Password",src:n(8083).A+"",width:"1791",height:"1362"})}),"\n",(0,t.jsxs)(s.p,{children:["Enter a password and its confirmation, and click the ",(0,t.jsx)(s.code,{children:"Register Account"})," button. You'll see the following:"]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Successful Registration",src:n(4159).A+"",width:"1791",height:"1369"})}),"\n",(0,t.jsxs)(s.p,{children:['For now, we\'ll ignore the "enable your shell for zrok" section. Just click the ',(0,t.jsx)(s.code,{children:"zrok web portal"})," link:"]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Web Login",src:n(6658).A+"",width:"1791",height:"1362"})}),"\n",(0,t.jsxs)(s.p,{children:["After clicking the ",(0,t.jsx)(s.code,{children:"Log In"})," button, you'll be brought into the ",(0,t.jsx)(s.code,{children:"zrok"})," ",(0,t.jsx)(s.em,{children:"web console"}),":"]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Web Console; Empty",src:n(3824).A+"",width:"1791",height:"1362"})}),"\n",(0,t.jsxs)(s.p,{children:["Congratulations! Your ",(0,t.jsx)(s.code,{children:"zrok"})," account is ready to go!"]})]})}function u(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},4159:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_registration_success-05e7e328284f6dc38cd993322698d38b.png"},8083:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_verify-22a26d401b9a77a4278f3c0f54d2a981.png"},3824:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_web_console_empty-cce147eaf8e7bc83abe556336a4aea98.png"},6658:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_web_login-a6161cc79e66932fab76994bdfb8f9c1.png"},8453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>c});var i=n(6540);const t={},o=i.createContext(t);function r(e){const s=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4f1777fd.a1f121f7.js b/assets/js/4f1777fd.a1f121f7.js new file mode 100644 index 00000000..2d40724e --- /dev/null +++ b/assets/js/4f1777fd.a1f121f7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[277],{7513:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"guides/self-hosting/self-service-invite","title":"Invitations","description":"This is how to set up self-service invitations for your users to get an account on your self-hosted zrok instance.","source":"@site/../docs/guides/self-hosting/self-service-invite.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/self-service-invite","permalink":"/docs/next/guides/self-hosting/self-service-invite","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/self-service-invite.mdx","tags":[],"version":"current","frontMatter":{"title":"Invitations"},"sidebar":"tutorialSidebar","previous":{"title":"Instance Config","permalink":"/docs/next/guides/self-hosting/instance-configuration"},"next":{"title":"Drives","permalink":"/docs/next/guides/drives"}}');var t=n(4848),o=n(8453);const r={title:"Invitations"},c=void 0,l={},a=[{value:"Overview",id:"overview",level:2},{value:"The Self-Service User Experience",id:"the-self-service-user-experience",level:2},{value:"How it Works",id:"how-it-works",level:2}];function d(e){const s={code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"This is how to set up self-service invitations for your users to get an account on your self-hosted zrok instance."}),"\n",(0,t.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["You can create user accounts directly with the ",(0,t.jsx)(s.code,{children:"zrok admin create account"})," CLI or API instead of inviting them."]}),"\n",(0,t.jsx)(s.li,{children:"You can welcome users to invite themselves via email."}),"\n",(0,t.jsx)(s.li,{children:"To enable self-service invitations you must also configure the controller to send email."}),"\n",(0,t.jsx)(s.li,{children:"You can require an invitation token if you want to restrict self-service."}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"the-self-service-user-experience",children:"The Self-Service User Experience"}),"\n",(0,t.jsx)(s.p,{children:"This is what your users will do."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"zrok invite\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-buttonless",metastring:'title="Output"',children:"enter and confirm your email address...\n\n> user@domain.com\n> user@domain.com\n\n[ Submit ]\n\ninvitation sent to 'user@domain.com'!\n"})}),"\n",(0,t.jsx)(s.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.code,{children:"zrok invite"})," command presents a small form that allows you to enter (and then confirm) your email address. Tabbing to the ",(0,t.jsx)(s.code,{children:"[ Submit ]"})," button will start the invitation process."]}),"\n",(0,t.jsxs)(s.p,{children:["Next, check the email where you sent the invite. You should receive a message asking you to click a link to create your ",(0,t.jsx)(s.code,{children:"zrok"})," account. When you click that link, you will be brought to a web page that will allow you to set a password for your new account."]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Enter a Password",src:n(8083).A+"",width:"1791",height:"1362"})}),"\n",(0,t.jsxs)(s.p,{children:["Enter a password and its confirmation, and click the ",(0,t.jsx)(s.code,{children:"Register Account"})," button. You'll see the following:"]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Successful Registration",src:n(4159).A+"",width:"1791",height:"1369"})}),"\n",(0,t.jsxs)(s.p,{children:['For now, we\'ll ignore the "enable your shell for zrok" section. Just click the ',(0,t.jsx)(s.code,{children:"zrok web portal"})," link:"]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Web Login",src:n(6658).A+"",width:"1791",height:"1362"})}),"\n",(0,t.jsxs)(s.p,{children:["After clicking the ",(0,t.jsx)(s.code,{children:"Log In"})," button, you'll be brought into the ",(0,t.jsx)(s.code,{children:"zrok"})," ",(0,t.jsx)(s.em,{children:"web console"}),":"]}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Web Console; Empty",src:n(3824).A+"",width:"1791",height:"1362"})}),"\n",(0,t.jsxs)(s.p,{children:["Congratulations! Your ",(0,t.jsx)(s.code,{children:"zrok"})," account is ready to go!"]})]})}function u(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},4159:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_registration_success-05e7e328284f6dc38cd993322698d38b.png"},8083:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_verify-22a26d401b9a77a4278f3c0f54d2a981.png"},3824:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_web_console_empty-cce147eaf8e7bc83abe556336a4aea98.png"},6658:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_web_login-a6161cc79e66932fab76994bdfb8f9c1.png"},8453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>c});var i=n(6540);const t={},o=i.createContext(t);function r(e){const s=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/50ef9c44.7c0dd56b.js b/assets/js/50ef9c44.7c0dd56b.js deleted file mode 100644 index 1708fd02..00000000 --- a/assets/js/50ef9c44.7c0dd56b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[429],{7928:(e,o,s)=>{s.r(o),s.d(o,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"concepts/hosting","title":"Hosting","description":"Self-Hosted","source":"@site/../docs/concepts/hosting.md","sourceDirName":"concepts","slug":"/concepts/hosting","permalink":"/docs/concepts/hosting","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/hosting.md","tags":[],"version":"current","sidebarPosition":200,"frontMatter":{"sidebar_position":200},"sidebar":"tutorialSidebar","previous":{"title":"Open Source","permalink":"/docs/concepts/opensource"},"next":{"title":"Guides","permalink":"/docs/category/guides"}}');var t=s(4848),i=s(8453);const r={sidebar_position:200},c="Hosting",d={},a=[{value:"Self-Hosted",id:"self-hosted",level:2},{value:"Managed Service",id:"managed-service",level:2}];function l(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.header,{children:(0,t.jsx)(o.h1,{id:"hosting",children:"Hosting"})}),"\n",(0,t.jsx)(o.h2,{id:"self-hosted",children:"Self-Hosted"}),"\n",(0,t.jsxs)(o.p,{children:[(0,t.jsx)(o.code,{children:"zrok"})," is not limited to a managed offering. You can ",(0,t.jsx)(o.a,{href:"/docs/guides/self-hosting/linux/",children:"host your own"})," instance of ",(0,t.jsx)(o.code,{children:"zrok"})," as well. ",(0,t.jsx)(o.code,{children:"zrok"})," is\nalso freely available as open source software hosted by GitHub under a very permissive Apache v2 license."]}),"\n",(0,t.jsx)(o.h2,{id:"managed-service",children:"Managed Service"}),"\n",(0,t.jsxs)(o.p,{children:[(0,t.jsx)(o.code,{children:"zrok"})," is also offered as a cloud service, making it instantly accessible to a large population immediately.\nNetFoundry provides a manged version of ",(0,t.jsx)(o.code,{children:"zrok"})," at ",(0,t.jsx)(o.a,{href:"https://zrok.io",children:"https://zrok.io"}),". This provides the easy-to-use,\nquick to demonstrate features of ",(0,t.jsx)(o.code,{children:"zrok"})," without needing to deploy and host ",(0,t.jsx)(o.code,{children:"zrok"})," yourself."]})]})}function h(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,o,s)=>{s.d(o,{R:()=>r,x:()=>c});var n=s(6540);const t={},i=n.createContext(t);function r(e){const o=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function c(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),n.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/50ef9c44.a1ff1b82.js b/assets/js/50ef9c44.a1ff1b82.js new file mode 100644 index 00000000..255ff498 --- /dev/null +++ b/assets/js/50ef9c44.a1ff1b82.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[429],{7928:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"concepts/hosting","title":"Hosting","description":"Self-Hosted","source":"@site/../docs/concepts/hosting.md","sourceDirName":"concepts","slug":"/concepts/hosting","permalink":"/docs/next/concepts/hosting","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/hosting.md","tags":[],"version":"current","sidebarPosition":200,"frontMatter":{"sidebar_position":200},"sidebar":"tutorialSidebar","previous":{"title":"Open Source","permalink":"/docs/next/concepts/opensource"},"next":{"title":"Guides","permalink":"/docs/next/category/guides"}}');var t=n(4848),i=n(8453);const r={sidebar_position:200},c="Hosting",d={},a=[{value:"Self-Hosted",id:"self-hosted",level:2},{value:"Managed Service",id:"managed-service",level:2}];function l(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.header,{children:(0,t.jsx)(o.h1,{id:"hosting",children:"Hosting"})}),"\n",(0,t.jsx)(o.h2,{id:"self-hosted",children:"Self-Hosted"}),"\n",(0,t.jsxs)(o.p,{children:[(0,t.jsx)(o.code,{children:"zrok"})," is not limited to a managed offering. You can ",(0,t.jsx)(o.a,{href:"/docs/next/guides/self-hosting/linux/",children:"host your own"})," instance of ",(0,t.jsx)(o.code,{children:"zrok"})," as well. ",(0,t.jsx)(o.code,{children:"zrok"})," is\nalso freely available as open source software hosted by GitHub under a very permissive Apache v2 license."]}),"\n",(0,t.jsx)(o.h2,{id:"managed-service",children:"Managed Service"}),"\n",(0,t.jsxs)(o.p,{children:[(0,t.jsx)(o.code,{children:"zrok"})," is also offered as a cloud service, making it instantly accessible to a large population immediately.\nNetFoundry provides a manged version of ",(0,t.jsx)(o.code,{children:"zrok"})," at ",(0,t.jsx)(o.a,{href:"https://zrok.io",children:"https://zrok.io"}),". This provides the easy-to-use,\nquick to demonstrate features of ",(0,t.jsx)(o.code,{children:"zrok"})," without needing to deploy and host ",(0,t.jsx)(o.code,{children:"zrok"})," yourself."]})]})}function h(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,o,n)=>{n.d(o,{R:()=>r,x:()=>c});var s=n(6540);const t={},i=s.createContext(t);function r(e){const o=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function c(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/54fa7005.0ae17351.js b/assets/js/54fa7005.0ae17351.js new file mode 100644 index 00000000..6ec278e1 --- /dev/null +++ b/assets/js/54fa7005.0ae17351.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8675],{9429:(e,s,r)=>{r.d(s,{Ay:()=>t,RM:()=>i});var n=r(4848),c=r(8453);const i=[];function o(e){const s={a:"a",code:"code",li:"li",ul:"ul",...(0,c.R)(),...e.components};return(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"proxy"})," mode forwards requests received by the frontend to the target server (",(0,n.jsx)(s.a,{href:"/docs/next/concepts/http",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"web"})," mode serves a target folder as a file index web page (",(0,n.jsx)(s.a,{href:"/docs/next/concepts/files",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"drive"})," mode serves a target folder with WebDAV (",(0,n.jsx)(s.a,{href:"/docs/next/guides/drives",children:"guide"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"caddy"})," mode runs the built-in Caddy server with the targeted Caddyfile (",(0,n.jsx)(s.a,{href:"pathname:///simple_reverse_proxy.Caddyfile",children:"example"}),")"]}),"\n"]})}function t(e={}){const{wrapper:s}={...(0,c.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},1806:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>a,contentTitle:()=>d,default:()=>p,frontMatter:()=>t,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"concepts/sharing-public","title":"Public Shares","description":"zrok supports public sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points.","source":"@site/../docs/concepts/sharing-public.mdx","sourceDirName":"concepts","slug":"/concepts/sharing-public","permalink":"/docs/next/concepts/sharing-public","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/sharing-public.mdx","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"sidebar_position":10},"sidebar":"tutorialSidebar","previous":{"title":"Private Shares","permalink":"/docs/next/concepts/sharing-private"},"next":{"title":"Reserved Shares","permalink":"/docs/next/concepts/sharing-reserved"}}');var c=r(4848),i=r(8453),o=r(9429);const t={sidebar_position:10},d="Public Shares",a={},l=[{value:"Peer to Public",id:"peer-to-public",level:2},{value:"Public Backend Modes",id:"public-backend-modes",level:2},...o.RM];function h(e){const s={code:"code",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.header,{children:(0,c.jsx)(s.h1,{id:"public-shares",children:"Public Shares"})}),"\n",(0,c.jsxs)(s.p,{children:[(0,c.jsx)(s.code,{children:"zrok"})," supports ",(0,c.jsx)(s.code,{children:"public"})," sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points."]}),"\n",(0,c.jsx)(s.h2,{id:"peer-to-public",children:"Peer to Public"}),"\n",(0,c.jsx)(s.p,{children:(0,c.jsx)(s.img,{alt:"zrok_public_share",src:r(1055).A+"",width:"2200",height:"916"})}),"\n",(0,c.jsxs)(s.p,{children:[(0,c.jsx)(s.code,{children:"public"})," sharing is most useful when the person or service accessing your resources does not have ",(0,c.jsx)(s.code,{children:"zrok"})," running locally and cannot make use of the ",(0,c.jsx)(s.code,{children:"private"})," sharing mode built into ",(0,c.jsx)(s.code,{children:"zrok"}),". Many users share development web servers, webhooks, and other HTTP/HTTPS resources."]}),"\n",(0,c.jsxs)(s.p,{children:["As with ",(0,c.jsx)(s.code,{children:"private"})," sharing, ",(0,c.jsx)(s.code,{children:"public"})," sharing does not require you to open any firewall ports or otherwise compromise the security of your local environments. A ",(0,c.jsx)(s.code,{children:"public"})," share goes away as soon as you terminate the ",(0,c.jsx)(s.code,{children:"zrok share"})," command."]}),"\n",(0,c.jsxs)(s.p,{children:["Using ",(0,c.jsx)(s.code,{children:"public"})," shares is easy and is accomplished using the ",(0,c.jsx)(s.code,{children:"zrok share public"})," command. Run ",(0,c.jsx)(s.code,{children:"zrok share public"})," to see the command-line help and to learn how to use ",(0,c.jsx)(s.code,{children:"public"})," shares."]}),"\n",(0,c.jsx)(s.h2,{id:"public-backend-modes",children:"Public Backend Modes"}),"\n",(0,c.jsxs)(s.p,{children:["The default backend mode is ",(0,c.jsx)(s.code,{children:"proxy"})," which targets an HTTP URL that must be reachable by the backend."]}),"\n",(0,c.jsx)(s.pre,{children:(0,c.jsx)(s.code,{className:"language-bash",metastring:'title="proxy example"',children:"zrok share public 80\n"})}),"\n",(0,c.jsx)(o.Ay,{})]})}function p(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,c.jsx)(s,{...e,children:(0,c.jsx)(h,{...e})}):h(e)}},1055:(e,s,r)=>{r.d(s,{A:()=>n});const n=r.p+"assets/images/zrok_public_share-1eec22cb798395c2bcd3ac10465f62ca.png"},8453:(e,s,r)=>{r.d(s,{R:()=>o,x:()=>t});var n=r(6540);const c={},i=n.createContext(c);function o(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/54fa7005.cf645e57.js b/assets/js/54fa7005.cf645e57.js deleted file mode 100644 index 36224d6f..00000000 --- a/assets/js/54fa7005.cf645e57.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8675],{9429:(e,s,r)=>{r.d(s,{Ay:()=>t,RM:()=>i});var n=r(4848),c=r(8453);const i=[];function o(e){const s={a:"a",code:"code",li:"li",ul:"ul",...(0,c.R)(),...e.components};return(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"proxy"})," mode forwards requests received by the frontend to the target server (",(0,n.jsx)(s.a,{href:"/docs/concepts/http",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"web"})," mode serves a target folder as a file index web page (",(0,n.jsx)(s.a,{href:"/docs/concepts/files",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"drive"})," mode serves a target folder with WebDAV (",(0,n.jsx)(s.a,{href:"/docs/guides/drives",children:"guide"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"caddy"})," mode runs the built-in Caddy server with the targeted Caddyfile (",(0,n.jsx)(s.a,{href:"pathname:///simple_reverse_proxy.Caddyfile",children:"example"}),")"]}),"\n"]})}function t(e={}){const{wrapper:s}={...(0,c.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},1806:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>a,contentTitle:()=>d,default:()=>p,frontMatter:()=>t,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"concepts/sharing-public","title":"Public Shares","description":"zrok supports public sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points.","source":"@site/../docs/concepts/sharing-public.mdx","sourceDirName":"concepts","slug":"/concepts/sharing-public","permalink":"/docs/concepts/sharing-public","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/sharing-public.mdx","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"sidebar_position":10},"sidebar":"tutorialSidebar","previous":{"title":"Private Shares","permalink":"/docs/concepts/sharing-private"},"next":{"title":"Reserved Shares","permalink":"/docs/concepts/sharing-reserved"}}');var c=r(4848),i=r(8453),o=r(9429);const t={sidebar_position:10},d="Public Shares",a={},l=[{value:"Peer to Public",id:"peer-to-public",level:2},{value:"Public Backend Modes",id:"public-backend-modes",level:2},...o.RM];function h(e){const s={code:"code",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.header,{children:(0,c.jsx)(s.h1,{id:"public-shares",children:"Public Shares"})}),"\n",(0,c.jsxs)(s.p,{children:[(0,c.jsx)(s.code,{children:"zrok"})," supports ",(0,c.jsx)(s.code,{children:"public"})," sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points."]}),"\n",(0,c.jsx)(s.h2,{id:"peer-to-public",children:"Peer to Public"}),"\n",(0,c.jsx)(s.p,{children:(0,c.jsx)(s.img,{alt:"zrok_public_share",src:r(1055).A+"",width:"2200",height:"916"})}),"\n",(0,c.jsxs)(s.p,{children:[(0,c.jsx)(s.code,{children:"public"})," sharing is most useful when the person or service accessing your resources does not have ",(0,c.jsx)(s.code,{children:"zrok"})," running locally and cannot make use of the ",(0,c.jsx)(s.code,{children:"private"})," sharing mode built into ",(0,c.jsx)(s.code,{children:"zrok"}),". Many users share development web servers, webhooks, and other HTTP/HTTPS resources."]}),"\n",(0,c.jsxs)(s.p,{children:["As with ",(0,c.jsx)(s.code,{children:"private"})," sharing, ",(0,c.jsx)(s.code,{children:"public"})," sharing does not require you to open any firewall ports or otherwise compromise the security of your local environments. A ",(0,c.jsx)(s.code,{children:"public"})," share goes away as soon as you terminate the ",(0,c.jsx)(s.code,{children:"zrok share"})," command."]}),"\n",(0,c.jsxs)(s.p,{children:["Using ",(0,c.jsx)(s.code,{children:"public"})," shares is easy and is accomplished using the ",(0,c.jsx)(s.code,{children:"zrok share public"})," command. Run ",(0,c.jsx)(s.code,{children:"zrok share public"})," to see the command-line help and to learn how to use ",(0,c.jsx)(s.code,{children:"public"})," shares."]}),"\n",(0,c.jsx)(s.h2,{id:"public-backend-modes",children:"Public Backend Modes"}),"\n",(0,c.jsxs)(s.p,{children:["The default backend mode is ",(0,c.jsx)(s.code,{children:"proxy"})," which targets an HTTP URL that must be reachable by the backend."]}),"\n",(0,c.jsx)(s.pre,{children:(0,c.jsx)(s.code,{className:"language-bash",metastring:'title="proxy example"',children:"zrok share public 80\n"})}),"\n",(0,c.jsx)(o.Ay,{})]})}function p(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,c.jsx)(s,{...e,children:(0,c.jsx)(h,{...e})}):h(e)}},1055:(e,s,r)=>{r.d(s,{A:()=>n});const n=r.p+"assets/images/zrok_public_share-1eec22cb798395c2bcd3ac10465f62ca.png"},8453:(e,s,r)=>{r.d(s,{R:()=>o,x:()=>t});var n=r(6540);const c={},i=n.createContext(c);function o(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5cd0a723.1806493a.js b/assets/js/5cd0a723.1806493a.js new file mode 100644 index 00000000..8270844f --- /dev/null +++ b/assets/js/5cd0a723.1806493a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4074],{2388:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"guides/self-hosting/instance-configuration","title":"Use Another zrok Instance","description":"This guide is relevant if you are self-hosting or using a friend\'s zrok instance instead of using zrok-as-a-service from zrok.io.","source":"@site/../docs/guides/self-hosting/instance-configuration.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/instance-configuration","permalink":"/docs/next/guides/self-hosting/instance-configuration","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/instance-configuration.mdx","tags":[],"version":"current","frontMatter":{"title":"Use Another zrok Instance","sidebar_label":"Instance Config"},"sidebar":"tutorialSidebar","previous":{"title":"OAuth Public Frontend Configuration","permalink":"/docs/next/guides/self-hosting/oauth/configuring-oauth"},"next":{"title":"Invitations","permalink":"/docs/next/guides/self-hosting/self-service-invite"}}');var s=t(4848),i=t(8453);const r={title:"Use Another zrok Instance",sidebar_label:"Instance Config"},c=void 0,a={},d=[];function l(e){const n={admonition:"admonition",code:"code",em:"em",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["This guide is relevant if you are self-hosting or using a friend's ",(0,s.jsx)(n.code,{children:"zrok"})," instance instead of using zrok-as-a-service from ",(0,s.jsx)(n.code,{children:"zrok.io"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok"})," ",(0,s.jsx)(n.em,{children:"command"})," on your computer uses a ",(0,s.jsx)(n.code,{children:"zrok"})," ",(0,s.jsx)(n.em,{children:"instance"})," over the network."]}),"\n",(0,s.jsxs)(n.p,{children:["The default instance API endpoint for the ",(0,s.jsx)(n.code,{children:"zrok"})," command is ",(0,s.jsx)(n.code,{children:"api.zrok.io"}),". Set the API endpoint to another instance's API endpoint:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"zrok config set apiEndpoint https://zrok.example.com\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"[WARNING]: unable to open environment metadata; ignoring\n\nzrok configuration updated\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"WARNING"})," about ",(0,s.jsx)(n.code,{children:"environment metadata"})," is expected when you run ",(0,s.jsx)(n.code,{children:"zrok config set"})," before ",(0,s.jsx)(n.code,{children:"zrok enable"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["You can use the ",(0,s.jsx)(n.code,{children:"zrok status"})," command to inspect the state of your local ",(0,s.jsx)(n.em,{children:"environment"}),". ",(0,s.jsx)(n.code,{children:"zrok"})," refers to each shell where you install and ",(0,s.jsx)(n.code,{children:"enable"})," a copy of ",(0,s.jsx)(n.code,{children:"zrok"})," as an ",(0,s.jsx)(n.em,{children:"environment"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"zrok status\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"Config:\n\n CONFIG VALUE SOURCE \n apiEndpoint https://zrok.mydomain.com config \n\n[WARNING]: Unable to load your local environment!\n\nTo create a local environment use the zrok enable command.\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok status"})," command shows the configured API service that your environment is using, as well as the ",(0,s.jsx)(n.code,{children:"SOURCE"})," where the setting was retrieved. In this case, ",(0,s.jsx)(n.code,{children:"config"})," means that the setting was set into the environment using the ",(0,s.jsx)(n.code,{children:"zrok config"})," command."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var o=t(6540);const s={},i=o.createContext(s);function r(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5cd0a723.8ac05e38.js b/assets/js/5cd0a723.8ac05e38.js deleted file mode 100644 index 4e599579..00000000 --- a/assets/js/5cd0a723.8ac05e38.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4074],{2388:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"guides/self-hosting/instance-configuration","title":"Use Another zrok Instance","description":"This guide is relevant if you are self-hosting or using a friend\'s zrok instance instead of using zrok-as-a-service from zrok.io.","source":"@site/../docs/guides/self-hosting/instance-configuration.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/instance-configuration","permalink":"/docs/guides/self-hosting/instance-configuration","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/instance-configuration.mdx","tags":[],"version":"current","frontMatter":{"title":"Use Another zrok Instance","sidebar_label":"Instance Config"},"sidebar":"tutorialSidebar","previous":{"title":"OAuth Public Frontend Configuration","permalink":"/docs/guides/self-hosting/oauth/configuring-oauth"},"next":{"title":"Invitations","permalink":"/docs/guides/self-hosting/self-service-invite"}}');var s=t(4848),i=t(8453);const r={title:"Use Another zrok Instance",sidebar_label:"Instance Config"},c=void 0,a={},d=[];function l(e){const n={admonition:"admonition",code:"code",em:"em",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["This guide is relevant if you are self-hosting or using a friend's ",(0,s.jsx)(n.code,{children:"zrok"})," instance instead of using zrok-as-a-service from ",(0,s.jsx)(n.code,{children:"zrok.io"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok"})," ",(0,s.jsx)(n.em,{children:"command"})," on your computer uses a ",(0,s.jsx)(n.code,{children:"zrok"})," ",(0,s.jsx)(n.em,{children:"instance"})," over the network."]}),"\n",(0,s.jsxs)(n.p,{children:["The default instance API endpoint for the ",(0,s.jsx)(n.code,{children:"zrok"})," command is ",(0,s.jsx)(n.code,{children:"api.zrok.io"}),". Set the API endpoint to another instance's API endpoint:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"zrok config set apiEndpoint https://zrok.example.com\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"[WARNING]: unable to open environment metadata; ignoring\n\nzrok configuration updated\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"WARNING"})," about ",(0,s.jsx)(n.code,{children:"environment metadata"})," is expected when you run ",(0,s.jsx)(n.code,{children:"zrok config set"})," before ",(0,s.jsx)(n.code,{children:"zrok enable"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["You can use the ",(0,s.jsx)(n.code,{children:"zrok status"})," command to inspect the state of your local ",(0,s.jsx)(n.em,{children:"environment"}),". ",(0,s.jsx)(n.code,{children:"zrok"})," refers to each shell where you install and ",(0,s.jsx)(n.code,{children:"enable"})," a copy of ",(0,s.jsx)(n.code,{children:"zrok"})," as an ",(0,s.jsx)(n.em,{children:"environment"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"zrok status\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"Config:\n\n CONFIG VALUE SOURCE \n apiEndpoint https://zrok.mydomain.com config \n\n[WARNING]: Unable to load your local environment!\n\nTo create a local environment use the zrok enable command.\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok status"})," command shows the configured API service that your environment is using, as well as the ",(0,s.jsx)(n.code,{children:"SOURCE"})," where the setting was retrieved. In this case, ",(0,s.jsx)(n.code,{children:"config"})," means that the setting was set into the environment using the ",(0,s.jsx)(n.code,{children:"zrok config"})," command."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var o=t(6540);const s={},i=o.createContext(s);function r(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5eed61e8.174ec865.js b/assets/js/5eed61e8.174ec865.js new file mode 100644 index 00000000..1d692f68 --- /dev/null +++ b/assets/js/5eed61e8.174ec865.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[418],{2447:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"myzrok","slug":"/category/myzrok","permalink":"/docs/next/category/myzrok","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"VPN","permalink":"/docs/next/guides/vpn/"},"next":{"title":"Custom Domains","permalink":"/docs/next/myzrok/custom-domains/"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/600b2345.18130102.js b/assets/js/600b2345.18130102.js deleted file mode 100644 index 39040c3f..00000000 --- a/assets/js/600b2345.18130102.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9355],{3989:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"guides/self-hosting/metrics-and-limits/configuring-limits","title":"Configuring Limits","description":"This guide is current as of zrok version v0.4.31.","source":"@site/../docs/guides/self-hosting/metrics-and-limits/configuring-limits.md","sourceDirName":"guides/self-hosting/metrics-and-limits","slug":"/guides/self-hosting/metrics-and-limits/configuring-limits","permalink":"/docs/guides/self-hosting/metrics-and-limits/configuring-limits","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/metrics-and-limits/configuring-limits.md","tags":[],"version":"current","sidebarPosition":40,"frontMatter":{"sidebar_position":40},"sidebar":"tutorialSidebar","previous":{"title":"Configuring Metrics","permalink":"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics"},"next":{"title":"OAuth","permalink":"/docs/category/oauth"}}');var s=n(4848),a=n(8453);const r={sidebar_position:40},l="Configuring Limits",o={},c=[{value:"Understanding the zrok Limits Agent",id:"understanding-the-zrok-limits-agent",level:2},{value:"Types of Limits",id:"types-of-limits",level:3},{value:"The Global Configuration",id:"the-global-configuration",level:2},{value:"Global Resouce Count Limits",id:"global-resouce-count-limits",level:3},{value:"Global Bandwidth Limits",id:"global-bandwidth-limits",level:3},{value:"Limit Classes",id:"limit-classes",level:2},{value:"Unscoped Resource Count Classes",id:"unscoped-resource-count-classes",level:3},{value:"Unscoped Bandwidth Classes",id:"unscoped-bandwidth-classes",level:3},{value:"Scoped Classes",id:"scoped-classes",level:3},{value:"Limit Actions",id:"limit-actions",level:2},{value:"Unlimited Accounts",id:"unlimited-accounts",level:2},{value:"Experimental Limits Locking",id:"experimental-limits-locking",level:2},{value:"Caveats",id:"caveats",level:2},{value:"Aggregate Bandwidth",id:"aggregate-bandwidth",level:3},{value:"Administration Through SQL",id:"administration-through-sql",level:3},{value:"Performance",id:"performance",level:3}];function d(e){const i={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.header,{children:(0,s.jsx)(i.h1,{id:"configuring-limits",children:"Configuring Limits"})}),"\n",(0,s.jsx)(i.admonition,{type:"note",children:(0,s.jsxs)(i.p,{children:["This guide is current as of zrok version ",(0,s.jsx)(i.code,{children:"v0.4.31"}),"."]})}),"\n",(0,s.jsx)(i.admonition,{type:"warning",children:(0,s.jsxs)(i.p,{children:["If you have not yet configured ",(0,s.jsx)(i.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics",children:"metrics"}),", please visit the ",(0,s.jsx)(i.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics",children:"metrics guide"})," first before working through the limits configuration."]})}),"\n",(0,s.jsx)(i.h2,{id:"understanding-the-zrok-limits-agent",children:"Understanding the zrok Limits Agent"}),"\n",(0,s.jsx)(i.p,{children:"The limits agent is a component of the zrok controller. It can be enabled and configured through the zrok controller configuration."}),"\n",(0,s.jsx)(i.p,{children:"The limits agent is responsible for controlling the number of resources in use (environments, shares, etc.) and also for ensuring that accounts are held below the configured data transfer bandwidth thresholds. The limits agent exists to manage resource consumption for larger, multi-user zrok installations."}),"\n",(0,s.jsx)(i.h3,{id:"types-of-limits",children:"Types of Limits"}),"\n",(0,s.jsxs)(i.p,{children:["Limits can be specified that control the number of environments, shares, reserved shares, unique names, and frontends per-share that can be created by an account. Limits that control the allowed number of resources are called ",(0,s.jsx)(i.em,{children:"resource count limits"}),"."]}),"\n",(0,s.jsxs)(i.p,{children:["Limits can be specified to control the amount of data that can be transferred within a time period. Limits that control the amount of data that can be transferred are called ",(0,s.jsx)(i.em,{children:"bandwidth limits"}),"."]}),"\n",(0,s.jsxs)(i.p,{children:["zrok limits can be specified ",(0,s.jsx)(i.em,{children:"globally"}),", applying to all users in a service instance. Limit ",(0,s.jsx)(i.em,{children:"classes"})," can be created to provide additional levels of resource allocation. Limit classes can then be ",(0,s.jsx)(i.em,{children:"applied"})," to multiple accounts, to alter their limit allocation beyond what's configured in the global configuration."]}),"\n",(0,s.jsx)(i.h2,{id:"the-global-configuration",children:"The Global Configuration"}),"\n",(0,s.jsxs)(i.p,{children:["The reference configuration for the zrok controller (found at ",(0,s.jsx)(i.a,{href:"https://github.com/openziti/zrok/blob/main/etc/ctrl.yml",children:(0,s.jsx)(i.code,{children:"etc/ctrl.yaml"})})," in the ",(0,s.jsx)(i.a,{href:"https://github.com/openziti/zrok",children:"repository"}),") contains the global limits configuration, which looks like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-yaml",children:"# Service instance limits global configuration.\n#\n# See `docs/guides/metrics-and-limits/configuring-limits.md` for details.\n#\nlimits:\n environments: -1\n shares: -1\n reserved_shares: -1\n unique_names: -1\n share_frontends: -1\n bandwidth:\n period: 5m\n warning:\n rx: -1\n tx: -1\n total: 7242880\n limit:\n rx: -1\n tx: -1\n total: 10485760\n enforcing: false\n cycle: 5m\n"})}),"\n",(0,s.jsx)(i.admonition,{type:"note",children:(0,s.jsxs)(i.p,{children:["A value of ",(0,s.jsx)(i.code,{children:"-1"})," appearing in the limits configuration mean the value is ",(0,s.jsx)(i.em,{children:"unlimited"}),"."]})}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"enforcing"})," boolean specifies whether or not limits are enabled in the service instance. By default, limits is disabled. No matter what else is configured in this stanza, if ",(0,s.jsx)(i.code,{children:"enforcing"})," is set to ",(0,s.jsx)(i.code,{children:"false"}),", there will be no limits placed on any account in the service instance."]}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"cycle"}),' value controls how frequently the limits agent will evaluate enforced limits. When a user exceeds a limit and has their shares disabled, the limits agent will evaluate their bandwidth usage on this interval looking to "relax" the limit once their usage falls below the threshold.']}),"\n",(0,s.jsx)(i.h3,{id:"global-resouce-count-limits",children:"Global Resouce Count Limits"}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"environments"}),", ",(0,s.jsx)(i.code,{children:"shares"}),", ",(0,s.jsx)(i.code,{children:"reserved_shares"}),", ",(0,s.jsx)(i.code,{children:"unique_names"}),", and ",(0,s.jsx)(i.code,{children:"share_frontends"})," specify the resource count limits, globally for the service instance."]}),"\n",(0,s.jsx)(i.p,{children:"These resource counts will be applied to all users in the service instance by default."}),"\n",(0,s.jsx)(i.h3,{id:"global-bandwidth-limits",children:"Global Bandwidth Limits"}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"bandwidth"})," section defines the global bandwidth limits for all users in the service instance."]}),"\n",(0,s.jsxs)(i.p,{children:["There are two levels of bandwidth limits that can be specified in the global configuration. The first limit defines a ",(0,s.jsx)(i.em,{children:"warning"})," threshold where the user will receive an email that they are using increased data transfer amounts and will ultimately be subject to a limit. If you do not want this warning email to be sent, then configure all of the values to ",(0,s.jsx)(i.code,{children:"-1"})," (unlimited)."]}),"\n",(0,s.jsxs)(i.p,{children:["The second limit defines the the actual ",(0,s.jsx)(i.em,{children:"limit"})," threshold, where the limits agent will disabled traffic for the account's shares."]}),"\n",(0,s.jsxs)(i.p,{children:["Bandwidth limits can be specified in terms of ",(0,s.jsx)(i.code,{children:"tx"})," (or ",(0,s.jsx)(i.em,{children:"transmitted"})," data), ",(0,s.jsx)(i.code,{children:"rx"})," (or ",(0,s.jsx)(i.em,{children:"received"})," data), and the ",(0,s.jsx)(i.code,{children:"total"})," bytes that are sent in either direction. If you only want to set the ",(0,s.jsx)(i.code,{children:"total"})," transferred limit, you can set ",(0,s.jsx)(i.code,{children:"rx"})," and ",(0,s.jsx)(i.code,{children:"tx"})," to ",(0,s.jsx)(i.code,{children:"-1"})," (for ",(0,s.jsx)(i.em,{children:"unlimited"}),"). You can configure any combination of these these values at either the limit or warning levels."]}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"period"})," specifies the time window for the bandwidth limit. See the documentation for ",(0,s.jsx)(i.a,{href:"https://pkg.go.dev/time#ParseDuration",children:(0,s.jsx)(i.code,{children:"time.Duration.ParseDuration"})})," for details about the format used for these durations. If the ",(0,s.jsx)(i.code,{children:"period"})," is set to 5 minutes, then the limits agent will monitor the transmitted and receivde traffic for the account for the last 5 minutes, and if the amount of data is greater than either the ",(0,s.jsx)(i.code,{children:"warning"})," or the ",(0,s.jsx)(i.code,{children:"limit"})," threshold, action will be taken."]}),"\n",(0,s.jsxs)(i.p,{children:["In the global configuration example above users are allowed to transfer a total of ",(0,s.jsx)(i.code,{children:"10485760"})," bytes in a ",(0,s.jsx)(i.code,{children:"5m"})," period, and they will receive a warning email after they transfer more than ",(0,s.jsx)(i.code,{children:"7242880"})," bytes in a ",(0,s.jsx)(i.code,{children:"5m"})," period."]}),"\n",(0,s.jsx)(i.h2,{id:"limit-classes",children:"Limit Classes"}),"\n",(0,s.jsxs)(i.p,{children:["The zrok limits agent includes a concept called ",(0,s.jsx)(i.em,{children:"limit classes"}),". Limit classes can be used to define resource count and bandwidth limits that can be selectively applied to individual accounts in a service instance."]}),"\n",(0,s.jsxs)(i.p,{children:["Limit classes are created by creating a record in the ",(0,s.jsx)(i.code,{children:"limit_classes"})," table in the zrok controller database. The table has this schema:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"CREATE TABLE public.limit_classes (\n id integer NOT NULL,\n label VARCHAR(32),\n backend_mode public.backend_mode,\n environments integer DEFAULT '-1'::integer NOT NULL,\n shares integer DEFAULT '-1'::integer NOT NULL,\n reserved_shares integer DEFAULT '-1'::integer NOT NULL,\n unique_names integer DEFAULT '-1'::integer NOT NULL,\n share_frontends integer DEFAULT '-1'::integer NOT NULL,\n period_minutes integer DEFAULT 1440 NOT NULL,\n rx_bytes bigint DEFAULT '-1'::integer NOT NULL,\n tx_bytes bigint DEFAULT '-1'::integer NOT NULL,\n total_bytes bigint DEFAULT '-1'::integer NOT NULL,\n limit_action public.limit_action DEFAULT 'limit'::public.limit_action NOT NULL,\n created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n deleted boolean DEFAULT false NOT NULL\n);\n\n"})}),"\n",(0,s.jsx)(i.p,{children:"This schema supports constructing the 3 different types of limits classes that the system supports."}),"\n",(0,s.jsxs)(i.p,{children:["After defining a limit class in the database, it can be applied to specific user accounts (overriding the relevant parts of the global configuration) by inserting a row into the ",(0,s.jsx)(i.code,{children:"applied_limit_classes"})," table:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"CREATE TABLE public.applied_limit_classes (\n id integer NOT NULL,\n account_id integer NOT NULL,\n limit_class_id integer NOT NULL,\n created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n deleted boolean DEFAULT false NOT NULL\n);\n"})}),"\n",(0,s.jsxs)(i.p,{children:["Create a row in this table linking the ",(0,s.jsx)(i.code,{children:"account_id"})," to the ",(0,s.jsx)(i.code,{children:"limit_class_id"})," to apply the limit class to a specific user account."]}),"\n",(0,s.jsx)(i.h3,{id:"unscoped-resource-count-classes",children:"Unscoped Resource Count Classes"}),"\n",(0,s.jsxs)(i.p,{children:["To support overriding the resource count limits defined in the global limits configuration, a site administrator can create a limit class by inserting a row into the ",(0,s.jsx)(i.code,{children:"limit_classes"})," table structured like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"insert into limit_classes (environments, shares, reserved_shares, unique_names, share_frontends) values (1, 1, 1, 1, 1);\n"})}),"\n",(0,s.jsxs)(i.p,{children:["This creates a limit class that sets the ",(0,s.jsx)(i.code,{children:"environments"}),", ",(0,s.jsx)(i.code,{children:"shares"}),", ",(0,s.jsx)(i.code,{children:"reserved_shares"}),", and ",(0,s.jsx)(i.code,{children:"unique_names"})," all to ",(0,s.jsx)(i.code,{children:"1"}),"."]}),"\n",(0,s.jsx)(i.p,{children:"When this limit class is applied to a user account those values would override the default resource count values configured globally."}),"\n",(0,s.jsxs)(i.p,{children:["Applying an unscoped resource count class ",(0,s.jsx)(i.em,{children:"does not"})," affect the bandwidth limits (either globally configured, or via a limit class)."]}),"\n",(0,s.jsx)(i.h3,{id:"unscoped-bandwidth-classes",children:"Unscoped Bandwidth Classes"}),"\n",(0,s.jsxs)(i.p,{children:["To support overriding the bandwidth limits defined in the global configuration, a site administrator can create a limit class by inserting a row into the ",(0,s.jsx)(i.code,{children:"limit_classes"})," table structured like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"insert into limit_classes (period_minutes, total_bytes, limit_action) values (2, 204800, 'limit');\n"})}),"\n",(0,s.jsxs)(i.p,{children:["This inserts a limit class that allows for a total bandwidth transfer of ",(0,s.jsx)(i.code,{children:"204800"})," bytes every ",(0,s.jsx)(i.code,{children:"2"})," minutes."]}),"\n",(0,s.jsx)(i.p,{children:"When this limit class is applied to a user account, those values would override the default bandwidth values configured globally."}),"\n",(0,s.jsxs)(i.p,{children:["Applying an unscoped bandwidth class ",(0,s.jsx)(i.em,{children:"does not"})," affect the resource count limits (either globally configured, or via a limit class)."]}),"\n",(0,s.jsx)(i.h3,{id:"scoped-classes",children:"Scoped Classes"}),"\n",(0,s.jsxs)(i.p,{children:["A scoped limit class specifies ",(0,s.jsx)(i.em,{children:"both"})," the resource counts (",(0,s.jsx)(i.code,{children:"shares"}),", ",(0,s.jsx)(i.code,{children:"reserved_shares"}),", and ",(0,s.jsx)(i.code,{children:"unique_names"}),", but ",(0,s.jsx)(i.em,{children:"NOT"})," ",(0,s.jsx)(i.code,{children:"environments"}),") for a ",(0,s.jsx)(i.em,{children:"specific"})," backend mode. Insert a row like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"insert into limit_classes (backend_mode, shares, reserved_shares, unique_names, period_minutes, total_bytes, limit_action) values ('web', 2, 1, 1, 2, 4096000, 'limit');\n"})}),"\n",(0,s.jsxs)(i.p,{children:["Scoped limits are designed to ",(0,s.jsx)(i.em,{children:"increase"})," the limits for a specific backend mode beyond what the global configuration and the unscoped classes provide. The general approach is to use the global configuration and the unscoped classes to provide the general account limits, and then the scoped classes can be used to further increase (or potentially ",(0,s.jsx)(i.em,{children:"decrease"}),") the limits for a specific backend mode."]}),"\n",(0,s.jsx)(i.p,{children:"If a scoped limit class exists for a specific backend mode, then the limits agent will use that limit in making a decision about limiting the resource count or bandwidth. All other types of shares will fall back to the unscoped classes or the global configuration."}),"\n",(0,s.jsx)(i.h2,{id:"limit-actions",children:"Limit Actions"}),"\n",(0,s.jsx)(i.p,{children:"When an account exceeds a bandwidth limit, the limits agent will seek to limit the affected shares (based on the combination of global configuration, unscoped limit classes, and scoped limit classes). It applies the limit by removing the underlying OpenZiti dial policies for any frontends that are trying to access the share."}),"\n",(0,s.jsxs)(i.p,{children:["This means that public frontends will simply return a ",(0,s.jsx)(i.code,{children:"404"})," as if the share is no longer there. Private frontends will also return ",(0,s.jsx)(i.code,{children:"404"})," errors. When the limit is relaxed, the dial policies are put back in place and the share will continue operating normally."]}),"\n",(0,s.jsx)(i.h2,{id:"unlimited-accounts",children:"Unlimited Accounts"}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"accounts"})," table in the database includes a ",(0,s.jsx)(i.code,{children:"limitless"})," column. When this column is set to ",(0,s.jsx)(i.code,{children:"true"})," the account is not subject to any of the limits in the system."]}),"\n",(0,s.jsx)(i.h2,{id:"experimental-limits-locking",children:"Experimental Limits Locking"}),"\n",(0,s.jsxs)(i.p,{children:["zrok versions prior to ",(0,s.jsx)(i.code,{children:"v0.4.31"})," had a potential race condition when enforcing resource count limits. This usually only manifested in cases where shares or environments were being allocated programmatically (and fast enough to win the limits race)."]}),"\n",(0,s.jsxs)(i.p,{children:["This occurs due to a lack of transactional database locking around the limited structures. ",(0,s.jsx)(i.code,{children:"v0.4.31"})," includes a pessimistic locking facility that can be enabled ",(0,s.jsx)(i.em,{children:"only"})," on the PostgreSQL store implemention."]}),"\n",(0,s.jsxs)(i.p,{children:["If you're running PostgreSQL for your service instance and you want to enable the new experimental locking facility that eliminates the potential resource count race condition, add the ",(0,s.jsx)(i.code,{children:"enable_locking: true"})," flag to your ",(0,s.jsx)(i.code,{children:"store"})," definition:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-yaml",children:"store:\n enable_locking: true\n"})}),"\n",(0,s.jsx)(i.h2,{id:"caveats",children:"Caveats"}),"\n",(0,s.jsx)(i.p,{children:"There are a number of caveats that are important to understand when using the limits agent with more complicated limits scenarios:"}),"\n",(0,s.jsx)(i.h3,{id:"aggregate-bandwidth",children:"Aggregate Bandwidth"}),"\n",(0,s.jsx)(i.p,{children:"The zrok limits agent is a work in progress. The system currently does not track bandwidth individually for each backend mode type, which means all bandwidth values are aggregated between all of the share types that an account might be using. This will likely change in an upcoming release."}),"\n",(0,s.jsx)(i.h3,{id:"administration-through-sql",children:"Administration Through SQL"}),"\n",(0,s.jsx)(i.p,{children:"There are currently no administrative API endpoints (or corresponding CLI tools) to support creating and applying limit classes in the current release. The limits agent infrastructure was designed to support software integrations that directly manipulate the underlying database structures."}),"\n",(0,s.jsx)(i.p,{children:"A future release may provide API and CLI tooling to support the human administration of the limits agent."}),"\n",(0,s.jsx)(i.h3,{id:"performance",children:"Performance"}),"\n",(0,s.jsxs)(i.p,{children:["Be sure to minimize the number of different periods used for specifying bandwidth limits. Specifying limits in multiple different periods can cause a multiplicity of queries to be executed against the metrics store (InfluxDB). Standardizing on a period like ",(0,s.jsx)(i.code,{children:"24h"})," or ",(0,s.jsx)(i.code,{children:"6h"})," and using that consistently is the best way to to manage the performance of the metrics store."]})]})}function h(e={}){const{wrapper:i}={...(0,a.R)(),...e.components};return i?(0,s.jsx)(i,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,i,n)=>{n.d(i,{R:()=>r,x:()=>l});var t=n(6540);const s={},a=t.createContext(s);function r(e){const i=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function l(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),t.createElement(a.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/600b2345.1df08fde.js b/assets/js/600b2345.1df08fde.js new file mode 100644 index 00000000..e2d9d8fb --- /dev/null +++ b/assets/js/600b2345.1df08fde.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9355],{3989:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"guides/self-hosting/metrics-and-limits/configuring-limits","title":"Configuring Limits","description":"This guide is current as of zrok version v0.4.31.","source":"@site/../docs/guides/self-hosting/metrics-and-limits/configuring-limits.md","sourceDirName":"guides/self-hosting/metrics-and-limits","slug":"/guides/self-hosting/metrics-and-limits/configuring-limits","permalink":"/docs/next/guides/self-hosting/metrics-and-limits/configuring-limits","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/metrics-and-limits/configuring-limits.md","tags":[],"version":"current","sidebarPosition":40,"frontMatter":{"sidebar_position":40},"sidebar":"tutorialSidebar","previous":{"title":"Configuring Metrics","permalink":"/docs/next/guides/self-hosting/metrics-and-limits/configuring-metrics"},"next":{"title":"OAuth","permalink":"/docs/next/category/oauth"}}');var s=n(4848),a=n(8453);const r={sidebar_position:40},l="Configuring Limits",o={},c=[{value:"Understanding the zrok Limits Agent",id:"understanding-the-zrok-limits-agent",level:2},{value:"Types of Limits",id:"types-of-limits",level:3},{value:"The Global Configuration",id:"the-global-configuration",level:2},{value:"Global Resouce Count Limits",id:"global-resouce-count-limits",level:3},{value:"Global Bandwidth Limits",id:"global-bandwidth-limits",level:3},{value:"Limit Classes",id:"limit-classes",level:2},{value:"Unscoped Resource Count Classes",id:"unscoped-resource-count-classes",level:3},{value:"Unscoped Bandwidth Classes",id:"unscoped-bandwidth-classes",level:3},{value:"Scoped Classes",id:"scoped-classes",level:3},{value:"Limit Actions",id:"limit-actions",level:2},{value:"Unlimited Accounts",id:"unlimited-accounts",level:2},{value:"Experimental Limits Locking",id:"experimental-limits-locking",level:2},{value:"Caveats",id:"caveats",level:2},{value:"Aggregate Bandwidth",id:"aggregate-bandwidth",level:3},{value:"Administration Through SQL",id:"administration-through-sql",level:3},{value:"Performance",id:"performance",level:3}];function d(e){const i={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.header,{children:(0,s.jsx)(i.h1,{id:"configuring-limits",children:"Configuring Limits"})}),"\n",(0,s.jsx)(i.admonition,{type:"note",children:(0,s.jsxs)(i.p,{children:["This guide is current as of zrok version ",(0,s.jsx)(i.code,{children:"v0.4.31"}),"."]})}),"\n",(0,s.jsx)(i.admonition,{type:"warning",children:(0,s.jsxs)(i.p,{children:["If you have not yet configured ",(0,s.jsx)(i.a,{href:"/docs/next/guides/self-hosting/metrics-and-limits/configuring-metrics",children:"metrics"}),", please visit the ",(0,s.jsx)(i.a,{href:"/docs/next/guides/self-hosting/metrics-and-limits/configuring-metrics",children:"metrics guide"})," first before working through the limits configuration."]})}),"\n",(0,s.jsx)(i.h2,{id:"understanding-the-zrok-limits-agent",children:"Understanding the zrok Limits Agent"}),"\n",(0,s.jsx)(i.p,{children:"The limits agent is a component of the zrok controller. It can be enabled and configured through the zrok controller configuration."}),"\n",(0,s.jsx)(i.p,{children:"The limits agent is responsible for controlling the number of resources in use (environments, shares, etc.) and also for ensuring that accounts are held below the configured data transfer bandwidth thresholds. The limits agent exists to manage resource consumption for larger, multi-user zrok installations."}),"\n",(0,s.jsx)(i.h3,{id:"types-of-limits",children:"Types of Limits"}),"\n",(0,s.jsxs)(i.p,{children:["Limits can be specified that control the number of environments, shares, reserved shares, unique names, and frontends per-share that can be created by an account. Limits that control the allowed number of resources are called ",(0,s.jsx)(i.em,{children:"resource count limits"}),"."]}),"\n",(0,s.jsxs)(i.p,{children:["Limits can be specified to control the amount of data that can be transferred within a time period. Limits that control the amount of data that can be transferred are called ",(0,s.jsx)(i.em,{children:"bandwidth limits"}),"."]}),"\n",(0,s.jsxs)(i.p,{children:["zrok limits can be specified ",(0,s.jsx)(i.em,{children:"globally"}),", applying to all users in a service instance. Limit ",(0,s.jsx)(i.em,{children:"classes"})," can be created to provide additional levels of resource allocation. Limit classes can then be ",(0,s.jsx)(i.em,{children:"applied"})," to multiple accounts, to alter their limit allocation beyond what's configured in the global configuration."]}),"\n",(0,s.jsx)(i.h2,{id:"the-global-configuration",children:"The Global Configuration"}),"\n",(0,s.jsxs)(i.p,{children:["The reference configuration for the zrok controller (found at ",(0,s.jsx)(i.a,{href:"https://github.com/openziti/zrok/blob/main/etc/ctrl.yml",children:(0,s.jsx)(i.code,{children:"etc/ctrl.yaml"})})," in the ",(0,s.jsx)(i.a,{href:"https://github.com/openziti/zrok",children:"repository"}),") contains the global limits configuration, which looks like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-yaml",children:"# Service instance limits global configuration.\n#\n# See `docs/guides/metrics-and-limits/configuring-limits.md` for details.\n#\nlimits:\n environments: -1\n shares: -1\n reserved_shares: -1\n unique_names: -1\n share_frontends: -1\n bandwidth:\n period: 5m\n warning:\n rx: -1\n tx: -1\n total: 7242880\n limit:\n rx: -1\n tx: -1\n total: 10485760\n enforcing: false\n cycle: 5m\n"})}),"\n",(0,s.jsx)(i.admonition,{type:"note",children:(0,s.jsxs)(i.p,{children:["A value of ",(0,s.jsx)(i.code,{children:"-1"})," appearing in the limits configuration mean the value is ",(0,s.jsx)(i.em,{children:"unlimited"}),"."]})}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"enforcing"})," boolean specifies whether or not limits are enabled in the service instance. By default, limits is disabled. No matter what else is configured in this stanza, if ",(0,s.jsx)(i.code,{children:"enforcing"})," is set to ",(0,s.jsx)(i.code,{children:"false"}),", there will be no limits placed on any account in the service instance."]}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"cycle"}),' value controls how frequently the limits agent will evaluate enforced limits. When a user exceeds a limit and has their shares disabled, the limits agent will evaluate their bandwidth usage on this interval looking to "relax" the limit once their usage falls below the threshold.']}),"\n",(0,s.jsx)(i.h3,{id:"global-resouce-count-limits",children:"Global Resouce Count Limits"}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"environments"}),", ",(0,s.jsx)(i.code,{children:"shares"}),", ",(0,s.jsx)(i.code,{children:"reserved_shares"}),", ",(0,s.jsx)(i.code,{children:"unique_names"}),", and ",(0,s.jsx)(i.code,{children:"share_frontends"})," specify the resource count limits, globally for the service instance."]}),"\n",(0,s.jsx)(i.p,{children:"These resource counts will be applied to all users in the service instance by default."}),"\n",(0,s.jsx)(i.h3,{id:"global-bandwidth-limits",children:"Global Bandwidth Limits"}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"bandwidth"})," section defines the global bandwidth limits for all users in the service instance."]}),"\n",(0,s.jsxs)(i.p,{children:["There are two levels of bandwidth limits that can be specified in the global configuration. The first limit defines a ",(0,s.jsx)(i.em,{children:"warning"})," threshold where the user will receive an email that they are using increased data transfer amounts and will ultimately be subject to a limit. If you do not want this warning email to be sent, then configure all of the values to ",(0,s.jsx)(i.code,{children:"-1"})," (unlimited)."]}),"\n",(0,s.jsxs)(i.p,{children:["The second limit defines the the actual ",(0,s.jsx)(i.em,{children:"limit"})," threshold, where the limits agent will disabled traffic for the account's shares."]}),"\n",(0,s.jsxs)(i.p,{children:["Bandwidth limits can be specified in terms of ",(0,s.jsx)(i.code,{children:"tx"})," (or ",(0,s.jsx)(i.em,{children:"transmitted"})," data), ",(0,s.jsx)(i.code,{children:"rx"})," (or ",(0,s.jsx)(i.em,{children:"received"})," data), and the ",(0,s.jsx)(i.code,{children:"total"})," bytes that are sent in either direction. If you only want to set the ",(0,s.jsx)(i.code,{children:"total"})," transferred limit, you can set ",(0,s.jsx)(i.code,{children:"rx"})," and ",(0,s.jsx)(i.code,{children:"tx"})," to ",(0,s.jsx)(i.code,{children:"-1"})," (for ",(0,s.jsx)(i.em,{children:"unlimited"}),"). You can configure any combination of these these values at either the limit or warning levels."]}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"period"})," specifies the time window for the bandwidth limit. See the documentation for ",(0,s.jsx)(i.a,{href:"https://pkg.go.dev/time#ParseDuration",children:(0,s.jsx)(i.code,{children:"time.Duration.ParseDuration"})})," for details about the format used for these durations. If the ",(0,s.jsx)(i.code,{children:"period"})," is set to 5 minutes, then the limits agent will monitor the transmitted and receivde traffic for the account for the last 5 minutes, and if the amount of data is greater than either the ",(0,s.jsx)(i.code,{children:"warning"})," or the ",(0,s.jsx)(i.code,{children:"limit"})," threshold, action will be taken."]}),"\n",(0,s.jsxs)(i.p,{children:["In the global configuration example above users are allowed to transfer a total of ",(0,s.jsx)(i.code,{children:"10485760"})," bytes in a ",(0,s.jsx)(i.code,{children:"5m"})," period, and they will receive a warning email after they transfer more than ",(0,s.jsx)(i.code,{children:"7242880"})," bytes in a ",(0,s.jsx)(i.code,{children:"5m"})," period."]}),"\n",(0,s.jsx)(i.h2,{id:"limit-classes",children:"Limit Classes"}),"\n",(0,s.jsxs)(i.p,{children:["The zrok limits agent includes a concept called ",(0,s.jsx)(i.em,{children:"limit classes"}),". Limit classes can be used to define resource count and bandwidth limits that can be selectively applied to individual accounts in a service instance."]}),"\n",(0,s.jsxs)(i.p,{children:["Limit classes are created by creating a record in the ",(0,s.jsx)(i.code,{children:"limit_classes"})," table in the zrok controller database. The table has this schema:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"CREATE TABLE public.limit_classes (\n id integer NOT NULL,\n label VARCHAR(32),\n backend_mode public.backend_mode,\n environments integer DEFAULT '-1'::integer NOT NULL,\n shares integer DEFAULT '-1'::integer NOT NULL,\n reserved_shares integer DEFAULT '-1'::integer NOT NULL,\n unique_names integer DEFAULT '-1'::integer NOT NULL,\n share_frontends integer DEFAULT '-1'::integer NOT NULL,\n period_minutes integer DEFAULT 1440 NOT NULL,\n rx_bytes bigint DEFAULT '-1'::integer NOT NULL,\n tx_bytes bigint DEFAULT '-1'::integer NOT NULL,\n total_bytes bigint DEFAULT '-1'::integer NOT NULL,\n limit_action public.limit_action DEFAULT 'limit'::public.limit_action NOT NULL,\n created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n deleted boolean DEFAULT false NOT NULL\n);\n\n"})}),"\n",(0,s.jsx)(i.p,{children:"This schema supports constructing the 3 different types of limits classes that the system supports."}),"\n",(0,s.jsxs)(i.p,{children:["After defining a limit class in the database, it can be applied to specific user accounts (overriding the relevant parts of the global configuration) by inserting a row into the ",(0,s.jsx)(i.code,{children:"applied_limit_classes"})," table:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"CREATE TABLE public.applied_limit_classes (\n id integer NOT NULL,\n account_id integer NOT NULL,\n limit_class_id integer NOT NULL,\n created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n deleted boolean DEFAULT false NOT NULL\n);\n"})}),"\n",(0,s.jsxs)(i.p,{children:["Create a row in this table linking the ",(0,s.jsx)(i.code,{children:"account_id"})," to the ",(0,s.jsx)(i.code,{children:"limit_class_id"})," to apply the limit class to a specific user account."]}),"\n",(0,s.jsx)(i.h3,{id:"unscoped-resource-count-classes",children:"Unscoped Resource Count Classes"}),"\n",(0,s.jsxs)(i.p,{children:["To support overriding the resource count limits defined in the global limits configuration, a site administrator can create a limit class by inserting a row into the ",(0,s.jsx)(i.code,{children:"limit_classes"})," table structured like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"insert into limit_classes (environments, shares, reserved_shares, unique_names, share_frontends) values (1, 1, 1, 1, 1);\n"})}),"\n",(0,s.jsxs)(i.p,{children:["This creates a limit class that sets the ",(0,s.jsx)(i.code,{children:"environments"}),", ",(0,s.jsx)(i.code,{children:"shares"}),", ",(0,s.jsx)(i.code,{children:"reserved_shares"}),", and ",(0,s.jsx)(i.code,{children:"unique_names"})," all to ",(0,s.jsx)(i.code,{children:"1"}),"."]}),"\n",(0,s.jsx)(i.p,{children:"When this limit class is applied to a user account those values would override the default resource count values configured globally."}),"\n",(0,s.jsxs)(i.p,{children:["Applying an unscoped resource count class ",(0,s.jsx)(i.em,{children:"does not"})," affect the bandwidth limits (either globally configured, or via a limit class)."]}),"\n",(0,s.jsx)(i.h3,{id:"unscoped-bandwidth-classes",children:"Unscoped Bandwidth Classes"}),"\n",(0,s.jsxs)(i.p,{children:["To support overriding the bandwidth limits defined in the global configuration, a site administrator can create a limit class by inserting a row into the ",(0,s.jsx)(i.code,{children:"limit_classes"})," table structured like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"insert into limit_classes (period_minutes, total_bytes, limit_action) values (2, 204800, 'limit');\n"})}),"\n",(0,s.jsxs)(i.p,{children:["This inserts a limit class that allows for a total bandwidth transfer of ",(0,s.jsx)(i.code,{children:"204800"})," bytes every ",(0,s.jsx)(i.code,{children:"2"})," minutes."]}),"\n",(0,s.jsx)(i.p,{children:"When this limit class is applied to a user account, those values would override the default bandwidth values configured globally."}),"\n",(0,s.jsxs)(i.p,{children:["Applying an unscoped bandwidth class ",(0,s.jsx)(i.em,{children:"does not"})," affect the resource count limits (either globally configured, or via a limit class)."]}),"\n",(0,s.jsx)(i.h3,{id:"scoped-classes",children:"Scoped Classes"}),"\n",(0,s.jsxs)(i.p,{children:["A scoped limit class specifies ",(0,s.jsx)(i.em,{children:"both"})," the resource counts (",(0,s.jsx)(i.code,{children:"shares"}),", ",(0,s.jsx)(i.code,{children:"reserved_shares"}),", and ",(0,s.jsx)(i.code,{children:"unique_names"}),", but ",(0,s.jsx)(i.em,{children:"NOT"})," ",(0,s.jsx)(i.code,{children:"environments"}),") for a ",(0,s.jsx)(i.em,{children:"specific"})," backend mode. Insert a row like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"insert into limit_classes (backend_mode, shares, reserved_shares, unique_names, period_minutes, total_bytes, limit_action) values ('web', 2, 1, 1, 2, 4096000, 'limit');\n"})}),"\n",(0,s.jsxs)(i.p,{children:["Scoped limits are designed to ",(0,s.jsx)(i.em,{children:"increase"})," the limits for a specific backend mode beyond what the global configuration and the unscoped classes provide. The general approach is to use the global configuration and the unscoped classes to provide the general account limits, and then the scoped classes can be used to further increase (or potentially ",(0,s.jsx)(i.em,{children:"decrease"}),") the limits for a specific backend mode."]}),"\n",(0,s.jsx)(i.p,{children:"If a scoped limit class exists for a specific backend mode, then the limits agent will use that limit in making a decision about limiting the resource count or bandwidth. All other types of shares will fall back to the unscoped classes or the global configuration."}),"\n",(0,s.jsx)(i.h2,{id:"limit-actions",children:"Limit Actions"}),"\n",(0,s.jsx)(i.p,{children:"When an account exceeds a bandwidth limit, the limits agent will seek to limit the affected shares (based on the combination of global configuration, unscoped limit classes, and scoped limit classes). It applies the limit by removing the underlying OpenZiti dial policies for any frontends that are trying to access the share."}),"\n",(0,s.jsxs)(i.p,{children:["This means that public frontends will simply return a ",(0,s.jsx)(i.code,{children:"404"})," as if the share is no longer there. Private frontends will also return ",(0,s.jsx)(i.code,{children:"404"})," errors. When the limit is relaxed, the dial policies are put back in place and the share will continue operating normally."]}),"\n",(0,s.jsx)(i.h2,{id:"unlimited-accounts",children:"Unlimited Accounts"}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"accounts"})," table in the database includes a ",(0,s.jsx)(i.code,{children:"limitless"})," column. When this column is set to ",(0,s.jsx)(i.code,{children:"true"})," the account is not subject to any of the limits in the system."]}),"\n",(0,s.jsx)(i.h2,{id:"experimental-limits-locking",children:"Experimental Limits Locking"}),"\n",(0,s.jsxs)(i.p,{children:["zrok versions prior to ",(0,s.jsx)(i.code,{children:"v0.4.31"})," had a potential race condition when enforcing resource count limits. This usually only manifested in cases where shares or environments were being allocated programmatically (and fast enough to win the limits race)."]}),"\n",(0,s.jsxs)(i.p,{children:["This occurs due to a lack of transactional database locking around the limited structures. ",(0,s.jsx)(i.code,{children:"v0.4.31"})," includes a pessimistic locking facility that can be enabled ",(0,s.jsx)(i.em,{children:"only"})," on the PostgreSQL store implemention."]}),"\n",(0,s.jsxs)(i.p,{children:["If you're running PostgreSQL for your service instance and you want to enable the new experimental locking facility that eliminates the potential resource count race condition, add the ",(0,s.jsx)(i.code,{children:"enable_locking: true"})," flag to your ",(0,s.jsx)(i.code,{children:"store"})," definition:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-yaml",children:"store:\n enable_locking: true\n"})}),"\n",(0,s.jsx)(i.h2,{id:"caveats",children:"Caveats"}),"\n",(0,s.jsx)(i.p,{children:"There are a number of caveats that are important to understand when using the limits agent with more complicated limits scenarios:"}),"\n",(0,s.jsx)(i.h3,{id:"aggregate-bandwidth",children:"Aggregate Bandwidth"}),"\n",(0,s.jsx)(i.p,{children:"The zrok limits agent is a work in progress. The system currently does not track bandwidth individually for each backend mode type, which means all bandwidth values are aggregated between all of the share types that an account might be using. This will likely change in an upcoming release."}),"\n",(0,s.jsx)(i.h3,{id:"administration-through-sql",children:"Administration Through SQL"}),"\n",(0,s.jsx)(i.p,{children:"There are currently no administrative API endpoints (or corresponding CLI tools) to support creating and applying limit classes in the current release. The limits agent infrastructure was designed to support software integrations that directly manipulate the underlying database structures."}),"\n",(0,s.jsx)(i.p,{children:"A future release may provide API and CLI tooling to support the human administration of the limits agent."}),"\n",(0,s.jsx)(i.h3,{id:"performance",children:"Performance"}),"\n",(0,s.jsxs)(i.p,{children:["Be sure to minimize the number of different periods used for specifying bandwidth limits. Specifying limits in multiple different periods can cause a multiplicity of queries to be executed against the metrics store (InfluxDB). Standardizing on a period like ",(0,s.jsx)(i.code,{children:"24h"})," or ",(0,s.jsx)(i.code,{children:"6h"})," and using that consistently is the best way to to manage the performance of the metrics store."]})]})}function h(e={}){const{wrapper:i}={...(0,a.R)(),...e.components};return i?(0,s.jsx)(i,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,i,n)=>{n.d(i,{R:()=>r,x:()=>l});var t=n(6540);const s={},a=t.createContext(s);function r(e){const i=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function l(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),t.createElement(a.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/61ea36d9.14b5d6ef.js b/assets/js/61ea36d9.14b5d6ef.js new file mode 100644 index 00000000..86da3fd8 --- /dev/null +++ b/assets/js/61ea36d9.14b5d6ef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9576],{9140:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>a,contentTitle:()=>c,default:()=>l,frontMatter:()=>s,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"concepts/opensource","title":"Open Source","description":"It\'s important to the zrok project that it remain free and open source software. The code is available on GitHub","source":"@site/versioned_docs/version-0.4/concepts/opensource.md","sourceDirName":"concepts","slug":"/concepts/opensource","permalink":"/docs/concepts/opensource","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/concepts/opensource.md","tags":[],"version":"0.4","sidebarPosition":100,"frontMatter":{"sidebar_position":100},"sidebar":"tutorialSidebar","previous":{"title":"Sharing Websites and Files","permalink":"/docs/concepts/files"},"next":{"title":"Hosting","permalink":"/docs/concepts/hosting"}}');var r=t(4848),i=t(8453);const s={sidebar_position:100},c="Open Source",a={},d=[{value:"Built on OpenZiti",id:"built-on-openziti",level:2}];function p(e){const o={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.header,{children:(0,r.jsx)(o.h1,{id:"open-source",children:"Open Source"})}),"\n",(0,r.jsxs)(o.p,{children:["It's important to the ",(0,r.jsx)(o.code,{children:"zrok"})," project that it remain free and open source software. The code is available on ",(0,r.jsx)(o.a,{href:"https://github.com/openziti/zrok",children:"GitHub"}),"\nfor the world to use, inspect, and build upon!"]}),"\n",(0,r.jsxs)(o.p,{children:["Check out the repository over on GitHub at ",(0,r.jsx)(o.a,{href:"https://github.com/openziti/zrok",children:"https://github.com/openziti/zrok"}),". If you find ",(0,r.jsx)(o.code,{children:"zrok"})," to be useful, and\nyou want to help spread the word of ",(0,r.jsx)(o.code,{children:"zrok"})," give the project a star. It really does help get the word out about the\nproject."]}),"\n",(0,r.jsxs)(o.p,{children:["The project also uses a very permissive license: Apache v2. We encourage people to fork the repo and use ",(0,r.jsx)(o.code,{children:"zrok"})," for your own purposes how you see fit or contribute back to the project."]}),"\n",(0,r.jsx)(o.h2,{id:"built-on-openziti",children:"Built on OpenZiti"}),"\n",(0,r.jsxs)(o.p,{children:["The power of ",(0,r.jsx)(o.code,{children:"zrok"})," really lies in ",(0,r.jsx)(o.code,{children:"private"})," sharing. It's increasingly clear that security needs to be a first-class\nmember of any organization. To enable ",(0,r.jsx)(o.code,{children:"private"})," sharing, ",(0,r.jsx)(o.code,{children:"zrok"})," was built on top of another excellent open source project named OpenZiti."]}),"\n",(0,r.jsxs)(o.p,{children:["OpenZiti is a secure overlay network focusing on bringing zero trust to applications. It is the ",(0,r.jsx)(o.strong,{children:"backbone"})," of ",(0,r.jsx)(o.code,{children:"zrok"}),".\nIn fact, ",(0,r.jsx)(o.code,{children:"zrok"})," proudly proclaims itself as an Ziti ",(0,r.jsx)(o.em,{children:"native"})," application."]}),"\n",(0,r.jsxs)(o.p,{children:["If you are interested in learning more about OpenZiti head over to ",(0,r.jsx)(o.a,{href:"https://docs.openziti.io/docs/learn/introduction/",children:"the docs"}),", try the quickstart, and don't forget to star that project too. We couldn't build ",(0,r.jsx)(o.code,{children:"zrok"})," without OpenZiti!"]})]})}function l(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},8453:(e,o,t)=>{t.d(o,{R:()=>s,x:()=>c});var n=t(6540);const r={},i=n.createContext(r);function s(e){const o=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function c(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6272ba0e.5dab9662.js b/assets/js/6272ba0e.5dab9662.js new file mode 100644 index 00000000..c7742bc8 --- /dev/null +++ b/assets/js/6272ba0e.5dab9662.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7242],{2816:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>d,contentTitle:()=>i,default:()=>l,frontMatter:()=>a,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"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/next/concepts/sharing-reserved","draft":false,"unlisted":false,"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/next/concepts/sharing-public"},"next":{"title":"Sharing HTTP Servers","permalink":"/docs/next/concepts/http"}}');var t=s(4848),o=s(8453);const a={sidebar_position:10},i="Reserved Shares",d={},c=[{value:"Unique Names",id:"unique-names",level:2}];function h(e){const r={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"reserved-shares",children:"Reserved Shares"})}),"\n",(0,t.jsxs)(r.p,{children:["By default, a ",(0,t.jsx)(r.code,{children:"public"})," or ",(0,t.jsx)(r.code,{children:"private"})," share is assigned a ",(0,t.jsx)(r.em,{children:"share token"})," when you create a share using the ",(0,t.jsx)(r.code,{children:"zrok share"})," command. The ",(0,t.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,t.jsx)(r.code,{children:"zrok share"}),", the bridge is eliminated and the ",(0,t.jsx)(r.em,{children:"share token"})," is deleted. If you run ",(0,t.jsx)(r.code,{children:"zrok share"})," again, you will be allocated a brand new ",(0,t.jsx)(r.em,{children:"share token"}),"."]}),"\n",(0,t.jsxs)(r.p,{children:["You can use a ",(0,t.jsx)(r.code,{children:"reserved"})," share to persist your ",(0,t.jsx)(r.em,{children:"share token"})," across multiple runs of the ",(0,t.jsx)(r.code,{children:"zrok share"})," bridge. When you use a ",(0,t.jsx)(r.code,{children:"reserved"})," share, the share token will not be deleted between multiple runs of ",(0,t.jsx)(r.code,{children:"zrok share"}),"."]}),"\n",(0,t.jsxs)(r.p,{children:["To use a ",(0,t.jsx)(r.code,{children:"reserved"})," share, you will first run the ",(0,t.jsx)(r.code,{children:"zrok reserve"})," command to create the reserved share (see ",(0,t.jsx)(r.code,{children:"zrok reserve --help"})," for details). Once you've created your ",(0,t.jsx)(r.code,{children:"reserved"})," share, you will use the ",(0,t.jsx)(r.code,{children:"zrok share reserved"})," command (see ",(0,t.jsx)(r.code,{children:"--help"})," for details) to run the bridge for the shared resource."]}),"\n",(0,t.jsxs)(r.p,{children:["This pattern works for both ",(0,t.jsx)(r.code,{children:"public"})," and ",(0,t.jsx)(r.code,{children:"private"})," shares, and for all resource types supported by ",(0,t.jsx)(r.code,{children:"zrok"}),"."]}),"\n",(0,t.jsxs)(r.p,{children:["To delete your ",(0,t.jsx)(r.code,{children:"reserved"})," share use the ",(0,t.jsx)(r.code,{children:"zrok release"})," command or click the delete button in the share's ",(0,t.jsx)(r.em,{children:"Actions"})," tab in the web console."]}),"\n",(0,t.jsx)(r.h2,{id:"unique-names",children:"Unique Names"}),"\n",(0,t.jsxs)(r.p,{children:["The default is to generate a random ",(0,t.jsx)(r.em,{children:"share token"})," and you may specify a ",(0,t.jsx)(r.em,{children:"unique name"}),"."]}),"\n",(0,t.jsx)(r.p,{children:'This reserves public share token "myshare."'}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-bash",metastring:'title="Reserve with the Command Line"',children:'zrok reserve public 80 --unique-name "myshare"\n'})}),"\n",(0,t.jsxs)(r.p,{children:["This shares ",(0,t.jsx)(r.code,{children:"127.0.0.1:80"})," as ",(0,t.jsx)(r.code,{children:"https://myshare.zrok.example.com"})," where ",(0,t.jsx)(r.code,{children:"https://{token}.zrok.example.com"})," is the frontend's template."]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-bash",metastring:'title="Share a Reserved Token"',children:'zrok share reserved "myshare"\n'})})]})}function l(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8453:(e,r,s)=>{s.d(r,{R:()=>a,x:()=>i});var n=s(6540);const t={},o=n.createContext(t);function a(e){const r=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),n.createElement(o.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6272ba0e.80d989e8.js b/assets/js/6272ba0e.80d989e8.js deleted file mode 100644 index 918e12a0..00000000 --- a/assets/js/6272ba0e.80d989e8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7242],{2816:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>d,contentTitle:()=>i,default:()=>l,frontMatter:()=>a,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"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":false,"unlisted":false,"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"}}');var t=s(4848),o=s(8453);const a={sidebar_position:10},i="Reserved Shares",d={},c=[{value:"Unique Names",id:"unique-names",level:2}];function h(e){const r={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"reserved-shares",children:"Reserved Shares"})}),"\n",(0,t.jsxs)(r.p,{children:["By default, a ",(0,t.jsx)(r.code,{children:"public"})," or ",(0,t.jsx)(r.code,{children:"private"})," share is assigned a ",(0,t.jsx)(r.em,{children:"share token"})," when you create a share using the ",(0,t.jsx)(r.code,{children:"zrok share"})," command. The ",(0,t.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,t.jsx)(r.code,{children:"zrok share"}),", the bridge is eliminated and the ",(0,t.jsx)(r.em,{children:"share token"})," is deleted. If you run ",(0,t.jsx)(r.code,{children:"zrok share"})," again, you will be allocated a brand new ",(0,t.jsx)(r.em,{children:"share token"}),"."]}),"\n",(0,t.jsxs)(r.p,{children:["You can use a ",(0,t.jsx)(r.code,{children:"reserved"})," share to persist your ",(0,t.jsx)(r.em,{children:"share token"})," across multiple runs of the ",(0,t.jsx)(r.code,{children:"zrok share"})," bridge. When you use a ",(0,t.jsx)(r.code,{children:"reserved"})," share, the share token will not be deleted between multiple runs of ",(0,t.jsx)(r.code,{children:"zrok share"}),"."]}),"\n",(0,t.jsxs)(r.p,{children:["To use a ",(0,t.jsx)(r.code,{children:"reserved"})," share, you will first run the ",(0,t.jsx)(r.code,{children:"zrok reserve"})," command to create the reserved share (see ",(0,t.jsx)(r.code,{children:"zrok reserve --help"})," for details). Once you've created your ",(0,t.jsx)(r.code,{children:"reserved"})," share, you will use the ",(0,t.jsx)(r.code,{children:"zrok share reserved"})," command (see ",(0,t.jsx)(r.code,{children:"--help"})," for details) to run the bridge for the shared resource."]}),"\n",(0,t.jsxs)(r.p,{children:["This pattern works for both ",(0,t.jsx)(r.code,{children:"public"})," and ",(0,t.jsx)(r.code,{children:"private"})," shares, and for all resource types supported by ",(0,t.jsx)(r.code,{children:"zrok"}),"."]}),"\n",(0,t.jsxs)(r.p,{children:["To delete your ",(0,t.jsx)(r.code,{children:"reserved"})," share use the ",(0,t.jsx)(r.code,{children:"zrok release"})," command or click the delete button in the share's ",(0,t.jsx)(r.em,{children:"Actions"})," tab in the web console."]}),"\n",(0,t.jsx)(r.h2,{id:"unique-names",children:"Unique Names"}),"\n",(0,t.jsxs)(r.p,{children:["The default is to generate a random ",(0,t.jsx)(r.em,{children:"share token"})," and you may specify a ",(0,t.jsx)(r.em,{children:"unique name"}),"."]}),"\n",(0,t.jsx)(r.p,{children:'This reserves public share token "myshare."'}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-bash",metastring:'title="Reserve with the Command Line"',children:'zrok reserve public 80 --unique-name "myshare"\n'})}),"\n",(0,t.jsxs)(r.p,{children:["This shares ",(0,t.jsx)(r.code,{children:"127.0.0.1:80"})," as ",(0,t.jsx)(r.code,{children:"https://myshare.zrok.example.com"})," where ",(0,t.jsx)(r.code,{children:"https://{token}.zrok.example.com"})," is the frontend's template."]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-bash",metastring:'title="Share a Reserved Token"',children:'zrok share reserved "myshare"\n'})})]})}function l(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8453:(e,r,s)=>{s.d(r,{R:()=>a,x:()=>i});var n=s(6540);const t={},o=n.createContext(t);function a(e){const r=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),n.createElement(o.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/685bed1a.b1929868.js b/assets/js/685bed1a.b1929868.js new file mode 100644 index 00000000..edf19f99 --- /dev/null +++ b/assets/js/685bed1a.b1929868.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5689],{1181:(e,n,o)=>{o.d(n,{Ay:()=>c,RM:()=>t});var r=o(4848),i=o(8453);const t=[{value:"Docker Instance",id:"docker-instance",level:2},{value:"DNS Configuration",id:"dns-configuration",level:3},{value:"Additional DNS Configuration for Caddy TLS",id:"additional-dns-configuration-for-caddy-tls",level:4},{value:"Create the Docker Compose Project",id:"create-the-docker-compose-project",level:3},{value:"Shortcut Option",id:"shortcut-option",level:4},{value:"Manual Option",id:"manual-option",level:4},{value:"Configure the Docker Compose Project Environment",id:"configure-the-docker-compose-project-environment",level:3},{value:"Start the Docker Compose Project",id:"start-the-docker-compose-project",level:3},{value:"Set up a User Account",id:"set-up-a-user-account",level:3},{value:"Enable the User Environment",id:"enable-the-user-environment",level:3},{value:"Firewall Configuration",id:"firewall-configuration",level:3},{value:"Required",id:"required",level:4},{value:"Troubleshooting",id:"troubleshooting",level:3}];function s(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"docker-instance",children:"Docker Instance"}),"\n",(0,r.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/70zJ_h4uiD8",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,r.jsx)(n.p,{children:"This Docker Compose project creates a zrok instance and includes a ziti controller and router. An optional Caddy container is included to provide HTTPS and reverse proxy services for the zrok API and public shares."}),"\n",(0,r.jsx)(n.h3,{id:"dns-configuration",children:"DNS Configuration"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["A wildcard record exists for the IP address where the zrok instance will run, e.g. if your DNS zone is ",(0,r.jsx)(n.code,{children:"share.example.com"}),", then your wildcard record is ",(0,r.jsx)(n.code,{children:"*.share.example.com"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"additional-dns-configuration-for-caddy-tls",children:"Additional DNS Configuration for Caddy TLS"}),"\n",(0,r.jsxs)(n.p,{children:["The included Caddy container can automatically manage a wildcard certificate for your zrok instance. You can enable Caddy in this compose project by renaming ",(0,r.jsx)(n.code,{children:"compose.caddy.yml"})," as ",(0,r.jsx)(n.code,{children:"compose.override.yml"}),"."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Ensure A Caddy DNS plugin is available for your DNS provider (see ",(0,r.jsx)(n.a,{href:"https://github.com/orgs/caddy-dns/repositories?type=all&q=sort%3Aname-asc",children:"github.com/caddy-dns"}),")."]}),"\n",(0,r.jsxs)(n.li,{children:["Designate A DNS zone for zrok, e.g. ",(0,r.jsx)(n.code,{children:"example.com"})," or ",(0,r.jsx)(n.code,{children:"share.example.com"})," and create the zone on your DNS provider's platform."]}),"\n",(0,r.jsx)(n.li,{children:"Created an API token in your DNS provider that has permission to manage zrok's DNS zone."}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"create-the-docker-compose-project",children:"Create the Docker Compose Project"}),"\n",(0,r.jsx)(n.p,{children:"Create a working directory on your Docker host and save these Docker Compose project files."}),"\n",(0,r.jsx)(n.h4,{id:"shortcut-option",children:"Shortcut Option"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Run this script to download the files in the current directory."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl https://get.openziti.io/zrok-instance/fetch.bash | bash\n"})}),"\n",(0,r.jsx)(n.p,{children:"Or, specify the Compose project directory."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl https://get.openziti.io/zrok-instance/fetch.bash | bash -s /path/to/compose/project/dir\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"manual-option",children:"Manual Option"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Get the zrok repo ZIP file."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"wget https://github.com/openziti/zrok/archive/refs/heads/main.zip\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Unzip the zrok-instance files into the project directory."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"unzip -j -d . main.zip '*/docker/compose/zrok-instance/*'\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"configure-the-docker-compose-project-environment",children:"Configure the Docker Compose Project Environment"}),"\n",(0,r.jsxs)(n.p,{children:["Create an ",(0,r.jsx)(n.code,{children:".env"})," file in the working directory."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title=".env required"',children:"ZROK_DNS_ZONE=share.example.com\n\nZROK_USER_EMAIL=me@example.com\nZROK_USER_PWD=zrokuserpw\n\nZITI_PWD=zitiadminpw\nZROK_ADMIN_TOKEN=zroktoken\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title=".env options"',children:"# Caddy TLS option: rename compose.caddy.yml to compose.override.yml and set these vars; allow 80,443 in firewall\n\n#\n## set these in .env for providers other than Route53\n#\n# plugin name for your DNS provider\nCADDY_DNS_PLUGIN=cloudflare\n# API token from your DNS provider\nCADDY_DNS_PLUGIN_TOKEN=abcd1234\n# use the staging API until you're sure everything is working to avoid hitting the rate limit\nCADDY_ACME_API=https://acme-staging-v02.api.letsencrypt.org/directory\n\n#\n## set these in .env for Route53\n#\n# AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}\n# AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}\n# AWS_REGION: ${AWS_REGION}\n# AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN} # if temporary credential, e.g., from STS\n\n#\n## if not using Caddy for TLS, uncomment to publish the insecure ports to the internet\n#\n#ZROK_INSECURE_INTERFACE=0.0.0.0\n\n# these insecure ports must be proxied with TLS for security\nZROK_CTRL_PORT=18080\nZROK_FRONTEND_PORT=8080\nZROK_OAUTH_PORT=8081\n\n# these secure ziti ports must be published to the internet\nZITI_CTRL_ADVERTISED_PORT=80\nZITI_ROUTER_PORT=3022\n\n# optionally configure oauth for public shares\n#ZROK_OAUTH_HASH_KEY=oauthhashkeysecret\n#ZROK_OAUTH_GITHUB_CLIENT_ID=abcd1234\n#ZROK_OAUTH_GITHUB_CLIENT_SECRET=abcd1234\n#ZROK_OAUTH_GOOGLE_CLIENT_ID=abcd1234\n#ZROK_OAUTH_GOOGLE_CLIENT_SECRET=abcd1234\n\n# zrok version, e.g., 1.0.0\nZROK_CLI_TAG=latest\n# ziti version, e.g., 1.0.0\nZITI_CLI_TAG=latest\n"})}),"\n",(0,r.jsx)(n.h3,{id:"start-the-docker-compose-project",children:"Start the Docker Compose Project"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Start the zrok instance."}),"\n",(0,r.jsxs)(n.p,{children:["The container images for zrok (including caddy) are built in this step. This provides a simple configuration to get started. You can modify the templates named like ",(0,r.jsx)(n.code,{children:"*.envsubst"})," or mount a customized configuration file to mask the one that was built in."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker compose up --build --detach\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"set-up-a-user-account",children:"Set up a User Account"}),"\n",(0,r.jsxs)(n.p,{children:["This step creates a user account. You will log in to the zrok web console with the account password created in this step. The ZROK_USER_EMAIL and ZROK_USER_PWD variables are set in the ",(0,r.jsx)(n.code,{children:".env"})," file. You can create more user accounts the same way by substituting a different email and password."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title="Create the first user account"',children:"docker compose exec zrok-controller bash -xc 'zrok admin create account ${ZROK_USER_EMAIL} ${ZROK_USER_PWD}'\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"+ zrok admin create account me@example.com zrokuserpw\n[ 0.000] INFO zrok/controller/store.Open: database connected\n[ 0.002] INFO zrok/controller/store.(*Store).migrate: applied 0 migrations\nheMqncCyxZcx\n"})}),"\n",(0,r.jsx)(n.p,{children:"Create additional users by running the command again with a different email and password."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title="Create another user"',children:"docker compose exec zrok-controller zrok admin create account \n"})}),"\n",(0,r.jsx)(n.h3,{id:"enable-the-user-environment",children:"Enable the User Environment"}),"\n",(0,r.jsx)(n.p,{children:"You must enable each device environment with the account token obtained when the account was created. This is separate from the account password that's used to log in to the web console."}),"\n",(0,r.jsxs)(n.p,{children:["Follow ",(0,r.jsx)(n.a,{href:"/docs/getting-started#installing-the-zrok-command",children:"the getting started guide"})," to install the zrok CLI on some device and enable a zrok environment."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure the environment with the zrok API. Substitute the API endpoint with the one you're using, e.g. ",(0,r.jsx)(n.code,{children:"https://zrok.${ZROK_DNS_ZONE}"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"zrok config set apiEndpoint https://zrok.share.example.com\n"})}),"\n",(0,r.jsx)(n.p,{children:"or, if not using Caddy for TLS:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"zrok config set apiEndpoint http://zrok.share.example.com:18080\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Enable an environment on this device with the account token from the previous step."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"zrok enable heMqncCyxZcx\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"firewall-configuration",children:"Firewall Configuration"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ziti-quickstart"})," and ",(0,r.jsx)(n.code,{children:"caddy"})," containers publish ports to all devices that use zrok shares. The ",(0,r.jsx)(n.code,{children:"zrok-controller"})," and ",(0,r.jsx)(n.code,{children:"zrok-frontend"})," containers expose ports only to the ",(0,r.jsx)(n.code,{children:"caddy"})," container and the Docker host's loopback interface."]}),"\n",(0,r.jsx)(n.h4,{id:"required",children:"Required"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"443/tcp"})," - reverse proxy handles HTTPS requests for zrok API, OAuth, and public shares (published by container ",(0,r.jsx)(n.code,{children:"caddy"}),")"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"80/tcp"})," - ziti ctrl plane (published by container ",(0,r.jsx)(n.code,{children:"ziti-quickstart"}),")"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"3022/tcp"})," - ziti data plane (published by container ",(0,r.jsx)(n.code,{children:"ziti-quickstart"}),")"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:'See "My internet connection can only send traffic to common ports" below about changing the required ports.'}),"\n",(0,r.jsx)(n.h3,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Check the ziti and zrok logs."}),"\n",(0,r.jsxs)(n.p,{children:["You can substitute the service container name of each to check their logs individually: ",(0,r.jsx)(n.code,{children:"ziti-quickstart"}),", ",(0,r.jsx)(n.code,{children:"zrok-controller"}),", ",(0,r.jsx)(n.code,{children:"zrok-frontend"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker compose logs zrok-controller\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Check the Caddy logs."}),"\n",(0,r.jsxs)(n.p,{children:["It can take a few minutes for Caddy to obtain the wildcard certificate. You can check the logs to see if there were any errors completing the DNS challenge which involves using the Caddy DNS plugin to create a TXT record in your DNS zone. This leverages the API token you provided in the ",(0,r.jsx)(n.code,{children:".env"})," file, which must have permission to create DNS records in the zrok DNS zone."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker compose logs caddy\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Caddy keeps failing to obtain a wildcard certificate because it timed out waiting for DNS."}),"\n",(0,r.jsx)(n.p,{children:"Symptom: the Caddy log contains \"timed out waiting for record to fully propagate.\" This means that Caddy added a DNS record with your DNS provider's API to prove to the CA it controls the zrok DNS zone, but it wasn't able to verify the record was created successfully with a DNS query."}),"\n",(0,r.jsx)(n.p,{children:"Solutions:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Add ",(0,r.jsx)(n.code,{children:"propagation_delay"})," in your ",(0,r.jsx)(n.code,{children:"Caddyfile"})," to delay the first DNS verification query. This avoids caching a verification query failure by waiting a few minutes for the record to become available so the verification query will succeed on the first attempt. Caddy will be unable to verify the DNS record if the failure remains in the cache too long."]}),"\n",(0,r.jsxs)(n.li,{children:["If the prior solution fails, you can override the default resolves/nameservers with ",(0,r.jsx)(n.code,{children:"resolvers"}),", a space-separated list of DNS servers. This gives you more control over if and where the verification query result is cached."]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"tls {\n dns {CADDY_DNS_PLUGIN} {CADDY_DNS_PLUGIN_TOKEN}\n\tpropagation_timeout 60m # default 2m\n propagation_delay 5m # default 0m\n}\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"zrok enable"})," fails certificate verification: ensure you are not using the staging API for Let's Encrypt."]}),"\n",(0,r.jsxs)(n.p,{children:["If you are using the staging API, you will see an error about the API certificate when you use the zrok CLI. You can switch to the production API by removing the overriding assignment of the ",(0,r.jsx)(n.code,{children:"CADDY_ACME_API"})," variable."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:'there was a problem enabling your environment!\nyou are trying to use the zrok service at: https://zrok.share.example.com\nyou can change your zrok service endpoint using this command:\n\n$ zrok config set apiEndpoint \n\n(where newEndpoint is something like: https://some.zrok.io)\n[ERROR]: error creating service client (error getting version from api endpoint \'https://zrok.share.example.com\': Get "https://zrok.share.example.com/api/v1/version": tls: failed to verify certificate: x509: certificate signed by unknown authority: Get "https://zrok.share.example.com/api/v1/version": tls: failed to verify certificate: x509: certificate signed by unknown authority)\n'})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Validate the Caddyfile."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker compose exec caddy caddy validate --config /etc/caddy/Caddyfile\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Verify the correct DNS provider module was built-in to Caddy."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker compose exec caddy caddy list-modules | grep dns.providers\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"dns.providers.cloudflare\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Use the Caddy admin API."}),"\n",(0,r.jsxs)(n.p,{children:["You can use the Caddy admin API to check the status of the Caddy instance. The admin API is available on port ",(0,r.jsx)(n.code,{children:"2019/tcp"})," inside the Docker Compose project. You can modify ",(0,r.jsx)(n.code,{children:"compose.override.yml"})," to publish the port if you want to access the admin API from the Docker host or elsewhere."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker compose exec caddy curl http://localhost:2019/config/ | jq\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"My DNS provider credential is composed of several values, not a single API token."}),"\n",(0,r.jsxs)(n.p,{children:["As long as your DNS provider is supported by Caddy then it will work. Here's a checklist for DNS providers like Route53 with credentials expressed as multiple values, e.g., ",(0,r.jsx)(n.code,{children:"AWS_ACCESS_KEY_ID"}),", ",(0,r.jsx)(n.code,{children:"AWS_SECRET_ACCESS_KEY"}),"."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Define env vars in ",(0,r.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,r.jsxs)(n.li,{children:["Declare env vars in ",(0,r.jsx)(n.code,{children:"compose.override.yml"})," file on ",(0,r.jsx)(n.code,{children:"caddy"}),"'s ",(0,r.jsx)(n.code,{children:"environment"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Modify ",(0,r.jsx)(n.code,{children:"Caddyfile"})," according to the DNS plugin author's instructions (",(0,r.jsx)(n.a,{href:"https://github.com/caddy-dns/route53",children:"link to Route53 README"}),"). This means modifying the ",(0,r.jsx)(n.code,{children:"Caddyfile"})," to reference the env vars. The provided file ",(0,r.jsx)(n.code,{children:"route53.Caddyfile"})," serves as an example."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"My internet connection can only send traffic to common ports like 80, 443, and 3389."}),"\n",(0,r.jsxs)(n.p,{children:["You can change the required ports in the ",(0,r.jsx)(n.code,{children:".env"})," file. Caddy will still use port 443 for zrok shares and API if you renamed ",(0,r.jsx)(n.code,{children:"compose.caddy.yml"})," as ",(0,r.jsx)(n.code,{children:"compose.override.yml"})," to enable Caddy."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title=".env"',children:"ZITI_CTRL_ADVERTISED_PORT=80\nZITI_ROUTER_PORT=3389\n"})}),"\n"]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(s,{...e})}):s(e)}},654:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"guides/self-hosting/docker","title":"Self-hosting guide for Docker","description":"","source":"@site/versioned_docs/version-0.4/guides/self-hosting/docker.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/docker","permalink":"/docs/guides/self-hosting/docker","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/docker.mdx","tags":[],"version":"0.4","sidebarPosition":45,"frontMatter":{"title":"Self-hosting guide for Docker","sidebar_label":"Docker","sidebar_position":45},"sidebar":"tutorialSidebar","previous":{"title":"Personalized Frontend","permalink":"/docs/guides/self-hosting/personalized-frontend"},"next":{"title":"Kubernetes","permalink":"/docs/guides/self-hosting/kubernetes"}}');var i=o(4848),t=o(8453),s=o(1181);const c={title:"Self-hosting guide for Docker",sidebar_label:"Docker",sidebar_position:45},a=void 0,d={},l=[...s.RM];function h(e){return(0,i.jsx)(s.Ay,{})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h()}},8453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>c});var r=o(6540);const i={},t=r.createContext(i);function s(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6a6a5bbc.18fd9113.js b/assets/js/6a6a5bbc.18fd9113.js new file mode 100644 index 00000000..717a5253 --- /dev/null +++ b/assets/js/6a6a5bbc.18fd9113.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2867],{2468:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"concepts/files","title":"Sharing Websites and Files","description":"With zrok it is possible to share files quickly and easily as well. To share files using zrok use","source":"@site/versioned_docs/version-0.4/concepts/files.md","sourceDirName":"concepts","slug":"/concepts/files","permalink":"/docs/concepts/files","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/concepts/files.md","tags":[],"version":"0.4","sidebarPosition":30,"frontMatter":{"title":"Sharing Websites and Files","sidebar_position":30},"sidebar":"tutorialSidebar","previous":{"title":"Sharing TCP and UDP Servers","permalink":"/docs/concepts/tunnels"},"next":{"title":"Open Source","permalink":"/docs/concepts/opensource"}}');var r=n(4848),t=n(8453);const o={title:"Sharing Websites and Files",sidebar_position:30},c=void 0,l={},a=[];function d(e){const s={code:"code",img:"img",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.p,{children:["With ",(0,r.jsx)(s.code,{children:"zrok"})," it is possible to share files quickly and easily as well. To share files using ",(0,r.jsx)(s.code,{children:"zrok"})," use\nthe ",(0,r.jsx)(s.code,{children:"--backend-mode web"}),", for example: ",(0,r.jsx)(s.code,{children:"zrok share private . --backend-mode web"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"Running with this mode will make it trivially easy to share files from the directory which the command\nwas run from."}),"\n",(0,r.jsx)(s.p,{children:"For example if you have a directory with a structure like this:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"-rw-r--r--+ 1 Michael None 7090 Apr 17 12:53 CHANGELOG.md\n-rw-r--r--+ 1 Michael None 11346 Apr 17 12:53 LICENSE\n-rw-r--r--+ 1 Michael None 2885 Apr 17 12:53 README.md\n-rwxr-xr-x+ 1 Michael None 44250624 Apr 17 13:00 zrok.exe*\n"})}),"\n",(0,r.jsx)(s.p,{children:"The files can be shared using a command such as:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"zrok share public --backend-mode web .\n"})}),"\n",(0,r.jsxs)(s.p,{children:["Then the files can be access with a ",(0,r.jsx)(s.code,{children:"private"})," or ",(0,r.jsx)(s.code,{children:"public"})," share, for example as shown:"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"zrok_share_web_files",src:n(3920).A+"",width:"952",height:"723"})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"zrok"})," will automatically provide a stock website, which will allow the accessing user to browse and navigate the file tree. Clicking the files allows the user to download them."]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"zrok"})," can also share a pre-rendered static HTML website. If you have a directory like this:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"-rw-rw-r--+ 1 Michael None 56 Jun 26 13:23 index.html\n"})}),"\n",(0,r.jsxs)(s.p,{children:["If ",(0,r.jsx)(s.code,{children:"index.html"})," contains valid HTML, like this:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-html",children:"\n\n

Hello zrok

\n\n"})}),"\n",(0,r.jsx)(s.p,{children:"Sharing the directory will result in the following when you access the share in a web browser:"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"zrok_share_web_website",src:n(6866).A+"",width:"952",height:"723"})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"zrok"})," contains a built-in web server, which you can use to serve static websites as a share."]})]})}function h(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},3920:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_share_web_files-936de420b39b071d71a8e275fe84e63d.png"},6866:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_share_web_website-5d4c550374b118d1992e488bb319e230.png"},8453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>c});var i=n(6540);const r={},t=i.createContext(r);function o(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e881e32.58f05075.js b/assets/js/6e881e32.58f05075.js deleted file mode 100644 index dec7c22f..00000000 --- a/assets/js/6e881e32.58f05075.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3373],{9864:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"guides/self-hosting/oauth/configuring-oauth","title":"OAuth Public Frontend Configuration","description":"As of v0.4.7, zrok includes OAuth integration for both Google and GitHub for zrok access public public frontends.","source":"@site/../docs/guides/self-hosting/oauth/configuring-oauth.md","sourceDirName":"guides/self-hosting/oauth","slug":"/guides/self-hosting/oauth/configuring-oauth","permalink":"/docs/guides/self-hosting/oauth/configuring-oauth","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/oauth/configuring-oauth.md","tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"OAuth","permalink":"/docs/category/oauth"},"next":{"title":"Instance Config","permalink":"/docs/guides/self-hosting/instance-configuration"}}');var o=n(4848),s=n(8453);const r={},a="OAuth Public Frontend Configuration",c={},h=[{value:"Planning for the OAuth Frontend",id:"planning-for-the-oauth-frontend",level:2},{value:"Configuring a Google OAuth Client ID",id:"configuring-a-google-oauth-client-id",level:2},{value:"OAuth Content Screen",id:"oauth-content-screen",level:3},{value:"Create the OAuth 2.0 Client ID",id:"create-the-oauth-20-client-id",level:3},{value:"Configuring a GitHub Client ID",id:"configuring-a-github-client-id",level:2},{value:"Configuring your Public Frontend",id:"configuring-your-public-frontend",level:2},{value:"Enabling OAuth on a Public Share",id:"enabling-oauth-on-a-public-share",level:2}];function d(e){const t={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"oauth-public-frontend-configuration",children:"OAuth Public Frontend Configuration"})}),"\n",(0,o.jsxs)(t.p,{children:["As of ",(0,o.jsx)(t.code,{children:"v0.4.7"}),", ",(0,o.jsx)(t.code,{children:"zrok"})," includes OAuth integration for both Google and GitHub for ",(0,o.jsx)(t.code,{children:"zrok access public"})," public frontends."]}),"\n",(0,o.jsx)(t.p,{children:"This integration allows you to create public shares and request that the public frontend authenticate your users against either the Google or GitHub OAuth endpoints (using the user's Google or GitHub accounts). Additionally, you can restrict the email address domain associated with the count to a list of domains that you provide when you create the share."}),"\n",(0,o.jsxs)(t.p,{children:["This is a first step towards a more comprehensive portfolio of user authentication strategies in future ",(0,o.jsx)(t.code,{children:"zrok"})," releases."]}),"\n",(0,o.jsx)(t.h2,{id:"planning-for-the-oauth-frontend",children:"Planning for the OAuth Frontend"}),"\n",(0,o.jsx)(t.p,{children:"The current implementation of the OAuth public frontend uses a HTTP listener to handle redirects from OAuth providers. You'll need to configure a DNS name and a port for this listener that is accessible by your end users. We'll refer to this listener as the \"OAuth frontend\" in this guide."}),"\n",(0,o.jsx)(t.p,{children:'We\'ll use the public DNS address of the OAuth frontend when creating the Google and GitHub OAuth clients below. This address is typically configured into these clients as the "redirect URL" where these clients will send the authenticated users after authentication.'}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"zrok"})," OAuth frontend will capture the successful authentication and forward the user back to their original destination."]}),"\n",(0,o.jsx)(t.h2,{id:"configuring-a-google-oauth-client-id",children:"Configuring a Google OAuth Client ID"}),"\n",(0,o.jsx)(t.h3,{id:"oauth-content-screen",children:"OAuth Content Screen"}),"\n",(0,o.jsx)(t.p,{children:'Before you can configure an OAuth Client ID in Google Cloud, you have to configure the "OAuth content screen".'}),"\n",(0,o.jsxs)(t.p,{children:["In the Google Cloud console, navigate to: ",(0,o.jsx)(t.code,{children:"APIs & Services > Credentials > OAuth content screen"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(1004).A+"",width:"1469",height:"1141"})}),"\n",(0,o.jsxs)(t.p,{children:["Here you can give your ",(0,o.jsx)(t.code,{children:"zrok"})," public frontend an identity and branding to match your deployment."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(3269).A+"",width:"1469",height:"1141"})}),"\n",(0,o.jsx)(t.p,{children:"Describe what domains are authorized to access your public frontend and establish contact information."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(6490).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Add a non-sensitive scope for ",(0,o.jsx)(t.code,{children:"../auth/userinfo.email"}),". This is important as it allows the ",(0,o.jsx)(t.code,{children:"zrok"})," OAuth frontend to receive the email address of the authenticated user."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(8403).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(2792).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:"Now your OAuth content screen is configured."}),"\n",(0,o.jsx)(t.h3,{id:"create-the-oauth-20-client-id",children:"Create the OAuth 2.0 Client ID"}),"\n",(0,o.jsx)(t.p,{children:"Next we create the OAuth Client ID for your public frontend."}),"\n",(0,o.jsxs)(t.p,{children:["In the Google Cloud Console, navigate to: ",(0,o.jsx)(t.code,{children:"APIs & Services > Credentials > + Create Credentials"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(8998).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Select ",(0,o.jsx)(t.code,{children:"OAuth client ID"})," from the ",(0,o.jsx)(t.code,{children:"+ Create Credentials"})," dropdown."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(9677).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Application type is ",(0,o.jsx)(t.code,{children:"Web Application"}),"."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(3524).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:['The most important bit here is the "Authorized redirect URIs". You\'re going to want to put a URL here that matches the ',(0,o.jsx)(t.code,{children:"zrok"})," OAuth frontend address that you configured at the start of this guide, but at the end of the URL you're going to append ",(0,o.jsx)(t.code,{children:"/google/oauth"})," to the URL."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(7115).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Save the client ID and the client secret. You'll configure these into your ",(0,o.jsx)(t.code,{children:"frontend.yml"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"With this your Google OAuth client should be configured and ready."}),"\n",(0,o.jsx)(t.h2,{id:"configuring-a-github-client-id",children:"Configuring a GitHub Client ID"}),"\n",(0,o.jsx)(t.p,{children:"Register a new OAuth application through the GitHub settings for the account that owns the application."}),"\n",(0,o.jsxs)(t.p,{children:["Navigate to:",(0,o.jsx)(t.code,{children:"Settings > Developer Settings > OAuth Apps > Register a new application"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(4378).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(1809).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:['The "Authorized callback URL" should be configured to match the OAuth frontend address you configured at the start of this guide, with ',(0,o.jsx)(t.code,{children:"/github/oauth"})," appended to the end."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(680).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:"Create a new client secret."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(2823).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Save the client ID and the client secret. You'll configure these into your ",(0,o.jsx)(t.code,{children:"frontend.yml"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"configuring-your-public-frontend",children:"Configuring your Public Frontend"}),"\n",(0,o.jsxs)(t.p,{children:["The public frontend configuration includes a new ",(0,o.jsx)(t.code,{children:"oauth"})," section:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-yaml",children:'oauth:\n bind_address: 0.0.0.0:8181\n redirect_url: https://oauth.zrok.io\n cookie_domain: zrok.io\n hash_key: "the quick brown fox jumped over the lazy dog"\n providers:\n - name: google\n client_id: ""\n client_secret: ""\n - name: github\n client_id: ""\n client_secret: ""\n \n'})}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"bind_address"})," parameter determines where the OAuth frontend will bind. Should be in ",(0,o.jsx)(t.code,{children:"ip:port"})," format."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"redirect_url"})," parameter determines the base URL where OAuth frontend requests will be redirected."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"cookie_domain"})," is the domain where authentication cookies should be stored."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"hash_key"})," is a unique string for your installation that is used to secure the authentication payloads for your public frontend."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"providers"})," is a list of configured providers for this public frontend. The current implementation supports ",(0,o.jsx)(t.code,{children:"google"})," and ",(0,o.jsx)(t.code,{children:"github"})," as options."]}),"\n",(0,o.jsxs)(t.p,{children:["Both the ",(0,o.jsx)(t.code,{children:"google"})," and ",(0,o.jsx)(t.code,{children:"github"})," providers accept a ",(0,o.jsx)(t.code,{children:"client_id"})," and ",(0,o.jsx)(t.code,{children:"client_secret"})," parameter. These values are provided when you configure the OAuth clients at Google or GitHub."]}),"\n",(0,o.jsx)(t.h2,{id:"enabling-oauth-on-a-public-share",children:"Enabling OAuth on a Public Share"}),"\n",(0,o.jsx)(t.p,{children:"With your public frontend configured to support OAuth, you can test this by creating a public share. There are new command line options to support this:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-text",children:'$ zrok share public --help\nShare a target resource publicly\n\nUsage:\n zrok share public [flags]\n\nFlags:\n -b, --backend-mode string The backend mode {proxy, web, caddy, drive} (default "proxy")\n --basic-auth stringArray Basic authentication users (,...)\n --frontends stringArray Selected frontends to use for the share (default [public])\n --headless Disable TUI and run headless\n -h, --help help for public\n --insecure Enable insecure TLS certificate validation for \n --oauth-check-interval duration Maximum lifetime for OAuth authentication; reauthenticate after expiry (default 3h0m0s)\n --oauth-email-address-patterns stringArray Allow only these email domain globs to authenticate via OAuth\n --oauth-provider string Enable OAuth provider [google, github]\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n'})}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--oauth-provider"})," flag enables OAuth for the share using the specified provider."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--oauth-email-address-patterns"})," flag accepts a single glob pattern that matches an authenticated email address that is allowed to access the share. Use this flag multiple times to allow different patterns."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--oauth-check-interval"})," flag specifies how frequently the authentication must be checked."]}),"\n",(0,o.jsx)(t.p,{children:"An example public share:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-text",children:"zrok share public --backend-mode web --oauth-provider github --oauth-email-address-patterns '*@zrok.io' ~/public\n"})})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},4378:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_1-dbb289a694d0c99b50cb949654d818f8.png"},1809:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_2-bc9d4c3f25853d608870eb220d00e5ee.png"},680:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_3-7973d63cd117eaba72fbaeb4ff119a39.png"},2823:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_4-6fed398013c9e6c3a31e5721adac4a4c.png"},8998:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_1-e61ee7e8fa51bdc93feab84235a90673.png"},9677:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_2-60cf4edb52f453d605907c17400e0800.png"},3524:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_3-1b3db3f9057d8626d64c5466dbb05ec7.png"},7115:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_4-f720031df1d09f997a18842745e9ea0d.png"},1004:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_2-b94a6456ce9b13e053b4c07d8f233e84.png"},3269:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_3-edf62ea2b291b58093289d31c2dae58d.png"},6490:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_4-4bc7e07b06c8a9a3c1e8f766f6f1c5a6.png"},8403:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_5-7c375cf49d8e2e392ca12b584462ab59.png"},2792:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_6-9b0fe216a782ef378313650e99ea52a1.png"},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var i=n(6540);const o={},s=i.createContext(o);function r(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e881e32.91f791d5.js b/assets/js/6e881e32.91f791d5.js new file mode 100644 index 00000000..c01fab5f --- /dev/null +++ b/assets/js/6e881e32.91f791d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3373],{9864:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"guides/self-hosting/oauth/configuring-oauth","title":"OAuth Public Frontend Configuration","description":"As of v0.4.7, zrok includes OAuth integration for both Google and GitHub for zrok access public public frontends.","source":"@site/../docs/guides/self-hosting/oauth/configuring-oauth.md","sourceDirName":"guides/self-hosting/oauth","slug":"/guides/self-hosting/oauth/configuring-oauth","permalink":"/docs/next/guides/self-hosting/oauth/configuring-oauth","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/oauth/configuring-oauth.md","tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"OAuth","permalink":"/docs/next/category/oauth"},"next":{"title":"Instance Config","permalink":"/docs/next/guides/self-hosting/instance-configuration"}}');var o=n(4848),s=n(8453);const r={},a="OAuth Public Frontend Configuration",c={},h=[{value:"Planning for the OAuth Frontend",id:"planning-for-the-oauth-frontend",level:2},{value:"Configuring a Google OAuth Client ID",id:"configuring-a-google-oauth-client-id",level:2},{value:"OAuth Content Screen",id:"oauth-content-screen",level:3},{value:"Create the OAuth 2.0 Client ID",id:"create-the-oauth-20-client-id",level:3},{value:"Configuring a GitHub Client ID",id:"configuring-a-github-client-id",level:2},{value:"Configuring your Public Frontend",id:"configuring-your-public-frontend",level:2},{value:"Enabling OAuth on a Public Share",id:"enabling-oauth-on-a-public-share",level:2}];function d(e){const t={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"oauth-public-frontend-configuration",children:"OAuth Public Frontend Configuration"})}),"\n",(0,o.jsxs)(t.p,{children:["As of ",(0,o.jsx)(t.code,{children:"v0.4.7"}),", ",(0,o.jsx)(t.code,{children:"zrok"})," includes OAuth integration for both Google and GitHub for ",(0,o.jsx)(t.code,{children:"zrok access public"})," public frontends."]}),"\n",(0,o.jsx)(t.p,{children:"This integration allows you to create public shares and request that the public frontend authenticate your users against either the Google or GitHub OAuth endpoints (using the user's Google or GitHub accounts). Additionally, you can restrict the email address domain associated with the count to a list of domains that you provide when you create the share."}),"\n",(0,o.jsxs)(t.p,{children:["This is a first step towards a more comprehensive portfolio of user authentication strategies in future ",(0,o.jsx)(t.code,{children:"zrok"})," releases."]}),"\n",(0,o.jsx)(t.h2,{id:"planning-for-the-oauth-frontend",children:"Planning for the OAuth Frontend"}),"\n",(0,o.jsx)(t.p,{children:"The current implementation of the OAuth public frontend uses a HTTP listener to handle redirects from OAuth providers. You'll need to configure a DNS name and a port for this listener that is accessible by your end users. We'll refer to this listener as the \"OAuth frontend\" in this guide."}),"\n",(0,o.jsx)(t.p,{children:'We\'ll use the public DNS address of the OAuth frontend when creating the Google and GitHub OAuth clients below. This address is typically configured into these clients as the "redirect URL" where these clients will send the authenticated users after authentication.'}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"zrok"})," OAuth frontend will capture the successful authentication and forward the user back to their original destination."]}),"\n",(0,o.jsx)(t.h2,{id:"configuring-a-google-oauth-client-id",children:"Configuring a Google OAuth Client ID"}),"\n",(0,o.jsx)(t.h3,{id:"oauth-content-screen",children:"OAuth Content Screen"}),"\n",(0,o.jsx)(t.p,{children:'Before you can configure an OAuth Client ID in Google Cloud, you have to configure the "OAuth content screen".'}),"\n",(0,o.jsxs)(t.p,{children:["In the Google Cloud console, navigate to: ",(0,o.jsx)(t.code,{children:"APIs & Services > Credentials > OAuth content screen"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(1004).A+"",width:"1469",height:"1141"})}),"\n",(0,o.jsxs)(t.p,{children:["Here you can give your ",(0,o.jsx)(t.code,{children:"zrok"})," public frontend an identity and branding to match your deployment."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(3269).A+"",width:"1469",height:"1141"})}),"\n",(0,o.jsx)(t.p,{children:"Describe what domains are authorized to access your public frontend and establish contact information."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(6490).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Add a non-sensitive scope for ",(0,o.jsx)(t.code,{children:"../auth/userinfo.email"}),". This is important as it allows the ",(0,o.jsx)(t.code,{children:"zrok"})," OAuth frontend to receive the email address of the authenticated user."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(8403).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(2792).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:"Now your OAuth content screen is configured."}),"\n",(0,o.jsx)(t.h3,{id:"create-the-oauth-20-client-id",children:"Create the OAuth 2.0 Client ID"}),"\n",(0,o.jsx)(t.p,{children:"Next we create the OAuth Client ID for your public frontend."}),"\n",(0,o.jsxs)(t.p,{children:["In the Google Cloud Console, navigate to: ",(0,o.jsx)(t.code,{children:"APIs & Services > Credentials > + Create Credentials"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(8998).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Select ",(0,o.jsx)(t.code,{children:"OAuth client ID"})," from the ",(0,o.jsx)(t.code,{children:"+ Create Credentials"})," dropdown."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(9677).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Application type is ",(0,o.jsx)(t.code,{children:"Web Application"}),"."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(3524).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:['The most important bit here is the "Authorized redirect URIs". You\'re going to want to put a URL here that matches the ',(0,o.jsx)(t.code,{children:"zrok"})," OAuth frontend address that you configured at the start of this guide, but at the end of the URL you're going to append ",(0,o.jsx)(t.code,{children:"/google/oauth"})," to the URL."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(7115).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Save the client ID and the client secret. You'll configure these into your ",(0,o.jsx)(t.code,{children:"frontend.yml"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"With this your Google OAuth client should be configured and ready."}),"\n",(0,o.jsx)(t.h2,{id:"configuring-a-github-client-id",children:"Configuring a GitHub Client ID"}),"\n",(0,o.jsx)(t.p,{children:"Register a new OAuth application through the GitHub settings for the account that owns the application."}),"\n",(0,o.jsxs)(t.p,{children:["Navigate to:",(0,o.jsx)(t.code,{children:"Settings > Developer Settings > OAuth Apps > Register a new application"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(4378).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(1809).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:['The "Authorized callback URL" should be configured to match the OAuth frontend address you configured at the start of this guide, with ',(0,o.jsx)(t.code,{children:"/github/oauth"})," appended to the end."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(680).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:"Create a new client secret."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(2823).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Save the client ID and the client secret. You'll configure these into your ",(0,o.jsx)(t.code,{children:"frontend.yml"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"configuring-your-public-frontend",children:"Configuring your Public Frontend"}),"\n",(0,o.jsxs)(t.p,{children:["The public frontend configuration includes a new ",(0,o.jsx)(t.code,{children:"oauth"})," section:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-yaml",children:'oauth:\n bind_address: 0.0.0.0:8181\n redirect_url: https://oauth.zrok.io\n cookie_domain: zrok.io\n hash_key: "the quick brown fox jumped over the lazy dog"\n providers:\n - name: google\n client_id: ""\n client_secret: ""\n - name: github\n client_id: ""\n client_secret: ""\n \n'})}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"bind_address"})," parameter determines where the OAuth frontend will bind. Should be in ",(0,o.jsx)(t.code,{children:"ip:port"})," format."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"redirect_url"})," parameter determines the base URL where OAuth frontend requests will be redirected."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"cookie_domain"})," is the domain where authentication cookies should be stored."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"hash_key"})," is a unique string for your installation that is used to secure the authentication payloads for your public frontend."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"providers"})," is a list of configured providers for this public frontend. The current implementation supports ",(0,o.jsx)(t.code,{children:"google"})," and ",(0,o.jsx)(t.code,{children:"github"})," as options."]}),"\n",(0,o.jsxs)(t.p,{children:["Both the ",(0,o.jsx)(t.code,{children:"google"})," and ",(0,o.jsx)(t.code,{children:"github"})," providers accept a ",(0,o.jsx)(t.code,{children:"client_id"})," and ",(0,o.jsx)(t.code,{children:"client_secret"})," parameter. These values are provided when you configure the OAuth clients at Google or GitHub."]}),"\n",(0,o.jsx)(t.h2,{id:"enabling-oauth-on-a-public-share",children:"Enabling OAuth on a Public Share"}),"\n",(0,o.jsx)(t.p,{children:"With your public frontend configured to support OAuth, you can test this by creating a public share. There are new command line options to support this:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-text",children:'$ zrok share public --help\nShare a target resource publicly\n\nUsage:\n zrok share public [flags]\n\nFlags:\n -b, --backend-mode string The backend mode {proxy, web, caddy, drive} (default "proxy")\n --basic-auth stringArray Basic authentication users (,...)\n --frontends stringArray Selected frontends to use for the share (default [public])\n --headless Disable TUI and run headless\n -h, --help help for public\n --insecure Enable insecure TLS certificate validation for \n --oauth-check-interval duration Maximum lifetime for OAuth authentication; reauthenticate after expiry (default 3h0m0s)\n --oauth-email-address-patterns stringArray Allow only these email domain globs to authenticate via OAuth\n --oauth-provider string Enable OAuth provider [google, github]\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n'})}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--oauth-provider"})," flag enables OAuth for the share using the specified provider."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--oauth-email-address-patterns"})," flag accepts a single glob pattern that matches an authenticated email address that is allowed to access the share. Use this flag multiple times to allow different patterns."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--oauth-check-interval"})," flag specifies how frequently the authentication must be checked."]}),"\n",(0,o.jsx)(t.p,{children:"An example public share:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-text",children:"zrok share public --backend-mode web --oauth-provider github --oauth-email-address-patterns '*@zrok.io' ~/public\n"})})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},4378:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_1-dbb289a694d0c99b50cb949654d818f8.png"},1809:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_2-bc9d4c3f25853d608870eb220d00e5ee.png"},680:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_3-7973d63cd117eaba72fbaeb4ff119a39.png"},2823:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_4-6fed398013c9e6c3a31e5721adac4a4c.png"},8998:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_1-e61ee7e8fa51bdc93feab84235a90673.png"},9677:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_2-60cf4edb52f453d605907c17400e0800.png"},3524:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_3-1b3db3f9057d8626d64c5466dbb05ec7.png"},7115:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_4-f720031df1d09f997a18842745e9ea0d.png"},1004:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_2-b94a6456ce9b13e053b4c07d8f233e84.png"},3269:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_3-edf62ea2b291b58093289d31c2dae58d.png"},6490:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_4-4bc7e07b06c8a9a3c1e8f766f6f1c5a6.png"},8403:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_5-7c375cf49d8e2e392ca12b584462ab59.png"},2792:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_6-9b0fe216a782ef378313650e99ea52a1.png"},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var i=n(6540);const o={},s=i.createContext(o);function r(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7452427d.951c0809.js b/assets/js/7452427d.951c0809.js deleted file mode 100644 index 41f23d17..00000000 --- a/assets/js/7452427d.951c0809.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9476],{4674:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>t,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"guides/self-hosting/personalized-frontend","title":"Personalized Frontend","description":"This guide describes an approach that enables a zrok user to use a hosted, shared instance (zrok.io) and configure their own personalized frontend, which enables custom DNS and TLS for their shares.","source":"@site/../docs/guides/self-hosting/personalized-frontend.md","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/personalized-frontend","permalink":"/docs/guides/self-hosting/personalized-frontend","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/personalized-frontend.md","tags":[],"version":"current","sidebarPosition":22,"frontMatter":{"title":"Personalized Frontend","sidebar_label":"Personalized Frontend","sidebar_position":22},"sidebar":"tutorialSidebar","previous":{"title":"Organizations","permalink":"/docs/guides/self-hosting/organizations"},"next":{"title":"Docker","permalink":"/docs/guides/self-hosting/docker"}}');var s=n(4848),i=n(8453);const t={title:"Personalized Frontend",sidebar_label:"Personalized Frontend",sidebar_position:22},a=void 0,d={},c=[{value:"Overview",id:"overview",level:2},{value:"Privacy",id:"privacy",level:2}];function h(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.p,{children:"This guide describes an approach that enables a zrok user to use a hosted, shared instance (zrok.io) and configure their own personalized frontend, which enables custom DNS and TLS for their shares."}),"\n",(0,s.jsx)(o.p,{children:"In order to accomplish this, the user will need to provide their own minimal VPS instance, or container hosting. The size and capacity of these resources will be entirely dependent on the workload that they will be used to service. But generally, for most modest workloads, the most inexpensive VPS option will suffice."}),"\n",(0,s.jsx)(o.p,{children:"This approach gives you complete control over the way that your shares are exposed publicly. This approach works for HTTPS shares, and also for TCP and UDP ports, allowing you to put all of these things onto the public internet, while maintaining strong security for your protected resources."}),"\n",(0,s.jsxs)(o.p,{children:["This guide isn't a detailed ",(0,s.jsx)(o.em,{children:"how to"})," with specific steps to follow. This is more of a description of the overall concept. You'll want to figure out your own specific steps to implement this style of deployment in your own environment."]}),"\n",(0,s.jsx)(o.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsxs)(o.p,{children:["Let's imagine a hypothetical scenario where you've got 3 different resources shared using zrok. We'll refer to these as ",(0,s.jsx)(o.code,{children:"A"}),", ",(0,s.jsx)(o.code,{children:"B"}),", and ",(0,s.jsx)(o.code,{children:"C"}),". Both ",(0,s.jsx)(o.code,{children:"A"})," and ",(0,s.jsx)(o.code,{children:"B"})," are shares using the ",(0,s.jsx)(o.code,{children:"proxy"})," backend mode, which are used to share private HTTPS resources. Share ",(0,s.jsx)(o.code,{children:"C"})," uses the ",(0,s.jsx)(o.code,{children:"tcpTunnel"})," backend to expose a listening port from a private server (like a game server, or a message queue)."]}),"\n",(0,s.jsx)(o.p,{children:"We're using the shared zrok instance at zrok.io to provide our secure sharing infrastructure."}),"\n",(0,s.jsx)(o.p,{children:"Our deployment will end up looking like this:"}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"personalized-frontend-1",src:n(8396).A+"",width:"716",height:"357"})}),"\n",(0,s.jsxs)(o.p,{children:["We're using ",(0,s.jsx)(o.code,{children:"zrok reserve"})," to create the ",(0,s.jsx)(o.code,{children:"A"}),", ",(0,s.jsx)(o.code,{children:"B"}),", and ",(0,s.jsx)(o.code,{children:"C"})," shares as reserved shares (using the ",(0,s.jsx)(o.code,{children:"--unique-name"})," option to give them specific names). These shares could be located together in a single environment on a single host, or can be located at completely different spots on the planet on completely different hosts. You could want to use significantly more shares than 3, or less. The secure sharing fabric allows seamless secure connectivity for these shared resources. This implementation will scale up or down as needed (use multiple hosts behind a load balancer for really big workloads)."]}),"\n",(0,s.jsxs)(o.p,{children:["Because we're using ",(0,s.jsx)(o.code,{children:"private"})," zrok shares, they'll need to be accessed using a corresponding ",(0,s.jsx)(o.code,{children:"zrok access"})," private command. The ",(0,s.jsx)(o.code,{children:"zrok access private"}),' command binds a "network listener" where the share can be accessed on an address and port on the host where the command is executed. You can use ',(0,s.jsx)(o.code,{children:"zrok access private"})," to bind a network listener for a share in as many places as you want (up to the limit configuration of the service)."]}),"\n",(0,s.jsx)(o.admonition,{type:"note",children:(0,s.jsxs)(o.p,{children:["When you use ",(0,s.jsx)(o.code,{children:"zrok share public"}),", you are allowing your shared resources to be accessed using the shared, public frontend provided by the service instance (zrok.io). ",(0,s.jsx)(o.code,{children:"zrok share private"})," (or ",(0,s.jsx)(o.code,{children:"zrok reserve"}),"/",(0,s.jsx)(o.code,{children:"zrok share reserved"}),") creates the same kind of share, but does not provision the shared public frontend, and you'll need to use ",(0,s.jsx)(o.code,{children:"zrok access private"})," in order to ",(0,s.jsx)(o.em,{children:"bind"})," that share to a network address where it can be accessed."]})}),"\n",(0,s.jsxs)(o.p,{children:["Imagine that we own the domain ",(0,s.jsx)(o.code,{children:"example.com"}),". In our example, we want to expose our HTTPS shares ",(0,s.jsx)(o.code,{children:"A"})," and ",(0,s.jsx)(o.code,{children:"B"})," as ",(0,s.jsx)(o.code,{children:"a.example.com"})," and ",(0,s.jsx)(o.code,{children:"b.example.com"}),". And maybe our ",(0,s.jsx)(o.code,{children:"C"})," share represents a gaming server that we want to expose as ",(0,s.jsx)(o.code,{children:"gaming.example.com:25565"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["We can accomplish this easily with cheap VPS instance. You could also do it with containers through a container hosting service. The VPS will need an IP address exposed to the internet. You'll also need to be able to create DNS entries for the ",(0,s.jsx)(o.code,{children:"example.com"})," domain."]}),"\n",(0,s.jsxs)(o.p,{children:["To accomplish this, we're going to run 3 separate ",(0,s.jsx)(o.code,{children:"zrok access private"})," commands on our VPS (see the ",(0,s.jsx)(o.a,{href:"../../frontdoor/",children:"frontdoor guide"}),", or ",(0,s.jsx)(o.a,{href:"../../docker-share/docker_private_share_guide/#access-the-private-share",children:"zrok-private-access Docker Compose guide"})," for details on an approach for setting this up). One command each for shares ",(0,s.jsx)(o.code,{children:"A"}),", ",(0,s.jsx)(o.code,{children:"B"}),", and ",(0,s.jsx)(o.code,{children:"C"}),". The ",(0,s.jsx)(o.code,{children:"zrok access private"})," command works like this:"]}),"\n",(0,s.jsx)(o.pre,{children:(0,s.jsx)(o.code,{children:'$ zrok access private\nError: accepts 1 arg(s), received 0\nUsage:\n zrok access private [flags]\n\nFlags:\n -b, --bind string The address to bind the private frontend (default "127.0.0.1:9191")\n --headless Disable TUI and run headless\n -h, --help help for private\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n'})}),"\n",(0,s.jsxs)(o.p,{children:["Notice the ",(0,s.jsx)(o.code,{children:"--bind"})," flag. That flag is used to bind a network listener to a specific IP address and port on the host we're accessing the shares from. In this case, imagine our VPS node has a public IP address of ",(0,s.jsx)(o.code,{children:"1.2.3.4"})," and a loopback (",(0,s.jsx)(o.code,{children:"127.0.0.1"}),")."]}),"\n",(0,s.jsxs)(o.p,{children:["To expose our HTTPS shares, we're going to use a reverse proxy like nginx. The reverse proxy will be exposed to the internet, terminating TLS and reverse proxying ",(0,s.jsx)(o.code,{children:"a.example.com"})," and ",(0,s.jsx)(o.code,{children:"b.example.com"})," to the network listeners for shares ",(0,s.jsx)(o.code,{children:"A"})," and ",(0,s.jsx)(o.code,{children:"B"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["So, we'll configure our VPS to persistently launch a ",(0,s.jsx)(o.code,{children:"zrok access private"})," for both of these shares. We'll use the ",(0,s.jsx)(o.code,{children:"--bind"})," flag to bind ",(0,s.jsx)(o.code,{children:"A"})," to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9191"})," and ",(0,s.jsx)(o.code,{children:"B"})," to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9192"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["We'll then configure nginx to have a virtual host for ",(0,s.jsx)(o.code,{children:"a.example.com"}),", proxying that to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9191"})," and ",(0,s.jsx)(o.code,{children:"b.example.com"}),", proxying that to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9192"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["Exposing our TCP port for ",(0,s.jsx)(o.code,{children:"gaming.example.com"})," is simply a matter of running a third ",(0,s.jsx)(o.code,{children:"zrok access private"})," with a ",(0,s.jsx)(o.code,{children:"--bind"})," flag configured to point to ",(0,s.jsx)(o.code,{children:"1.2.3.4:25565"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["Once you've created the appropriate DNS entries for ",(0,s.jsx)(o.code,{children:"a.example.com"}),", ",(0,s.jsx)(o.code,{children:"b.example.com"}),", and ",(0,s.jsx)(o.code,{children:"gaming.example.com"})," and worked through the TLS configuration (letsencrypt is your friend here), you'll have a fully functional personalized frontend for your zrok shares that you control."]}),"\n",(0,s.jsx)(o.p,{children:"Your protected resources remain disconnected from the internet and are only reachable through your personalized endpoint."}),"\n",(0,s.jsx)(o.h2,{id:"privacy",children:"Privacy"}),"\n",(0,s.jsxs)(o.p,{children:["When you use a public frontend (with a simple ",(0,s.jsx)(o.code,{children:"zrok share public"}),") at a hosted zrok instance (like zrok.io), the operators of that service have some amount of visibility into what traffic you're sending to your shares. The load balancers in front of the public frontend maintain logs describing all of the URLs that were accessed, as well as other information (headers, etc.) that contain information about the resource you're sharing."]}),"\n",(0,s.jsxs)(o.p,{children:["If you create private shares using ",(0,s.jsx)(o.code,{children:"zrok share private"})," and then run your own ",(0,s.jsx)(o.code,{children:"zrok access private"})," from some other location, the operators of the zrok service instance only know that some amount of data moved between the environment running the ",(0,s.jsx)(o.code,{children:"zrok share private"})," and the ",(0,s.jsx)(o.code,{children:"zrok access private"}),". There is no other information available."]})]})}function l(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8396:(e,o,n)=>{n.d(o,{A:()=>r});const r=n.p+"assets/images/personalized-frontend-1-4a8782774dbbdff2247871d2064f51f9.png"},8453:(e,o,n)=>{n.d(o,{R:()=>t,x:()=>a});var r=n(6540);const s={},i=r.createContext(s);function t(e){const o=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),r.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7452427d.d7a2276e.js b/assets/js/7452427d.d7a2276e.js new file mode 100644 index 00000000..0b3dd1d3 --- /dev/null +++ b/assets/js/7452427d.d7a2276e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9476],{4674:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>t,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"guides/self-hosting/personalized-frontend","title":"Personalized Frontend","description":"This guide describes an approach that enables a zrok user to use a hosted, shared instance (zrok.io) and configure their own personalized frontend, which enables custom DNS and TLS for their shares.","source":"@site/../docs/guides/self-hosting/personalized-frontend.md","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/personalized-frontend","permalink":"/docs/next/guides/self-hosting/personalized-frontend","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/personalized-frontend.md","tags":[],"version":"current","sidebarPosition":22,"frontMatter":{"title":"Personalized Frontend","sidebar_label":"Personalized Frontend","sidebar_position":22},"sidebar":"tutorialSidebar","previous":{"title":"Organizations","permalink":"/docs/next/guides/self-hosting/organizations"},"next":{"title":"Docker","permalink":"/docs/next/guides/self-hosting/docker"}}');var s=n(4848),i=n(8453);const t={title:"Personalized Frontend",sidebar_label:"Personalized Frontend",sidebar_position:22},a=void 0,d={},c=[{value:"Overview",id:"overview",level:2},{value:"Privacy",id:"privacy",level:2}];function h(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.p,{children:"This guide describes an approach that enables a zrok user to use a hosted, shared instance (zrok.io) and configure their own personalized frontend, which enables custom DNS and TLS for their shares."}),"\n",(0,s.jsx)(o.p,{children:"In order to accomplish this, the user will need to provide their own minimal VPS instance, or container hosting. The size and capacity of these resources will be entirely dependent on the workload that they will be used to service. But generally, for most modest workloads, the most inexpensive VPS option will suffice."}),"\n",(0,s.jsx)(o.p,{children:"This approach gives you complete control over the way that your shares are exposed publicly. This approach works for HTTPS shares, and also for TCP and UDP ports, allowing you to put all of these things onto the public internet, while maintaining strong security for your protected resources."}),"\n",(0,s.jsxs)(o.p,{children:["This guide isn't a detailed ",(0,s.jsx)(o.em,{children:"how to"})," with specific steps to follow. This is more of a description of the overall concept. You'll want to figure out your own specific steps to implement this style of deployment in your own environment."]}),"\n",(0,s.jsx)(o.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsxs)(o.p,{children:["Let's imagine a hypothetical scenario where you've got 3 different resources shared using zrok. We'll refer to these as ",(0,s.jsx)(o.code,{children:"A"}),", ",(0,s.jsx)(o.code,{children:"B"}),", and ",(0,s.jsx)(o.code,{children:"C"}),". Both ",(0,s.jsx)(o.code,{children:"A"})," and ",(0,s.jsx)(o.code,{children:"B"})," are shares using the ",(0,s.jsx)(o.code,{children:"proxy"})," backend mode, which are used to share private HTTPS resources. Share ",(0,s.jsx)(o.code,{children:"C"})," uses the ",(0,s.jsx)(o.code,{children:"tcpTunnel"})," backend to expose a listening port from a private server (like a game server, or a message queue)."]}),"\n",(0,s.jsx)(o.p,{children:"We're using the shared zrok instance at zrok.io to provide our secure sharing infrastructure."}),"\n",(0,s.jsx)(o.p,{children:"Our deployment will end up looking like this:"}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"personalized-frontend-1",src:n(8396).A+"",width:"716",height:"357"})}),"\n",(0,s.jsxs)(o.p,{children:["We're using ",(0,s.jsx)(o.code,{children:"zrok reserve"})," to create the ",(0,s.jsx)(o.code,{children:"A"}),", ",(0,s.jsx)(o.code,{children:"B"}),", and ",(0,s.jsx)(o.code,{children:"C"})," shares as reserved shares (using the ",(0,s.jsx)(o.code,{children:"--unique-name"})," option to give them specific names). These shares could be located together in a single environment on a single host, or can be located at completely different spots on the planet on completely different hosts. You could want to use significantly more shares than 3, or less. The secure sharing fabric allows seamless secure connectivity for these shared resources. This implementation will scale up or down as needed (use multiple hosts behind a load balancer for really big workloads)."]}),"\n",(0,s.jsxs)(o.p,{children:["Because we're using ",(0,s.jsx)(o.code,{children:"private"})," zrok shares, they'll need to be accessed using a corresponding ",(0,s.jsx)(o.code,{children:"zrok access"})," private command. The ",(0,s.jsx)(o.code,{children:"zrok access private"}),' command binds a "network listener" where the share can be accessed on an address and port on the host where the command is executed. You can use ',(0,s.jsx)(o.code,{children:"zrok access private"})," to bind a network listener for a share in as many places as you want (up to the limit configuration of the service)."]}),"\n",(0,s.jsx)(o.admonition,{type:"note",children:(0,s.jsxs)(o.p,{children:["When you use ",(0,s.jsx)(o.code,{children:"zrok share public"}),", you are allowing your shared resources to be accessed using the shared, public frontend provided by the service instance (zrok.io). ",(0,s.jsx)(o.code,{children:"zrok share private"})," (or ",(0,s.jsx)(o.code,{children:"zrok reserve"}),"/",(0,s.jsx)(o.code,{children:"zrok share reserved"}),") creates the same kind of share, but does not provision the shared public frontend, and you'll need to use ",(0,s.jsx)(o.code,{children:"zrok access private"})," in order to ",(0,s.jsx)(o.em,{children:"bind"})," that share to a network address where it can be accessed."]})}),"\n",(0,s.jsxs)(o.p,{children:["Imagine that we own the domain ",(0,s.jsx)(o.code,{children:"example.com"}),". In our example, we want to expose our HTTPS shares ",(0,s.jsx)(o.code,{children:"A"})," and ",(0,s.jsx)(o.code,{children:"B"})," as ",(0,s.jsx)(o.code,{children:"a.example.com"})," and ",(0,s.jsx)(o.code,{children:"b.example.com"}),". And maybe our ",(0,s.jsx)(o.code,{children:"C"})," share represents a gaming server that we want to expose as ",(0,s.jsx)(o.code,{children:"gaming.example.com:25565"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["We can accomplish this easily with cheap VPS instance. You could also do it with containers through a container hosting service. The VPS will need an IP address exposed to the internet. You'll also need to be able to create DNS entries for the ",(0,s.jsx)(o.code,{children:"example.com"})," domain."]}),"\n",(0,s.jsxs)(o.p,{children:["To accomplish this, we're going to run 3 separate ",(0,s.jsx)(o.code,{children:"zrok access private"})," commands on our VPS (see the ",(0,s.jsx)(o.a,{href:"../../frontdoor/",children:"frontdoor guide"}),", or ",(0,s.jsx)(o.a,{href:"../../docker-share/docker_private_share_guide/#access-the-private-share",children:"zrok-private-access Docker Compose guide"})," for details on an approach for setting this up). One command each for shares ",(0,s.jsx)(o.code,{children:"A"}),", ",(0,s.jsx)(o.code,{children:"B"}),", and ",(0,s.jsx)(o.code,{children:"C"}),". The ",(0,s.jsx)(o.code,{children:"zrok access private"})," command works like this:"]}),"\n",(0,s.jsx)(o.pre,{children:(0,s.jsx)(o.code,{children:'$ zrok access private\nError: accepts 1 arg(s), received 0\nUsage:\n zrok access private [flags]\n\nFlags:\n -b, --bind string The address to bind the private frontend (default "127.0.0.1:9191")\n --headless Disable TUI and run headless\n -h, --help help for private\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n'})}),"\n",(0,s.jsxs)(o.p,{children:["Notice the ",(0,s.jsx)(o.code,{children:"--bind"})," flag. That flag is used to bind a network listener to a specific IP address and port on the host we're accessing the shares from. In this case, imagine our VPS node has a public IP address of ",(0,s.jsx)(o.code,{children:"1.2.3.4"})," and a loopback (",(0,s.jsx)(o.code,{children:"127.0.0.1"}),")."]}),"\n",(0,s.jsxs)(o.p,{children:["To expose our HTTPS shares, we're going to use a reverse proxy like nginx. The reverse proxy will be exposed to the internet, terminating TLS and reverse proxying ",(0,s.jsx)(o.code,{children:"a.example.com"})," and ",(0,s.jsx)(o.code,{children:"b.example.com"})," to the network listeners for shares ",(0,s.jsx)(o.code,{children:"A"})," and ",(0,s.jsx)(o.code,{children:"B"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["So, we'll configure our VPS to persistently launch a ",(0,s.jsx)(o.code,{children:"zrok access private"})," for both of these shares. We'll use the ",(0,s.jsx)(o.code,{children:"--bind"})," flag to bind ",(0,s.jsx)(o.code,{children:"A"})," to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9191"})," and ",(0,s.jsx)(o.code,{children:"B"})," to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9192"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["We'll then configure nginx to have a virtual host for ",(0,s.jsx)(o.code,{children:"a.example.com"}),", proxying that to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9191"})," and ",(0,s.jsx)(o.code,{children:"b.example.com"}),", proxying that to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9192"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["Exposing our TCP port for ",(0,s.jsx)(o.code,{children:"gaming.example.com"})," is simply a matter of running a third ",(0,s.jsx)(o.code,{children:"zrok access private"})," with a ",(0,s.jsx)(o.code,{children:"--bind"})," flag configured to point to ",(0,s.jsx)(o.code,{children:"1.2.3.4:25565"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["Once you've created the appropriate DNS entries for ",(0,s.jsx)(o.code,{children:"a.example.com"}),", ",(0,s.jsx)(o.code,{children:"b.example.com"}),", and ",(0,s.jsx)(o.code,{children:"gaming.example.com"})," and worked through the TLS configuration (letsencrypt is your friend here), you'll have a fully functional personalized frontend for your zrok shares that you control."]}),"\n",(0,s.jsx)(o.p,{children:"Your protected resources remain disconnected from the internet and are only reachable through your personalized endpoint."}),"\n",(0,s.jsx)(o.h2,{id:"privacy",children:"Privacy"}),"\n",(0,s.jsxs)(o.p,{children:["When you use a public frontend (with a simple ",(0,s.jsx)(o.code,{children:"zrok share public"}),") at a hosted zrok instance (like zrok.io), the operators of that service have some amount of visibility into what traffic you're sending to your shares. The load balancers in front of the public frontend maintain logs describing all of the URLs that were accessed, as well as other information (headers, etc.) that contain information about the resource you're sharing."]}),"\n",(0,s.jsxs)(o.p,{children:["If you create private shares using ",(0,s.jsx)(o.code,{children:"zrok share private"})," and then run your own ",(0,s.jsx)(o.code,{children:"zrok access private"})," from some other location, the operators of the zrok service instance only know that some amount of data moved between the environment running the ",(0,s.jsx)(o.code,{children:"zrok share private"})," and the ",(0,s.jsx)(o.code,{children:"zrok access private"}),". There is no other information available."]})]})}function l(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8396:(e,o,n)=>{n.d(o,{A:()=>r});const r=n.p+"assets/images/personalized-frontend-1-4a8782774dbbdff2247871d2064f51f9.png"},8453:(e,o,n)=>{n.d(o,{R:()=>t,x:()=>a});var r=n(6540);const s={},i=r.createContext(s);function t(e){const o=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),r.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/75b20590.48572dc1.js b/assets/js/75b20590.48572dc1.js new file mode 100644 index 00000000..19205ebc --- /dev/null +++ b/assets/js/75b20590.48572dc1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9025],{6992:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>a,contentTitle:()=>c,default:()=>l,frontMatter:()=>s,metadata:()=>n,toc:()=>p});const n=JSON.parse('{"id":"concepts/opensource","title":"Open Source","description":"It\'s important to the zrok project that it remain free and open source software. The code is available on GitHub","source":"@site/../docs/concepts/opensource.md","sourceDirName":"concepts","slug":"/concepts/opensource","permalink":"/docs/next/concepts/opensource","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/opensource.md","tags":[],"version":"current","sidebarPosition":100,"frontMatter":{"sidebar_position":100},"sidebar":"tutorialSidebar","previous":{"title":"Sharing Websites and Files","permalink":"/docs/next/concepts/files"},"next":{"title":"Hosting","permalink":"/docs/next/concepts/hosting"}}');var r=t(4848),i=t(8453);const s={sidebar_position:100},c="Open Source",a={},p=[{value:"Built on OpenZiti",id:"built-on-openziti",level:2}];function d(e){const o={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.header,{children:(0,r.jsx)(o.h1,{id:"open-source",children:"Open Source"})}),"\n",(0,r.jsxs)(o.p,{children:["It's important to the ",(0,r.jsx)(o.code,{children:"zrok"})," project that it remain free and open source software. The code is available on ",(0,r.jsx)(o.a,{href:"https://github.com/openziti/zrok",children:"GitHub"}),"\nfor the world to use, inspect, and build upon!"]}),"\n",(0,r.jsxs)(o.p,{children:["Check out the repository over on GitHub at ",(0,r.jsx)(o.a,{href:"https://github.com/openziti/zrok",children:"https://github.com/openziti/zrok"}),". If you find ",(0,r.jsx)(o.code,{children:"zrok"})," to be useful, and\nyou want to help spread the word of ",(0,r.jsx)(o.code,{children:"zrok"})," give the project a star. It really does help get the word out about the\nproject."]}),"\n",(0,r.jsxs)(o.p,{children:["The project also uses a very permissive license: Apache v2. We encourage people to fork the repo and use ",(0,r.jsx)(o.code,{children:"zrok"})," for your own purposes how you see fit or contribute back to the project."]}),"\n",(0,r.jsx)(o.h2,{id:"built-on-openziti",children:"Built on OpenZiti"}),"\n",(0,r.jsxs)(o.p,{children:["The power of ",(0,r.jsx)(o.code,{children:"zrok"})," really lies in ",(0,r.jsx)(o.code,{children:"private"})," sharing. It's increasingly clear that security needs to be a first-class\nmember of any organization. To enable ",(0,r.jsx)(o.code,{children:"private"})," sharing, ",(0,r.jsx)(o.code,{children:"zrok"})," was built on top of another excellent open source project named OpenZiti."]}),"\n",(0,r.jsxs)(o.p,{children:["OpenZiti is a secure overlay network focusing on bringing zero trust to applications. It is the ",(0,r.jsx)(o.strong,{children:"backbone"})," of ",(0,r.jsx)(o.code,{children:"zrok"}),".\nIn fact, ",(0,r.jsx)(o.code,{children:"zrok"})," proudly proclaims itself as an Ziti ",(0,r.jsx)(o.em,{children:"native"})," application."]}),"\n",(0,r.jsxs)(o.p,{children:["If you are interested in learning more about OpenZiti head over to ",(0,r.jsx)(o.a,{href:"https://docs.openziti.io/docs/learn/introduction/",children:"the docs"}),", try the quickstart, and don't forget to star that project too. We couldn't build ",(0,r.jsx)(o.code,{children:"zrok"})," without OpenZiti!"]})]})}function l(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,o,t)=>{t.d(o,{R:()=>s,x:()=>c});var n=t(6540);const r={},i=n.createContext(r);function s(e){const o=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function c(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/75b20590.c44edc33.js b/assets/js/75b20590.c44edc33.js deleted file mode 100644 index eda9db8d..00000000 --- a/assets/js/75b20590.c44edc33.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9025],{6992:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>a,contentTitle:()=>c,default:()=>l,frontMatter:()=>s,metadata:()=>n,toc:()=>p});const n=JSON.parse('{"id":"concepts/opensource","title":"Open Source","description":"It\'s important to the zrok project that it remain free and open source software. The code is available on GitHub","source":"@site/../docs/concepts/opensource.md","sourceDirName":"concepts","slug":"/concepts/opensource","permalink":"/docs/concepts/opensource","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/opensource.md","tags":[],"version":"current","sidebarPosition":100,"frontMatter":{"sidebar_position":100},"sidebar":"tutorialSidebar","previous":{"title":"Sharing Websites and Files","permalink":"/docs/concepts/files"},"next":{"title":"Hosting","permalink":"/docs/concepts/hosting"}}');var r=t(4848),i=t(8453);const s={sidebar_position:100},c="Open Source",a={},p=[{value:"Built on OpenZiti",id:"built-on-openziti",level:2}];function d(e){const o={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.header,{children:(0,r.jsx)(o.h1,{id:"open-source",children:"Open Source"})}),"\n",(0,r.jsxs)(o.p,{children:["It's important to the ",(0,r.jsx)(o.code,{children:"zrok"})," project that it remain free and open source software. The code is available on ",(0,r.jsx)(o.a,{href:"https://github.com/openziti/zrok",children:"GitHub"}),"\nfor the world to use, inspect, and build upon!"]}),"\n",(0,r.jsxs)(o.p,{children:["Check out the repository over on GitHub at ",(0,r.jsx)(o.a,{href:"https://github.com/openziti/zrok",children:"https://github.com/openziti/zrok"}),". If you find ",(0,r.jsx)(o.code,{children:"zrok"})," to be useful, and\nyou want to help spread the word of ",(0,r.jsx)(o.code,{children:"zrok"})," give the project a star. It really does help get the word out about the\nproject."]}),"\n",(0,r.jsxs)(o.p,{children:["The project also uses a very permissive license: Apache v2. We encourage people to fork the repo and use ",(0,r.jsx)(o.code,{children:"zrok"})," for your own purposes how you see fit or contribute back to the project."]}),"\n",(0,r.jsx)(o.h2,{id:"built-on-openziti",children:"Built on OpenZiti"}),"\n",(0,r.jsxs)(o.p,{children:["The power of ",(0,r.jsx)(o.code,{children:"zrok"})," really lies in ",(0,r.jsx)(o.code,{children:"private"})," sharing. It's increasingly clear that security needs to be a first-class\nmember of any organization. To enable ",(0,r.jsx)(o.code,{children:"private"})," sharing, ",(0,r.jsx)(o.code,{children:"zrok"})," was built on top of another excellent open source project named OpenZiti."]}),"\n",(0,r.jsxs)(o.p,{children:["OpenZiti is a secure overlay network focusing on bringing zero trust to applications. It is the ",(0,r.jsx)(o.strong,{children:"backbone"})," of ",(0,r.jsx)(o.code,{children:"zrok"}),".\nIn fact, ",(0,r.jsx)(o.code,{children:"zrok"})," proudly proclaims itself as an Ziti ",(0,r.jsx)(o.em,{children:"native"})," application."]}),"\n",(0,r.jsxs)(o.p,{children:["If you are interested in learning more about OpenZiti head over to ",(0,r.jsx)(o.a,{href:"https://docs.openziti.io/docs/learn/introduction/",children:"the docs"}),", try the quickstart, and don't forget to star that project too. We couldn't build ",(0,r.jsx)(o.code,{children:"zrok"})," without OpenZiti!"]})]})}function l(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,o,t)=>{t.d(o,{R:()=>s,x:()=>c});var n=t(6540);const r={},i=n.createContext(r);function s(e){const o=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function c(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7d0a541a.3ce441af.js b/assets/js/7d0a541a.3ce441af.js new file mode 100644 index 00000000..3de756a2 --- /dev/null +++ b/assets/js/7d0a541a.3ce441af.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4466],{2454:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>c,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"concepts/index","title":"Concepts","description":"zrok was designed to make sharing local resources both secure and easy. In this section of the zrok documentation, we\'ll tour through all of the most important features.","source":"@site/versioned_docs/version-0.4/concepts/index.md","sourceDirName":"concepts","slug":"/concepts/","permalink":"/docs/concepts/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/concepts/index.md","tags":[],"version":"0.4","sidebarPosition":25,"frontMatter":{"sidebar_title":"Core Features","sidebar_position":25},"sidebar":"tutorialSidebar","previous":{"title":"Getting Started","permalink":"/docs/getting-started"},"next":{"title":"Private Shares","permalink":"/docs/concepts/sharing-private"}}');var o=s(4848),r=s(8453);const c={sidebar_title:"Core Features",sidebar_position:25},i="Concepts",a={},d=[];function l(e){const n={a:"a",code:"code",h1:"h1",header:"header",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"concepts",children:"Concepts"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"zrok"})," was designed to make sharing local resources both secure and easy. In this section of the ",(0,o.jsx)(n.code,{children:"zrok"})," documentation, we'll tour through all of the most important features."]}),"\n",(0,o.jsxs)(n.p,{children:["Sharing with ",(0,o.jsx)(n.code,{children:"zrok"})," can be either ",(0,o.jsx)(n.a,{href:"/docs/concepts/sharing-public",children:(0,o.jsx)(n.code,{children:"public"})})," or ",(0,o.jsx)(n.a,{href:"/docs/concepts/sharing-private",children:(0,o.jsx)(n.code,{children:"private"})}),".\nNaturally, regular web-based resources can be shared but ",(0,o.jsx)(n.code,{children:"zrok"})," also includes support for sharing raw ",(0,o.jsx)(n.a,{href:"/docs/concepts/tunnels",children:"TCP"})," and ",(0,o.jsx)(n.a,{href:"/docs/concepts/tunnels",children:"UDP"})," network connections, and also includes a ",(0,o.jsx)(n.a,{href:"/docs/concepts/files",children:"website and file sharing"})," feature."]}),"\n",(0,o.jsxs)(n.p,{children:["Learn about ",(0,o.jsx)(n.code,{children:"zrok"})," ",(0,o.jsx)(n.a,{href:"/docs/concepts/hosting",children:"hosting here"}),", including instructions on how to ",(0,o.jsxs)(n.a,{href:"/docs/guides/self-hosting/linux/",children:["install your own ",(0,o.jsx)(n.code,{children:"zrok"})," instance"]}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>i});var t=s(6540);const o={},r=t.createContext(o);function c(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7dd0c8d0.1c47de89.js b/assets/js/7dd0c8d0.1c47de89.js new file mode 100644 index 00000000..cabb9499 --- /dev/null +++ b/assets/js/7dd0c8d0.1c47de89.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[471],{1796:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"guides/self-hosting/kubernetes","title":"Self-host a zrok Instance in Kubernetes","description":"The Helm chart for zrok is available from the main OpenZiti charts repo.","source":"@site/versioned_docs/version-0.4/guides/self-hosting/kubernetes.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/kubernetes","permalink":"/docs/guides/self-hosting/kubernetes","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/kubernetes.mdx","tags":[],"version":"0.4","sidebarPosition":55,"frontMatter":{"title":"Self-host a zrok Instance in Kubernetes","sidebar_label":"Kubernetes","sidebar_position":55},"sidebar":"tutorialSidebar","previous":{"title":"Docker","permalink":"/docs/guides/self-hosting/docker"},"next":{"title":"Metrics and Limits","permalink":"/docs/category/metrics-and-limits"}}');var i=s(4848),r=s(8453);const o={title:"Self-host a zrok Instance in Kubernetes",sidebar_label:"Kubernetes",sidebar_position:55},a=void 0,c={},l=[];function d(e){const t={a:"a",p:"p",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"The Helm chart for zrok is available from the main OpenZiti charts repo."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"https://github.com/openziti/helm-charts/tree/main/charts/zrok#readme",children:"Link to README in GitHub"})})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>a});var n=s(6540);const i={},r=n.createContext(i);function o(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7f5ec875.7e01f190.js b/assets/js/7f5ec875.7e01f190.js new file mode 100644 index 00000000..96ca8bbf --- /dev/null +++ b/assets/js/7f5ec875.7e01f190.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1939],{7433:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>d,contentTitle:()=>s,default:()=>m,frontMatter:()=>t,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"guides/self-hosting/organizations","title":"Organizations","description":"zrok (starting with v0.4.45) includes support for \\"organizations\\". Organizations are groups of related accounts that are typically centrally managed in some capacity. A zrok account can be a member of multiple organizations. Organization membership can also include an \\"admin\\" permission. As of v0.4.45 organization admins are able to retrieve an \\"overview\\" (zrok overview) from any other account in the organization, allowing the admin to see the details of the environments, shares, and accesses created within that account.","source":"@site/../docs/guides/self-hosting/organizations.md","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/organizations","permalink":"/docs/next/guides/self-hosting/organizations","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/organizations.md","tags":[],"version":"current","sidebarPosition":21,"frontMatter":{"sidebar_position":21,"sidebar_label":"Organizations"},"sidebar":"tutorialSidebar","previous":{"title":"Interstitial Pages","permalink":"/docs/next/guides/self-hosting/interstitial-page"},"next":{"title":"Personalized Frontend","permalink":"/docs/next/guides/self-hosting/personalized-frontend"}}');var o=i(4848),r=i(8453);const t={sidebar_position:21,sidebar_label:"Organizations"},s="Organizations",d={},c=[{value:"Configuring an Organization",id:"configuring-an-organization",level:2},{value:"Create an Organization",id:"create-an-organization",level:3},{value:"List Organizations",id:"list-organizations",level:3},{value:"Add a Member to an Organization",id:"add-a-member-to-an-organization",level:3},{value:"List Members of an Organization",id:"list-members-of-an-organization",level:3},{value:"Removing Organizations and Members",id:"removing-organizations-and-members",level:3},{value:"End-user Organization Administrator Commands",id:"end-user-organization-administrator-commands",level:2},{value:"End-user Organization Commands",id:"end-user-organization-commands",level:2}];function l(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,r.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.header,{children:(0,o.jsx)(e.h1,{id:"organizations",children:"Organizations"})}),"\n",(0,o.jsxs)(e.p,{children:["zrok (starting with ",(0,o.jsx)(e.code,{children:"v0.4.45"}),') includes support for "organizations". Organizations are groups of related accounts that are typically centrally managed in some capacity. A zrok account can be a member of multiple organizations. Organization membership can also include an "admin" permission. As of ',(0,o.jsx)(e.code,{children:"v0.4.45"}),' organization admins are able to retrieve an "overview" (',(0,o.jsx)(e.code,{children:"zrok overview"}),") from any other account in the organization, allowing the admin to see the details of the environments, shares, and accesses created within that account."]}),"\n",(0,o.jsxs)(e.p,{children:["Future zrok releases will include additional organization features, including ",(0,o.jsx)(e.code,{children:"--closed"})," permission sharing functions."]}),"\n",(0,o.jsx)(e.h2,{id:"configuring-an-organization",children:"Configuring an Organization"}),"\n",(0,o.jsxs)(e.p,{children:["The API endpoints used to manage organizations and their members require a site-level ",(0,o.jsx)(e.code,{children:"ZROK_ADMIN_TOKEN"})," to access. See the ",(0,o.jsx)(e.a,{href:"/docs/next/guides/self-hosting/linux/#configure-the-controller",children:"self-hosting guide"})," for details on configuring admin tokens."]}),"\n",(0,o.jsx)(e.h3,{id:"create-an-organization",children:"Create an Organization"}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok admin create organization"})," command is used to create organizations:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create organization --help\nCreate a new organization\n\nUsage:\n zrok admin create organization [flags]\n\nAliases:\n organization, org\n\nFlags:\n -d, --description string Organization description\n -h, --help help for organization\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n"})}),"\n",(0,o.jsxs)(e.p,{children:["Use the ",(0,o.jsx)(e.code,{children:"-d"})," flag to add a description that shows up in end-user membership listings."]}),"\n",(0,o.jsx)(e.p,{children:"We'll create an example organization:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create organization -d \"documentation\"\n[ 0.006] INFO main.(*adminCreateOrganizationCommand).run: created new organization with token 'gK1XRvthq7ci'\n"})}),"\n",(0,o.jsx)(e.h3,{id:"list-organizations",children:"List Organizations"}),"\n",(0,o.jsxs)(e.p,{children:["We use the ",(0,o.jsx)(e.code,{children:"zrok admin list organizations"})," command to list our organizations:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin list organizations\n\n ORGANIZATION TOKEN DESCRIPTION \n gK1XRvthq7ci documentation \n"})}),"\n",(0,o.jsx)(e.h3,{id:"add-a-member-to-an-organization",children:"Add a Member to an Organization"}),"\n",(0,o.jsxs)(e.p,{children:["We use the ",(0,o.jsx)(e.code,{children:"zrok admin create org-member"})," command to add members to organizations:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create org-member \nError: accepts 2 arg(s), received 0\nUsage:\n zrok admin create org-member [flags]\n\nAliases:\n org-member, member\n\nFlags:\n --admin Make the new account an admin of the organization\n -h, --help help for org-member\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n"})}),"\n",(0,o.jsx)(e.p,{children:"Like this:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create org-member gK1XRvthq7ci michael.quigley@netfoundry.io\n[ 0.006] INFO main.(*adminCreateOrgMemberCommand).run: added 'michael.quigley@netfoundry.io' to organization 'gK1XRvthq7ci\n"})}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"--admin"})," flag can be added to the ",(0,o.jsx)(e.code,{children:"zrok admin create org-member"})," command to mark the member as an administrator of the organization."]}),"\n",(0,o.jsx)(e.h3,{id:"list-members-of-an-organization",children:"List Members of an Organization"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin list org-members gK1XRvthq7ci\n\n ACCOUNT EMAIL ADMIN? \n michael.quigley@netfoundry.io false \n"})}),"\n",(0,o.jsx)(e.h3,{id:"removing-organizations-and-members",children:"Removing Organizations and Members"}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok admin delete org-member"})," and ",(0,o.jsx)(e.code,{children:"zrok admin delete organization"})," commands are available to clean up organizations and their membership lists."]}),"\n",(0,o.jsx)(e.h2,{id:"end-user-organization-administrator-commands",children:"End-user Organization Administrator Commands"}),"\n",(0,o.jsxs)(e.p,{children:["When a zrok account is added to an organization as an administrator it allows them to use the ",(0,o.jsx)(e.code,{children:"zrok organization admin"})," commands, which include:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:'$ zrok organization admin\nOrganization admin commands\n\nUsage:\n zrok organization admin [command]\n\nAvailable Commands:\n list List the members of an organization\n overview Retrieve account overview for organization member account\n\nFlags:\n -h, --help help for admin\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n\nUse "zrok organization admin [command] --help" for more information about a command.\n'})}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok organization admin list"})," command is used to list the members of an organization."]}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok organization admin overview"})," command is used to retrieve an overview of an organization member account. This is functionally equivalent to what the ",(0,o.jsx)(e.code,{children:"zrok overview"})," command does, but it allows an organization admin to retrieve the overview for another zrok account."]}),"\n",(0,o.jsx)(e.h2,{id:"end-user-organization-commands",children:"End-user Organization Commands"}),"\n",(0,o.jsxs)(e.p,{children:["All zrok accounts can use the ",(0,o.jsx)(e.code,{children:"zrok organization memberships"})," command to list the organizations they're a member of:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok organization memberships\n\n ORGANIZATION TOKEN DESCRIPTION ADMIN? \n gK1XRvthq7ci documentation false \n\n"})})]})}function m(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(l,{...n})}):l(n)}},8453:(n,e,i)=>{i.d(e,{R:()=>t,x:()=>s});var a=i(6540);const o={},r=a.createContext(o);function t(n){const e=a.useContext(r);return a.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(o):n.components||o:t(n.components),a.createElement(r.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/7f5ec875.bb718edf.js b/assets/js/7f5ec875.bb718edf.js deleted file mode 100644 index cc430a82..00000000 --- a/assets/js/7f5ec875.bb718edf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1939],{7433:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>d,contentTitle:()=>s,default:()=>m,frontMatter:()=>t,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"guides/self-hosting/organizations","title":"Organizations","description":"zrok (starting with v0.4.45) includes support for \\"organizations\\". Organizations are groups of related accounts that are typically centrally managed in some capacity. A zrok account can be a member of multiple organizations. Organization membership can also include an \\"admin\\" permission. As of v0.4.45 organization admins are able to retrieve an \\"overview\\" (zrok overview) from any other account in the organization, allowing the admin to see the details of the environments, shares, and accesses created within that account.","source":"@site/../docs/guides/self-hosting/organizations.md","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/organizations","permalink":"/docs/guides/self-hosting/organizations","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/organizations.md","tags":[],"version":"current","sidebarPosition":21,"frontMatter":{"sidebar_position":21,"sidebar_label":"Organizations"},"sidebar":"tutorialSidebar","previous":{"title":"Interstitial Pages","permalink":"/docs/guides/self-hosting/interstitial-page"},"next":{"title":"Personalized Frontend","permalink":"/docs/guides/self-hosting/personalized-frontend"}}');var o=i(4848),r=i(8453);const t={sidebar_position:21,sidebar_label:"Organizations"},s="Organizations",d={},c=[{value:"Configuring an Organization",id:"configuring-an-organization",level:2},{value:"Create an Organization",id:"create-an-organization",level:3},{value:"List Organizations",id:"list-organizations",level:3},{value:"Add a Member to an Organization",id:"add-a-member-to-an-organization",level:3},{value:"List Members of an Organization",id:"list-members-of-an-organization",level:3},{value:"Removing Organizations and Members",id:"removing-organizations-and-members",level:3},{value:"End-user Organization Administrator Commands",id:"end-user-organization-administrator-commands",level:2},{value:"End-user Organization Commands",id:"end-user-organization-commands",level:2}];function l(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,r.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.header,{children:(0,o.jsx)(e.h1,{id:"organizations",children:"Organizations"})}),"\n",(0,o.jsxs)(e.p,{children:["zrok (starting with ",(0,o.jsx)(e.code,{children:"v0.4.45"}),') includes support for "organizations". Organizations are groups of related accounts that are typically centrally managed in some capacity. A zrok account can be a member of multiple organizations. Organization membership can also include an "admin" permission. As of ',(0,o.jsx)(e.code,{children:"v0.4.45"}),' organization admins are able to retrieve an "overview" (',(0,o.jsx)(e.code,{children:"zrok overview"}),") from any other account in the organization, allowing the admin to see the details of the environments, shares, and accesses created within that account."]}),"\n",(0,o.jsxs)(e.p,{children:["Future zrok releases will include additional organization features, including ",(0,o.jsx)(e.code,{children:"--closed"})," permission sharing functions."]}),"\n",(0,o.jsx)(e.h2,{id:"configuring-an-organization",children:"Configuring an Organization"}),"\n",(0,o.jsxs)(e.p,{children:["The API endpoints used to manage organizations and their members require a site-level ",(0,o.jsx)(e.code,{children:"ZROK_ADMIN_TOKEN"})," to access. See the ",(0,o.jsx)(e.a,{href:"/docs/guides/self-hosting/linux/#configure-the-controller",children:"self-hosting guide"})," for details on configuring admin tokens."]}),"\n",(0,o.jsx)(e.h3,{id:"create-an-organization",children:"Create an Organization"}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok admin create organization"})," command is used to create organizations:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create organization --help\nCreate a new organization\n\nUsage:\n zrok admin create organization [flags]\n\nAliases:\n organization, org\n\nFlags:\n -d, --description string Organization description\n -h, --help help for organization\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n"})}),"\n",(0,o.jsxs)(e.p,{children:["Use the ",(0,o.jsx)(e.code,{children:"-d"})," flag to add a description that shows up in end-user membership listings."]}),"\n",(0,o.jsx)(e.p,{children:"We'll create an example organization:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create organization -d \"documentation\"\n[ 0.006] INFO main.(*adminCreateOrganizationCommand).run: created new organization with token 'gK1XRvthq7ci'\n"})}),"\n",(0,o.jsx)(e.h3,{id:"list-organizations",children:"List Organizations"}),"\n",(0,o.jsxs)(e.p,{children:["We use the ",(0,o.jsx)(e.code,{children:"zrok admin list organizations"})," command to list our organizations:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin list organizations\n\n ORGANIZATION TOKEN DESCRIPTION \n gK1XRvthq7ci documentation \n"})}),"\n",(0,o.jsx)(e.h3,{id:"add-a-member-to-an-organization",children:"Add a Member to an Organization"}),"\n",(0,o.jsxs)(e.p,{children:["We use the ",(0,o.jsx)(e.code,{children:"zrok admin create org-member"})," command to add members to organizations:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create org-member \nError: accepts 2 arg(s), received 0\nUsage:\n zrok admin create org-member [flags]\n\nAliases:\n org-member, member\n\nFlags:\n --admin Make the new account an admin of the organization\n -h, --help help for org-member\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n"})}),"\n",(0,o.jsx)(e.p,{children:"Like this:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create org-member gK1XRvthq7ci michael.quigley@netfoundry.io\n[ 0.006] INFO main.(*adminCreateOrgMemberCommand).run: added 'michael.quigley@netfoundry.io' to organization 'gK1XRvthq7ci\n"})}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"--admin"})," flag can be added to the ",(0,o.jsx)(e.code,{children:"zrok admin create org-member"})," command to mark the member as an administrator of the organization."]}),"\n",(0,o.jsx)(e.h3,{id:"list-members-of-an-organization",children:"List Members of an Organization"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin list org-members gK1XRvthq7ci\n\n ACCOUNT EMAIL ADMIN? \n michael.quigley@netfoundry.io false \n"})}),"\n",(0,o.jsx)(e.h3,{id:"removing-organizations-and-members",children:"Removing Organizations and Members"}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok admin delete org-member"})," and ",(0,o.jsx)(e.code,{children:"zrok admin delete organization"})," commands are available to clean up organizations and their membership lists."]}),"\n",(0,o.jsx)(e.h2,{id:"end-user-organization-administrator-commands",children:"End-user Organization Administrator Commands"}),"\n",(0,o.jsxs)(e.p,{children:["When a zrok account is added to an organization as an administrator it allows them to use the ",(0,o.jsx)(e.code,{children:"zrok organization admin"})," commands, which include:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:'$ zrok organization admin\nOrganization admin commands\n\nUsage:\n zrok organization admin [command]\n\nAvailable Commands:\n list List the members of an organization\n overview Retrieve account overview for organization member account\n\nFlags:\n -h, --help help for admin\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n\nUse "zrok organization admin [command] --help" for more information about a command.\n'})}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok organization admin list"})," command is used to list the members of an organization."]}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok organization admin overview"})," command is used to retrieve an overview of an organization member account. This is functionally equivalent to what the ",(0,o.jsx)(e.code,{children:"zrok overview"})," command does, but it allows an organization admin to retrieve the overview for another zrok account."]}),"\n",(0,o.jsx)(e.h2,{id:"end-user-organization-commands",children:"End-user Organization Commands"}),"\n",(0,o.jsxs)(e.p,{children:["All zrok accounts can use the ",(0,o.jsx)(e.code,{children:"zrok organization memberships"})," command to list the organizations they're a member of:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok organization memberships\n\n ORGANIZATION TOKEN DESCRIPTION ADMIN? \n gK1XRvthq7ci documentation false \n\n"})})]})}function m(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(l,{...n})}):l(n)}},8453:(n,e,i)=>{i.d(e,{R:()=>t,x:()=>s});var a=i(6540);const o={},r=a.createContext(o);function t(n){const e=a.useContext(r);return a.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(o):n.components||o:t(n.components),a.createElement(r.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/81fb89b8.2419bcac.js b/assets/js/81fb89b8.2419bcac.js new file mode 100644 index 00000000..7391cb0a --- /dev/null +++ b/assets/js/81fb89b8.2419bcac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8301],{599:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>t,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"guides/self-hosting/personalized-frontend","title":"Personalized Frontend","description":"This guide describes an approach that enables a zrok user to use a hosted, shared instance (zrok.io) and configure their own personalized frontend, which enables custom DNS and TLS for their shares.","source":"@site/versioned_docs/version-0.4/guides/self-hosting/personalized-frontend.md","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/personalized-frontend","permalink":"/docs/guides/self-hosting/personalized-frontend","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/personalized-frontend.md","tags":[],"version":"0.4","sidebarPosition":22,"frontMatter":{"title":"Personalized Frontend","sidebar_label":"Personalized Frontend","sidebar_position":22},"sidebar":"tutorialSidebar","previous":{"title":"Organizations","permalink":"/docs/guides/self-hosting/organizations"},"next":{"title":"Docker","permalink":"/docs/guides/self-hosting/docker"}}');var s=n(4848),i=n(8453);const t={title:"Personalized Frontend",sidebar_label:"Personalized Frontend",sidebar_position:22},a=void 0,d={},c=[{value:"Overview",id:"overview",level:2},{value:"Privacy",id:"privacy",level:2}];function h(e){const o={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.p,{children:"This guide describes an approach that enables a zrok user to use a hosted, shared instance (zrok.io) and configure their own personalized frontend, which enables custom DNS and TLS for their shares."}),"\n",(0,s.jsx)(o.p,{children:"In order to accomplish this, the user will need to provide their own minimal VPS instance, or container hosting. The size and capacity of these resources will be entirely dependent on the workload that they will be used to service. But generally, for most modest workloads, the most inexpensive VPS option will suffice."}),"\n",(0,s.jsx)(o.p,{children:"This approach gives you complete control over the way that your shares are exposed publicly. This approach works for HTTPS shares, and also for TCP and UDP ports, allowing you to put all of these things onto the public internet, while maintaining strong security for your protected resources."}),"\n",(0,s.jsxs)(o.p,{children:["This guide isn't a detailed ",(0,s.jsx)(o.em,{children:"how to"})," with specific steps to follow. This is more of a description of the overall concept. You'll want to figure out your own specific steps to implement this style of deployment in your own environment."]}),"\n",(0,s.jsx)(o.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsxs)(o.p,{children:["Let's imagine a hypothetical scenario where you've got 3 different resources shared using zrok. We'll refer to these as ",(0,s.jsx)(o.code,{children:"A"}),", ",(0,s.jsx)(o.code,{children:"B"}),", and ",(0,s.jsx)(o.code,{children:"C"}),". Both ",(0,s.jsx)(o.code,{children:"A"})," and ",(0,s.jsx)(o.code,{children:"B"})," are shares using the ",(0,s.jsx)(o.code,{children:"proxy"})," backend mode, which are used to share private HTTPS resources. Share ",(0,s.jsx)(o.code,{children:"C"})," uses the ",(0,s.jsx)(o.code,{children:"tcpTunnel"})," backend to expose a listening port from a private server (like a game server, or a message queue)."]}),"\n",(0,s.jsx)(o.p,{children:"We're using the shared zrok instance at zrok.io to provide our secure sharing infrastructure."}),"\n",(0,s.jsx)(o.p,{children:"Our deployment will end up looking like this:"}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"personalized-frontend-1",src:n(5300).A+"",width:"716",height:"357"})}),"\n",(0,s.jsxs)(o.p,{children:["We're using ",(0,s.jsx)(o.code,{children:"zrok reserve"})," to create the ",(0,s.jsx)(o.code,{children:"A"}),", ",(0,s.jsx)(o.code,{children:"B"}),", and ",(0,s.jsx)(o.code,{children:"C"})," shares as reserved shares (using the ",(0,s.jsx)(o.code,{children:"--unique-name"})," option to give them specific names). These shares could be located together in a single environment on a single host, or can be located at completely different spots on the planet on completely different hosts. You could want to use significantly more shares than 3, or less. The secure sharing fabric allows seamless secure connectivity for these shared resources. This implementation will scale up or down as needed (use multiple hosts behind a load balancer for really big workloads)."]}),"\n",(0,s.jsxs)(o.p,{children:["Because we're using ",(0,s.jsx)(o.code,{children:"private"})," zrok shares, they'll need to be accessed using a corresponding ",(0,s.jsx)(o.code,{children:"zrok access"})," private command. The ",(0,s.jsx)(o.code,{children:"zrok access private"}),' command binds a "network listener" where the share can be accessed on an address and port on the host where the command is executed. You can use ',(0,s.jsx)(o.code,{children:"zrok access private"})," to bind a network listener for a share in as many places as you want (up to the limit configuration of the service)."]}),"\n",(0,s.jsx)(o.admonition,{type:"note",children:(0,s.jsxs)(o.p,{children:["When you use ",(0,s.jsx)(o.code,{children:"zrok share public"}),", you are allowing your shared resources to be accessed using the shared, public frontend provided by the service instance (zrok.io). ",(0,s.jsx)(o.code,{children:"zrok share private"})," (or ",(0,s.jsx)(o.code,{children:"zrok reserve"}),"/",(0,s.jsx)(o.code,{children:"zrok share reserved"}),") creates the same kind of share, but does not provision the shared public frontend, and you'll need to use ",(0,s.jsx)(o.code,{children:"zrok access private"})," in order to ",(0,s.jsx)(o.em,{children:"bind"})," that share to a network address where it can be accessed."]})}),"\n",(0,s.jsxs)(o.p,{children:["Imagine that we own the domain ",(0,s.jsx)(o.code,{children:"example.com"}),". In our example, we want to expose our HTTPS shares ",(0,s.jsx)(o.code,{children:"A"})," and ",(0,s.jsx)(o.code,{children:"B"})," as ",(0,s.jsx)(o.code,{children:"a.example.com"})," and ",(0,s.jsx)(o.code,{children:"b.example.com"}),". And maybe our ",(0,s.jsx)(o.code,{children:"C"})," share represents a gaming server that we want to expose as ",(0,s.jsx)(o.code,{children:"gaming.example.com:25565"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["We can accomplish this easily with cheap VPS instance. You could also do it with containers through a container hosting service. The VPS will need an IP address exposed to the internet. You'll also need to be able to create DNS entries for the ",(0,s.jsx)(o.code,{children:"example.com"})," domain."]}),"\n",(0,s.jsxs)(o.p,{children:["To accomplish this, we're going to run 3 separate ",(0,s.jsx)(o.code,{children:"zrok access private"})," commands on our VPS (see the ",(0,s.jsx)(o.a,{href:"../../frontdoor/",children:"frontdoor guide"}),", or ",(0,s.jsx)(o.a,{href:"../../docker-share/docker_private_share_guide/#access-the-private-share",children:"zrok-private-access Docker Compose guide"})," for details on an approach for setting this up). One command each for shares ",(0,s.jsx)(o.code,{children:"A"}),", ",(0,s.jsx)(o.code,{children:"B"}),", and ",(0,s.jsx)(o.code,{children:"C"}),". The ",(0,s.jsx)(o.code,{children:"zrok access private"})," command works like this:"]}),"\n",(0,s.jsx)(o.pre,{children:(0,s.jsx)(o.code,{children:'$ zrok access private\nError: accepts 1 arg(s), received 0\nUsage:\n zrok access private [flags]\n\nFlags:\n -b, --bind string The address to bind the private frontend (default "127.0.0.1:9191")\n --headless Disable TUI and run headless\n -h, --help help for private\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n'})}),"\n",(0,s.jsxs)(o.p,{children:["Notice the ",(0,s.jsx)(o.code,{children:"--bind"})," flag. That flag is used to bind a network listener to a specific IP address and port on the host we're accessing the shares from. In this case, imagine our VPS node has a public IP address of ",(0,s.jsx)(o.code,{children:"1.2.3.4"})," and a loopback (",(0,s.jsx)(o.code,{children:"127.0.0.1"}),")."]}),"\n",(0,s.jsxs)(o.p,{children:["To expose our HTTPS shares, we're going to use a reverse proxy like nginx. The reverse proxy will be exposed to the internet, terminating TLS and reverse proxying ",(0,s.jsx)(o.code,{children:"a.example.com"})," and ",(0,s.jsx)(o.code,{children:"b.example.com"})," to the network listeners for shares ",(0,s.jsx)(o.code,{children:"A"})," and ",(0,s.jsx)(o.code,{children:"B"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["So, we'll configure our VPS to persistently launch a ",(0,s.jsx)(o.code,{children:"zrok access private"})," for both of these shares. We'll use the ",(0,s.jsx)(o.code,{children:"--bind"})," flag to bind ",(0,s.jsx)(o.code,{children:"A"})," to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9191"})," and ",(0,s.jsx)(o.code,{children:"B"})," to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9192"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["We'll then configure nginx to have a virtual host for ",(0,s.jsx)(o.code,{children:"a.example.com"}),", proxying that to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9191"})," and ",(0,s.jsx)(o.code,{children:"b.example.com"}),", proxying that to ",(0,s.jsx)(o.code,{children:"127.0.0.1:9192"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["Exposing our TCP port for ",(0,s.jsx)(o.code,{children:"gaming.example.com"})," is simply a matter of running a third ",(0,s.jsx)(o.code,{children:"zrok access private"})," with a ",(0,s.jsx)(o.code,{children:"--bind"})," flag configured to point to ",(0,s.jsx)(o.code,{children:"1.2.3.4:25565"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["Once you've created the appropriate DNS entries for ",(0,s.jsx)(o.code,{children:"a.example.com"}),", ",(0,s.jsx)(o.code,{children:"b.example.com"}),", and ",(0,s.jsx)(o.code,{children:"gaming.example.com"})," and worked through the TLS configuration (letsencrypt is your friend here), you'll have a fully functional personalized frontend for your zrok shares that you control."]}),"\n",(0,s.jsx)(o.p,{children:"Your protected resources remain disconnected from the internet and are only reachable through your personalized endpoint."}),"\n",(0,s.jsx)(o.h2,{id:"privacy",children:"Privacy"}),"\n",(0,s.jsxs)(o.p,{children:["When you use a public frontend (with a simple ",(0,s.jsx)(o.code,{children:"zrok share public"}),") at a hosted zrok instance (like zrok.io), the operators of that service have some amount of visibility into what traffic you're sending to your shares. The load balancers in front of the public frontend maintain logs describing all of the URLs that were accessed, as well as other information (headers, etc.) that contain information about the resource you're sharing."]}),"\n",(0,s.jsxs)(o.p,{children:["If you create private shares using ",(0,s.jsx)(o.code,{children:"zrok share private"})," and then run your own ",(0,s.jsx)(o.code,{children:"zrok access private"})," from some other location, the operators of the zrok service instance only know that some amount of data moved between the environment running the ",(0,s.jsx)(o.code,{children:"zrok share private"})," and the ",(0,s.jsx)(o.code,{children:"zrok access private"}),". There is no other information available."]})]})}function l(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},5300:(e,o,n)=>{n.d(o,{A:()=>r});const r=n.p+"assets/images/personalized-frontend-1-4a8782774dbbdff2247871d2064f51f9.png"},8453:(e,o,n)=>{n.d(o,{R:()=>t,x:()=>a});var r=n(6540);const s={},i=r.createContext(s);function t(e){const o=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),r.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8a10c423.bf9ed799.js b/assets/js/8a10c423.bf9ed799.js deleted file mode 100644 index fde21056..00000000 --- a/assets/js/8a10c423.bf9ed799.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3929],{633:(e,r,s)=>{s.d(r,{Ay:()=>o,RM:()=>t});var n=s(4848),i=s(8453);const t=[];function a(e){const r={a:"a",code:"code",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:["Set up ",(0,n.jsx)(r.code,{children:"zrok"}),"'s Linux package repository by following ",(0,n.jsx)(r.a,{href:"/docs/guides/install/linux#install-zrok-from-the-repository",children:"the Linux install guide"}),", or run this one-liner to complete the repo setup and install packages."]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"curl -sSLf https://get.openziti.io/install.bash \\\n| sudo bash -s zrok-share\n"})}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:["If you set up the repository by following the guide, then also install the ",(0,n.jsx)(r.code,{children:"zrok-share"})," package. This package provides the systemd service."]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",metastring:'title="Ubuntu, Debian"',children:"sudo apt install zrok-share\n"})}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",metastring:'title="Fedora, Rocky"',children:"sudo dnf install zrok-share\n"})}),"\n"]}),"\n"]})}function o(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(a,{...e})}):a(e)}},7715:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"guides/linux-user-share/index","title":"Linux User Share","description":"Overview","source":"@site/../docs/guides/linux-user-share/index.mdx","sourceDirName":"guides/linux-user-share","slug":"/guides/linux-user-share/","permalink":"/docs/guides/linux-user-share/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/linux-user-share/index.mdx","tags":[],"version":"current","frontMatter":{"title":"Linux User Share"},"sidebar":"tutorialSidebar","previous":{"title":"Private Share","permalink":"/docs/guides/docker-share/docker_private_share_guide"},"next":{"title":"Self Hosting","permalink":"/docs/category/self-hosting"}}');var i=s(4848),t=s(8453),a=s(633);const o={title:"Linux User Share"},l=void 0,c={},h=[{value:"Overview",id:"overview",level:2},{value:"Install the Linux Package",id:"install-the-linux-package",level:2},...a.RM,{value:"Create a User Share Configuration File",id:"create-a-user-share-configuration-file",level:2},{value:"Edit the User Share Configuration File",id:"edit-the-user-share-configuration-file",level:2},{value:"Start the User Share Service",id:"start-the-user-share-service",level:2},{value:"Check the User Share Journal",id:"check-the-user-share-journal",level:2},{value:"Add Another User Share",id:"add-another-user-share",level:2}];function d(e){const r={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(r.p,{children:["You can run any number of zrok share services as ",(0,i.jsx)(r.code,{children:"systemd --user"})," units with your Linux user's zrok environment in ",(0,i.jsx)(r.code,{children:"~/.zrok"}),". This is like ",(0,i.jsx)(r.a,{href:"/docs/guides/frontdoor",children:"zrok frontdoor"})," except that frontdoor is a system service managed by root separately from your user's login. Linux user shares, Linux system services, and Docker shares all use the same configuration environment variables."]}),"\n",(0,i.jsx)(r.h2,{id:"install-the-linux-package",children:"Install the Linux Package"}),"\n",(0,i.jsxs)(r.p,{children:["The package provides the ",(0,i.jsx)(r.code,{children:"zrok"})," executable and service unit template."]}),"\n",(0,i.jsx)(a.Ay,{}),"\n",(0,i.jsx)(r.h2,{id:"create-a-user-share-configuration-file",children:"Create a User Share Configuration File"}),"\n",(0,i.jsxs)(r.p,{children:["Substitute a name for your instance in place of ",(0,i.jsx)(r.code,{children:"my-instance"})," in the following example. To avoid character escaping problems, use only letters, numbers, hyphens, and underscores in the instance name, not spaces or other special characters."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'ZROK_INSTANCE="my-instance"\ncp /opt/openziti/etc/zrok/zrok-share.env ~/.zrok/zrok-share@${ZROK_INSTANCE}.env\n'})}),"\n",(0,i.jsx)(r.h2,{id:"edit-the-user-share-configuration-file",children:"Edit the User Share Configuration File"}),"\n",(0,i.jsxs)(r.p,{children:["Edit the configuration file in ",(0,i.jsx)(r.code,{children:"~/.zrok/zrok-share@${ZROK_INSTANCE}.env"})," as you would for ",(0,i.jsx)(r.a,{href:"/docs/guides/frontdoor",children:"zrok frontdoor"}),', except ignore the first section "ZROK ENVIRONMENT" because user shares re-use ',(0,i.jsx)(r.code,{children:"~/.zrok"})," and do not need a separate zrok environment."]}),"\n",(0,i.jsx)(r.h2,{id:"start-the-user-share-service",children:"Start the User Share Service"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"systemctl --user enable --now zrok-share@${ZROK_INSTANCE}.service\n"})}),"\n",(0,i.jsx)(r.h2,{id:"check-the-user-share-journal",children:"Check the User Share Journal"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"journalctl --user -lfu zrok-share@${ZROK_INSTANCE}.service\n"})}),"\n",(0,i.jsx)(r.h2,{id:"add-another-user-share",children:"Add Another User Share"}),"\n",(0,i.jsxs)(r.p,{children:["To create another user share, choose another instance name, copy the ",(0,i.jsx)(r.code,{children:"zrok-share.env"})," file, edit the configuration file, and start the service."]})]})}function u(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,r,s)=>{s.d(r,{R:()=>a,x:()=>o});var n=s(6540);const i={},t=n.createContext(i);function a(e){const r=n.useContext(t);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(t.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8a10c423.ee66911d.js b/assets/js/8a10c423.ee66911d.js new file mode 100644 index 00000000..9635faf7 --- /dev/null +++ b/assets/js/8a10c423.ee66911d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3929],{633:(e,r,s)=>{s.d(r,{Ay:()=>o,RM:()=>t});var n=s(4848),i=s(8453);const t=[];function a(e){const r={a:"a",code:"code",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:["Set up ",(0,n.jsx)(r.code,{children:"zrok"}),"'s Linux package repository by following ",(0,n.jsx)(r.a,{href:"/docs/next/guides/install/linux#install-zrok-from-the-repository",children:"the Linux install guide"}),", or run this one-liner to complete the repo setup and install packages."]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"curl -sSLf https://get.openziti.io/install.bash \\\n| sudo bash -s zrok-share\n"})}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:["If you set up the repository by following the guide, then also install the ",(0,n.jsx)(r.code,{children:"zrok-share"})," package. This package provides the systemd service."]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",metastring:'title="Ubuntu, Debian"',children:"sudo apt install zrok-share\n"})}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",metastring:'title="Fedora, Rocky"',children:"sudo dnf install zrok-share\n"})}),"\n"]}),"\n"]})}function o(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(a,{...e})}):a(e)}},7715:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"guides/linux-user-share/index","title":"Linux User Share","description":"Overview","source":"@site/../docs/guides/linux-user-share/index.mdx","sourceDirName":"guides/linux-user-share","slug":"/guides/linux-user-share/","permalink":"/docs/next/guides/linux-user-share/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/linux-user-share/index.mdx","tags":[],"version":"current","frontMatter":{"title":"Linux User Share"},"sidebar":"tutorialSidebar","previous":{"title":"Private Share","permalink":"/docs/next/guides/docker-share/docker_private_share_guide"},"next":{"title":"Self Hosting","permalink":"/docs/next/category/self-hosting"}}');var i=s(4848),t=s(8453),a=s(633);const o={title:"Linux User Share"},l=void 0,c={},h=[{value:"Overview",id:"overview",level:2},{value:"Install the Linux Package",id:"install-the-linux-package",level:2},...a.RM,{value:"Create a User Share Configuration File",id:"create-a-user-share-configuration-file",level:2},{value:"Edit the User Share Configuration File",id:"edit-the-user-share-configuration-file",level:2},{value:"Start the User Share Service",id:"start-the-user-share-service",level:2},{value:"Check the User Share Journal",id:"check-the-user-share-journal",level:2},{value:"Add Another User Share",id:"add-another-user-share",level:2}];function d(e){const r={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(r.p,{children:["You can run any number of zrok share services as ",(0,i.jsx)(r.code,{children:"systemd --user"})," units with your Linux user's zrok environment in ",(0,i.jsx)(r.code,{children:"~/.zrok"}),". This is like ",(0,i.jsx)(r.a,{href:"/docs/next/guides/frontdoor",children:"zrok frontdoor"})," except that frontdoor is a system service managed by root separately from your user's login. Linux user shares, Linux system services, and Docker shares all use the same configuration environment variables."]}),"\n",(0,i.jsx)(r.h2,{id:"install-the-linux-package",children:"Install the Linux Package"}),"\n",(0,i.jsxs)(r.p,{children:["The package provides the ",(0,i.jsx)(r.code,{children:"zrok"})," executable and service unit template."]}),"\n",(0,i.jsx)(a.Ay,{}),"\n",(0,i.jsx)(r.h2,{id:"create-a-user-share-configuration-file",children:"Create a User Share Configuration File"}),"\n",(0,i.jsxs)(r.p,{children:["Substitute a name for your instance in place of ",(0,i.jsx)(r.code,{children:"my-instance"})," in the following example. To avoid character escaping problems, use only letters, numbers, hyphens, and underscores in the instance name, not spaces or other special characters."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'ZROK_INSTANCE="my-instance"\ncp /opt/openziti/etc/zrok/zrok-share.env ~/.zrok/zrok-share@${ZROK_INSTANCE}.env\n'})}),"\n",(0,i.jsx)(r.h2,{id:"edit-the-user-share-configuration-file",children:"Edit the User Share Configuration File"}),"\n",(0,i.jsxs)(r.p,{children:["Edit the configuration file in ",(0,i.jsx)(r.code,{children:"~/.zrok/zrok-share@${ZROK_INSTANCE}.env"})," as you would for ",(0,i.jsx)(r.a,{href:"/docs/next/guides/frontdoor",children:"zrok frontdoor"}),', except ignore the first section "ZROK ENVIRONMENT" because user shares re-use ',(0,i.jsx)(r.code,{children:"~/.zrok"})," and do not need a separate zrok environment."]}),"\n",(0,i.jsx)(r.h2,{id:"start-the-user-share-service",children:"Start the User Share Service"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"systemctl --user enable --now zrok-share@${ZROK_INSTANCE}.service\n"})}),"\n",(0,i.jsx)(r.h2,{id:"check-the-user-share-journal",children:"Check the User Share Journal"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"journalctl --user -lfu zrok-share@${ZROK_INSTANCE}.service\n"})}),"\n",(0,i.jsx)(r.h2,{id:"add-another-user-share",children:"Add Another User Share"}),"\n",(0,i.jsxs)(r.p,{children:["To create another user share, choose another instance name, copy the ",(0,i.jsx)(r.code,{children:"zrok-share.env"})," file, edit the configuration file, and start the service."]})]})}function u(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,r,s)=>{s.d(r,{R:()=>a,x:()=>o});var n=s(6540);const i={},t=n.createContext(i);function a(e){const r=n.useContext(t);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(t.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8a9ffb5d.427ff4b6.js b/assets/js/8a9ffb5d.427ff4b6.js new file mode 100644 index 00000000..36ef61a9 --- /dev/null +++ b/assets/js/8a9ffb5d.427ff4b6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1864],{2158:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>l,default:()=>x,frontMatter:()=>d,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"getting-started","title":"Getting Started","description":"Your Secure Internet Sharing Perimeter","source":"@site/versioned_docs/version-0.4/getting-started.mdx","sourceDirName":".","slug":"/getting-started","permalink":"/docs/getting-started","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/getting-started.mdx","tags":[],"version":"0.4","sidebarPosition":10,"frontMatter":{"title":"Getting Started","sidebar_label":"Getting Started","sidebar_position":10},"sidebar":"tutorialSidebar","next":{"title":"Concepts","permalink":"/docs/concepts/"}}');var i=s(4848),o=s(8453),t=s(8151),a=s(595),c=s(1342);const d={title:"Getting Started",sidebar_label:"Getting Started",sidebar_position:10},l=void 0,h={},u=[{value:"Your Secure Internet Sharing Perimeter",id:"your-secure-internet-sharing-perimeter",level:2},{value:"Your First Share",id:"your-first-share",level:3},{value:"Share Backend Modes",id:"share-backend-modes",level:2},{value:"Open Source",id:"open-source",level:2},{value:"Ziti native",id:"ziti-native",level:3},{value:"What's it for?",id:"whats-it-for",level:2},{value:"Installing the zrok Command",id:"installing-the-zrok-command",level:2},{value:"Enabling Your zrok Environment",id:"enabling-your-zrok-environment",level:2},{value:"Sharing",id:"sharing",level:2},{value:"Ephemeral by Default",id:"ephemeral-by-default",level:3},{value:"Public Shares and Frontends",id:"public-shares-and-frontends",level:3},{value:"Private Shares",id:"private-shares",level:3},{value:"Proxy Backend Mode",id:"proxy-backend-mode",level:3},{value:"Web Backend Mode",id:"web-backend-mode",level:3},{value:"Reserved Shares",id:"reserved-shares",level:3},{value:"Concepts Review",id:"concepts-review",level:2},{value:"Instance and Account",id:"instance-and-account",level:3},{value:"Environment",id:"environment",level:3},{value:"Shares",id:"shares",level:3},{value:"Reserved Shares",id:"reserved-shares-1",level:3},{value:"Self-Hosting an Instance",id:"self-hosting-an-instance",level:2},{value:"Resources",id:"resources",level:2}];function m(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components},{Card:r,CardBody:d,CardFooter:l,CardHeader:h,Column:u,Columns:m}=n;return r||p("Card",!0),d||p("CardBody",!0),l||p("CardFooter",!0),h||p("CardHeader",!0),u||p("Column",!0),m||p("Columns",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"your-secure-internet-sharing-perimeter",children:"Your Secure Internet Sharing Perimeter"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," (",(0,i.jsx)(n.em,{children:"/zi\u02d0\u0279\u0252k/ ZEE-rock"}),") is a secure, open-source, self-hostable sharing platform that simplifies shielding and sharing network services or files.\nThere's a hardened zrok-as-a-service offering available at ",(0,i.jsx)(n.a,{href:"https://myzrok.io",children:"myzrok.io"})," with a generous free tier."]}),"\n",(0,i.jsx)(n.h3,{id:"your-first-share",children:"Your First Share"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Get an account token"}),"\n"]}),"\n",(0,i.jsxs)(m,{className:"text--center getting-started-cards",style:{marginLeft:1},children:[(0,i.jsx)(u,{style:{paddingBottom:20},children:(0,i.jsxs)(r,{shadow:"tl",children:[(0,i.jsx)(h,{children:(0,i.jsx)("h3",{children:"Hosted zrok"})}),(0,i.jsx)(d,{children:(0,i.jsx)(n.p,{children:"Use NetFoundry's public zrok instance."})}),(0,i.jsx)(l,{children:(0,i.jsx)("a",{href:"https://myzrok.io/",children:(0,i.jsx)("button",{className:"button button--secondary button--block",children:"Get an Account"})})})]})}),(0,i.jsx)(u,{style:{paddingBottom:20},children:(0,i.jsxs)(r,{shadow:"tl",children:[(0,i.jsx)(h,{children:(0,i.jsx)("h3",{children:"Self-Hosted zrok"})}),(0,i.jsx)(d,{children:(0,i.jsx)(n.p,{children:"Run a zrok instance on Linux, Docker, or Kubernetes."})}),(0,i.jsx)(l,{children:(0,i.jsx)("a",{href:"/docs/category/self-hosting/",children:(0,i.jsx)("button",{className:"button button--secondary button--block",children:"Guides"})})})]})})]}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"#installing-the-zrok-command",children:"Download the zrok binary"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Enable zrok for your ",(0,i.jsx)(n.a,{href:"#enabling-your-zrok-environment",children:"user environment"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"zrok enable \n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Share ",(0,i.jsx)(n.code,{children:"http://localhost:8080"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"zrok share public 8080\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Visit the public URL displayed in your terminal"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zrok share public",src:s(439).A+"",width:"1115",height:"628"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"share-backend-modes",children:"Share Backend Modes"}),"\n",(0,i.jsx)(n.p,{children:"zrok shares can be public or private, with different options for backend modes, including:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-public",children:"Public shares"})," for ",(0,i.jsx)(n.a,{href:"/docs/concepts/http",children:"web services"})," or ",(0,i.jsx)(n.a,{href:"/docs/concepts/files",children:"files"})]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-private",children:"Private shares for web services or files"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/tunnels",children:"TCP Tunnels"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/tunnels",children:"UDP Tunnels"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/guides/drives",children:"File Drives"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/guides/vpn/",children:"VPN"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"open-source",children:"Open Source"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," is licensed under Apache 2.0."]}),"\n",(0,i.jsxs)(n.p,{children:["Check ",(0,i.jsx)(n.a,{href:"https://github.com/orgs/openziti/projects/16",children:"the roadmap"})," if you're thinking about the future. We would love to hear your ideas for ",(0,i.jsx)(n.code,{children:"zrok"}),"!"]}),"\n",(0,i.jsxs)(n.p,{children:["The best ways to engage are ",(0,i.jsx)(n.a,{href:"https://openziti.discourse.group/",children:"Discourse"})," for questions and ",(0,i.jsx)(n.a,{href:"https://github.com/openziti/zrok/issues",children:"GitHub Issues"})," for documenting problems."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"/docs/concepts/opensource",children:"Read more about zrok open source"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"ziti-native",children:"Ziti native"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," is a ",(0,i.jsx)(n.em,{children:"Ziti Native Application"}),", built on the ",(0,i.jsx)(n.a,{href:"https://openziti.io",children:"OpenZiti"})," platform, and supported by the OpenZiti community and NetFoundry team."]}),"\n",(0,i.jsx)(n.h2,{id:"whats-it-for",children:"What's it for?"}),"\n",(0,i.jsxs)(n.p,{children:["Use ",(0,i.jsx)(n.code,{children:"zrok"})," to share a running service, like a web server or a network socket, or to share a directory of static files."]}),"\n",(0,i.jsxs)(n.p,{children:["If ",(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-public",children:"sharing publicly"}),", you can reserve a subdomain, enable authentication options, or both. Public shares proxy HTTPS to your service or files."]}),"\n",(0,i.jsxs)(n.p,{children:["If ",(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-private",children:"sharing privately"}),", only users with the share token can access your share. In addition to what you can share publicly, private shares can include TCP and UDP services."]}),"\n",(0,i.jsx)(n.h2,{id:"installing-the-zrok-command",children:"Installing the zrok Command"}),"\n",(0,i.jsx)(t.F,{children:(0,i.jsxs)("div",{className:c.A.downloadContainer,children:[(0,i.jsx)(a.A,{osName:"Windows",osLogo:"/img/logo-windows.svg",infoText:"Binary executable",guideLink:"/docs/guides/install/windows"}),(0,i.jsx)(a.A,{osName:"macOS",osLogo:"/img/logo-apple.svg",infoText:"Binary executable",guideLink:"/docs/guides/install/macos"}),(0,i.jsx)(a.A,{osName:"Linux",osLogo:"/img/logo-linux.svg",infoText:"DEB, RPM packages",guideLink:"/docs/guides/install/linux"})]})}),"\n",(0,i.jsx)(n.h2,{id:"enabling-your-zrok-environment",children:"Enabling Your zrok Environment"}),"\n",(0,i.jsxs)(n.p,{children:["After you have ",(0,i.jsx)(n.a,{href:"#your-first-share",children:"an account"}),", you can enable your ",(0,i.jsx)(n.code,{children:"zrok"})," environment."]}),"\n",(0,i.jsxs)(n.p,{children:["A zrok environment usually refers to an enabled device where shares and accesses can be created, .e.g., ",(0,i.jsx)(n.code,{children:"~/.zrok"})," on a Unix machine. It can be a specific user's environment or a system-wide agent's environment owned by the administrator."]}),"\n",(0,i.jsxs)(n.p,{children:["When your ",(0,i.jsx)(n.code,{children:"zrok"})," account was created, the service generated a ",(0,i.jsx)(n.em,{children:"secret token"})," that identifies and authenticates in a single step. Protect your secret token as if it were a password, or an important account number; it's a ",(0,i.jsx)(n.em,{children:"secret"}),", protect it."]}),"\n",(0,i.jsxs)(n.p,{children:["When we left off you had downloaded, extracted, and configured your ",(0,i.jsx)(n.code,{children:"zrok"})," environment. In order to use that environment with your account, you'll need to ",(0,i.jsx)(n.code,{children:"enable"})," it. Enabling an environment generates a secure identity and the necessary underlying security policies with the OpenZiti network hosting the ",(0,i.jsx)(n.code,{children:"zrok"})," service."]}),"\n",(0,i.jsxs)(n.p,{children:["From the web console, click on your email address in the upper right corner of the header. That drop down menu contains an ",(0,i.jsx)(n.code,{children:"Enable Your Environment"})," link. Click that link and a modal dialog will be shown like this:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Enable Modal Dialog",src:s(5803).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["This dialog box shows you the ",(0,i.jsx)(n.code,{children:"zrok enable"})," command that you can use to enable any shell to work with your ",(0,i.jsx)(n.code,{children:"zrok"})," account with a single command."]}),"\n",(0,i.jsx)(n.p,{children:"Let's copy that command and paste it into your shell:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example"',children:"$ zrok enable klFEoIi0QAg7 \n\u28fb contacting the zrok service...\n"})}),"\n",(0,i.jsx)(n.p,{children:"After a few seconds, the message will change and indicate that the enable operation succeeded:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example"',children:"$ zrok enable klFEoIi0QAg7 \n\u28fb the zrok environment was successfully enabled...\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Now, if we run a ",(0,i.jsx)(n.code,{children:"zrok status"})," command, you will see the details of your environment:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",children:"zrok status\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"Config:\n\n CONFIG VALUE SOURCE\n apiEndpoint https://api.staging.zrok.io env\n\nEnvironment:\n\n PROPERTY VALUE\n Secret Token <>\n Ziti Identity <>\n"})}),"\n",(0,i.jsx)(n.p,{children:"Excellent... our environment is now fully enabled."}),"\n",(0,i.jsxs)(n.p,{children:["If we return to the ",(0,i.jsx)(n.em,{children:"web console"}),", we'll now see the new environment reflected in the explorer view:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"New Environment in Web UI",src:s(6054).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["In my case, the environment is named ",(0,i.jsx)(n.code,{children:"michael@ziti-lx"}),", which is the username of my shell and the hostname of the system the shell is running on."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["Should you want to use a non-default name for your environment, you can pass the ",(0,i.jsx)(n.code,{children:"-d"})," option to the ",(0,i.jsx)(n.code,{children:"zrok enable"})," command. See ",(0,i.jsx)(n.code,{children:"zrok enable --help"})," for details."]})}),"\n",(0,i.jsxs)(n.p,{children:["If you click on the environment node in the explorer in the ",(0,i.jsx)(n.em,{children:"web console"}),", the details panel shown at the bottom of the page will change:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Empty Environment",src:s(3826).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["The explorer supports clicking, dragging, mouse wheel zooming, and selecting the nodes in the graph for more information (and available actions) for the selected node. If you ever get lost in the explorer, click the ",(0,i.jsx)(n.img,{alt:"Zoom to Fit",src:s(6413).A+"",width:"30",height:"25"})," ",(0,i.jsx)(n.em,{children:"zoom to fit"})," icon in the lower right corner of the explorer."]}),"\n",(0,i.jsxs)(n.p,{children:["If we click on the ",(0,i.jsx)(n.code,{children:"Detail"})," tab for our environment, we'll see something like:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Environment Detail",src:s(4387).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["With your ",(0,i.jsx)(n.code,{children:"zrok"})," account you can ",(0,i.jsx)(n.code,{children:"zrok enable"})," multiple environments. This will allow you to run ",(0,i.jsx)(n.code,{children:"zrok share"})," in one environment, and ",(0,i.jsx)(n.code,{children:"zrok access"})," in other environments."]})}),"\n",(0,i.jsx)(n.p,{children:"Your environment is fully ready to go. Now we can move on to the fun stuff..."}),"\n",(0,i.jsx)(n.h2,{id:"sharing",children:"Sharing"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," is designed to make sharing resources as effortless as possible, while providing a high degree of security and control."]}),"\n",(0,i.jsx)(n.h3,{id:"ephemeral-by-default",children:"Ephemeral by Default"}),"\n",(0,i.jsxs)(n.p,{children:["Shared resources are ",(0,i.jsx)(n.em,{children:"ephemeral"})," by default; as soon as you terminate the ",(0,i.jsx)(n.code,{children:"zrok share"})," command, the entire share is removed and is no longer available to any users. Identifiers for shared resources are randomly allocated when the share is created."]}),"\n",(0,i.jsx)(n.h3,{id:"public-shares-and-frontends",children:"Public Shares and Frontends"}),"\n",(0,i.jsxs)(n.p,{children:["Resources that are shared ",(0,i.jsx)(n.em,{children:"publicly"})," are exposed to any users on the internet who have access to the ",(0,i.jsx)(n.code,{children:"zrok"}),' instance\'s "frontend".']}),"\n",(0,i.jsx)(n.p,{children:"A frontend is an HTTPS listener exposed to the internet, that lets any user with your ephemeral share token access your publicly shared resources."}),"\n",(0,i.jsxs)(n.p,{children:["For example, I might create a public share using the ",(0,i.jsx)(n.code,{children:"zrok share public"})," command, which results in my ",(0,i.jsx)(n.code,{children:"zrok"})," instance exposing a URL like ",(0,i.jsx)(n.code,{children:"https://2ptgbr8tlfvk.share.zrok.io"})," to access my resources."]}),"\n",(0,i.jsxs)(n.p,{children:['In this case, my share was given the "share token" of ',(0,i.jsx)(n.code,{children:"2ptgbr8tlfvk"}),". That URL can be given to any user, allowing them to immediately access the shared resources directly from my local environment, all without exposing any access to my private, secure environment. The physical network location of my environment is not exposed to anonymous consumers of my resources."]}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsxs)(n.p,{children:["Here is the ",(0,i.jsx)(n.code,{children:"--help"})," output from ",(0,i.jsx)(n.code,{children:"zrok share public"}),":"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-text",children:"zrok share public\n"})}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:'Error: accepts 1 arg(s), received 0\nUsage:\n zrok share public [flags]\n\nFlags:\n --backend-mode string The backend mode {proxy, web, caddy, drive} (default "proxy")\n --basic-auth stringArray Basic authentication users (,...)\n --frontends stringArray Selected frontends to use for the share (default [public])\n --headless Disable TUI and run headless\n -h, --help help for public\n --insecure Enable insecure TLS certificate validation for \n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n\n[ERROR]: an error occurred (accepts 1 arg(s), received 0)\n'})}),(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:""})," defines the path to the local resource that you intend to share. The form of ",(0,i.jsx)(n.code,{children:""})," depends on the ",(0,i.jsx)(n.code,{children:"--backend-mode"})," that you're using."]}),(0,i.jsxs)(n.p,{children:["In the case of ",(0,i.jsx)(n.code,{children:"--backend-mode proxy"}),", ",(0,i.jsx)(n.code,{children:""})," should be a URL to an HTTP endpoint."]}),(0,i.jsxs)(n.p,{children:["In the case of ",(0,i.jsx)(n.code,{children:"--backend-mode web"}),", ",(0,i.jsx)(n.code,{children:""}),' is the path to a file on disk that serves as the "root" of the file tree to be shared.']})]}),"\n",(0,i.jsx)(n.p,{children:"If we return to the web console, we see our share in the explorer:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Web Console Share",src:s(8517).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["If we click on our new share in the explorer, we can see the share details:\n",(0,i.jsx)(n.img,{alt:"Share Details",src:s(8404).A+"",width:"1791",height:"1369"})]}),"\n",(0,i.jsxs)(n.p,{children:["If we click on the ",(0,i.jsx)(n.em,{children:"frontend endpoint"})," a new browser tab opens and we see the content of our share:\n",(0,i.jsx)(n.img,{alt:"Share Frontend",src:s(9467).A+"",width:"1669",height:"1033"})]}),"\n",(0,i.jsx)(n.p,{children:"If we click on the environment in the explorer, we're shown all of the shares for that environment (including our new share), along with a spark line that shows the activity:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Environment Spark Line",src:s(590).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["And as soon as I terminate the ",(0,i.jsx)(n.code,{children:"zrok share"})," client, the resources are removed from the ",(0,i.jsx)(n.code,{children:"zrok"})," environment."]}),"\n",(0,i.jsx)(n.p,{children:"If we try to reload the frontend endpoint in our web browser, we'll see:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Not Found",src:s(4532).A+"",width:"1556",height:"1229"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-public",children:"More about public shares"})}),"\n",(0,i.jsx)(n.h3,{id:"private-shares",children:"Private Shares"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," also provides a powerful ",(0,i.jsx)(n.em,{children:"private"})," sharing model. If I execute the following command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example"',children:"$ zrok share private http://localhost:8080\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"zrok"})," service will respond with the following:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"access your share with: zrok access private wvszln4dyz9q\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Rather than allowing access to your service through a public frontend, a ",(0,i.jsx)(n.em,{children:"private"})," share is only exposed to the underlying OpenZiti network, and can only be accessed using the ",(0,i.jsx)(n.code,{children:"zrok access"})," command."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"zrok access private wvszln4dyz9q"})," command can be run by any ",(0,i.jsx)(n.code,{children:"zrok"})," user, allowing them to create and bind a local HTTP listener, that allows for private access to your shared resources."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-private",children:"More about private shares"})}),"\n",(0,i.jsx)(n.h3,{id:"proxy-backend-mode",children:"Proxy Backend Mode"}),"\n",(0,i.jsxs)(n.p,{children:["Without specifying a ",(0,i.jsx)(n.em,{children:"backend mode"}),", the ",(0,i.jsx)(n.code,{children:"zrok share"})," command will assume that you're trying to share a ",(0,i.jsx)(n.code,{children:"proxy"})," resource. A ",(0,i.jsx)(n.code,{children:"proxy"})," resource is usually some private HTTP/HTTPS endpoint (like a development server, or a private application) running in your local environment. Usually such an endpoint would have no inbound connectivity except for however it is reachable from your local environment. It might be running on ",(0,i.jsx)(n.code,{children:"localhost"}),", or only listening on a private LAN segment behind a firewall."]}),"\n",(0,i.jsxs)(n.p,{children:["For these services a ",(0,i.jsx)(n.code,{children:"proxy"})," share will allow those endpoints to be reached, either ",(0,i.jsx)(n.em,{children:"publicly"})," or ",(0,i.jsx)(n.em,{children:"privately"})," through the ",(0,i.jsx)(n.code,{children:"zrok"})," service."]}),"\n",(0,i.jsx)(n.h3,{id:"web-backend-mode",children:"Web Backend Mode"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"zrok share"})," command accepts a ",(0,i.jsx)(n.code,{children:"--backend-mode"})," option. Besides ",(0,i.jsx)(n.code,{children:"proxy"}),", the current ",(0,i.jsx)(n.code,{children:"v0.3"})," release (as of this writing) also supports a ",(0,i.jsx)(n.code,{children:"web"})," mode. The ",(0,i.jsx)(n.code,{children:"web"})," mode allows you to specify a local folder on your filesystem, and instantly turns your ",(0,i.jsx)(n.code,{children:"zrok"})," client into a web server, exposing your web content either ",(0,i.jsx)(n.em,{children:"publicly"})," or ",(0,i.jsx)(n.em,{children:"privately"})," without having to a configure a web server."]}),"\n",(0,i.jsx)(n.h3,{id:"reserved-shares",children:"Reserved Shares"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," shares are ",(0,i.jsx)(n.em,{children:"ephemeral"}),' unless you specifically create a "reserved" share.']}),"\n",(0,i.jsxs)(n.p,{children:["A reserved share can be re-used multiple times; it will survive termination of the ",(0,i.jsx)(n.code,{children:"zrok share"})," command, allowing for longer-lasting semi-permanent access to shared resources."]}),"\n",(0,i.jsx)(n.p,{children:"The first step is to create the reserved share:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",metastring:'title="Example"',children:"$ zrok reserve public --backend-mode web v0.3_getting_started\n[ 0.275] INFO main.(*reserveCommand).run: your reserved share token is 'mltwsinym1s2'\n[ 0.275] INFO main.(*reserveCommand).run: reserved frontend endpoint: https://mltwsinym1s2.share.zrok.io\n"})}),"\n",(0,i.jsxs)(n.p,{children:["I'm asking the ",(0,i.jsx)(n.code,{children:"zrok"})," service to reserve a share with a ",(0,i.jsx)(n.code,{children:"web"})," backend mode, pointing at my local ",(0,i.jsx)(n.code,{children:"docs"})," folder."]}),"\n",(0,i.jsxs)(n.p,{children:["You'll want to remember the share token (",(0,i.jsx)(n.code,{children:"mltwsinym1s2"})," in this case), and the frontend endpoint URL. If this were a ",(0,i.jsx)(n.em,{children:"private"})," reserved share, there would not be a frontend URL."]}),"\n",(0,i.jsx)(n.p,{children:"If we do nothing else, and then point a web browser at the frontend endpoint, we get:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Not Found",src:s(5151).A+"",width:"1556",height:"1229"})}),"\n",(0,i.jsxs)(n.p,{children:["This is the ",(0,i.jsx)(n.code,{children:"404"})," error message returned by the ",(0,i.jsx)(n.code,{children:"zrok"})," frontend. We're getting this because we haven't yet started up a ",(0,i.jsx)(n.code,{children:"zrok share"})," for the service. Let's do that:"]}),"\n",(0,i.jsx)(n.p,{children:"This command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",metastring:'title="Example"',children:"$ zrok share reserved mltwsinym1s2\n"})}),"\n",(0,i.jsx)(n.p,{children:"...results in a new share backend starting up and connecting to the existing reserved share:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zrok share reserved",src:s(1248).A+"",width:"951",height:"706"})}),"\n",(0,i.jsxs)(n.p,{children:["And now if we refresh the frontend endpoint URL in the web browser, we'll see an index of the ",(0,i.jsx)(n.code,{children:"docs"})," directory:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zrok docs share",src:s(9467).A+"",width:"1669",height:"1033"})}),"\n",(0,i.jsxs)(n.p,{children:["With the reserved share, we're free to stop and restart the ",(0,i.jsx)(n.code,{children:"zrok share reserved"})," command as many times as we want, without losing the token for our share."]}),"\n",(0,i.jsxs)(n.p,{children:["When we're done with the reserved share, we can ",(0,i.jsx)(n.em,{children:"release"})," it using this command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",metastring:'title="Example"',children:"$ zrok release mltwsinym1s2\n[ 0.230] INFO main.(*releaseCommand).run: reserved share 'mltwsinym1s2' released\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-reserved",children:"More about reserved shares"})}),"\n",(0,i.jsx)(n.h2,{id:"concepts-review",children:"Concepts Review"}),"\n",(0,i.jsxs)(n.p,{children:["In summary, ",(0,i.jsx)(n.code,{children:"zrok"})," lets you easily and securely share resources with both general internet users (through ",(0,i.jsx)(n.em,{children:"public"})," sharing) and also with other ",(0,i.jsx)(n.code,{children:"zrok"})," users (through ",(0,i.jsx)(n.em,{children:"private"})," sharing)."]}),"\n",(0,i.jsxs)(n.p,{children:["Here's a quick review of the ",(0,i.jsx)(n.code,{children:"zrok"})," mental model and the vocabulary."]}),"\n",(0,i.jsx)(n.h3,{id:"instance-and-account",children:"Instance and Account"}),"\n",(0,i.jsxs)(n.p,{children:["You create an ",(0,i.jsx)(n.em,{children:"account"})," with a ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"}),". Your account is identified by a username and a password, which you use to log into the ",(0,i.jsx)(n.em,{children:"web console"}),". Your account also has a ",(0,i.jsx)(n.em,{children:"secret token"}),", which you will use to authenticate from the ",(0,i.jsx)(n.code,{children:"zrok"})," command-line to interact with the ",(0,i.jsx)(n.em,{children:"instance"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You create a new ",(0,i.jsx)(n.em,{children:"account"})," with NetFoundry's ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"})," by subscribing in ",(0,i.jsx)(n.a,{href:"https://myzrok.io",children:"myzrok.io"})," or in a self-hosted ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"})," by running ",(0,i.jsxs)(n.a,{href:"/docs/guides/self-hosting/self-service-invite",children:["the ",(0,i.jsx)(n.code,{children:"zrok invite"})," command"]})," or the ",(0,i.jsx)(n.code,{children:"zrok admin create account"})," command."]}),"\n",(0,i.jsx)(n.h3,{id:"environment",children:"Environment"}),"\n",(0,i.jsxs)(n.p,{children:["Using your ",(0,i.jsx)(n.em,{children:"secret token"})," you use the ",(0,i.jsx)(n.code,{children:"zrok"})," command-line interface to create an ",(0,i.jsx)(n.em,{children:"environment"}),". An ",(0,i.jsx)(n.em,{children:"environment"})," corresponds to a single command-line user on a specific ",(0,i.jsx)(n.em,{children:"host system"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You create a new ",(0,i.jsx)(n.em,{children:"environment"})," by using the ",(0,i.jsx)(n.code,{children:"zrok enable"})," command."]}),"\n",(0,i.jsx)(n.h3,{id:"shares",children:"Shares"}),"\n",(0,i.jsxs)(n.p,{children:["Once you've enabled an ",(0,i.jsx)(n.em,{children:"environment"}),", you then create one or more ",(0,i.jsx)(n.em,{children:"shares"}),". Shares have either a ",(0,i.jsx)(n.em,{children:"public"})," or ",(0,i.jsx)(n.em,{children:"private"})," ",(0,i.jsx)(n.em,{children:"sharing mode"}),". ",(0,i.jsx)(n.em,{children:"Shares"})," share a specific type of resource using a ",(0,i.jsx)(n.em,{children:"backend mode"}),". As of this writing ",(0,i.jsx)(n.code,{children:"zrok"})," supports a ",(0,i.jsx)(n.code,{children:"proxy"})," ",(0,i.jsx)(n.em,{children:"backend mode"})," to share local HTTP resources as a ",(0,i.jsx)(n.em,{children:"reverse proxy"}),". ",(0,i.jsx)(n.code,{children:"zrok"})," also supports a ",(0,i.jsx)(n.code,{children:"web"})," ",(0,i.jsx)(n.em,{children:"backend mode"})," to share local file and HTML resources by enabling a basic HTTP server."]}),"\n",(0,i.jsxs)(n.p,{children:["Every ",(0,i.jsx)(n.em,{children:"share"})," is identified by a ",(0,i.jsx)(n.em,{children:"share token"}),". ",(0,i.jsx)(n.em,{children:"Public shares"})," can be accessed through either a ",(0,i.jsx)(n.em,{children:"frontend"})," instance offered through the ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"}),", or through the ",(0,i.jsx)(n.code,{children:"zrok access"})," command. ",(0,i.jsx)(n.em,{children:"Private shares"})," can only be accessed through the ",(0,i.jsx)(n.code,{children:"zrok access"})," command."]}),"\n",(0,i.jsxs)(n.p,{children:["You use the ",(0,i.jsx)(n.code,{children:"zrok share"})," command to create and enable ",(0,i.jsx)(n.em,{children:"ephemeral shares"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"reserved-shares-1",children:"Reserved Shares"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," supports creating ",(0,i.jsx)(n.em,{children:"shares"})," that have a consistent ",(0,i.jsx)(n.em,{children:"share token"})," that survives restarts of the ",(0,i.jsx)(n.code,{children:"zrok share"})," command. These are considered ",(0,i.jsx)(n.em,{children:"non-ephemeral"}),", and is callled a ",(0,i.jsx)(n.em,{children:"reserved share"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You use the ",(0,i.jsx)(n.code,{children:"zrok reserve"})," command to create ",(0,i.jsx)(n.em,{children:"reserved shares"}),". Reserved shares last until you use the ",(0,i.jsx)(n.code,{children:"zrok release"})," command to delete them."]}),"\n",(0,i.jsx)(n.h2,{id:"self-hosting-an-instance",children:"Self-Hosting an Instance"}),"\n",(0,i.jsxs)(n.p,{children:["Interested in self-hosting your own ",(0,i.jsx)(n.code,{children:"zrok"})," instance? See the ",(0,i.jsx)(n.a,{href:"/docs/category/self-hosting/",children:"self-hosting guides"}),"!"]}),"\n",(0,i.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Learn about ",(0,i.jsx)(n.a,{href:"https://openziti.io/",children:"OpenZiti"})]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(m,{...e})}):m(e)}function p(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},8151:(e,n,s)=>{s.d(n,{F:()=>a,d:()=>t});var r=s(6540),i=s(4848);const o=(0,r.createContext)([]),t=()=>(0,r.useContext)(o),a=e=>{let{children:n}=e;const[s,t]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),t(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,i.jsx)(o.Provider,{value:s,children:n})}},595:(e,n,s)=>{s.d(n,{A:()=>c});s(6540);var r=s(8151),i=s(1342),o=s(5293),t=s(4848);const a=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},c=e=>{let{osName:n,osLogo:s,infoText:c,guideLink:d}=e;const{colorMode:l}=(0,o.G)(),h=(0,r.d)();console.log("Assets in DownloadCard:",h);const u=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=h.filter((e=>e.name.includes(u)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,t.jsxs)("div",{className:i.A.downloadCard,children:[(0,t.jsx)("div",{className:i.A.imgContainer,children:(0,t.jsx)("img",{src:s,alt:`${n} logo`})}),(0,t.jsx)("h3",{children:n}),m.length>0&&(0,t.jsx)("ul",{children:m.map(((e,n)=>(0,t.jsx)("li",{className:i.A.downloadButtons,children:(0,t.jsx)("a",{href:e.url,className:i.A.downloadLinks,children:a(e.arch)})},n)))}),d&&(0,t.jsxs)("div",{className:i.A.cardFooter,children:[(0,t.jsx)("p",{children:c}),(0,t.jsx)("a",{href:d,children:"GUIDE"}),(0,t.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},5803:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_enable_modal-45da63a6907e930daaa4c798272ce5fa.png"},4532:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_not_found-fa3415937c341eb10e1eb98c9b063583.png"},5151:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_reserved_not_found-2519707e5cc3e635b7a6feb381c1d040.png"},439:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_share_public-322dc971477d3a0b97b42478ea023dd7.png"},1248:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_share_reserved-6bce67775ce2c41abb0ef13ee1fad972.png"},590:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_environment_spark-925c0709ed7a42f0a708ab0523cdeb5f.png"},8517:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_explorer_share-11236f68819da60014d5444e7429c189.png"},8404:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_share_detail-efeaa472d5e5c225a160f6d5647086b3.png"},9467:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_share_frontend-d7c0d6495493c00b94ae237339f2dc2d.png"},4387:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_ui_empty_environment_detail-153c921ade86f924079947b0f734e3ff.png"},3826:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_ui_empty_shares-048c08c18477bcabb9fa8c1b58537012.png"},6054:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_ui_new_environment-414d8e8fc25b09f257cb40ba47d6acbb.png"},6413:(e,n,s)=>{s.d(n,{A:()=>r});const r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAZCAIAAACpVwlNAAAEr2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgdGlmZjpJbWFnZUxlbmd0aD0iMjUiCiAgIHRpZmY6SW1hZ2VXaWR0aD0iMzAiCiAgIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiCiAgIHRpZmY6WFJlc29sdXRpb249Ijk2LzEiCiAgIHRpZmY6WVJlc29sdXRpb249Ijk2LzEiCiAgIGV4aWY6UGl4ZWxYRGltZW5zaW9uPSIzMCIKICAgZXhpZjpQaXhlbFlEaW1lbnNpb249IjI1IgogICBleGlmOkNvbG9yU3BhY2U9IjEiCiAgIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiCiAgIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjMtMDEtMTlUMTA6NTY6NTYtMDU6MDAiCiAgIHhtcDpNZXRhZGF0YURhdGU9IjIwMjMtMDEtMTlUMTA6NTY6NTYtMDU6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJwcm9kdWNlZCIKICAgICAgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWZmaW5pdHkgUGhvdG8gMi4wLjMiCiAgICAgIHN0RXZ0OndoZW49IjIwMjMtMDEtMTlUMTA6NTY6NTYtMDU6MDAiLz4KICAgIDwvcmRmOlNlcT4KICAgPC94bXBNTTpIaXN0b3J5PgogIDwvcmRmOkRlc2NyaXB0aW9uPgogPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KPD94cGFja2V0IGVuZD0iciI/Pq+HLHgAAAGBaUNDUHNSR0IgSUVDNjE5NjYtMi4xAAAokXWRy0tCQRSHP7UwemBQixYtJKyVRg8Q27RQyoJqYQZZbfTmI/BxuVcJaRu0FQqiNr0W9RfUNmgdBEURRNtaF7UpuZ2rghF5hjnzzW/OOcycAWs4rWT0piHIZPNaKOh3LkaWnPYXLHThwIclqujq7PxkmIb2eS/RYrces1bjuH+tbTWuK2BpER5XVC0vPCU8s55XTd4R7lZS0VXhM2G3JhcUvjP1WJVfTU5W+dtkLRwKgLVT2Jn8xbFfrKS0jLC8HFcmXVBq9zFf0h7PLszL2iezF50QQfw4mWaCAF6GGRPvxcMIg7KjQf5QJX+OnOQq4lWKaKyRJEUet6gFqR6XNSF6XEaaotn/v33VE6Mj1ertfmh+Noz3frBvQ7lkGF9HhlE+BtsTXGbr+blD8H2IXqprrgNwbML5VV2L7cLFFvQ8qlEtWpFsMq2JBLydQkcEum6gdbnas9o5Jw8Q3pCvuoa9fRiQeMfKD2DYZ+PDGzxnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABZklEQVRIie2VvW7CMBDHr1UfwE5fII7lvahIWUEiQ7qxMLEwsVQMSB0YKsTExsDGxFs0QyqlYyMVld3k4wWw/QgMlqp+JXFQGZB649n3k+9/f9sX9w+PcJq4PBH3H/0zrkrWfK99jVF5/V6qIIzqod1m485rC6nK0S5GAPArvRDNHFtINZ0vviQp4Un2OTObjIs6q6G122yMhgPfaxvuN0VbGDHHBgDm2FbVAGqgLYyEVPFmCwDB84uQilHyB2i32ej3uoySvZDT+YInGaPE77QqlSkznz5vv9cFAEbJdL4QUlkYjYYDnYnf3o9HC6mewog5ttZBq7xcrf1OK95sy61ZgQaAIIx2lGgdRsPBcrXmSbYXstLyRmPkSWZh5HdaAODe3uipVlaZmk9IxdMcAHiam3DBRJCPCMJol+bfbuMxaJ7mjJLZZFxeb2Gku6mDTrJXjExeviILFqJF8WtpGOf5y5wn+gBcXI4F9z6rgwAAAABJRU5ErkJggg=="},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>a});var r=s(6540);const i={},o=r.createContext(i);function t(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8b4ddd1a.f6e240b1.js b/assets/js/8b4ddd1a.f6e240b1.js new file mode 100644 index 00000000..91daafa4 --- /dev/null +++ b/assets/js/8b4ddd1a.f6e240b1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5955],{1770:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"guides/drives","title":"Drives","description":"The zrok drives CLI tools allow for simple, ergonomic management and synchronization of local and remote files.","source":"@site/versioned_docs/version-0.4/guides/drives.mdx","sourceDirName":"guides","slug":"/guides/drives","permalink":"/docs/guides/drives","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/drives.mdx","tags":[],"version":"0.4","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Invitations","permalink":"/docs/guides/self-hosting/self-service-invite"},"next":{"title":"VPN","permalink":"/docs/guides/vpn/"}}');var s=r(4848),o=r(8453);const t={},c="Drives",a={},d=[{value:"Sharing a Drive",id:"sharing-a-drive",level:2},{value:"Working with a Private Drive Share",id:"working-with-a-private-drive-share",level:2},{value:"Working with Public Shares",id:"working-with-public-shares",level:2},{value:"One-way Synchronization",id:"one-way-synchronization",level:2},{value:"Drive-to-Drive Copies and Synchronization",id:"drive-to-drive-copies-and-synchronization",level:2},{value:"Copying from Drives to the Local Filesystem",id:"copying-from-drives-to-the-local-filesystem",level:2},{value:"Unique Names and Reserved Shares",id:"unique-names-and-reserved-shares",level:2},{value:"Future Enhancements",id:"future-enhancements",level:2}];function l(e){const n={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"drives",children:"Drives"})}),"\n",(0,s.jsx)(n.p,{children:"The zrok drives CLI tools allow for simple, ergonomic management and synchronization of local and remote files."}),"\n",(0,s.jsx)(n.h2,{id:"sharing-a-drive",children:"Sharing a Drive"}),"\n",(0,s.jsxs)(n.p,{children:["Virtual drives are shared through the ",(0,s.jsx)(n.code,{children:"zrok"})," CLI using the ",(0,s.jsx)(n.code,{children:"--backend-mode drive"})," flag through the ",(0,s.jsx)(n.code,{children:"zrok share"})," command, using either the ",(0,s.jsx)(n.code,{children:"public"})," or ",(0,s.jsx)(n.code,{children:"private"})," sharing modes. We'll use the ",(0,s.jsx)(n.code,{children:"private"})," sharing mode for this example:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ mkdir /tmp/junk\n$ zrok share private --headless --backend-mode drive /tmp/junk\n[ 0.124] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[cf640aac-2706-49ae-9cc9-9a497d67d9c5]} new service session\n[ 0.145] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command:\nzrok access private wkcfb58vj51l\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The command shown above creates an ephemeral, ",(0,s.jsx)(n.code,{children:"private"})," drive share pointed at the local ",(0,s.jsx)(n.code,{children:"/tmp/junk"})," folder."]}),"\n",(0,s.jsxs)(n.p,{children:["Notice that the share token allocated by ",(0,s.jsx)(n.code,{children:"zrok"})," is ",(0,s.jsx)(n.code,{children:"wkcfb58vj51l"}),". We'll use that share token to identify our virtual drive in the following operations."]}),"\n",(0,s.jsx)(n.h2,{id:"working-with-a-private-drive-share",children:"Working with a Private Drive Share"}),"\n",(0,s.jsxs)(n.p,{children:["First, let's copy a file into our virtual drive using the ",(0,s.jsx)(n.code,{children:"zrok copy"})," command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy LICENSE zrok://wkcfb58vj51l\n[ 0.119] INFO zrok/drives/sync.OneWay: => /LICENSE\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["We used the URL scheme ",(0,s.jsx)(n.code,{children:"zrok://"})," to refer to the private virtual drive we allocated above using the ",(0,s.jsx)(n.code,{children:"zrok share private"})," command. Use ",(0,s.jsx)(n.code,{children:"zrok://"})," URLs with the drives CLI tools to refer to contents of private virtual drives."]}),"\n",(0,s.jsx)(n.p,{children:"Next, let's get a directory listing of the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2024-01-19 12:16:46 -0500 EST \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.p,{children:"We can make directories on the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok mkdir zrok://wkcfb58vj51l/stuff\n$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2024-01-19 12:16:46 -0500 EST \u2502\n\u2502 DIR \u2502 stuff \u2502 \u2502 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.p,{children:"We can copy the contents of a local directory into the new directory on the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ ls -l util/\ntotal 20\n-rw-rw-r-- 1 michael michael 329 Jul 21 13:17 email.go\n-rw-rw-r-- 1 michael michael 456 Jul 21 13:17 headers.go\n-rw-rw-r-- 1 michael michael 609 Jul 21 13:17 proxy.go\n-rw-rw-r-- 1 michael michael 361 Jul 21 13:17 size.go\n-rw-rw-r-- 1 michael michael 423 Jan 2 11:57 uniqueName.go\n$ zrok copy util/ zrok://wkcfb58vj51l/stuff\n[ 0.123] INFO zrok/drives/sync.OneWay: => /email.go\n[ 0.194] INFO zrok/drives/sync.OneWay: => /headers.go\n[ 0.267] INFO zrok/drives/sync.OneWay: => /proxy.go\n[ 0.337] INFO zrok/drives/sync.OneWay: => /size.go\n[ 0.408] INFO zrok/drives/sync.OneWay: => /uniqueName.go\ncopy complete!\n$ zrok ls zrok://wkcfb58vj51l/stuff\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 email.go \u2502 329 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 headers.go \u2502 456 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 proxy.go \u2502 609 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 size.go \u2502 361 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2502 \u2502 uniqueName.go \u2502 423 B \u2502 2024-01-19 12:26:45 -0500 EST \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.p,{children:"And we can remove files and directories from the virtual drive:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok rm zrok://wkcfb58vj51l/LICENSE\n$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 DIR \u2502 stuff \u2502 \u2502 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n$ zrok rm zrok://wkcfb58vj51l/stuff\n$ zrok ls zrok://wkcfb58vj51l\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.h2,{id:"working-with-public-shares",children:"Working with Public Shares"}),"\n",(0,s.jsx)(n.p,{children:"Public shares work very similarly to private shares, they just use a different URL scheme:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok share public --headless --backend-mode drive /tmp/junk\n[ 0.708] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[05e0f48b-242b-4fd9-8edb-259488535c47]} new service session\n[ 0.878] INFO main.(*sharePublicCommand).run: access your zrok share at the following endpoints:\n https://6kiww4bn7iok.share.zrok.io\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The same commands, with a different URL scheme work with the ",(0,s.jsx)(n.code,{children:"zrok"})," drives CLI:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy util/ https://6kiww4bn7iok.share.zrok.io\n[ 0.268] INFO zrok/drives/sync.OneWay: => /email.go\n[ 0.406] INFO zrok/drives/sync.OneWay: => /headers.go\n[ 0.530] INFO zrok/drives/sync.OneWay: => /proxy.go\n[ 0.655] INFO zrok/drives/sync.OneWay: => /size.go\n[ 0.714] INFO zrok/drives/sync.OneWay: => /uniqueName.go\ncopy complete!\nmichael@fourtyfour Fri Jan 19 12:42:52 ~/Repos/nf/zrok \n$ zrok ls https://6kiww4bn7iok.share.zrok.io\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 email.go \u2502 329 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 headers.go \u2502 456 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 proxy.go \u2502 609 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 size.go \u2502 361 B \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2502 \u2502 uniqueName.go \u2502 423 B \u2502 2024-01-02 11:57:14 -0500 EST \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsxs)(n.p,{children:["For basic authentication provided by public shares, the ",(0,s.jsx)(n.code,{children:"zrok"})," drives CLI offers the ",(0,s.jsx)(n.code,{children:"--basic-auth"})," flag, which accepts a ",(0,s.jsx)(n.code,{children:":"})," parameter to specify the authentication for the public virtual drive (if it's required)."]}),"\n",(0,s.jsxs)(n.p,{children:["Alternatively, the authentication can be set using the ",(0,s.jsx)(n.code,{children:"ZROK_DRIVES_BASIC_AUTH"})," environment variable:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ export ZROK_DRIVES_BASIC_AUTH=username:password\n"})}),"\n",(0,s.jsx)(n.h2,{id:"one-way-synchronization",children:"One-way Synchronization"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok copy"})," command includes a ",(0,s.jsx)(n.code,{children:"--sync"})," flag, which only copies files detected as ",(0,s.jsx)(n.em,{children:"modified"}),". ",(0,s.jsx)(n.code,{children:"zrok"})," considers a file with the same modification timestamp and size to be the same. Of course, this is not a strong guarantee that the files are equivalent. Future ",(0,s.jsx)(n.code,{children:"zrok"})," drives versions will provide a cryptographically strong mechanism (a-la ",(0,s.jsx)(n.code,{children:"rsync"})," and friends) to guarantee that files and trees of files are synchronized."]}),"\n",(0,s.jsxs)(n.p,{children:["For now, the ",(0,s.jsx)(n.code,{children:"--sync"})," flag provides a convenience mechanism to allow resuming copies of large file trees and provide a reasonable guarantee that the trees are in sync."]}),"\n",(0,s.jsxs)(n.p,{children:["Let's take a look at ",(0,s.jsx)(n.code,{children:"zrok copy --sync"})," in action:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync docs/ https://glmv049c62p7.share.zrok.io\n[ 0.636] INFO zrok/drives/sync.OneWay: => /_attic/\n[ 0.760] INFO zrok/drives/sync.OneWay: => /_attic/network/\n[ 0.816] INFO zrok/drives/sync.OneWay: => /_attic/network/_category_.json\n[ 0.928] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/\n[ 0.987] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-ctrl.service\n[ 1.048] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-ctrl.yml\n[ 1.107] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-router0.service\n[ 1.167] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/ziti-router0.yml\n[ 1.218] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok-access-public.service\n[ 1.273] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok-ctrl.service\n[ 1.328] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok-ctrl.yml\n[ 1.382] INFO zrok/drives/sync.OneWay: => /_attic/network/prod/zrok.io-network-skeleton.md\n[ 1.447] INFO zrok/drives/sync.OneWay: => /_attic/overview.md\n[ 1.572] INFO zrok/drives/sync.OneWay: => /_attic/sharing/\n[ 1.622] INFO zrok/drives/sync.OneWay: => /_attic/sharing/_category_.json\n[ 1.673] INFO zrok/drives/sync.OneWay: => /_attic/sharing/reserved_services.md\n[ 1.737] INFO zrok/drives/sync.OneWay: => /_attic/sharing/sharing_modes.md\n[ 1.793] INFO zrok/drives/sync.OneWay: => /_attic/v0.2_account_requests.md\n[ 1.902] INFO zrok/drives/sync.OneWay: => /_attic/v0.4_limits.md\n...\n[ 9.691] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_empty_shares.png\n[ 9.812] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_new_environment.png\n[ 9.870] INFO zrok/drives/sync.OneWay: => /images/zrok_zoom_to_fit.png\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Because the target drive was empty, ",(0,s.jsx)(n.code,{children:"zrok copy --sync"})," copied the entire contents of the local ",(0,s.jsx)(n.code,{children:"docs/"})," tree into the virtual drive. However, if we run that command again, we get:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync docs/ https://glmv049c62p7.share.zrok.io\ncopy complete!\n"})}),"\n",(0,s.jsx)(n.p,{children:"The virtual drive contents are already in sync with the local filesystem tree, so there is nothing for it to copy."}),"\n",(0,s.jsxs)(n.p,{children:["Let's alter the contents of the drive and run the ",(0,s.jsx)(n.code,{children:"--sync"})," again:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok rm https://glmv049c62p7.share.zrok.io/images\n$ zrok copy --sync docs/ https://glmv049c62p7.share.zrok.io\n[ 0.364] INFO zrok/drives/sync.OneWay: => /images/\n[ 0.456] INFO zrok/drives/sync.OneWay: => /images/zrok.png\n[ 0.795] INFO zrok/drives/sync.OneWay: => /images/zrok_cover.png\n[ 0.866] INFO zrok/drives/sync.OneWay: => /images/zrok_deployment.drawio\n...\n[ 2.254] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_empty_shares.png\n[ 2.340] INFO zrok/drives/sync.OneWay: => /images/zrok_web_ui_new_environment.png\n[ 2.391] INFO zrok/drives/sync.OneWay: => /images/zrok_zoom_to_fit.png\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Because we removed the ",(0,s.jsx)(n.code,{children:"images/"})," tree from the virtual drive, ",(0,s.jsx)(n.code,{children:"zrok copy --sync"})," detected this and copied the local ",(0,s.jsx)(n.code,{children:"images/"})," tree back onto the virtual drive."]}),"\n",(0,s.jsx)(n.h2,{id:"drive-to-drive-copies-and-synchronization",children:"Drive-to-Drive Copies and Synchronization"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok copy"})," CLI can operate on pairs of virtual drives remotely, without ever having to store files locally. This allow for drive-to-drive copies and synchronization."]}),"\n",(0,s.jsx)(n.p,{children:"Here are a couple of examples:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync https://glmv049c62p7.share.zrok.io https://glmv049c62p7.share.zrok.io\ncopy complete!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Specifying the same URL for both the source and the target of a ",(0,s.jsx)(n.code,{children:"--sync"})," operation should always result in nothing being copied... they are the same drive with the same state."]}),"\n",(0,s.jsx)(n.p,{children:"We can copy files between two virtual drives with a single command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy --sync https://glmv049c62p7.share.zrok.io zrok://hsml272j3xzf\n[ 1.396] INFO zrok/drives/sync.OneWay: => /_attic/\n[ 2.083] INFO zrok/drives/sync.OneWay: => /_attic/overview.md\n[ 2.704] INFO zrok/drives/sync.OneWay: => /_attic/sharing/\n...\n[ 118.240] INFO zrok/drives/sync.OneWay: => /images/zrok_web_console_empty.png\n[ 118.920] INFO zrok/drives/sync.OneWay: => /images/zrok_enable_modal.png\n[ 119.589] INFO zrok/drives/sync.OneWay: => /images/zrok_cover.png\n[ 120.214] INFO zrok/drives/sync.OneWay: => /getting-started.mdx\ncopy complete!\n$ zrok copy --sync https://glmv049c62p7.share.zrok.io zrok://hsml272j3xzf\ncopy complete!\n"})}),"\n",(0,s.jsx)(n.h2,{id:"copying-from-drives-to-the-local-filesystem",children:"Copying from Drives to the Local Filesystem"}),"\n",(0,s.jsxs)(n.p,{children:["In the current version of the drives CLI, ",(0,s.jsx)(n.code,{children:"zrok copy"})," always assumes the destination is a directory. There is currently no way to do:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy somefile someotherfile\n"})}),"\n",(0,s.jsx)(n.p,{children:"What you'll end up with on the local filesystem is:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"somefile\nsomeotherfile/somefile\n"})}),"\n",(0,s.jsxs)(n.p,{children:["It's in the backlog to support file destinations in a future release of ",(0,s.jsx)(n.code,{children:"zrok"}),". So, when using ",(0,s.jsx)(n.code,{children:"zrok copy"}),", always take note of the destination."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"zrok copy"})," supports a default destination of ",(0,s.jsx)(n.code,{children:"file://."}),", so you can do single parameter ",(0,s.jsx)(n.code,{children:"zrok copy"})," commands like this:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok ls https://azc47r3cwjds.share.zrok.io\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n$ zrok copy https://azc47r3cwjds.share.zrok.io/LICENSE\n[ 0.260] INFO zrok/drives/sync.OneWay: => /LICENSE\ncopy complete!\n$ ls -l\ntotal 12\n-rw-rw-r-- 1 michael michael 11346 Jan 19 13:29 LICENSE\n"})}),"\n",(0,s.jsx)(n.p,{children:"You can also specify a local folder as the destination for your copy:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok copy https://azc47r3cwjds.share.zrok.io/LICENSE /tmp/inbox\n[ 0.221] INFO zrok/drives/sync.OneWay: => /LICENSE\ncopy complete! \n$ l /tmp/inbox\ntotal 12\n-rw-rw-r-- 1 michael michael 11346 Jan 19 13:30 LICENSE\n"})}),"\n",(0,s.jsx)(n.h2,{id:"unique-names-and-reserved-shares",children:"Unique Names and Reserved Shares"}),"\n",(0,s.jsx)(n.p,{children:"Private reserved shares with unque names can be particularly useful with the drives CLI:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok reserve private -b drive --unique-name mydrive /tmp/junk\n[ 0.315] INFO main.(*reserveCommand).run: your reserved share token is 'mydrive'\n$ zrok share reserved --headless mydrive\n[ 0.289] INFO main.(*shareReservedCommand).run: sharing target: '/tmp/junk'\n[ 0.289] INFO main.(*shareReservedCommand).run: using existing backend target: /tmp/junk\n[ 0.767] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[d519a436-9fb5-4207-afd5-7cbc28fb779a]} new service session\n[ 0.927] INFO main.(*shareReservedCommand).run: use this command to access your zrok share: 'zrok access private mydrive'\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This makes working with ",(0,s.jsx)(n.code,{children:"zrok://"})," URLs particularly convenient:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ zrok ls zrok://mydrive\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 TYPE \u2502 NAME \u2502 SIZE \u2502 MODIFIED \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 LICENSE \u2502 11.3 kB \u2502 2023-07-21 13:17:56 -0400 EDT \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,s.jsx)(n.h2,{id:"future-enhancements",children:"Future Enhancements"}),"\n",(0,s.jsxs)(n.p,{children:["Coming in a future release of ",(0,s.jsx)(n.code,{children:"zrok"})," drives are features like:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:'two-way synchronization between multiple hosts... allowing for shared "dropbox-like" usage scenarios between multiple environments'}),"\n",(0,s.jsx)(n.li,{children:"better ergonomics for single-file destinations"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>c});var i=r(6540);const s={},o=i.createContext(s);function t(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8dbf8f84.bc41e705.js b/assets/js/8dbf8f84.bc41e705.js new file mode 100644 index 00000000..77545247 --- /dev/null +++ b/assets/js/8dbf8f84.bc41e705.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5117],{9754:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"guides/self-hosting/metrics-and-limits/configuring-limits","title":"Configuring Limits","description":"This guide is current as of zrok version v0.4.31.","source":"@site/versioned_docs/version-0.4/guides/self-hosting/metrics-and-limits/configuring-limits.md","sourceDirName":"guides/self-hosting/metrics-and-limits","slug":"/guides/self-hosting/metrics-and-limits/configuring-limits","permalink":"/docs/guides/self-hosting/metrics-and-limits/configuring-limits","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/metrics-and-limits/configuring-limits.md","tags":[],"version":"0.4","sidebarPosition":40,"frontMatter":{"sidebar_position":40},"sidebar":"tutorialSidebar","previous":{"title":"Configuring Metrics","permalink":"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics"},"next":{"title":"OAuth","permalink":"/docs/category/oauth"}}');var s=n(4848),a=n(8453);const r={sidebar_position:40},l="Configuring Limits",o={},c=[{value:"Understanding the zrok Limits Agent",id:"understanding-the-zrok-limits-agent",level:2},{value:"Types of Limits",id:"types-of-limits",level:3},{value:"The Global Configuration",id:"the-global-configuration",level:2},{value:"Global Resouce Count Limits",id:"global-resouce-count-limits",level:3},{value:"Global Bandwidth Limits",id:"global-bandwidth-limits",level:3},{value:"Limit Classes",id:"limit-classes",level:2},{value:"Unscoped Resource Count Classes",id:"unscoped-resource-count-classes",level:3},{value:"Unscoped Bandwidth Classes",id:"unscoped-bandwidth-classes",level:3},{value:"Scoped Classes",id:"scoped-classes",level:3},{value:"Limit Actions",id:"limit-actions",level:2},{value:"Unlimited Accounts",id:"unlimited-accounts",level:2},{value:"Experimental Limits Locking",id:"experimental-limits-locking",level:2},{value:"Caveats",id:"caveats",level:2},{value:"Aggregate Bandwidth",id:"aggregate-bandwidth",level:3},{value:"Administration Through SQL",id:"administration-through-sql",level:3},{value:"Performance",id:"performance",level:3}];function d(e){const i={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.header,{children:(0,s.jsx)(i.h1,{id:"configuring-limits",children:"Configuring Limits"})}),"\n",(0,s.jsx)(i.admonition,{type:"note",children:(0,s.jsxs)(i.p,{children:["This guide is current as of zrok version ",(0,s.jsx)(i.code,{children:"v0.4.31"}),"."]})}),"\n",(0,s.jsx)(i.admonition,{type:"warning",children:(0,s.jsxs)(i.p,{children:["If you have not yet configured ",(0,s.jsx)(i.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics",children:"metrics"}),", please visit the ",(0,s.jsx)(i.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics",children:"metrics guide"})," first before working through the limits configuration."]})}),"\n",(0,s.jsx)(i.h2,{id:"understanding-the-zrok-limits-agent",children:"Understanding the zrok Limits Agent"}),"\n",(0,s.jsx)(i.p,{children:"The limits agent is a component of the zrok controller. It can be enabled and configured through the zrok controller configuration."}),"\n",(0,s.jsx)(i.p,{children:"The limits agent is responsible for controlling the number of resources in use (environments, shares, etc.) and also for ensuring that accounts are held below the configured data transfer bandwidth thresholds. The limits agent exists to manage resource consumption for larger, multi-user zrok installations."}),"\n",(0,s.jsx)(i.h3,{id:"types-of-limits",children:"Types of Limits"}),"\n",(0,s.jsxs)(i.p,{children:["Limits can be specified that control the number of environments, shares, reserved shares, unique names, and frontends per-share that can be created by an account. Limits that control the allowed number of resources are called ",(0,s.jsx)(i.em,{children:"resource count limits"}),"."]}),"\n",(0,s.jsxs)(i.p,{children:["Limits can be specified to control the amount of data that can be transferred within a time period. Limits that control the amount of data that can be transferred are called ",(0,s.jsx)(i.em,{children:"bandwidth limits"}),"."]}),"\n",(0,s.jsxs)(i.p,{children:["zrok limits can be specified ",(0,s.jsx)(i.em,{children:"globally"}),", applying to all users in a service instance. Limit ",(0,s.jsx)(i.em,{children:"classes"})," can be created to provide additional levels of resource allocation. Limit classes can then be ",(0,s.jsx)(i.em,{children:"applied"})," to multiple accounts, to alter their limit allocation beyond what's configured in the global configuration."]}),"\n",(0,s.jsx)(i.h2,{id:"the-global-configuration",children:"The Global Configuration"}),"\n",(0,s.jsxs)(i.p,{children:["The reference configuration for the zrok controller (found at ",(0,s.jsx)(i.a,{href:"https://github.com/openziti/zrok/blob/main/etc/ctrl.yml",children:(0,s.jsx)(i.code,{children:"etc/ctrl.yaml"})})," in the ",(0,s.jsx)(i.a,{href:"https://github.com/openziti/zrok",children:"repository"}),") contains the global limits configuration, which looks like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-yaml",children:"# Service instance limits global configuration.\n#\n# See `docs/guides/metrics-and-limits/configuring-limits.md` for details.\n#\nlimits:\n environments: -1\n shares: -1\n reserved_shares: -1\n unique_names: -1\n share_frontends: -1\n bandwidth:\n period: 5m\n warning:\n rx: -1\n tx: -1\n total: 7242880\n limit:\n rx: -1\n tx: -1\n total: 10485760\n enforcing: false\n cycle: 5m\n"})}),"\n",(0,s.jsx)(i.admonition,{type:"note",children:(0,s.jsxs)(i.p,{children:["A value of ",(0,s.jsx)(i.code,{children:"-1"})," appearing in the limits configuration mean the value is ",(0,s.jsx)(i.em,{children:"unlimited"}),"."]})}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"enforcing"})," boolean specifies whether or not limits are enabled in the service instance. By default, limits is disabled. No matter what else is configured in this stanza, if ",(0,s.jsx)(i.code,{children:"enforcing"})," is set to ",(0,s.jsx)(i.code,{children:"false"}),", there will be no limits placed on any account in the service instance."]}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"cycle"}),' value controls how frequently the limits agent will evaluate enforced limits. When a user exceeds a limit and has their shares disabled, the limits agent will evaluate their bandwidth usage on this interval looking to "relax" the limit once their usage falls below the threshold.']}),"\n",(0,s.jsx)(i.h3,{id:"global-resouce-count-limits",children:"Global Resouce Count Limits"}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"environments"}),", ",(0,s.jsx)(i.code,{children:"shares"}),", ",(0,s.jsx)(i.code,{children:"reserved_shares"}),", ",(0,s.jsx)(i.code,{children:"unique_names"}),", and ",(0,s.jsx)(i.code,{children:"share_frontends"})," specify the resource count limits, globally for the service instance."]}),"\n",(0,s.jsx)(i.p,{children:"These resource counts will be applied to all users in the service instance by default."}),"\n",(0,s.jsx)(i.h3,{id:"global-bandwidth-limits",children:"Global Bandwidth Limits"}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"bandwidth"})," section defines the global bandwidth limits for all users in the service instance."]}),"\n",(0,s.jsxs)(i.p,{children:["There are two levels of bandwidth limits that can be specified in the global configuration. The first limit defines a ",(0,s.jsx)(i.em,{children:"warning"})," threshold where the user will receive an email that they are using increased data transfer amounts and will ultimately be subject to a limit. If you do not want this warning email to be sent, then configure all of the values to ",(0,s.jsx)(i.code,{children:"-1"})," (unlimited)."]}),"\n",(0,s.jsxs)(i.p,{children:["The second limit defines the the actual ",(0,s.jsx)(i.em,{children:"limit"})," threshold, where the limits agent will disabled traffic for the account's shares."]}),"\n",(0,s.jsxs)(i.p,{children:["Bandwidth limits can be specified in terms of ",(0,s.jsx)(i.code,{children:"tx"})," (or ",(0,s.jsx)(i.em,{children:"transmitted"})," data), ",(0,s.jsx)(i.code,{children:"rx"})," (or ",(0,s.jsx)(i.em,{children:"received"})," data), and the ",(0,s.jsx)(i.code,{children:"total"})," bytes that are sent in either direction. If you only want to set the ",(0,s.jsx)(i.code,{children:"total"})," transferred limit, you can set ",(0,s.jsx)(i.code,{children:"rx"})," and ",(0,s.jsx)(i.code,{children:"tx"})," to ",(0,s.jsx)(i.code,{children:"-1"})," (for ",(0,s.jsx)(i.em,{children:"unlimited"}),"). You can configure any combination of these these values at either the limit or warning levels."]}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"period"})," specifies the time window for the bandwidth limit. See the documentation for ",(0,s.jsx)(i.a,{href:"https://pkg.go.dev/time#ParseDuration",children:(0,s.jsx)(i.code,{children:"time.Duration.ParseDuration"})})," for details about the format used for these durations. If the ",(0,s.jsx)(i.code,{children:"period"})," is set to 5 minutes, then the limits agent will monitor the transmitted and receivde traffic for the account for the last 5 minutes, and if the amount of data is greater than either the ",(0,s.jsx)(i.code,{children:"warning"})," or the ",(0,s.jsx)(i.code,{children:"limit"})," threshold, action will be taken."]}),"\n",(0,s.jsxs)(i.p,{children:["In the global configuration example above users are allowed to transfer a total of ",(0,s.jsx)(i.code,{children:"10485760"})," bytes in a ",(0,s.jsx)(i.code,{children:"5m"})," period, and they will receive a warning email after they transfer more than ",(0,s.jsx)(i.code,{children:"7242880"})," bytes in a ",(0,s.jsx)(i.code,{children:"5m"})," period."]}),"\n",(0,s.jsx)(i.h2,{id:"limit-classes",children:"Limit Classes"}),"\n",(0,s.jsxs)(i.p,{children:["The zrok limits agent includes a concept called ",(0,s.jsx)(i.em,{children:"limit classes"}),". Limit classes can be used to define resource count and bandwidth limits that can be selectively applied to individual accounts in a service instance."]}),"\n",(0,s.jsxs)(i.p,{children:["Limit classes are created by creating a record in the ",(0,s.jsx)(i.code,{children:"limit_classes"})," table in the zrok controller database. The table has this schema:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"CREATE TABLE public.limit_classes (\n id integer NOT NULL,\n label VARCHAR(32),\n backend_mode public.backend_mode,\n environments integer DEFAULT '-1'::integer NOT NULL,\n shares integer DEFAULT '-1'::integer NOT NULL,\n reserved_shares integer DEFAULT '-1'::integer NOT NULL,\n unique_names integer DEFAULT '-1'::integer NOT NULL,\n share_frontends integer DEFAULT '-1'::integer NOT NULL,\n period_minutes integer DEFAULT 1440 NOT NULL,\n rx_bytes bigint DEFAULT '-1'::integer NOT NULL,\n tx_bytes bigint DEFAULT '-1'::integer NOT NULL,\n total_bytes bigint DEFAULT '-1'::integer NOT NULL,\n limit_action public.limit_action DEFAULT 'limit'::public.limit_action NOT NULL,\n created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n deleted boolean DEFAULT false NOT NULL\n);\n\n"})}),"\n",(0,s.jsx)(i.p,{children:"This schema supports constructing the 3 different types of limits classes that the system supports."}),"\n",(0,s.jsxs)(i.p,{children:["After defining a limit class in the database, it can be applied to specific user accounts (overriding the relevant parts of the global configuration) by inserting a row into the ",(0,s.jsx)(i.code,{children:"applied_limit_classes"})," table:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"CREATE TABLE public.applied_limit_classes (\n id integer NOT NULL,\n account_id integer NOT NULL,\n limit_class_id integer NOT NULL,\n created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n deleted boolean DEFAULT false NOT NULL\n);\n"})}),"\n",(0,s.jsxs)(i.p,{children:["Create a row in this table linking the ",(0,s.jsx)(i.code,{children:"account_id"})," to the ",(0,s.jsx)(i.code,{children:"limit_class_id"})," to apply the limit class to a specific user account."]}),"\n",(0,s.jsx)(i.h3,{id:"unscoped-resource-count-classes",children:"Unscoped Resource Count Classes"}),"\n",(0,s.jsxs)(i.p,{children:["To support overriding the resource count limits defined in the global limits configuration, a site administrator can create a limit class by inserting a row into the ",(0,s.jsx)(i.code,{children:"limit_classes"})," table structured like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"insert into limit_classes (environments, shares, reserved_shares, unique_names, share_frontends) values (1, 1, 1, 1, 1);\n"})}),"\n",(0,s.jsxs)(i.p,{children:["This creates a limit class that sets the ",(0,s.jsx)(i.code,{children:"environments"}),", ",(0,s.jsx)(i.code,{children:"shares"}),", ",(0,s.jsx)(i.code,{children:"reserved_shares"}),", and ",(0,s.jsx)(i.code,{children:"unique_names"})," all to ",(0,s.jsx)(i.code,{children:"1"}),"."]}),"\n",(0,s.jsx)(i.p,{children:"When this limit class is applied to a user account those values would override the default resource count values configured globally."}),"\n",(0,s.jsxs)(i.p,{children:["Applying an unscoped resource count class ",(0,s.jsx)(i.em,{children:"does not"})," affect the bandwidth limits (either globally configured, or via a limit class)."]}),"\n",(0,s.jsx)(i.h3,{id:"unscoped-bandwidth-classes",children:"Unscoped Bandwidth Classes"}),"\n",(0,s.jsxs)(i.p,{children:["To support overriding the bandwidth limits defined in the global configuration, a site administrator can create a limit class by inserting a row into the ",(0,s.jsx)(i.code,{children:"limit_classes"})," table structured like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"insert into limit_classes (period_minutes, total_bytes, limit_action) values (2, 204800, 'limit');\n"})}),"\n",(0,s.jsxs)(i.p,{children:["This inserts a limit class that allows for a total bandwidth transfer of ",(0,s.jsx)(i.code,{children:"204800"})," bytes every ",(0,s.jsx)(i.code,{children:"2"})," minutes."]}),"\n",(0,s.jsx)(i.p,{children:"When this limit class is applied to a user account, those values would override the default bandwidth values configured globally."}),"\n",(0,s.jsxs)(i.p,{children:["Applying an unscoped bandwidth class ",(0,s.jsx)(i.em,{children:"does not"})," affect the resource count limits (either globally configured, or via a limit class)."]}),"\n",(0,s.jsx)(i.h3,{id:"scoped-classes",children:"Scoped Classes"}),"\n",(0,s.jsxs)(i.p,{children:["A scoped limit class specifies ",(0,s.jsx)(i.em,{children:"both"})," the resource counts (",(0,s.jsx)(i.code,{children:"shares"}),", ",(0,s.jsx)(i.code,{children:"reserved_shares"}),", and ",(0,s.jsx)(i.code,{children:"unique_names"}),", but ",(0,s.jsx)(i.em,{children:"NOT"})," ",(0,s.jsx)(i.code,{children:"environments"}),") for a ",(0,s.jsx)(i.em,{children:"specific"})," backend mode. Insert a row like this:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-sql",children:"insert into limit_classes (backend_mode, shares, reserved_shares, unique_names, period_minutes, total_bytes, limit_action) values ('web', 2, 1, 1, 2, 4096000, 'limit');\n"})}),"\n",(0,s.jsxs)(i.p,{children:["Scoped limits are designed to ",(0,s.jsx)(i.em,{children:"increase"})," the limits for a specific backend mode beyond what the global configuration and the unscoped classes provide. The general approach is to use the global configuration and the unscoped classes to provide the general account limits, and then the scoped classes can be used to further increase (or potentially ",(0,s.jsx)(i.em,{children:"decrease"}),") the limits for a specific backend mode."]}),"\n",(0,s.jsx)(i.p,{children:"If a scoped limit class exists for a specific backend mode, then the limits agent will use that limit in making a decision about limiting the resource count or bandwidth. All other types of shares will fall back to the unscoped classes or the global configuration."}),"\n",(0,s.jsx)(i.h2,{id:"limit-actions",children:"Limit Actions"}),"\n",(0,s.jsx)(i.p,{children:"When an account exceeds a bandwidth limit, the limits agent will seek to limit the affected shares (based on the combination of global configuration, unscoped limit classes, and scoped limit classes). It applies the limit by removing the underlying OpenZiti dial policies for any frontends that are trying to access the share."}),"\n",(0,s.jsxs)(i.p,{children:["This means that public frontends will simply return a ",(0,s.jsx)(i.code,{children:"404"})," as if the share is no longer there. Private frontends will also return ",(0,s.jsx)(i.code,{children:"404"})," errors. When the limit is relaxed, the dial policies are put back in place and the share will continue operating normally."]}),"\n",(0,s.jsx)(i.h2,{id:"unlimited-accounts",children:"Unlimited Accounts"}),"\n",(0,s.jsxs)(i.p,{children:["The ",(0,s.jsx)(i.code,{children:"accounts"})," table in the database includes a ",(0,s.jsx)(i.code,{children:"limitless"})," column. When this column is set to ",(0,s.jsx)(i.code,{children:"true"})," the account is not subject to any of the limits in the system."]}),"\n",(0,s.jsx)(i.h2,{id:"experimental-limits-locking",children:"Experimental Limits Locking"}),"\n",(0,s.jsxs)(i.p,{children:["zrok versions prior to ",(0,s.jsx)(i.code,{children:"v0.4.31"})," had a potential race condition when enforcing resource count limits. This usually only manifested in cases where shares or environments were being allocated programmatically (and fast enough to win the limits race)."]}),"\n",(0,s.jsxs)(i.p,{children:["This occurs due to a lack of transactional database locking around the limited structures. ",(0,s.jsx)(i.code,{children:"v0.4.31"})," includes a pessimistic locking facility that can be enabled ",(0,s.jsx)(i.em,{children:"only"})," on the PostgreSQL store implemention."]}),"\n",(0,s.jsxs)(i.p,{children:["If you're running PostgreSQL for your service instance and you want to enable the new experimental locking facility that eliminates the potential resource count race condition, add the ",(0,s.jsx)(i.code,{children:"enable_locking: true"})," flag to your ",(0,s.jsx)(i.code,{children:"store"})," definition:"]}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-yaml",children:"store:\n enable_locking: true\n"})}),"\n",(0,s.jsx)(i.h2,{id:"caveats",children:"Caveats"}),"\n",(0,s.jsx)(i.p,{children:"There are a number of caveats that are important to understand when using the limits agent with more complicated limits scenarios:"}),"\n",(0,s.jsx)(i.h3,{id:"aggregate-bandwidth",children:"Aggregate Bandwidth"}),"\n",(0,s.jsx)(i.p,{children:"The zrok limits agent is a work in progress. The system currently does not track bandwidth individually for each backend mode type, which means all bandwidth values are aggregated between all of the share types that an account might be using. This will likely change in an upcoming release."}),"\n",(0,s.jsx)(i.h3,{id:"administration-through-sql",children:"Administration Through SQL"}),"\n",(0,s.jsx)(i.p,{children:"There are currently no administrative API endpoints (or corresponding CLI tools) to support creating and applying limit classes in the current release. The limits agent infrastructure was designed to support software integrations that directly manipulate the underlying database structures."}),"\n",(0,s.jsx)(i.p,{children:"A future release may provide API and CLI tooling to support the human administration of the limits agent."}),"\n",(0,s.jsx)(i.h3,{id:"performance",children:"Performance"}),"\n",(0,s.jsxs)(i.p,{children:["Be sure to minimize the number of different periods used for specifying bandwidth limits. Specifying limits in multiple different periods can cause a multiplicity of queries to be executed against the metrics store (InfluxDB). Standardizing on a period like ",(0,s.jsx)(i.code,{children:"24h"})," or ",(0,s.jsx)(i.code,{children:"6h"})," and using that consistently is the best way to to manage the performance of the metrics store."]})]})}function h(e={}){const{wrapper:i}={...(0,a.R)(),...e.components};return i?(0,s.jsx)(i,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,i,n)=>{n.d(i,{R:()=>r,x:()=>l});var t=n(6540);const s={},a=t.createContext(s);function r(e){const i=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function l(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),t.createElement(a.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/901ef07d.a2248504.js b/assets/js/901ef07d.a2248504.js new file mode 100644 index 00000000..534231be --- /dev/null +++ b/assets/js/901ef07d.a2248504.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9033],{8628:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"guides/self-hosting/metrics-and-limits/configuring-metrics","title":"Configuring Metrics","description":"A fully configured, production-scale zrok service instance looks like this:","source":"@site/versioned_docs/version-0.4/guides/self-hosting/metrics-and-limits/configuring-metrics.md","sourceDirName":"guides/self-hosting/metrics-and-limits","slug":"/guides/self-hosting/metrics-and-limits/configuring-metrics","permalink":"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/metrics-and-limits/configuring-metrics.md","tags":[],"version":"0.4","sidebarPosition":20,"frontMatter":{"sidebar_position":20},"sidebar":"tutorialSidebar","previous":{"title":"Metrics and Limits","permalink":"/docs/category/metrics-and-limits"},"next":{"title":"Configuring Limits","permalink":"/docs/guides/self-hosting/metrics-and-limits/configuring-limits"}}');var r=i(4848),o=i(8453);const s={sidebar_position:20},c="Configuring Metrics",l={},a=[{value:"Configuring the OpenZiti Controller",id:"configuring-the-openziti-controller",level:2},{value:"Configuring the zrok Metrics Bridge",id:"configuring-the-zrok-metrics-bridge",level:2},{value:"RabbitMQ",id:"rabbitmq",level:3},{value:"Configuring zrok Metrics",id:"configuring-zrok-metrics",level:2},{value:"Testing Metrics",id:"testing-metrics",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"configuring-metrics",children:"Configuring Metrics"})}),"\n",(0,r.jsxs)(n.p,{children:["A fully configured, production-scale ",(0,r.jsx)(n.code,{children:"zrok"})," service instance looks like this:"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"zrok Metrics Architecture",src:i(6499).A+"",width:"381",height:"492"})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"zrok"})," metrics builds on top of the ",(0,r.jsx)(n.code,{children:"fabric.usage"})," event type from OpenZiti. The OpenZiti controller has a number of way to emit events. The ",(0,r.jsx)(n.code,{children:"zrok"})," controller has several ways to consume ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events. Smaller installations could be configured in these ways:"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"zrok simplified metrics architecture",src:i(7556).A+"",width:"522",height:"322"})}),"\n",(0,r.jsxs)(n.p,{children:["Environments that horizontally scale the ",(0,r.jsx)(n.code,{children:"zrok"}),' control plane with multiple controllers should use an AMQP-based queue to "fan out" the metrics workload across the entire control plane. Simpler installations that use a single ',(0,r.jsx)(n.code,{children:"zrok"})," controller can collect ",(0,r.jsx)(n.code,{children:"fabric.usage"}),' events from the OpenZiti controller by "tailing" the events log file, or collecting them from the OpenZiti controller\'s websocket implementation.']}),"\n",(0,r.jsx)(n.h2,{id:"configuring-the-openziti-controller",children:"Configuring the OpenZiti Controller"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:["This requires a version of OpenZiti with a ",(0,r.jsx)(n.code,{children:"fabric"})," dependency of ",(0,r.jsx)(n.code,{children:"v0.22.52"})," or newer, which is satisfed by the ",(0,r.jsx)(n.code,{children:"v0.27.6"})," release of OpenZiti Controller."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Emitting ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events to a file is currently the most reliable mechanism to capture usage events into ",(0,r.jsx)(n.code,{children:"zrok"}),". We're going to configure the OpenZiti controller to append ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events to a file, by adding this stanza to the OpenZiti controller configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"events:\n jsonLogger:\n subscriptions:\n - type: fabric.usage\n version: 3\n handler:\n type: file\n format: json\n path: /tmp/fabric-usage.json\n"})}),"\n",(0,r.jsxs)(n.p,{children:["You'll want to adjust the ",(0,r.jsx)(n.code,{children:"events/jsonLogger/handler/path"})," to wherever you would like to send these events for ingestion into ",(0,r.jsx)(n.code,{children:"zrok"}),". There are additional OpenZiti options that control file rotation. Be sure to consult the OpenZiti docs to tune these settings to be appropriate for your environment."]}),"\n",(0,r.jsxs)(n.p,{children:["By default, the OpenZiti events infrastructure reports and batches events in 1 minute buckets. 1 minute is too large of an interval to provide a snappy ",(0,r.jsx)(n.code,{children:"zrok"})," metrics experience. So, let's increase the frequency to every 5 seconds. Add this to the ",(0,r.jsx)(n.code,{children:"network"})," stanza of your OpenZiti controller's configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"network:\n intervalAgeThreshold: 5s \n metricsReportInterval: 5s\n"})}),"\n",(0,r.jsx)(n.p,{children:"And you'll want to add this stanza to the tail-end of the router configuration for every router on your OpenZiti network:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"metrics:\n reportInterval: 5s\n intervalAgeThreshold: 5s\n"})}),"\n",(0,r.jsx)(n.p,{children:"Be sure to restart all of the components of your OpenZiti network after making these configuration changes."}),"\n",(0,r.jsx)(n.h2,{id:"configuring-the-zrok-metrics-bridge",children:"Configuring the zrok Metrics Bridge"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"zrok"}),' currently uses a "metrics bridge" component (running as a separate process) to consume the ',(0,r.jsx)(n.code,{children:"fabric.usage"})," events from the OpenZiti controller, and publish them onto an AMQP queue. Add a stanza like the following to your ",(0,r.jsx)(n.code,{children:"zrok"})," controller configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"bridge:\n source:\n type: fileSource\n path: /tmp/fabric-usage.json\n sink:\n type: amqpSink\n url: amqp://guest:guest@localhost:5672\n queue_name: events\n"})}),"\n",(0,r.jsxs)(n.p,{children:["This configuration consumes the ",(0,r.jsx)(n.code,{children:"fabric.usage"})," events from the file we previously specified in our OpenZiti controller configuration, and publishes them onto an AMQP queue."]}),"\n",(0,r.jsx)(n.h3,{id:"rabbitmq",children:"RabbitMQ"}),"\n",(0,r.jsxs)(n.p,{children:["For this example, we're going to use RabbitMQ as our AMQP implementation. The stock, default RabbitMQ configuration, launched as a ",(0,r.jsx)(n.code,{children:"docker"})," container will work just fine:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.11-management\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Once RabbitMQ is running, you can start the ",(0,r.jsx)(n.code,{children:"zrok"})," metrics bridge by pointing it at your ",(0,r.jsx)(n.code,{children:"zrok"})," controller configuration, like this:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ zrok ctrl metrics bridge \n"})}),"\n",(0,r.jsx)(n.h2,{id:"configuring-zrok-metrics",children:"Configuring zrok Metrics"}),"\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.code,{children:"metrics"})," section of your ",(0,r.jsx)(n.code,{children:"zrok"})," controller. Here is an example:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:'metrics:\n agent:\n source:\n type: amqpSource\n url: amqp://guest:guest@localhost:5672\n queue_name: events\n influx:\n url: "http://127.0.0.1:8086"\n bucket: zrok # the bucket and org must be\n org: zrok # created in advance in InfluxDB\n token: ""\n'})}),"\n",(0,r.jsxs)(n.p,{children:["This configures the ",(0,r.jsx)(n.code,{children:"zrok"})," controller to consume usage events from the AMQP queue, and configures the InfluxDB metrics store. The InfluxDB organization and bucket must be created in advance. The ",(0,r.jsx)(n.code,{children:"zrok"})," controller will not create these for you."]}),"\n",(0,r.jsx)(n.h2,{id:"testing-metrics",children:"Testing Metrics"}),"\n",(0,r.jsxs)(n.p,{children:["With all of the components configured and running, either use ",(0,r.jsx)(n.code,{children:"zrok test loop"})," or manually create share(s) to generate traffic on the ",(0,r.jsx)(n.code,{children:"zrok"})," instance. If everything is working correctly, you should see log messages from the controller like the following, which indicate that that the controller is processing OpenZiti usage events, and generating ",(0,r.jsx)(n.code,{children:"zrok"})," metrics:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"[5339.658] INFO zrok/controller/metrics.(*influxWriter).Handle: share: 736z80mr4syu, circuit: Ad1V-6y48 backend {rx: 4.5 kB, tx: 4.6 kB} frontend {rx: 4.6 kB, tx: 4.5 kB}\n[5349.652] INFO zrok/controller/metrics.(*influxWriter).Handle: share: 736z80mr4syu, circuit: Ad1V-6y48 backend {rx: 2.5 kB, tx: 2.6 kB} frontend {rx: 2.6 kB, tx: 2.5 kB}\n[5354.657] INFO zrok/controller/metrics.(*influxWriter).Handle: share: 5a4u7lqxb7pa, circuit: iG1--6H4S backend {rx: 13.2 kB, tx: 13.3 kB} frontend {rx: 13.3 kB, tx: 13.2 kB}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"zrok"})," web console should also be showing activity for your share(s) like the following:"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"zrok web console activity",src:i(8824).A+"",width:"1920",height:"1230"})}),"\n",(0,r.jsxs)(n.p,{children:["With metrics configured, you might be interested in ",(0,r.jsx)(n.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-limits",children:"configuring limits"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},7556:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/metrics-architecture-simple-15902678f75b6a41fc6d26c1b6165d48.png"},6499:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/metrics-architecture-abc07e1548198a0d2176bbfea70521fa.png"},8824:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/zrok-console-activity-5e11ec1f9f3e58b54566c42a213e4ee5.png"},8453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>c});var t=i(6540);const r={},o=t.createContext(r);function s(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9939c4f4.0a8ed6f3.js b/assets/js/9939c4f4.0a8ed6f3.js deleted file mode 100644 index 8f485881..00000000 --- a/assets/js/9939c4f4.0a8ed6f3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[598],{4551:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"guides/self-hosting/interstitial-page","title":"Interstitial Pages","description":"On large zrok installations that support open registration and shared public frontends, abuse can become an issue. In order to mitigate phishing and other similar forms of abuse, zrok offers an interstitial page that announces to the visiting user that the share is hosted through zrok, and probably isn\'t their financial institution.","source":"@site/../docs/guides/self-hosting/interstitial-page.md","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/interstitial-page","permalink":"/docs/guides/self-hosting/interstitial-page","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/interstitial-page.md","tags":[],"version":"current","sidebarPosition":18,"frontMatter":{"title":"Interstitial Pages","sidebar_label":"Interstitial Pages","sidebar_position":18},"sidebar":"tutorialSidebar","previous":{"title":"NGINX TLS","permalink":"/docs/guides/self-hosting/linux/nginx"},"next":{"title":"Organizations","permalink":"/docs/guides/self-hosting/organizations"}}');var s=i(4848),r=i(8453);const a={title:"Interstitial Pages",sidebar_label:"Interstitial Pages",sidebar_position:18},o=void 0,l={},h=[{value:"Bypassing the Interstitial",id:"bypassing-the-interstitial",level:2}];function c(e){const t={code:"code",em:"em",h2:"h2",img:"img",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"On large zrok installations that support open registration and shared public frontends, abuse can become an issue. In order to mitigate phishing and other similar forms of abuse, zrok offers an interstitial page that announces to the visiting user that the share is hosted through zrok, and probably isn't their financial institution."}),"\n",(0,s.jsx)(t.p,{children:"Interstitial pages can be enabled on a per-frontend basis. This allows the interstitial to be enabled on open public frontends but not closed public frontends (closed public frontends require a grant to use)."}),"\n",(0,s.jsx)(t.p,{children:"The interstitial page requirement can also be overridden on a per-account basis, allowing shares created by specific accounts to bypass the interstitial requirement on frontends that enable it. This facilitates building infrastructure that grants trusted users additional privileges."}),"\n",(0,s.jsx)(t.p,{children:"By default, if you do not specifically enable interstitial pages on a public frontend, then your self-hosted service instance will not offer them."}),"\n",(0,s.jsx)(t.p,{children:"Let's take a look at how the interstitial pages mechanism works. The following diagram shows the share configuration rendezvous made between the zrok controller and a zrok frontend:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"zrok_interstitial_rendezvous",src:i(4214).A+"",width:"631",height:"362"})}),"\n",(0,s.jsxs)(t.p,{children:["Every zrok share has a ",(0,s.jsx)(t.em,{children:"config"})," recorded in the underlying OpenZiti network. The config is of type ",(0,s.jsx)(t.code,{children:"zrok.proxy.v1"}),". The frontend uses the information in this config to understand the disposition of the share. The config can contain an ",(0,s.jsx)(t.code,{children:"interstitial: true"})," setting. If the config has this setting, and the frontend is configured to enable interstitial pages, then end users accessing the share will receive the interstitial page on first visit."]}),"\n",(0,s.jsxs)(t.p,{children:["By default the zrok controller will record ",(0,s.jsx)(t.code,{children:"interstitial: true"})," in the share config ",(0,s.jsx)(t.em,{children:"unless"})," a row is present in the ",(0,s.jsx)(t.code,{children:"skip_interstitial_grants"})," table in the underlying database for the account creating the share. The ",(0,s.jsx)(t.code,{children:"skip_interstitial_grants"})," table is a basic SQL structure that allows inserting a row per account."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"create table skip_interstitial_grants (\n id serial primary key,\n\n account_id integer references accounts (id) not null,\n\n created_at timestamptz not null default(current_timestamp),\n updated_at timestamptz not null default(current_timestamp),\n deleted boolean not null default(false)\n);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["If an account has a row present in this table when creating a share, then the controller will write ",(0,s.jsx)(t.code,{children:"interstitial: false"})," into the config for the share, which will bypass the interstitial regardless of frontend configuration. The ",(0,s.jsx)(t.code,{children:"skip_interstitial_grants"})," controls what the zrok controller will store in the share config when creating the share."]}),"\n",(0,s.jsx)(t.p,{children:"The frontend configuration controls what the frontend will do with the share config it finds in OpenZiti. The new stanza looks like this:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:'# Configure interstitial pages for this frontend. The interstitial page presents a warning to internet users, alerting\n# them to the fact that they\'re visiting a zrok share.\n#\n#interstitial:\n# # Enable or disable interstitial pages on this frontend.\n# #\n# enabled: true\n#\n# # Specify a list of User-Agent prefixes that should receive the interstitial page. If interstitial pages are enabled\n# # and this list is not set, all user agents will receive an interstitial page.\n# #\n# user_agent_prefixes:\n# - "Mozilla/5.0"\n'})}),"\n",(0,s.jsxs)(t.p,{children:["Setting ",(0,s.jsx)(t.code,{children:"enabled: true"})," in the ",(0,s.jsx)(t.code,{children:"interstitial"})," stanza of the frontend config will allow the configured frontend to offer an interstitial page if the share config enables the interstitial page for that share. The ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," array can be used to specify which specific ",(0,s.jsx)(t.code,{children:"User-Agent"})," types receive the interstitial. User agents that match a prefix in the list will receive the interstitial, while others will not. If the ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," list is omitted, ",(0,s.jsx)(t.em,{children:"all"})," user agents will receive the interstitial page."]}),"\n",(0,s.jsx)(t.h2,{id:"bypassing-the-interstitial",children:"Bypassing the Interstitial"}),"\n",(0,s.jsxs)(t.p,{children:["The interstitial page will be presented unless the client shows up with a ",(0,s.jsx)(t.code,{children:"zrok_interstitial"})," cookie (depending on ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," configuration). When the user is presented with the interstitial page, there is a button they can click which sets the necessary cookie and allows them to visit the site. The cookie is set to expire in one week."]}),"\n",(0,s.jsxs)(t.p,{children:["Typically the ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," list contains ",(0,s.jsx)(t.code,{children:"Mozilla/5.0"}),", which matches all typical interactive mobile and desktop browsers. Setting a non-standard ",(0,s.jsx)(t.code,{children:"User-Agent"})," in an interactive browser will bypass the interstitial pages for frontends configured with the usual ",(0,s.jsx)(t.code,{children:"Mozilla/5.0"})," prefix."]}),"\n",(0,s.jsxs)(t.p,{children:["End users can offer an HTTP header of ",(0,s.jsx)(t.code,{children:"skip_zrok_interstitial"}),", set to any value to bypass the interstitial page. Setting this header means that the user most likely understands what a zrok share is and will hopefully not fall for a phishing attack."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"skip_zrok_interstitial"})," header is especially useful for API clients (like ",(0,s.jsx)(t.code,{children:"curl"}),") and other types of non-interactive clients."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"drive"})," backend mode does not currently support ",(0,s.jsx)(t.code,{children:"GET"})," requests and cannot be accessed with a conventional web browser, so it bypasses the interstitial page requirement."]})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},4214:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/zrok_interstitial_rendezvous-18053866f55c9d823e96f76f39c20555.png"},8453:(e,t,i)=>{i.d(t,{R:()=>a,x:()=>o});var n=i(6540);const s={},r=n.createContext(s);function a(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9939c4f4.0c889a1f.js b/assets/js/9939c4f4.0c889a1f.js new file mode 100644 index 00000000..9982417e --- /dev/null +++ b/assets/js/9939c4f4.0c889a1f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[598],{4551:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"guides/self-hosting/interstitial-page","title":"Interstitial Pages","description":"On large zrok installations that support open registration and shared public frontends, abuse can become an issue. In order to mitigate phishing and other similar forms of abuse, zrok offers an interstitial page that announces to the visiting user that the share is hosted through zrok, and probably isn\'t their financial institution.","source":"@site/../docs/guides/self-hosting/interstitial-page.md","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/interstitial-page","permalink":"/docs/next/guides/self-hosting/interstitial-page","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/interstitial-page.md","tags":[],"version":"current","sidebarPosition":18,"frontMatter":{"title":"Interstitial Pages","sidebar_label":"Interstitial Pages","sidebar_position":18},"sidebar":"tutorialSidebar","previous":{"title":"NGINX TLS","permalink":"/docs/next/guides/self-hosting/linux/nginx"},"next":{"title":"Organizations","permalink":"/docs/next/guides/self-hosting/organizations"}}');var s=i(4848),r=i(8453);const a={title:"Interstitial Pages",sidebar_label:"Interstitial Pages",sidebar_position:18},o=void 0,l={},h=[{value:"Bypassing the Interstitial",id:"bypassing-the-interstitial",level:2}];function c(e){const t={code:"code",em:"em",h2:"h2",img:"img",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"On large zrok installations that support open registration and shared public frontends, abuse can become an issue. In order to mitigate phishing and other similar forms of abuse, zrok offers an interstitial page that announces to the visiting user that the share is hosted through zrok, and probably isn't their financial institution."}),"\n",(0,s.jsx)(t.p,{children:"Interstitial pages can be enabled on a per-frontend basis. This allows the interstitial to be enabled on open public frontends but not closed public frontends (closed public frontends require a grant to use)."}),"\n",(0,s.jsx)(t.p,{children:"The interstitial page requirement can also be overridden on a per-account basis, allowing shares created by specific accounts to bypass the interstitial requirement on frontends that enable it. This facilitates building infrastructure that grants trusted users additional privileges."}),"\n",(0,s.jsx)(t.p,{children:"By default, if you do not specifically enable interstitial pages on a public frontend, then your self-hosted service instance will not offer them."}),"\n",(0,s.jsx)(t.p,{children:"Let's take a look at how the interstitial pages mechanism works. The following diagram shows the share configuration rendezvous made between the zrok controller and a zrok frontend:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"zrok_interstitial_rendezvous",src:i(4214).A+"",width:"631",height:"362"})}),"\n",(0,s.jsxs)(t.p,{children:["Every zrok share has a ",(0,s.jsx)(t.em,{children:"config"})," recorded in the underlying OpenZiti network. The config is of type ",(0,s.jsx)(t.code,{children:"zrok.proxy.v1"}),". The frontend uses the information in this config to understand the disposition of the share. The config can contain an ",(0,s.jsx)(t.code,{children:"interstitial: true"})," setting. If the config has this setting, and the frontend is configured to enable interstitial pages, then end users accessing the share will receive the interstitial page on first visit."]}),"\n",(0,s.jsxs)(t.p,{children:["By default the zrok controller will record ",(0,s.jsx)(t.code,{children:"interstitial: true"})," in the share config ",(0,s.jsx)(t.em,{children:"unless"})," a row is present in the ",(0,s.jsx)(t.code,{children:"skip_interstitial_grants"})," table in the underlying database for the account creating the share. The ",(0,s.jsx)(t.code,{children:"skip_interstitial_grants"})," table is a basic SQL structure that allows inserting a row per account."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"create table skip_interstitial_grants (\n id serial primary key,\n\n account_id integer references accounts (id) not null,\n\n created_at timestamptz not null default(current_timestamp),\n updated_at timestamptz not null default(current_timestamp),\n deleted boolean not null default(false)\n);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["If an account has a row present in this table when creating a share, then the controller will write ",(0,s.jsx)(t.code,{children:"interstitial: false"})," into the config for the share, which will bypass the interstitial regardless of frontend configuration. The ",(0,s.jsx)(t.code,{children:"skip_interstitial_grants"})," controls what the zrok controller will store in the share config when creating the share."]}),"\n",(0,s.jsx)(t.p,{children:"The frontend configuration controls what the frontend will do with the share config it finds in OpenZiti. The new stanza looks like this:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:'# Configure interstitial pages for this frontend. The interstitial page presents a warning to internet users, alerting\n# them to the fact that they\'re visiting a zrok share.\n#\n#interstitial:\n# # Enable or disable interstitial pages on this frontend.\n# #\n# enabled: true\n#\n# # Specify a list of User-Agent prefixes that should receive the interstitial page. If interstitial pages are enabled\n# # and this list is not set, all user agents will receive an interstitial page.\n# #\n# user_agent_prefixes:\n# - "Mozilla/5.0"\n'})}),"\n",(0,s.jsxs)(t.p,{children:["Setting ",(0,s.jsx)(t.code,{children:"enabled: true"})," in the ",(0,s.jsx)(t.code,{children:"interstitial"})," stanza of the frontend config will allow the configured frontend to offer an interstitial page if the share config enables the interstitial page for that share. The ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," array can be used to specify which specific ",(0,s.jsx)(t.code,{children:"User-Agent"})," types receive the interstitial. User agents that match a prefix in the list will receive the interstitial, while others will not. If the ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," list is omitted, ",(0,s.jsx)(t.em,{children:"all"})," user agents will receive the interstitial page."]}),"\n",(0,s.jsx)(t.h2,{id:"bypassing-the-interstitial",children:"Bypassing the Interstitial"}),"\n",(0,s.jsxs)(t.p,{children:["The interstitial page will be presented unless the client shows up with a ",(0,s.jsx)(t.code,{children:"zrok_interstitial"})," cookie (depending on ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," configuration). When the user is presented with the interstitial page, there is a button they can click which sets the necessary cookie and allows them to visit the site. The cookie is set to expire in one week."]}),"\n",(0,s.jsxs)(t.p,{children:["Typically the ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," list contains ",(0,s.jsx)(t.code,{children:"Mozilla/5.0"}),", which matches all typical interactive mobile and desktop browsers. Setting a non-standard ",(0,s.jsx)(t.code,{children:"User-Agent"})," in an interactive browser will bypass the interstitial pages for frontends configured with the usual ",(0,s.jsx)(t.code,{children:"Mozilla/5.0"})," prefix."]}),"\n",(0,s.jsxs)(t.p,{children:["End users can offer an HTTP header of ",(0,s.jsx)(t.code,{children:"skip_zrok_interstitial"}),", set to any value to bypass the interstitial page. Setting this header means that the user most likely understands what a zrok share is and will hopefully not fall for a phishing attack."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"skip_zrok_interstitial"})," header is especially useful for API clients (like ",(0,s.jsx)(t.code,{children:"curl"}),") and other types of non-interactive clients."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"drive"})," backend mode does not currently support ",(0,s.jsx)(t.code,{children:"GET"})," requests and cannot be accessed with a conventional web browser, so it bypasses the interstitial page requirement."]})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},4214:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/zrok_interstitial_rendezvous-18053866f55c9d823e96f76f39c20555.png"},8453:(e,t,i)=>{i.d(t,{R:()=>a,x:()=>o});var n=i(6540);const s={},r=n.createContext(s);function a(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.95046d7a.js b/assets/js/a7bd4aaa.6c642da0.js similarity index 90% rename from assets/js/a7bd4aaa.95046d7a.js rename to assets/js/a7bd4aaa.6c642da0.js index 3bf23b19..44894cdc 100644 --- a/assets/js/a7bd4aaa.95046d7a.js +++ b/assets/js/a7bd4aaa.6c642da0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7098],{4532:(e,n,s)=>{s.r(n),s.d(n,{default:()=>x});s(6540);var r=s(9024),t=s(2565),o=s(3025),i=s(2831),c=s(1463),u=s(4848);function a(e){const{version:n}=e;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.A,{version:n.version,tag:(0,t.k)(n.pluginId,n.version)}),(0,u.jsx)(r.be,{children:n.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(e){const{version:n,route:s}=e;return(0,u.jsx)(r.e3,{className:n.className,children:(0,u.jsx)(o.n,{version:n,children:(0,i.v)(s.routes)})})}function x(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...e}),(0,u.jsx)(l,{...e})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7098],{2151:(e,n,s)=>{s.r(n),s.d(n,{default:()=>x});s(6540);var r=s(9024),t=s(2565),o=s(3025),i=s(2831),c=s(1463),u=s(4848);function a(e){const{version:n}=e;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.A,{version:n.version,tag:(0,t.k)(n.pluginId,n.version)}),(0,u.jsx)(r.be,{children:n.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(e){const{version:n,route:s}=e;return(0,u.jsx)(r.e3,{className:n.className,children:(0,u.jsx)(o.n,{version:n,children:(0,i.v)(s.routes)})})}function x(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...e}),(0,u.jsx)(l,{...e})]})}}}]); \ No newline at end of file diff --git a/assets/js/aad6478e.8dd329a2.js b/assets/js/aad6478e.8dd329a2.js deleted file mode 100644 index 94fb14c8..00000000 --- a/assets/js/aad6478e.8dd329a2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1769],{9429:(e,s,r)=>{r.d(s,{Ay:()=>i,RM:()=>o});var n=r(4848),t=r(8453);const o=[];function c(e){const s={a:"a",code:"code",li:"li",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"proxy"})," mode forwards requests received by the frontend to the target server (",(0,n.jsx)(s.a,{href:"/docs/concepts/http",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"web"})," mode serves a target folder as a file index web page (",(0,n.jsx)(s.a,{href:"/docs/concepts/files",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"drive"})," mode serves a target folder with WebDAV (",(0,n.jsx)(s.a,{href:"/docs/guides/drives",children:"guide"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"caddy"})," mode runs the built-in Caddy server with the targeted Caddyfile (",(0,n.jsx)(s.a,{href:"pathname:///simple_reverse_proxy.Caddyfile",children:"example"}),")"]}),"\n"]})}function i(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},4889:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"concepts/sharing-private","title":"Private Shares","description":"zrok was built to share and access digital resources. A private share allows a resource to be","source":"@site/../docs/concepts/sharing-private.mdx","sourceDirName":"concepts","slug":"/concepts/sharing-private","permalink":"/docs/concepts/sharing-private","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/sharing-private.mdx","tags":[],"version":"current","sidebarPosition":0,"frontMatter":{"sidebar_position":0},"sidebar":"tutorialSidebar","previous":{"title":"Concepts","permalink":"/docs/concepts/"},"next":{"title":"Public Shares","permalink":"/docs/concepts/sharing-public"}}');var t=r(4848),o=r(8453),c=r(9429);const i={sidebar_position:0},a="Private Shares",d={},h=[{value:"Peer to Peer",id:"peer-to-peer",level:2},{value:"Private Backend Modes",id:"private-backend-modes",level:2},...c.RM];function l(e){const s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"private-shares",children:"Private Shares"})}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"zrok"})," was built to share and access digital resources. A ",(0,t.jsx)(s.code,{children:"private"})," share allows a resource to be\naccessed on another user's system as if it were local to them. Privately shared resources can only be accessed by another ",(0,t.jsx)(s.code,{children:"zrok"})," user who has the details of your unique share. You are in control of who can access your ",(0,t.jsx)(s.code,{children:"private"})," shares by sharing the share token."]}),"\n",(0,t.jsxs)(s.p,{children:["Peer-to-peer private resource sharing is one of the things that makes ",(0,t.jsx)(s.code,{children:"zrok"})," unique."]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"zrok"})," also provides ",(0,t.jsx)(s.code,{children:"public"})," sharing of resources with non-",(0,t.jsx)(s.code,{children:"zrok"})," users. Public resource sharing is limited to only resources that can be accessed over ",(0,t.jsx)(s.code,{children:"HTTP"})," or ",(0,t.jsx)(s.code,{children:"HTTPS"}),". ",(0,t.jsx)(s.code,{children:"private"})," sharing works with all of the resources types that ",(0,t.jsx)(s.code,{children:"zrok"})," supports."]}),"\n",(0,t.jsx)(s.p,{children:"Here's how private sharing works:"}),"\n",(0,t.jsx)(s.h2,{id:"peer-to-peer",children:"Peer to Peer"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"zrok_public_share",src:r(683).A+"",width:"2200",height:"922"})}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"private"})," shares are accessed using the ",(0,t.jsx)(s.code,{children:"zrok access"})," command, and require the accessing user to have a ",(0,t.jsx)(s.code,{children:"zrok enable"}),"-d account on the same service instance where the share was created."]}),"\n",(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.code,{children:"private"})," share is identified by a ",(0,t.jsx)(s.em,{children:"share token"}),". The accessing user will use the share token, along with the ",(0,t.jsx)(s.code,{children:"zrok access"})," command to create a local endpoint on their system, which lets them use the shared resource as if it were local to their system."]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"zrok"})," does not require you to open any firewall ports or otherwise compromise the security of your local system; there is never an attack surface open to the public internet. As soon as you terminate the ",(0,t.jsx)(s.code,{children:"zrok share"})," process, you immediately terminate any possible access to your shared resource."]}),"\n",(0,t.jsxs)(s.p,{children:["The shared resource can be a development web server to share with friends and colleagues, a webhook from a server running in the cloud which has ",(0,t.jsx)(s.code,{children:"zrok"})," running and has been instructed to ",(0,t.jsx)(s.code,{children:"access"})," the private resource. ",(0,t.jsx)(s.code,{children:"zrok"})," can also share files, websites, and low-level TCP and UDP network connections using the ",(0,t.jsx)(s.code,{children:"tunnel"})," backend. What matters is that the access to the shared resource is not done in a public way, and can only be accessed by other ",(0,t.jsx)(s.code,{children:"zrok"})," users that have access to your share token."]}),"\n",(0,t.jsxs)(s.p,{children:["The peer-to-peer capabilities of ",(0,t.jsx)(s.code,{children:"zrok"})," are an important property of the underlying ",(0,t.jsx)(s.a,{href:"https://docs.openziti.io/docs/learn/introduction/",children:"OpenZiti"})," network that ",(0,t.jsx)(s.code,{children:"zrok"})," uses to provide connectivity between users and resources."]}),"\n",(0,t.jsxs)(s.p,{children:["Creating ",(0,t.jsx)(s.code,{children:"private"})," shares is easy and is accomplished using the ",(0,t.jsx)(s.code,{children:"zrok share private"})," command. Run ",(0,t.jsx)(s.code,{children:"zrok share private"})," to see the usage output and to further learn how to use the command."]}),"\n",(0,t.jsx)(s.h2,{id:"private-backend-modes",children:"Private Backend Modes"}),"\n",(0,t.jsxs)(s.p,{children:["The default backend mode is ",(0,t.jsx)(s.code,{children:"proxy"})," which targets an HTTP URL that must be reachable by the backend."]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",metastring:'title="proxy example"',children:"zrok share private 80\n"})}),"\n",(0,t.jsx)(c.Ay,{}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"tcpTunnel"}),", ",(0,t.jsx)(s.code,{children:"udpTunnel"})," modes forward the data payload to the target server (",(0,t.jsx)(s.a,{href:"/docs/concepts/tunnels",children:"more"}),")"]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"socks"})," mode provides a SOCKS5 dynamic proxy on the private access bind port that tunnels TCP payloads to the share backend where they are forwarded to their destinations (",(0,t.jsx)(s.a,{href:"https://blog.openziti.io/the-zrok-socks-backend",children:"blog"}),")"]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"vpn"})," mode provides a network layer tunnel between the private access and the share backend (",(0,t.jsx)(s.a,{href:"/docs/guides/vpn/",children:"guide"}),")"]}),"\n"]})]})}function p(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},683:(e,s,r)=>{r.d(s,{A:()=>n});const n=r.p+"assets/images/zrok_private_share-3b4b2f89f7b5e6704d0b9078a701161e.png"},8453:(e,s,r)=>{r.d(s,{R:()=>c,x:()=>i});var n=r(6540);const t={},o=n.createContext(t);function c(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/aad6478e.ce2d129d.js b/assets/js/aad6478e.ce2d129d.js new file mode 100644 index 00000000..e9df66bd --- /dev/null +++ b/assets/js/aad6478e.ce2d129d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1769],{9429:(e,s,r)=>{r.d(s,{Ay:()=>i,RM:()=>o});var n=r(4848),t=r(8453);const o=[];function c(e){const s={a:"a",code:"code",li:"li",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"proxy"})," mode forwards requests received by the frontend to the target server (",(0,n.jsx)(s.a,{href:"/docs/next/concepts/http",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"web"})," mode serves a target folder as a file index web page (",(0,n.jsx)(s.a,{href:"/docs/next/concepts/files",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"drive"})," mode serves a target folder with WebDAV (",(0,n.jsx)(s.a,{href:"/docs/next/guides/drives",children:"guide"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"caddy"})," mode runs the built-in Caddy server with the targeted Caddyfile (",(0,n.jsx)(s.a,{href:"pathname:///simple_reverse_proxy.Caddyfile",children:"example"}),")"]}),"\n"]})}function i(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},4889:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"concepts/sharing-private","title":"Private Shares","description":"zrok was built to share and access digital resources. A private share allows a resource to be","source":"@site/../docs/concepts/sharing-private.mdx","sourceDirName":"concepts","slug":"/concepts/sharing-private","permalink":"/docs/next/concepts/sharing-private","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/sharing-private.mdx","tags":[],"version":"current","sidebarPosition":0,"frontMatter":{"sidebar_position":0},"sidebar":"tutorialSidebar","previous":{"title":"Concepts","permalink":"/docs/next/concepts/"},"next":{"title":"Public Shares","permalink":"/docs/next/concepts/sharing-public"}}');var t=r(4848),o=r(8453),c=r(9429);const i={sidebar_position:0},a="Private Shares",d={},h=[{value:"Peer to Peer",id:"peer-to-peer",level:2},{value:"Private Backend Modes",id:"private-backend-modes",level:2},...c.RM];function l(e){const s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"private-shares",children:"Private Shares"})}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"zrok"})," was built to share and access digital resources. A ",(0,t.jsx)(s.code,{children:"private"})," share allows a resource to be\naccessed on another user's system as if it were local to them. Privately shared resources can only be accessed by another ",(0,t.jsx)(s.code,{children:"zrok"})," user who has the details of your unique share. You are in control of who can access your ",(0,t.jsx)(s.code,{children:"private"})," shares by sharing the share token."]}),"\n",(0,t.jsxs)(s.p,{children:["Peer-to-peer private resource sharing is one of the things that makes ",(0,t.jsx)(s.code,{children:"zrok"})," unique."]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"zrok"})," also provides ",(0,t.jsx)(s.code,{children:"public"})," sharing of resources with non-",(0,t.jsx)(s.code,{children:"zrok"})," users. Public resource sharing is limited to only resources that can be accessed over ",(0,t.jsx)(s.code,{children:"HTTP"})," or ",(0,t.jsx)(s.code,{children:"HTTPS"}),". ",(0,t.jsx)(s.code,{children:"private"})," sharing works with all of the resources types that ",(0,t.jsx)(s.code,{children:"zrok"})," supports."]}),"\n",(0,t.jsx)(s.p,{children:"Here's how private sharing works:"}),"\n",(0,t.jsx)(s.h2,{id:"peer-to-peer",children:"Peer to Peer"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"zrok_public_share",src:r(683).A+"",width:"2200",height:"922"})}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"private"})," shares are accessed using the ",(0,t.jsx)(s.code,{children:"zrok access"})," command, and require the accessing user to have a ",(0,t.jsx)(s.code,{children:"zrok enable"}),"-d account on the same service instance where the share was created."]}),"\n",(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.code,{children:"private"})," share is identified by a ",(0,t.jsx)(s.em,{children:"share token"}),". The accessing user will use the share token, along with the ",(0,t.jsx)(s.code,{children:"zrok access"})," command to create a local endpoint on their system, which lets them use the shared resource as if it were local to their system."]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"zrok"})," does not require you to open any firewall ports or otherwise compromise the security of your local system; there is never an attack surface open to the public internet. As soon as you terminate the ",(0,t.jsx)(s.code,{children:"zrok share"})," process, you immediately terminate any possible access to your shared resource."]}),"\n",(0,t.jsxs)(s.p,{children:["The shared resource can be a development web server to share with friends and colleagues, a webhook from a server running in the cloud which has ",(0,t.jsx)(s.code,{children:"zrok"})," running and has been instructed to ",(0,t.jsx)(s.code,{children:"access"})," the private resource. ",(0,t.jsx)(s.code,{children:"zrok"})," can also share files, websites, and low-level TCP and UDP network connections using the ",(0,t.jsx)(s.code,{children:"tunnel"})," backend. What matters is that the access to the shared resource is not done in a public way, and can only be accessed by other ",(0,t.jsx)(s.code,{children:"zrok"})," users that have access to your share token."]}),"\n",(0,t.jsxs)(s.p,{children:["The peer-to-peer capabilities of ",(0,t.jsx)(s.code,{children:"zrok"})," are an important property of the underlying ",(0,t.jsx)(s.a,{href:"https://docs.openziti.io/docs/learn/introduction/",children:"OpenZiti"})," network that ",(0,t.jsx)(s.code,{children:"zrok"})," uses to provide connectivity between users and resources."]}),"\n",(0,t.jsxs)(s.p,{children:["Creating ",(0,t.jsx)(s.code,{children:"private"})," shares is easy and is accomplished using the ",(0,t.jsx)(s.code,{children:"zrok share private"})," command. Run ",(0,t.jsx)(s.code,{children:"zrok share private"})," to see the usage output and to further learn how to use the command."]}),"\n",(0,t.jsx)(s.h2,{id:"private-backend-modes",children:"Private Backend Modes"}),"\n",(0,t.jsxs)(s.p,{children:["The default backend mode is ",(0,t.jsx)(s.code,{children:"proxy"})," which targets an HTTP URL that must be reachable by the backend."]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",metastring:'title="proxy example"',children:"zrok share private 80\n"})}),"\n",(0,t.jsx)(c.Ay,{}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"tcpTunnel"}),", ",(0,t.jsx)(s.code,{children:"udpTunnel"})," modes forward the data payload to the target server (",(0,t.jsx)(s.a,{href:"/docs/next/concepts/tunnels",children:"more"}),")"]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"socks"})," mode provides a SOCKS5 dynamic proxy on the private access bind port that tunnels TCP payloads to the share backend where they are forwarded to their destinations (",(0,t.jsx)(s.a,{href:"https://blog.openziti.io/the-zrok-socks-backend",children:"blog"}),")"]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"vpn"})," mode provides a network layer tunnel between the private access and the share backend (",(0,t.jsx)(s.a,{href:"/docs/next/guides/vpn/",children:"guide"}),")"]}),"\n"]})]})}function p(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},683:(e,s,r)=>{r.d(s,{A:()=>n});const n=r.p+"assets/images/zrok_private_share-3b4b2f89f7b5e6704d0b9078a701161e.png"},8453:(e,s,r)=>{r.d(s,{R:()=>c,x:()=>i});var n=r(6540);const t={},o=n.createContext(t);function c(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/adf8dca1.fe940d23.js b/assets/js/adf8dca1.fe940d23.js new file mode 100644 index 00000000..2e6284d2 --- /dev/null +++ b/assets/js/adf8dca1.fe940d23.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8051],{3626:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"guides/self-hosting/instance-configuration","title":"Use Another zrok Instance","description":"This guide is relevant if you are self-hosting or using a friend\'s zrok instance instead of using zrok-as-a-service from zrok.io.","source":"@site/versioned_docs/version-0.4/guides/self-hosting/instance-configuration.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/instance-configuration","permalink":"/docs/guides/self-hosting/instance-configuration","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/instance-configuration.mdx","tags":[],"version":"0.4","frontMatter":{"title":"Use Another zrok Instance","sidebar_label":"Instance Config"},"sidebar":"tutorialSidebar","previous":{"title":"OAuth Public Frontend Configuration","permalink":"/docs/guides/self-hosting/oauth/configuring-oauth"},"next":{"title":"Invitations","permalink":"/docs/guides/self-hosting/self-service-invite"}}');var s=o(4848),i=o(8453);const r={title:"Use Another zrok Instance",sidebar_label:"Instance Config"},c=void 0,a={},d=[];function l(e){const n={admonition:"admonition",code:"code",em:"em",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["This guide is relevant if you are self-hosting or using a friend's ",(0,s.jsx)(n.code,{children:"zrok"})," instance instead of using zrok-as-a-service from ",(0,s.jsx)(n.code,{children:"zrok.io"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok"})," ",(0,s.jsx)(n.em,{children:"command"})," on your computer uses a ",(0,s.jsx)(n.code,{children:"zrok"})," ",(0,s.jsx)(n.em,{children:"instance"})," over the network."]}),"\n",(0,s.jsxs)(n.p,{children:["The default instance API endpoint for the ",(0,s.jsx)(n.code,{children:"zrok"})," command is ",(0,s.jsx)(n.code,{children:"api.zrok.io"}),". Set the API endpoint to another instance's API endpoint:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"zrok config set apiEndpoint https://zrok.example.com\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"[WARNING]: unable to open environment metadata; ignoring\n\nzrok configuration updated\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"WARNING"})," about ",(0,s.jsx)(n.code,{children:"environment metadata"})," is expected when you run ",(0,s.jsx)(n.code,{children:"zrok config set"})," before ",(0,s.jsx)(n.code,{children:"zrok enable"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["You can use the ",(0,s.jsx)(n.code,{children:"zrok status"})," command to inspect the state of your local ",(0,s.jsx)(n.em,{children:"environment"}),". ",(0,s.jsx)(n.code,{children:"zrok"})," refers to each shell where you install and ",(0,s.jsx)(n.code,{children:"enable"})," a copy of ",(0,s.jsx)(n.code,{children:"zrok"})," as an ",(0,s.jsx)(n.em,{children:"environment"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"zrok status\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"Config:\n\n CONFIG VALUE SOURCE \n apiEndpoint https://zrok.mydomain.com config \n\n[WARNING]: Unable to load your local environment!\n\nTo create a local environment use the zrok enable command.\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"zrok status"})," command shows the configured API service that your environment is using, as well as the ",(0,s.jsx)(n.code,{children:"SOURCE"})," where the setting was retrieved. In this case, ",(0,s.jsx)(n.code,{children:"config"})," means that the setting was set into the environment using the ",(0,s.jsx)(n.code,{children:"zrok config"})," command."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>c});var t=o(6540);const s={},i=t.createContext(s);function r(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b36bb0c9.d026f6a2.js b/assets/js/b36bb0c9.d026f6a2.js new file mode 100644 index 00000000..5bd1a763 --- /dev/null +++ b/assets/js/b36bb0c9.d026f6a2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4504],{548:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>d,contentTitle:()=>s,default:()=>m,frontMatter:()=>t,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"guides/self-hosting/organizations","title":"Organizations","description":"zrok (starting with v0.4.45) includes support for \\"organizations\\". Organizations are groups of related accounts that are typically centrally managed in some capacity. A zrok account can be a member of multiple organizations. Organization membership can also include an \\"admin\\" permission. As of v0.4.45 organization admins are able to retrieve an \\"overview\\" (zrok overview) from any other account in the organization, allowing the admin to see the details of the environments, shares, and accesses created within that account.","source":"@site/versioned_docs/version-0.4/guides/self-hosting/organizations.md","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/organizations","permalink":"/docs/guides/self-hosting/organizations","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/organizations.md","tags":[],"version":"0.4","sidebarPosition":21,"frontMatter":{"sidebar_position":21,"sidebar_label":"Organizations"},"sidebar":"tutorialSidebar","previous":{"title":"Interstitial Pages","permalink":"/docs/guides/self-hosting/interstitial-page"},"next":{"title":"Personalized Frontend","permalink":"/docs/guides/self-hosting/personalized-frontend"}}');var o=i(4848),r=i(8453);const t={sidebar_position:21,sidebar_label:"Organizations"},s="Organizations",d={},c=[{value:"Configuring an Organization",id:"configuring-an-organization",level:2},{value:"Create an Organization",id:"create-an-organization",level:3},{value:"List Organizations",id:"list-organizations",level:3},{value:"Add a Member to an Organization",id:"add-a-member-to-an-organization",level:3},{value:"List Members of an Organization",id:"list-members-of-an-organization",level:3},{value:"Removing Organizations and Members",id:"removing-organizations-and-members",level:3},{value:"End-user Organization Administrator Commands",id:"end-user-organization-administrator-commands",level:2},{value:"End-user Organization Commands",id:"end-user-organization-commands",level:2}];function l(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,r.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.header,{children:(0,o.jsx)(e.h1,{id:"organizations",children:"Organizations"})}),"\n",(0,o.jsxs)(e.p,{children:["zrok (starting with ",(0,o.jsx)(e.code,{children:"v0.4.45"}),') includes support for "organizations". Organizations are groups of related accounts that are typically centrally managed in some capacity. A zrok account can be a member of multiple organizations. Organization membership can also include an "admin" permission. As of ',(0,o.jsx)(e.code,{children:"v0.4.45"}),' organization admins are able to retrieve an "overview" (',(0,o.jsx)(e.code,{children:"zrok overview"}),") from any other account in the organization, allowing the admin to see the details of the environments, shares, and accesses created within that account."]}),"\n",(0,o.jsxs)(e.p,{children:["Future zrok releases will include additional organization features, including ",(0,o.jsx)(e.code,{children:"--closed"})," permission sharing functions."]}),"\n",(0,o.jsx)(e.h2,{id:"configuring-an-organization",children:"Configuring an Organization"}),"\n",(0,o.jsxs)(e.p,{children:["The API endpoints used to manage organizations and their members require a site-level ",(0,o.jsx)(e.code,{children:"ZROK_ADMIN_TOKEN"})," to access. See the ",(0,o.jsx)(e.a,{href:"/docs/guides/self-hosting/linux/#configure-the-controller",children:"self-hosting guide"})," for details on configuring admin tokens."]}),"\n",(0,o.jsx)(e.h3,{id:"create-an-organization",children:"Create an Organization"}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok admin create organization"})," command is used to create organizations:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create organization --help\nCreate a new organization\n\nUsage:\n zrok admin create organization [flags]\n\nAliases:\n organization, org\n\nFlags:\n -d, --description string Organization description\n -h, --help help for organization\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n"})}),"\n",(0,o.jsxs)(e.p,{children:["Use the ",(0,o.jsx)(e.code,{children:"-d"})," flag to add a description that shows up in end-user membership listings."]}),"\n",(0,o.jsx)(e.p,{children:"We'll create an example organization:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create organization -d \"documentation\"\n[ 0.006] INFO main.(*adminCreateOrganizationCommand).run: created new organization with token 'gK1XRvthq7ci'\n"})}),"\n",(0,o.jsx)(e.h3,{id:"list-organizations",children:"List Organizations"}),"\n",(0,o.jsxs)(e.p,{children:["We use the ",(0,o.jsx)(e.code,{children:"zrok admin list organizations"})," command to list our organizations:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin list organizations\n\n ORGANIZATION TOKEN DESCRIPTION \n gK1XRvthq7ci documentation \n"})}),"\n",(0,o.jsx)(e.h3,{id:"add-a-member-to-an-organization",children:"Add a Member to an Organization"}),"\n",(0,o.jsxs)(e.p,{children:["We use the ",(0,o.jsx)(e.code,{children:"zrok admin create org-member"})," command to add members to organizations:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create org-member \nError: accepts 2 arg(s), received 0\nUsage:\n zrok admin create org-member [flags]\n\nAliases:\n org-member, member\n\nFlags:\n --admin Make the new account an admin of the organization\n -h, --help help for org-member\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n"})}),"\n",(0,o.jsx)(e.p,{children:"Like this:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin create org-member gK1XRvthq7ci michael.quigley@netfoundry.io\n[ 0.006] INFO main.(*adminCreateOrgMemberCommand).run: added 'michael.quigley@netfoundry.io' to organization 'gK1XRvthq7ci\n"})}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"--admin"})," flag can be added to the ",(0,o.jsx)(e.code,{children:"zrok admin create org-member"})," command to mark the member as an administrator of the organization."]}),"\n",(0,o.jsx)(e.h3,{id:"list-members-of-an-organization",children:"List Members of an Organization"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok admin list org-members gK1XRvthq7ci\n\n ACCOUNT EMAIL ADMIN? \n michael.quigley@netfoundry.io false \n"})}),"\n",(0,o.jsx)(e.h3,{id:"removing-organizations-and-members",children:"Removing Organizations and Members"}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok admin delete org-member"})," and ",(0,o.jsx)(e.code,{children:"zrok admin delete organization"})," commands are available to clean up organizations and their membership lists."]}),"\n",(0,o.jsx)(e.h2,{id:"end-user-organization-administrator-commands",children:"End-user Organization Administrator Commands"}),"\n",(0,o.jsxs)(e.p,{children:["When a zrok account is added to an organization as an administrator it allows them to use the ",(0,o.jsx)(e.code,{children:"zrok organization admin"})," commands, which include:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:'$ zrok organization admin\nOrganization admin commands\n\nUsage:\n zrok organization admin [command]\n\nAvailable Commands:\n list List the members of an organization\n overview Retrieve account overview for organization member account\n\nFlags:\n -h, --help help for admin\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n\nUse "zrok organization admin [command] --help" for more information about a command.\n'})}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok organization admin list"})," command is used to list the members of an organization."]}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"zrok organization admin overview"})," command is used to retrieve an overview of an organization member account. This is functionally equivalent to what the ",(0,o.jsx)(e.code,{children:"zrok overview"})," command does, but it allows an organization admin to retrieve the overview for another zrok account."]}),"\n",(0,o.jsx)(e.h2,{id:"end-user-organization-commands",children:"End-user Organization Commands"}),"\n",(0,o.jsxs)(e.p,{children:["All zrok accounts can use the ",(0,o.jsx)(e.code,{children:"zrok organization memberships"})," command to list the organizations they're a member of:"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{children:"$ zrok organization memberships\n\n ORGANIZATION TOKEN DESCRIPTION ADMIN? \n gK1XRvthq7ci documentation false \n\n"})})]})}function m(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(l,{...n})}):l(n)}},8453:(n,e,i)=>{i.d(e,{R:()=>t,x:()=>s});var a=i(6540);const o={},r=a.createContext(o);function t(n){const e=a.useContext(r);return a.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(o):n.components||o:t(n.components),a.createElement(r.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/b6569025.bfa7ed0e.js b/assets/js/b6569025.bfa7ed0e.js new file mode 100644 index 00000000..358fb4c5 --- /dev/null +++ b/assets/js/b6569025.bfa7ed0e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[714],{9579:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>g,frontMatter:()=>d,metadata:()=>t,toc:()=>x});const t=JSON.parse('{"id":"guides/install/index","title":"Install","description":"{s.d(n,{F:()=>r,d:()=>i});var t=s(6540),o=s(4848);const a=(0,t.createContext)([]),i=()=>(0,t.useContext)(a),r=e=>{let{children:n}=e;const[s,i]=(0,t.useState)([]);return(0,t.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),i(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,o.jsx)(a.Provider,{value:s,children:n})}},595:(e,n,s)=>{s.d(n,{A:()=>l});s(6540);var t=s(8151),o=s(1342),a=s(5293),i=s(4848);const r=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:s,infoText:l,guideLink:d}=e;const{colorMode:c}=(0,a.G)(),u=(0,t.d)();console.log("Assets in DownloadCard:",u);const x=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=u.filter((e=>e.name.includes(x)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,i.jsxs)("div",{className:o.A.downloadCard,children:[(0,i.jsx)("div",{className:o.A.imgContainer,children:(0,i.jsx)("img",{src:s,alt:`${n} logo`})}),(0,i.jsx)("h3",{children:n}),m.length>0&&(0,i.jsx)("ul",{children:m.map(((e,n)=>(0,i.jsx)("li",{className:o.A.downloadButtons,children:(0,i.jsx)("a",{href:e.url,className:o.A.downloadLinks,children:r(e.arch)})},n)))}),d&&(0,i.jsxs)("div",{className:o.A.cardFooter,children:[(0,i.jsx)("p",{children:l}),(0,i.jsx)("a",{href:d,children:"GUIDE"}),(0,i.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>t});const t={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>r});var t=s(6540);const o={},a=t.createContext(o);function i(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b6569025.ff0961c6.js b/assets/js/b6569025.ff0961c6.js deleted file mode 100644 index 0d86a083..00000000 --- a/assets/js/b6569025.ff0961c6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[714],{9579:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>u,contentTitle:()=>c,default:()=>x,frontMatter:()=>d,metadata:()=>t,toc:()=>m});const t=JSON.parse('{"id":"guides/install/index","title":"Install","description":"{n.d(s,{F:()=>r,d:()=>i});var t=n(6540),o=n(4848);const a=(0,t.createContext)([]),i=()=>(0,t.useContext)(a),r=e=>{let{children:s}=e;const[n,i]=(0,t.useState)([]);return(0,t.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const s=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",s),i(s)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,o.jsx)(a.Provider,{value:n,children:s})}},595:(e,s,n)=>{n.d(s,{A:()=>l});n(6540);var t=n(8151),o=n(1342),a=n(5293),i=n(4848);const r=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:s,osLogo:n,infoText:l,guideLink:d}=e;const{colorMode:c}=(0,a.G)(),u=(0,t.d)();console.log("Assets in DownloadCard:",u);const m=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(s),g=u.filter((e=>e.name.includes(m)));return console.log("Filtered assets for",s,"in DownloadCard:",g),(0,i.jsxs)("div",{className:o.A.downloadCard,children:[(0,i.jsx)("div",{className:o.A.imgContainer,children:(0,i.jsx)("img",{src:n,alt:`${s} logo`})}),(0,i.jsx)("h3",{children:s}),g.length>0&&(0,i.jsx)("ul",{children:g.map(((e,s)=>(0,i.jsx)("li",{className:o.A.downloadButtons,children:(0,i.jsx)("a",{href:e.url,className:o.A.downloadLinks,children:r(e.arch)})},s)))}),d&&(0,i.jsxs)("div",{className:o.A.cardFooter,children:[(0,i.jsx)("p",{children:l}),(0,i.jsx)("a",{href:d,children:"GUIDE"}),(0,i.jsx)("p",{})]})]})}},1342:(e,s,n)=>{n.d(s,{A:()=>t});const t={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>r});var t=n(6540);const o={},a=t.createContext(o);function i(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bbbe662c.0376698e.js b/assets/js/bbbe662c.0376698e.js deleted file mode 100644 index 780b24a2..00000000 --- a/assets/js/bbbe662c.0376698e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1057],{942:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>t,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"guides/docker-share/docker_private_share_guide","title":"Docker Private Share","description":"Goal","source":"@site/../docs/guides/docker-share/docker_private_share_guide.md","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/docker_private_share_guide","permalink":"/docs/guides/docker-share/docker_private_share_guide","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/docker-share/docker_private_share_guide.md","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"title":"Docker Private Share","sidebar_position":20,"sidebar_label":"Private Share"},"sidebar":"tutorialSidebar","previous":{"title":"Public Share","permalink":"/docs/guides/docker-share/docker_public_share_guide"},"next":{"title":"Linux User Share","permalink":"/docs/guides/linux-user-share/"}}');var i=n(4848),o=n(8453);const t={title:"Docker Private Share",sidebar_position:20,sidebar_label:"Private Share"},a=void 0,c={},l=[{value:"Goal",id:"goal",level:2},{value:"Overview",id:"overview",level:2},{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"How it Works",id:"how-it-works",level:2},{value:"Before You Begin",id:"before-you-begin",level:2},{value:"Begin Sharing Privately with zrok in Docker",id:"begin-sharing-privately-with-zrok-in-docker",level:2},{value:"Access the Private Share",id:"access-the-private-share",level:2},{value:"Closed Permission Mode",id:"closed-permission-mode",level:2},{value:"Going Further with Private Access",id:"going-further-with-private-access",level:2},{value:"Cleaning Up",id:"cleaning-up",level:2}];function h(e){const r={a:"a",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h2,{id:"goal",children:"Goal"}),"\n",(0,i.jsx)(r.p,{children:"Privately share a Docker Compose service with a separate zrok environment and a permanent zrok share token."}),"\n",(0,i.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsx)(r.p,{children:"With zrok, you can privately share a service that's running in Docker. You need a zrok private share running somewhere that it can reach the service you're sharing, and a zrok private access running somewhere else where you want to use the private share. Together, the private share and private access form a private point-to-point tunnel."}),"\n",(0,i.jsxs)(r.p,{children:["Here's a short article with an overview of ",(0,i.jsx)(r.a,{href:"/docs/concepts/sharing-private",children:"private sharing with zrok"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,i.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/HxyvtFAvwUE",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,i.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,i.jsx)(r.p,{children:"The Docker Compose project uses your zrok account token to reserve a private share token and keep sharing the backend target."}),"\n",(0,i.jsx)(r.p,{children:"When the project runs it will:"}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["enable a zrok environment unless ",(0,i.jsx)(r.code,{children:"/mnt/.zrok/environment.json"})," exists in the ",(0,i.jsx)(r.code,{children:"zrok_env"})," volume"]}),"\n",(0,i.jsxs)(r.li,{children:["reserve a private share token for the service unless ",(0,i.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," exists"]}),"\n",(0,i.jsxs)(r.li,{children:["start sharing the target specified in the ",(0,i.jsx)(r.code,{children:"ZROK_TARGET"})," environment variable"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"before-you-begin",children:"Before You Begin"}),"\n",(0,i.jsxs)(r.p,{children:["To follow this guide you will need ",(0,i.jsx)(r.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"}),"."]}),"\n",(0,i.jsx)(r.p,{children:"If you have installed Docker Desktop on macOS or Windows then you are all set."}),"\n",(0,i.jsx)(r.h2,{id:"begin-sharing-privately-with-zrok-in-docker",children:"Begin Sharing Privately with zrok in Docker"}),"\n",(0,i.jsx)(r.p,{children:"First, let's create the private share."}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private share."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Download ",(0,i.jsx)(r.a,{href:"pathname:///zrok-private-share/compose.yml",children:"the zrok-private-share Docker Compose project file"})," into your new project folder and make sure it's named ",(0,i.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,i.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"If you are self-hosting zrok then it's important to set your API endpoint URL too. If you're using the hosted zrok service then you can skip this step."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_API_ENDPOINT="https://zrok.example.com"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Run your Compose project to start sharing the built-in demo web server:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose up\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Read the private share token from the output. One of the last lines is like this:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"zrok-private-share-1 | zrok access private wr3hpf2z5fiy\n"})}),"\n",(0,i.jsx)(r.p,{children:"Keep track of this token so you can use it in your zrok private access project."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"access-the-private-share",children:"Access the Private Share"}),"\n",(0,i.jsx)(r.p,{children:"Now that we have a private share we can access it with the zrok command or by running a separate Docker Compose project."}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private access."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Download ",(0,i.jsx)(r.a,{href:"pathname:///zrok-private-access/compose.yml",children:"the zrok-private-access Docker Compose project file"})," into your new project folder and make sure it's named ",(0,i.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,i.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Now copy the zrok private access token from the zrok private share project's output to your clipboard and paste it in the same file named ",(0,i.jsx)(r.code,{children:".env"})," here in your private share project folder like this:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\nZROK_ACCESS_TOKEN="wr3hpf2z5fiy"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Run your Compose project to start accessing the private share:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose up zrok-access\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Now your zrok private access proxy is ready on ",(0,i.jsx)(r.a,{href:"http://127.0.0.1:9191",children:"http://127.0.0.1:9191"}),". You can visit the demo web server in your browser."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"closed-permission-mode",children:"Closed Permission Mode"}),"\n",(0,i.jsx)(r.p,{children:'Normally, you need only the share token to access a private share. You can further restrict access with "closed" permission mode.'}),"\n",(0,i.jsx)(r.p,{children:"You must set the permission mode before you reserve the share."}),"\n",(0,i.jsx)(r.p,{children:"Only your own account can access the private share."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'ZROK_PERMISSION_MODE="closed"\n'})}),"\n",(0,i.jsx)(r.p,{children:"Grant access to additional zrok accounts."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'ZROK_ACCESS_GRANTS="bob@example.com alice@example.org"\n'})}),"\n",(0,i.jsxs)(r.p,{children:["You can adjust the access grants by running the CLI inside the ",(0,i.jsx)(r.code,{children:"zrok-share"})," container."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose exec zrok-share zrok modify ${ZROK_UNIQUE_NAME} --remove-access-grant bob@example.com\n"})}),"\n",(0,i.jsx)(r.h2,{id:"going-further-with-private-access",children:"Going Further with Private Access"}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Try changing the demo web server used in the private share project. One alternative demo server is provided: ",(0,i.jsx)(r.code,{children:"httpbin"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Try accessing the private share from ",(0,i.jsx)(r.em,{children:"inside"})," a container running in the private access project. One demo client is provided: ",(0,i.jsx)(r.code,{children:"demo-client"}),". You can run it like this."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose up demo-client\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["You'll see in the terminal output that the demo-client container is getting a response from the private share indicating the source IP of the request from the perspective of the demo server: ",(0,i.jsx)(r.code,{children:"httpbin"})," that's running in the private share project."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"cleaning-up",children:"Cleaning Up"}),"\n",(0,i.jsx)(r.p,{children:'Run the "down" command in both Compose projects to destroy them when you\'re all done. This will stop the running containers and delete zrok environments\' storage volumes. Then delete the selected zrok environment by clicking "Actions" in the web console.'}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose down --remove-orphans --volumes\n"})})]})}function d(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>a});var s=n(6540);const i={},o=s.createContext(i);function t(e){const r=s.useContext(o);return s.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(i):e.components||i:t(e.components),s.createElement(o.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bbbe662c.c75ebde3.js b/assets/js/bbbe662c.c75ebde3.js new file mode 100644 index 00000000..006e6aa0 --- /dev/null +++ b/assets/js/bbbe662c.c75ebde3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1057],{942:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>t,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"guides/docker-share/docker_private_share_guide","title":"Docker Private Share","description":"Goal","source":"@site/../docs/guides/docker-share/docker_private_share_guide.md","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/docker_private_share_guide","permalink":"/docs/next/guides/docker-share/docker_private_share_guide","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/docker-share/docker_private_share_guide.md","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"title":"Docker Private Share","sidebar_position":20,"sidebar_label":"Private Share"},"sidebar":"tutorialSidebar","previous":{"title":"Public Share","permalink":"/docs/next/guides/docker-share/docker_public_share_guide"},"next":{"title":"Linux User Share","permalink":"/docs/next/guides/linux-user-share/"}}');var i=n(4848),o=n(8453);const t={title:"Docker Private Share",sidebar_position:20,sidebar_label:"Private Share"},a=void 0,c={},l=[{value:"Goal",id:"goal",level:2},{value:"Overview",id:"overview",level:2},{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"How it Works",id:"how-it-works",level:2},{value:"Before You Begin",id:"before-you-begin",level:2},{value:"Begin Sharing Privately with zrok in Docker",id:"begin-sharing-privately-with-zrok-in-docker",level:2},{value:"Access the Private Share",id:"access-the-private-share",level:2},{value:"Closed Permission Mode",id:"closed-permission-mode",level:2},{value:"Going Further with Private Access",id:"going-further-with-private-access",level:2},{value:"Cleaning Up",id:"cleaning-up",level:2}];function h(e){const r={a:"a",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h2,{id:"goal",children:"Goal"}),"\n",(0,i.jsx)(r.p,{children:"Privately share a Docker Compose service with a separate zrok environment and a permanent zrok share token."}),"\n",(0,i.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsx)(r.p,{children:"With zrok, you can privately share a service that's running in Docker. You need a zrok private share running somewhere that it can reach the service you're sharing, and a zrok private access running somewhere else where you want to use the private share. Together, the private share and private access form a private point-to-point tunnel."}),"\n",(0,i.jsxs)(r.p,{children:["Here's a short article with an overview of ",(0,i.jsx)(r.a,{href:"/docs/next/concepts/sharing-private",children:"private sharing with zrok"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,i.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/HxyvtFAvwUE",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,i.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,i.jsx)(r.p,{children:"The Docker Compose project uses your zrok account token to reserve a private share token and keep sharing the backend target."}),"\n",(0,i.jsx)(r.p,{children:"When the project runs it will:"}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["enable a zrok environment unless ",(0,i.jsx)(r.code,{children:"/mnt/.zrok/environment.json"})," exists in the ",(0,i.jsx)(r.code,{children:"zrok_env"})," volume"]}),"\n",(0,i.jsxs)(r.li,{children:["reserve a private share token for the service unless ",(0,i.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," exists"]}),"\n",(0,i.jsxs)(r.li,{children:["start sharing the target specified in the ",(0,i.jsx)(r.code,{children:"ZROK_TARGET"})," environment variable"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"before-you-begin",children:"Before You Begin"}),"\n",(0,i.jsxs)(r.p,{children:["To follow this guide you will need ",(0,i.jsx)(r.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"}),"."]}),"\n",(0,i.jsx)(r.p,{children:"If you have installed Docker Desktop on macOS or Windows then you are all set."}),"\n",(0,i.jsx)(r.h2,{id:"begin-sharing-privately-with-zrok-in-docker",children:"Begin Sharing Privately with zrok in Docker"}),"\n",(0,i.jsx)(r.p,{children:"First, let's create the private share."}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private share."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Download ",(0,i.jsx)(r.a,{href:"pathname:///zrok-private-share/compose.yml",children:"the zrok-private-share Docker Compose project file"})," into your new project folder and make sure it's named ",(0,i.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,i.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"If you are self-hosting zrok then it's important to set your API endpoint URL too. If you're using the hosted zrok service then you can skip this step."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_API_ENDPOINT="https://zrok.example.com"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Run your Compose project to start sharing the built-in demo web server:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose up\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Read the private share token from the output. One of the last lines is like this:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"zrok-private-share-1 | zrok access private wr3hpf2z5fiy\n"})}),"\n",(0,i.jsx)(r.p,{children:"Keep track of this token so you can use it in your zrok private access project."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"access-the-private-share",children:"Access the Private Share"}),"\n",(0,i.jsx)(r.p,{children:"Now that we have a private share we can access it with the zrok command or by running a separate Docker Compose project."}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok private access."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"In your terminal, change directory to your newly-created project folder."}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Download ",(0,i.jsx)(r.a,{href:"pathname:///zrok-private-access/compose.yml",children:"the zrok-private-access Docker Compose project file"})," into your new project folder and make sure it's named ",(0,i.jsx)(r.code,{children:"compose.yml"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Copy your zrok environment token from the zrok web console to your clipboard and paste it in a file named ",(0,i.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Now copy the zrok private access token from the zrok private share project's output to your clipboard and paste it in the same file named ",(0,i.jsx)(r.code,{children:".env"})," here in your private share project folder like this:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'# file name ".env"\nZROK_ENABLE_TOKEN="8UL9-48rN0ua"\nZROK_ACCESS_TOKEN="wr3hpf2z5fiy"\n'})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsx)(r.p,{children:"Run your Compose project to start accessing the private share:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose up zrok-access\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Now your zrok private access proxy is ready on ",(0,i.jsx)(r.a,{href:"http://127.0.0.1:9191",children:"http://127.0.0.1:9191"}),". You can visit the demo web server in your browser."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"closed-permission-mode",children:"Closed Permission Mode"}),"\n",(0,i.jsx)(r.p,{children:'Normally, you need only the share token to access a private share. You can further restrict access with "closed" permission mode.'}),"\n",(0,i.jsx)(r.p,{children:"You must set the permission mode before you reserve the share."}),"\n",(0,i.jsx)(r.p,{children:"Only your own account can access the private share."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'ZROK_PERMISSION_MODE="closed"\n'})}),"\n",(0,i.jsx)(r.p,{children:"Grant access to additional zrok accounts."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'ZROK_ACCESS_GRANTS="bob@example.com alice@example.org"\n'})}),"\n",(0,i.jsxs)(r.p,{children:["You can adjust the access grants by running the CLI inside the ",(0,i.jsx)(r.code,{children:"zrok-share"})," container."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose exec zrok-share zrok modify ${ZROK_UNIQUE_NAME} --remove-access-grant bob@example.com\n"})}),"\n",(0,i.jsx)(r.h2,{id:"going-further-with-private-access",children:"Going Further with Private Access"}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Try changing the demo web server used in the private share project. One alternative demo server is provided: ",(0,i.jsx)(r.code,{children:"httpbin"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Try accessing the private share from ",(0,i.jsx)(r.em,{children:"inside"})," a container running in the private access project. One demo client is provided: ",(0,i.jsx)(r.code,{children:"demo-client"}),". You can run it like this."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose up demo-client\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["You'll see in the terminal output that the demo-client container is getting a response from the private share indicating the source IP of the request from the perspective of the demo server: ",(0,i.jsx)(r.code,{children:"httpbin"})," that's running in the private share project."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"cleaning-up",children:"Cleaning Up"}),"\n",(0,i.jsx)(r.p,{children:'Run the "down" command in both Compose projects to destroy them when you\'re all done. This will stop the running containers and delete zrok environments\' storage volumes. Then delete the selected zrok environment by clicking "Actions" in the web console.'}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker compose down --remove-orphans --volumes\n"})})]})}function d(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>a});var s=n(6540);const i={},o=s.createContext(i);function t(e){const r=s.useContext(o);return s.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(i):e.components||i:t(e.components),s.createElement(o.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bc32cbb6.b0e94afe.js b/assets/js/bc32cbb6.b0e94afe.js new file mode 100644 index 00000000..dca85dcb --- /dev/null +++ b/assets/js/bc32cbb6.b0e94afe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[826],{6272:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"guides/self-hosting/interstitial-page","title":"Interstitial Pages","description":"On large zrok installations that support open registration and shared public frontends, abuse can become an issue. In order to mitigate phishing and other similar forms of abuse, zrok offers an interstitial page that announces to the visiting user that the share is hosted through zrok, and probably isn\'t their financial institution.","source":"@site/versioned_docs/version-0.4/guides/self-hosting/interstitial-page.md","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/interstitial-page","permalink":"/docs/guides/self-hosting/interstitial-page","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/interstitial-page.md","tags":[],"version":"0.4","sidebarPosition":18,"frontMatter":{"title":"Interstitial Pages","sidebar_label":"Interstitial Pages","sidebar_position":18},"sidebar":"tutorialSidebar","previous":{"title":"NGINX TLS","permalink":"/docs/guides/self-hosting/linux/nginx"},"next":{"title":"Organizations","permalink":"/docs/guides/self-hosting/organizations"}}');var s=i(4848),r=i(8453);const a={title:"Interstitial Pages",sidebar_label:"Interstitial Pages",sidebar_position:18},o=void 0,l={},h=[{value:"Bypassing the Interstitial",id:"bypassing-the-interstitial",level:2}];function c(e){const t={code:"code",em:"em",h2:"h2",img:"img",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"On large zrok installations that support open registration and shared public frontends, abuse can become an issue. In order to mitigate phishing and other similar forms of abuse, zrok offers an interstitial page that announces to the visiting user that the share is hosted through zrok, and probably isn't their financial institution."}),"\n",(0,s.jsx)(t.p,{children:"Interstitial pages can be enabled on a per-frontend basis. This allows the interstitial to be enabled on open public frontends but not closed public frontends (closed public frontends require a grant to use)."}),"\n",(0,s.jsx)(t.p,{children:"The interstitial page requirement can also be overridden on a per-account basis, allowing shares created by specific accounts to bypass the interstitial requirement on frontends that enable it. This facilitates building infrastructure that grants trusted users additional privileges."}),"\n",(0,s.jsx)(t.p,{children:"By default, if you do not specifically enable interstitial pages on a public frontend, then your self-hosted service instance will not offer them."}),"\n",(0,s.jsx)(t.p,{children:"Let's take a look at how the interstitial pages mechanism works. The following diagram shows the share configuration rendezvous made between the zrok controller and a zrok frontend:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"zrok_interstitial_rendezvous",src:i(6990).A+"",width:"631",height:"362"})}),"\n",(0,s.jsxs)(t.p,{children:["Every zrok share has a ",(0,s.jsx)(t.em,{children:"config"})," recorded in the underlying OpenZiti network. The config is of type ",(0,s.jsx)(t.code,{children:"zrok.proxy.v1"}),". The frontend uses the information in this config to understand the disposition of the share. The config can contain an ",(0,s.jsx)(t.code,{children:"interstitial: true"})," setting. If the config has this setting, and the frontend is configured to enable interstitial pages, then end users accessing the share will receive the interstitial page on first visit."]}),"\n",(0,s.jsxs)(t.p,{children:["By default the zrok controller will record ",(0,s.jsx)(t.code,{children:"interstitial: true"})," in the share config ",(0,s.jsx)(t.em,{children:"unless"})," a row is present in the ",(0,s.jsx)(t.code,{children:"skip_interstitial_grants"})," table in the underlying database for the account creating the share. The ",(0,s.jsx)(t.code,{children:"skip_interstitial_grants"})," table is a basic SQL structure that allows inserting a row per account."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"create table skip_interstitial_grants (\n id serial primary key,\n\n account_id integer references accounts (id) not null,\n\n created_at timestamptz not null default(current_timestamp),\n updated_at timestamptz not null default(current_timestamp),\n deleted boolean not null default(false)\n);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["If an account has a row present in this table when creating a share, then the controller will write ",(0,s.jsx)(t.code,{children:"interstitial: false"})," into the config for the share, which will bypass the interstitial regardless of frontend configuration. The ",(0,s.jsx)(t.code,{children:"skip_interstitial_grants"})," controls what the zrok controller will store in the share config when creating the share."]}),"\n",(0,s.jsx)(t.p,{children:"The frontend configuration controls what the frontend will do with the share config it finds in OpenZiti. The new stanza looks like this:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:'# Configure interstitial pages for this frontend. The interstitial page presents a warning to internet users, alerting\n# them to the fact that they\'re visiting a zrok share.\n#\n#interstitial:\n# # Enable or disable interstitial pages on this frontend.\n# #\n# enabled: true\n#\n# # Specify a list of User-Agent prefixes that should receive the interstitial page. If interstitial pages are enabled\n# # and this list is not set, all user agents will receive an interstitial page.\n# #\n# user_agent_prefixes:\n# - "Mozilla/5.0"\n'})}),"\n",(0,s.jsxs)(t.p,{children:["Setting ",(0,s.jsx)(t.code,{children:"enabled: true"})," in the ",(0,s.jsx)(t.code,{children:"interstitial"})," stanza of the frontend config will allow the configured frontend to offer an interstitial page if the share config enables the interstitial page for that share. The ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," array can be used to specify which specific ",(0,s.jsx)(t.code,{children:"User-Agent"})," types receive the interstitial. User agents that match a prefix in the list will receive the interstitial, while others will not. If the ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," list is omitted, ",(0,s.jsx)(t.em,{children:"all"})," user agents will receive the interstitial page."]}),"\n",(0,s.jsx)(t.h2,{id:"bypassing-the-interstitial",children:"Bypassing the Interstitial"}),"\n",(0,s.jsxs)(t.p,{children:["The interstitial page will be presented unless the client shows up with a ",(0,s.jsx)(t.code,{children:"zrok_interstitial"})," cookie (depending on ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," configuration). When the user is presented with the interstitial page, there is a button they can click which sets the necessary cookie and allows them to visit the site. The cookie is set to expire in one week."]}),"\n",(0,s.jsxs)(t.p,{children:["Typically the ",(0,s.jsx)(t.code,{children:"user_agent_prefixes"})," list contains ",(0,s.jsx)(t.code,{children:"Mozilla/5.0"}),", which matches all typical interactive mobile and desktop browsers. Setting a non-standard ",(0,s.jsx)(t.code,{children:"User-Agent"})," in an interactive browser will bypass the interstitial pages for frontends configured with the usual ",(0,s.jsx)(t.code,{children:"Mozilla/5.0"})," prefix."]}),"\n",(0,s.jsxs)(t.p,{children:["End users can offer an HTTP header of ",(0,s.jsx)(t.code,{children:"skip_zrok_interstitial"}),", set to any value to bypass the interstitial page. Setting this header means that the user most likely understands what a zrok share is and will hopefully not fall for a phishing attack."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"skip_zrok_interstitial"})," header is especially useful for API clients (like ",(0,s.jsx)(t.code,{children:"curl"}),") and other types of non-interactive clients."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"drive"})," backend mode does not currently support ",(0,s.jsx)(t.code,{children:"GET"})," requests and cannot be accessed with a conventional web browser, so it bypasses the interstitial page requirement."]})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},6990:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/zrok_interstitial_rendezvous-18053866f55c9d823e96f76f39c20555.png"},8453:(e,t,i)=>{i.d(t,{R:()=>a,x:()=>o});var n=i(6540);const s={},r=n.createContext(s);function a(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bc747cac.7ee6980c.js b/assets/js/bc747cac.7ee6980c.js deleted file mode 100644 index 96278b61..00000000 --- a/assets/js/bc747cac.7ee6980c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4909],{487:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"concepts/index","title":"Concepts","description":"zrok was designed to make sharing local resources both secure and easy. In this section of the zrok documentation, we\'ll tour through all of the most important features.","source":"@site/../docs/concepts/index.md","sourceDirName":"concepts","slug":"/concepts/","permalink":"/docs/concepts/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/index.md","tags":[],"version":"current","sidebarPosition":25,"frontMatter":{"sidebar_title":"Core Features","sidebar_position":25},"sidebar":"tutorialSidebar","previous":{"title":"Getting Started","permalink":"/docs/getting-started"},"next":{"title":"Private Shares","permalink":"/docs/concepts/sharing-private"}}');var o=t(4848),r=t(8453);const c={sidebar_title:"Core Features",sidebar_position:25},i="Concepts",a={},d=[];function l(e){const n={a:"a",code:"code",h1:"h1",header:"header",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"concepts",children:"Concepts"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"zrok"})," was designed to make sharing local resources both secure and easy. In this section of the ",(0,o.jsx)(n.code,{children:"zrok"})," documentation, we'll tour through all of the most important features."]}),"\n",(0,o.jsxs)(n.p,{children:["Sharing with ",(0,o.jsx)(n.code,{children:"zrok"})," can be either ",(0,o.jsx)(n.a,{href:"/docs/concepts/sharing-public",children:(0,o.jsx)(n.code,{children:"public"})})," or ",(0,o.jsx)(n.a,{href:"/docs/concepts/sharing-private",children:(0,o.jsx)(n.code,{children:"private"})}),".\nNaturally, regular web-based resources can be shared but ",(0,o.jsx)(n.code,{children:"zrok"})," also includes support for sharing raw ",(0,o.jsx)(n.a,{href:"/docs/concepts/tunnels",children:"TCP"})," and ",(0,o.jsx)(n.a,{href:"/docs/concepts/tunnels",children:"UDP"})," network connections, and also includes a ",(0,o.jsx)(n.a,{href:"/docs/concepts/files",children:"website and file sharing"})," feature."]}),"\n",(0,o.jsxs)(n.p,{children:["Learn about ",(0,o.jsx)(n.code,{children:"zrok"})," ",(0,o.jsx)(n.a,{href:"/docs/concepts/hosting",children:"hosting here"}),", including instructions on how to ",(0,o.jsxs)(n.a,{href:"/docs/guides/self-hosting/linux/",children:["install your own ",(0,o.jsx)(n.code,{children:"zrok"})," instance"]}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var s=t(6540);const o={},r=s.createContext(o);function c(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bc747cac.d8758ff0.js b/assets/js/bc747cac.d8758ff0.js new file mode 100644 index 00000000..f49d2390 --- /dev/null +++ b/assets/js/bc747cac.d8758ff0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4909],{487:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"concepts/index","title":"Concepts","description":"zrok was designed to make sharing local resources both secure and easy. In this section of the zrok documentation, we\'ll tour through all of the most important features.","source":"@site/../docs/concepts/index.md","sourceDirName":"concepts","slug":"/concepts/","permalink":"/docs/next/concepts/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/index.md","tags":[],"version":"current","sidebarPosition":25,"frontMatter":{"sidebar_title":"Core Features","sidebar_position":25},"sidebar":"tutorialSidebar","previous":{"title":"Getting Started","permalink":"/docs/next/getting-started"},"next":{"title":"Private Shares","permalink":"/docs/next/concepts/sharing-private"}}');var o=t(4848),r=t(8453);const c={sidebar_title:"Core Features",sidebar_position:25},i="Concepts",a={},d=[];function l(e){const n={a:"a",code:"code",h1:"h1",header:"header",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"concepts",children:"Concepts"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"zrok"})," was designed to make sharing local resources both secure and easy. In this section of the ",(0,o.jsx)(n.code,{children:"zrok"})," documentation, we'll tour through all of the most important features."]}),"\n",(0,o.jsxs)(n.p,{children:["Sharing with ",(0,o.jsx)(n.code,{children:"zrok"})," can be either ",(0,o.jsx)(n.a,{href:"/docs/next/concepts/sharing-public",children:(0,o.jsx)(n.code,{children:"public"})})," or ",(0,o.jsx)(n.a,{href:"/docs/next/concepts/sharing-private",children:(0,o.jsx)(n.code,{children:"private"})}),".\nNaturally, regular web-based resources can be shared but ",(0,o.jsx)(n.code,{children:"zrok"})," also includes support for sharing raw ",(0,o.jsx)(n.a,{href:"/docs/next/concepts/tunnels",children:"TCP"})," and ",(0,o.jsx)(n.a,{href:"/docs/next/concepts/tunnels",children:"UDP"})," network connections, and also includes a ",(0,o.jsx)(n.a,{href:"/docs/next/concepts/files",children:"website and file sharing"})," feature."]}),"\n",(0,o.jsxs)(n.p,{children:["Learn about ",(0,o.jsx)(n.code,{children:"zrok"})," ",(0,o.jsx)(n.a,{href:"/docs/next/concepts/hosting",children:"hosting here"}),", including instructions on how to ",(0,o.jsxs)(n.a,{href:"/docs/next/guides/self-hosting/linux/",children:["install your own ",(0,o.jsx)(n.code,{children:"zrok"})," instance"]}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var s=t(6540);const o={},r=s.createContext(o);function c(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bf372175.a12ce1e0.js b/assets/js/bf372175.a12ce1e0.js new file mode 100644 index 00000000..92eb603a --- /dev/null +++ b/assets/js/bf372175.a12ce1e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6974],{6603:(e,o,s)=>{s.r(o),s.d(o,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"concepts/hosting","title":"Hosting","description":"Self-Hosted","source":"@site/versioned_docs/version-0.4/concepts/hosting.md","sourceDirName":"concepts","slug":"/concepts/hosting","permalink":"/docs/concepts/hosting","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/concepts/hosting.md","tags":[],"version":"0.4","sidebarPosition":200,"frontMatter":{"sidebar_position":200},"sidebar":"tutorialSidebar","previous":{"title":"Open Source","permalink":"/docs/concepts/opensource"},"next":{"title":"Guides","permalink":"/docs/category/guides"}}');var t=s(4848),i=s(8453);const r={sidebar_position:200},c="Hosting",d={},a=[{value:"Self-Hosted",id:"self-hosted",level:2},{value:"Managed Service",id:"managed-service",level:2}];function l(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.header,{children:(0,t.jsx)(o.h1,{id:"hosting",children:"Hosting"})}),"\n",(0,t.jsx)(o.h2,{id:"self-hosted",children:"Self-Hosted"}),"\n",(0,t.jsxs)(o.p,{children:[(0,t.jsx)(o.code,{children:"zrok"})," is not limited to a managed offering. You can ",(0,t.jsx)(o.a,{href:"/docs/guides/self-hosting/linux/",children:"host your own"})," instance of ",(0,t.jsx)(o.code,{children:"zrok"})," as well. ",(0,t.jsx)(o.code,{children:"zrok"})," is\nalso freely available as open source software hosted by GitHub under a very permissive Apache v2 license."]}),"\n",(0,t.jsx)(o.h2,{id:"managed-service",children:"Managed Service"}),"\n",(0,t.jsxs)(o.p,{children:[(0,t.jsx)(o.code,{children:"zrok"})," is also offered as a cloud service, making it instantly accessible to a large population immediately.\nNetFoundry provides a manged version of ",(0,t.jsx)(o.code,{children:"zrok"})," at ",(0,t.jsx)(o.a,{href:"https://zrok.io",children:"https://zrok.io"}),". This provides the easy-to-use,\nquick to demonstrate features of ",(0,t.jsx)(o.code,{children:"zrok"})," without needing to deploy and host ",(0,t.jsx)(o.code,{children:"zrok"})," yourself."]})]})}function h(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,o,s)=>{s.d(o,{R:()=>r,x:()=>c});var n=s(6540);const t={},i=n.createContext(t);function r(e){const o=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function c(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),n.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bfe99541.5d34498b.js b/assets/js/bfe99541.5d34498b.js new file mode 100644 index 00000000..ec5aa5ff --- /dev/null +++ b/assets/js/bfe99541.5d34498b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3434],{5937:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"guides/self-hosting/oauth/configuring-oauth","title":"OAuth Public Frontend Configuration","description":"As of v0.4.7, zrok includes OAuth integration for both Google and GitHub for zrok access public public frontends.","source":"@site/versioned_docs/version-0.4/guides/self-hosting/oauth/configuring-oauth.md","sourceDirName":"guides/self-hosting/oauth","slug":"/guides/self-hosting/oauth/configuring-oauth","permalink":"/docs/guides/self-hosting/oauth/configuring-oauth","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/oauth/configuring-oauth.md","tags":[],"version":"0.4","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"OAuth","permalink":"/docs/category/oauth"},"next":{"title":"Instance Config","permalink":"/docs/guides/self-hosting/instance-configuration"}}');var o=n(4848),s=n(8453);const r={},a="OAuth Public Frontend Configuration",c={},h=[{value:"Planning for the OAuth Frontend",id:"planning-for-the-oauth-frontend",level:2},{value:"Configuring a Google OAuth Client ID",id:"configuring-a-google-oauth-client-id",level:2},{value:"OAuth Content Screen",id:"oauth-content-screen",level:3},{value:"Create the OAuth 2.0 Client ID",id:"create-the-oauth-20-client-id",level:3},{value:"Configuring a GitHub Client ID",id:"configuring-a-github-client-id",level:2},{value:"Configuring your Public Frontend",id:"configuring-your-public-frontend",level:2},{value:"Enabling OAuth on a Public Share",id:"enabling-oauth-on-a-public-share",level:2}];function d(e){const t={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"oauth-public-frontend-configuration",children:"OAuth Public Frontend Configuration"})}),"\n",(0,o.jsxs)(t.p,{children:["As of ",(0,o.jsx)(t.code,{children:"v0.4.7"}),", ",(0,o.jsx)(t.code,{children:"zrok"})," includes OAuth integration for both Google and GitHub for ",(0,o.jsx)(t.code,{children:"zrok access public"})," public frontends."]}),"\n",(0,o.jsx)(t.p,{children:"This integration allows you to create public shares and request that the public frontend authenticate your users against either the Google or GitHub OAuth endpoints (using the user's Google or GitHub accounts). Additionally, you can restrict the email address domain associated with the count to a list of domains that you provide when you create the share."}),"\n",(0,o.jsxs)(t.p,{children:["This is a first step towards a more comprehensive portfolio of user authentication strategies in future ",(0,o.jsx)(t.code,{children:"zrok"})," releases."]}),"\n",(0,o.jsx)(t.h2,{id:"planning-for-the-oauth-frontend",children:"Planning for the OAuth Frontend"}),"\n",(0,o.jsx)(t.p,{children:"The current implementation of the OAuth public frontend uses a HTTP listener to handle redirects from OAuth providers. You'll need to configure a DNS name and a port for this listener that is accessible by your end users. We'll refer to this listener as the \"OAuth frontend\" in this guide."}),"\n",(0,o.jsx)(t.p,{children:'We\'ll use the public DNS address of the OAuth frontend when creating the Google and GitHub OAuth clients below. This address is typically configured into these clients as the "redirect URL" where these clients will send the authenticated users after authentication.'}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"zrok"})," OAuth frontend will capture the successful authentication and forward the user back to their original destination."]}),"\n",(0,o.jsx)(t.h2,{id:"configuring-a-google-oauth-client-id",children:"Configuring a Google OAuth Client ID"}),"\n",(0,o.jsx)(t.h3,{id:"oauth-content-screen",children:"OAuth Content Screen"}),"\n",(0,o.jsx)(t.p,{children:'Before you can configure an OAuth Client ID in Google Cloud, you have to configure the "OAuth content screen".'}),"\n",(0,o.jsxs)(t.p,{children:["In the Google Cloud console, navigate to: ",(0,o.jsx)(t.code,{children:"APIs & Services > Credentials > OAuth content screen"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(7700).A+"",width:"1469",height:"1141"})}),"\n",(0,o.jsxs)(t.p,{children:["Here you can give your ",(0,o.jsx)(t.code,{children:"zrok"})," public frontend an identity and branding to match your deployment."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(941).A+"",width:"1469",height:"1141"})}),"\n",(0,o.jsx)(t.p,{children:"Describe what domains are authorized to access your public frontend and establish contact information."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(962).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Add a non-sensitive scope for ",(0,o.jsx)(t.code,{children:"../auth/userinfo.email"}),". This is important as it allows the ",(0,o.jsx)(t.code,{children:"zrok"})," OAuth frontend to receive the email address of the authenticated user."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(2507).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(4944).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:"Now your OAuth content screen is configured."}),"\n",(0,o.jsx)(t.h3,{id:"create-the-oauth-20-client-id",children:"Create the OAuth 2.0 Client ID"}),"\n",(0,o.jsx)(t.p,{children:"Next we create the OAuth Client ID for your public frontend."}),"\n",(0,o.jsxs)(t.p,{children:["In the Google Cloud Console, navigate to: ",(0,o.jsx)(t.code,{children:"APIs & Services > Credentials > + Create Credentials"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(1390).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Select ",(0,o.jsx)(t.code,{children:"OAuth client ID"})," from the ",(0,o.jsx)(t.code,{children:"+ Create Credentials"})," dropdown."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(7141).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Application type is ",(0,o.jsx)(t.code,{children:"Web Application"}),"."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(604).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:['The most important bit here is the "Authorized redirect URIs". You\'re going to want to put a URL here that matches the ',(0,o.jsx)(t.code,{children:"zrok"})," OAuth frontend address that you configured at the start of this guide, but at the end of the URL you're going to append ",(0,o.jsx)(t.code,{children:"/google/oauth"})," to the URL."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(4419).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Save the client ID and the client secret. You'll configure these into your ",(0,o.jsx)(t.code,{children:"frontend.yml"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"With this your Google OAuth client should be configured and ready."}),"\n",(0,o.jsx)(t.h2,{id:"configuring-a-github-client-id",children:"Configuring a GitHub Client ID"}),"\n",(0,o.jsx)(t.p,{children:"Register a new OAuth application through the GitHub settings for the account that owns the application."}),"\n",(0,o.jsxs)(t.p,{children:["Navigate to:",(0,o.jsx)(t.code,{children:"Settings > Developer Settings > OAuth Apps > Register a new application"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(2306).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(7449).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:['The "Authorized callback URL" should be configured to match the OAuth frontend address you configured at the start of this guide, with ',(0,o.jsx)(t.code,{children:"/github/oauth"})," appended to the end."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(3891).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsx)(t.p,{children:"Create a new client secret."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:n(4927).A+"",width:"1469",height:"1179"})}),"\n",(0,o.jsxs)(t.p,{children:["Save the client ID and the client secret. You'll configure these into your ",(0,o.jsx)(t.code,{children:"frontend.yml"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"configuring-your-public-frontend",children:"Configuring your Public Frontend"}),"\n",(0,o.jsxs)(t.p,{children:["The public frontend configuration includes a new ",(0,o.jsx)(t.code,{children:"oauth"})," section:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-yaml",children:'oauth:\n bind_address: 0.0.0.0:8181\n redirect_url: https://oauth.zrok.io\n cookie_domain: zrok.io\n hash_key: "the quick brown fox jumped over the lazy dog"\n providers:\n - name: google\n client_id: ""\n client_secret: ""\n - name: github\n client_id: ""\n client_secret: ""\n \n'})}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"bind_address"})," parameter determines where the OAuth frontend will bind. Should be in ",(0,o.jsx)(t.code,{children:"ip:port"})," format."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"redirect_url"})," parameter determines the base URL where OAuth frontend requests will be redirected."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"cookie_domain"})," is the domain where authentication cookies should be stored."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"hash_key"})," is a unique string for your installation that is used to secure the authentication payloads for your public frontend."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"providers"})," is a list of configured providers for this public frontend. The current implementation supports ",(0,o.jsx)(t.code,{children:"google"})," and ",(0,o.jsx)(t.code,{children:"github"})," as options."]}),"\n",(0,o.jsxs)(t.p,{children:["Both the ",(0,o.jsx)(t.code,{children:"google"})," and ",(0,o.jsx)(t.code,{children:"github"})," providers accept a ",(0,o.jsx)(t.code,{children:"client_id"})," and ",(0,o.jsx)(t.code,{children:"client_secret"})," parameter. These values are provided when you configure the OAuth clients at Google or GitHub."]}),"\n",(0,o.jsx)(t.h2,{id:"enabling-oauth-on-a-public-share",children:"Enabling OAuth on a Public Share"}),"\n",(0,o.jsx)(t.p,{children:"With your public frontend configured to support OAuth, you can test this by creating a public share. There are new command line options to support this:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-text",children:'$ zrok share public --help\nShare a target resource publicly\n\nUsage:\n zrok share public [flags]\n\nFlags:\n -b, --backend-mode string The backend mode {proxy, web, caddy, drive} (default "proxy")\n --basic-auth stringArray Basic authentication users (,...)\n --frontends stringArray Selected frontends to use for the share (default [public])\n --headless Disable TUI and run headless\n -h, --help help for public\n --insecure Enable insecure TLS certificate validation for \n --oauth-check-interval duration Maximum lifetime for OAuth authentication; reauthenticate after expiry (default 3h0m0s)\n --oauth-email-address-patterns stringArray Allow only these email domain globs to authenticate via OAuth\n --oauth-provider string Enable OAuth provider [google, github]\n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n'})}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--oauth-provider"})," flag enables OAuth for the share using the specified provider."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--oauth-email-address-patterns"})," flag accepts a single glob pattern that matches an authenticated email address that is allowed to access the share. Use this flag multiple times to allow different patterns."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"--oauth-check-interval"})," flag specifies how frequently the authentication must be checked."]}),"\n",(0,o.jsx)(t.p,{children:"An example public share:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-text",children:"zrok share public --backend-mode web --oauth-provider github --oauth-email-address-patterns '*@zrok.io' ~/public\n"})})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},2306:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_1-dbb289a694d0c99b50cb949654d818f8.png"},7449:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_2-bc9d4c3f25853d608870eb220d00e5ee.png"},3891:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_3-7973d63cd117eaba72fbaeb4ff119a39.png"},4927:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/github_create_oauth_application_4-6fed398013c9e6c3a31e5721adac4a4c.png"},1390:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_1-e61ee7e8fa51bdc93feab84235a90673.png"},7141:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_2-60cf4edb52f453d605907c17400e0800.png"},604:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_3-1b3db3f9057d8626d64c5466dbb05ec7.png"},4419:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_create_credentials_4-f720031df1d09f997a18842745e9ea0d.png"},7700:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_2-b94a6456ce9b13e053b4c07d8f233e84.png"},941:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_3-edf62ea2b291b58093289d31c2dae58d.png"},962:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_4-4bc7e07b06c8a9a3c1e8f766f6f1c5a6.png"},2507:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_5-7c375cf49d8e2e392ca12b584462ab59.png"},4944:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/google_oauth_content_screen_6-9b0fe216a782ef378313650e99ea52a1.png"},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var i=n(6540);const o={},s=i.createContext(o);function r(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c015c796.32854b4b.js b/assets/js/c015c796.32854b4b.js deleted file mode 100644 index cd3a1fa4..00000000 --- a/assets/js/c015c796.32854b4b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[887],{2711:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"concepts/files","title":"Sharing Websites and Files","description":"With zrok it is possible to share files quickly and easily as well. To share files using zrok use","source":"@site/../docs/concepts/files.md","sourceDirName":"concepts","slug":"/concepts/files","permalink":"/docs/concepts/files","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/files.md","tags":[],"version":"current","sidebarPosition":30,"frontMatter":{"title":"Sharing Websites and Files","sidebar_position":30},"sidebar":"tutorialSidebar","previous":{"title":"Sharing TCP and UDP Servers","permalink":"/docs/concepts/tunnels"},"next":{"title":"Open Source","permalink":"/docs/concepts/opensource"}}');var r=n(4848),t=n(8453);const o={title:"Sharing Websites and Files",sidebar_position:30},c=void 0,l={},a=[];function d(e){const s={code:"code",img:"img",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.p,{children:["With ",(0,r.jsx)(s.code,{children:"zrok"})," it is possible to share files quickly and easily as well. To share files using ",(0,r.jsx)(s.code,{children:"zrok"})," use\nthe ",(0,r.jsx)(s.code,{children:"--backend-mode web"}),", for example: ",(0,r.jsx)(s.code,{children:"zrok share private . --backend-mode web"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"Running with this mode will make it trivially easy to share files from the directory which the command\nwas run from."}),"\n",(0,r.jsx)(s.p,{children:"For example if you have a directory with a structure like this:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"-rw-r--r--+ 1 Michael None 7090 Apr 17 12:53 CHANGELOG.md\n-rw-r--r--+ 1 Michael None 11346 Apr 17 12:53 LICENSE\n-rw-r--r--+ 1 Michael None 2885 Apr 17 12:53 README.md\n-rwxr-xr-x+ 1 Michael None 44250624 Apr 17 13:00 zrok.exe*\n"})}),"\n",(0,r.jsx)(s.p,{children:"The files can be shared using a command such as:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"zrok share public --backend-mode web .\n"})}),"\n",(0,r.jsxs)(s.p,{children:["Then the files can be access with a ",(0,r.jsx)(s.code,{children:"private"})," or ",(0,r.jsx)(s.code,{children:"public"})," share, for example as shown:"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"zrok_share_web_files",src:n(3112).A+"",width:"952",height:"723"})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"zrok"})," will automatically provide a stock website, which will allow the accessing user to browse and navigate the file tree. Clicking the files allows the user to download them."]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"zrok"})," can also share a pre-rendered static HTML website. If you have a directory like this:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"-rw-rw-r--+ 1 Michael None 56 Jun 26 13:23 index.html\n"})}),"\n",(0,r.jsxs)(s.p,{children:["If ",(0,r.jsx)(s.code,{children:"index.html"})," contains valid HTML, like this:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-html",children:"\n\n

Hello zrok

\n\n"})}),"\n",(0,r.jsx)(s.p,{children:"Sharing the directory will result in the following when you access the share in a web browser:"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"zrok_share_web_website",src:n(3514).A+"",width:"952",height:"723"})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"zrok"})," contains a built-in web server, which you can use to serve static websites as a share."]})]})}function h(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},3112:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_share_web_files-936de420b39b071d71a8e275fe84e63d.png"},3514:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_share_web_website-5d4c550374b118d1992e488bb319e230.png"},8453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>c});var i=n(6540);const r={},t=i.createContext(r);function o(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c015c796.74591fad.js b/assets/js/c015c796.74591fad.js new file mode 100644 index 00000000..5f09a981 --- /dev/null +++ b/assets/js/c015c796.74591fad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[887],{2711:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"concepts/files","title":"Sharing Websites and Files","description":"With zrok it is possible to share files quickly and easily as well. To share files using zrok use","source":"@site/../docs/concepts/files.md","sourceDirName":"concepts","slug":"/concepts/files","permalink":"/docs/next/concepts/files","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/concepts/files.md","tags":[],"version":"current","sidebarPosition":30,"frontMatter":{"title":"Sharing Websites and Files","sidebar_position":30},"sidebar":"tutorialSidebar","previous":{"title":"Sharing TCP and UDP Servers","permalink":"/docs/next/concepts/tunnels"},"next":{"title":"Open Source","permalink":"/docs/next/concepts/opensource"}}');var r=n(4848),t=n(8453);const o={title:"Sharing Websites and Files",sidebar_position:30},c=void 0,l={},a=[];function d(e){const s={code:"code",img:"img",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.p,{children:["With ",(0,r.jsx)(s.code,{children:"zrok"})," it is possible to share files quickly and easily as well. To share files using ",(0,r.jsx)(s.code,{children:"zrok"})," use\nthe ",(0,r.jsx)(s.code,{children:"--backend-mode web"}),", for example: ",(0,r.jsx)(s.code,{children:"zrok share private . --backend-mode web"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"Running with this mode will make it trivially easy to share files from the directory which the command\nwas run from."}),"\n",(0,r.jsx)(s.p,{children:"For example if you have a directory with a structure like this:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"-rw-r--r--+ 1 Michael None 7090 Apr 17 12:53 CHANGELOG.md\n-rw-r--r--+ 1 Michael None 11346 Apr 17 12:53 LICENSE\n-rw-r--r--+ 1 Michael None 2885 Apr 17 12:53 README.md\n-rwxr-xr-x+ 1 Michael None 44250624 Apr 17 13:00 zrok.exe*\n"})}),"\n",(0,r.jsx)(s.p,{children:"The files can be shared using a command such as:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"zrok share public --backend-mode web .\n"})}),"\n",(0,r.jsxs)(s.p,{children:["Then the files can be access with a ",(0,r.jsx)(s.code,{children:"private"})," or ",(0,r.jsx)(s.code,{children:"public"})," share, for example as shown:"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"zrok_share_web_files",src:n(3112).A+"",width:"952",height:"723"})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"zrok"})," will automatically provide a stock website, which will allow the accessing user to browse and navigate the file tree. Clicking the files allows the user to download them."]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"zrok"})," can also share a pre-rendered static HTML website. If you have a directory like this:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"-rw-rw-r--+ 1 Michael None 56 Jun 26 13:23 index.html\n"})}),"\n",(0,r.jsxs)(s.p,{children:["If ",(0,r.jsx)(s.code,{children:"index.html"})," contains valid HTML, like this:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-html",children:"\n\n

Hello zrok

\n\n"})}),"\n",(0,r.jsx)(s.p,{children:"Sharing the directory will result in the following when you access the share in a web browser:"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"zrok_share_web_website",src:n(3514).A+"",width:"952",height:"723"})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"zrok"})," contains a built-in web server, which you can use to serve static websites as a share."]})]})}function h(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},3112:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_share_web_files-936de420b39b071d71a8e275fe84e63d.png"},3514:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/zrok_share_web_website-5d4c550374b118d1992e488bb319e230.png"},8453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>c});var i=n(6540);const r={},t=i.createContext(r);function o(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c143539c.ca5c43b2.js b/assets/js/c143539c.ca5c43b2.js new file mode 100644 index 00000000..64348acb --- /dev/null +++ b/assets/js/c143539c.ca5c43b2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6384],{7660:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"1.0","banner":"unreleased","badge":true,"noIndex":false,"className":"docs-version-current","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Getting Started","href":"/docs/next/getting-started","docId":"getting-started","unlisted":false},{"type":"category","label":"Concepts","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Private Shares","href":"/docs/next/concepts/sharing-private","docId":"concepts/sharing-private","unlisted":false},{"type":"link","label":"Public Shares","href":"/docs/next/concepts/sharing-public","docId":"concepts/sharing-public","unlisted":false},{"type":"link","label":"Reserved Shares","href":"/docs/next/concepts/sharing-reserved","docId":"concepts/sharing-reserved","unlisted":false},{"type":"link","label":"Sharing HTTP Servers","href":"/docs/next/concepts/http","docId":"concepts/http","unlisted":false},{"type":"link","label":"Sharing TCP and UDP Servers","href":"/docs/next/concepts/tunnels","docId":"concepts/tunnels","unlisted":false},{"type":"link","label":"Sharing Websites and Files","href":"/docs/next/concepts/files","docId":"concepts/files","unlisted":false},{"type":"link","label":"Open Source","href":"/docs/next/concepts/opensource","docId":"concepts/opensource","unlisted":false},{"type":"link","label":"Hosting","href":"/docs/next/concepts/hosting","docId":"concepts/hosting","unlisted":false}],"href":"/docs/next/concepts/"},{"type":"category","label":"Guides","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Install","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Linux","href":"/docs/next/guides/install/linux","docId":"guides/install/linux","unlisted":false},{"type":"link","label":"macOS","href":"/docs/next/guides/install/macos","docId":"guides/install/macos","unlisted":false},{"type":"link","label":"Windows","href":"/docs/next/guides/install/windows","docId":"guides/install/windows","unlisted":false}],"href":"/docs/next/guides/install/"},{"type":"link","label":"frontdoor","href":"/docs/next/guides/frontdoor","docId":"guides/frontdoor","unlisted":false},{"type":"link","label":"Permission Modes","href":"/docs/next/guides/permission-modes","docId":"guides/permission-modes","unlisted":false},{"type":"category","label":"Docker Share","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Public Share","href":"/docs/next/guides/docker-share/docker_public_share_guide","docId":"guides/docker-share/docker_public_share_guide","unlisted":false},{"type":"link","label":"Private Share","href":"/docs/next/guides/docker-share/docker_private_share_guide","docId":"guides/docker-share/docker_private_share_guide","unlisted":false}],"href":"/docs/next/guides/docker-share/"},{"type":"link","label":"Linux User Share","href":"/docs/next/guides/linux-user-share/","docId":"guides/linux-user-share/index","unlisted":false},{"type":"category","label":"Self Hosting","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Linux","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"NGINX TLS","href":"/docs/next/guides/self-hosting/linux/nginx","docId":"guides/self-hosting/linux/nginx","unlisted":false}],"href":"/docs/next/guides/self-hosting/linux/"},{"type":"link","label":"Interstitial Pages","href":"/docs/next/guides/self-hosting/interstitial-page","docId":"guides/self-hosting/interstitial-page","unlisted":false},{"type":"link","label":"Organizations","href":"/docs/next/guides/self-hosting/organizations","docId":"guides/self-hosting/organizations","unlisted":false},{"type":"link","label":"Personalized Frontend","href":"/docs/next/guides/self-hosting/personalized-frontend","docId":"guides/self-hosting/personalized-frontend","unlisted":false},{"type":"link","label":"Docker","href":"/docs/next/guides/self-hosting/docker","docId":"guides/self-hosting/docker","unlisted":false},{"type":"link","label":"Kubernetes","href":"/docs/next/guides/self-hosting/kubernetes","docId":"guides/self-hosting/kubernetes","unlisted":false},{"type":"category","label":"Metrics and Limits","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Configuring Metrics","href":"/docs/next/guides/self-hosting/metrics-and-limits/configuring-metrics","docId":"guides/self-hosting/metrics-and-limits/configuring-metrics","unlisted":false},{"type":"link","label":"Configuring Limits","href":"/docs/next/guides/self-hosting/metrics-and-limits/configuring-limits","docId":"guides/self-hosting/metrics-and-limits/configuring-limits","unlisted":false}],"href":"/docs/next/category/metrics-and-limits"},{"type":"category","label":"OAuth","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"OAuth Public Frontend Configuration","href":"/docs/next/guides/self-hosting/oauth/configuring-oauth","docId":"guides/self-hosting/oauth/configuring-oauth","unlisted":false}],"href":"/docs/next/category/oauth"},{"type":"link","label":"Instance Config","href":"/docs/next/guides/self-hosting/instance-configuration","docId":"guides/self-hosting/instance-configuration","unlisted":false},{"type":"link","label":"Invitations","href":"/docs/next/guides/self-hosting/self-service-invite","docId":"guides/self-hosting/self-service-invite","unlisted":false}],"href":"/docs/next/category/self-hosting"},{"type":"link","label":"Drives","href":"/docs/next/guides/drives","docId":"guides/drives","unlisted":false},{"type":"link","label":"VPN","href":"/docs/next/guides/vpn/","docId":"guides/vpn/vpn","unlisted":false}],"href":"/docs/next/category/guides"},{"type":"category","label":"myzrok","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Custom Domains","href":"/docs/next/myzrok/custom-domains/","docId":"myzrok/custom-domains/index","unlisted":false}],"href":"/docs/next/category/myzrok"}]},"docs":{"concepts/files":{"id":"concepts/files","title":"Sharing Websites and Files","description":"With zrok it is possible to share files quickly and easily as well. To share files using zrok use","sidebar":"tutorialSidebar"},"concepts/hosting":{"id":"concepts/hosting","title":"Hosting","description":"Self-Hosted","sidebar":"tutorialSidebar"},"concepts/http":{"id":"concepts/http","title":"Sharing HTTP Servers","description":"zrok can share HTTP and HTTPS resources natively. If you have an existing web server that you want to share with other users, you can use the zrok share command using the --backend-mode proxy flag.","sidebar":"tutorialSidebar"},"concepts/index":{"id":"concepts/index","title":"Concepts","description":"zrok was designed to make sharing local resources both secure and easy. In this section of the zrok documentation, we\'ll tour through all of the most important features.","sidebar":"tutorialSidebar"},"concepts/opensource":{"id":"concepts/opensource","title":"Open Source","description":"It\'s important to the zrok project that it remain free and open source software. The code is available on GitHub","sidebar":"tutorialSidebar"},"concepts/sharing-private":{"id":"concepts/sharing-private","title":"Private Shares","description":"zrok was built to share and access digital resources. A private share allows a resource to be","sidebar":"tutorialSidebar"},"concepts/sharing-public":{"id":"concepts/sharing-public","title":"Public Shares","description":"zrok supports public sharing for web-based (HTTP and HTTPS) resources. These resources are easily shared with the general internet through public access points.","sidebar":"tutorialSidebar"},"concepts/sharing-reserved":{"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.","sidebar":"tutorialSidebar"},"concepts/tunnels":{"id":"concepts/tunnels","title":"Sharing TCP and UDP Servers","description":"zrok includes support for sharing low-level TCP and UDP network resources using the tcpTunnel and udpTunnel backend modes.","sidebar":"tutorialSidebar"},"getting-started":{"id":"getting-started","title":"Getting Started","description":"Your Secure Internet Sharing Perimeter","sidebar":"tutorialSidebar"},"guides/docker-share/docker_private_share_guide":{"id":"guides/docker-share/docker_private_share_guide","title":"Docker Private Share","description":"Goal","sidebar":"tutorialSidebar"},"guides/docker-share/docker_public_share_guide":{"id":"guides/docker-share/docker_public_share_guide","title":"Docker Compose Public Share","description":"Goal","sidebar":"tutorialSidebar"},"guides/docker-share/index":{"id":"guides/docker-share/index","title":"Getting Started with Docker","description":"Overview","sidebar":"tutorialSidebar"},"guides/drives":{"id":"guides/drives","title":"Drives","description":"The zrok drives CLI tools allow for simple, ergonomic management and synchronization of local and remote files.","sidebar":"tutorialSidebar"},"guides/frontdoor":{"id":"guides/frontdoor","title":"zrok frontdoor","description":"zrok frontdoor is the heavy-duty front door to your app or site. It makes your website or app available to your online audience through the shield of zrok.io\'s hardened, managed frontends.","sidebar":"tutorialSidebar"},"guides/install/index":{"id":"guides/install/index","title":"Install","description":"{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>w,frontMatter:()=>d,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"guides/install/windows","title":"Install zrok in Windows","description":"Windows Binary","source":"@site/../docs/guides/install/windows.mdx","sourceDirName":"guides/install","slug":"/guides/install/windows","permalink":"/docs/guides/install/windows","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/install/windows.mdx","tags":[],"version":"current","frontMatter":{"title":"Install zrok in Windows","sidebar_label":"Windows"},"sidebar":"tutorialSidebar","previous":{"title":"macOS","permalink":"/docs/guides/install/macos"},"next":{"title":"frontdoor","permalink":"/docs/guides/frontdoor"}}');var s=t(4848),o=t(8453),i=t(8151),a=t(595),l=t(1342);const d={title:"Install zrok in Windows",sidebar_label:"Windows"},c=void 0,u={},h=[{value:"Windows Binary",id:"windows-binary",level:2},{value:"Wintun for zrok VPN",id:"wintun-for-zrok-vpn",level:2}];function m(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"windows-binary",children:"Windows Binary"}),"\n",(0,s.jsx)(i.F,{children:(0,s.jsx)("div",{className:l.A.downloadContainer,children:(0,s.jsx)(a.A,{osName:"Windows",osLogo:"/img/logo-windows.svg"})})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"In PowerShell, change to the directory where you downloaded zrok."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:'cd "$env:USERPROFILE\\Downloads"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In PowerShell, install zrok in your home directory (",(0,s.jsx)(n.code,{children:"bin\\zrok.exe"}),"), and permanently set the executable search path."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:'$binDir = Join-Path -Path $env:USERPROFILE -ChildPath "bin"\nNew-Item -Path $binDir -ItemType Directory -ErrorAction SilentlyContinue\n$latest = Get-ChildItem -Path .\\zrok*windows*.tar.gz | Sort-Object LastWriteTime | Select-Object -Last 1\ntar -xf $latest.FullName -C $binDir zrok.exe\n$currentPath = [System.Environment]::GetEnvironmentVariable(\'PATH\', [System.EnvironmentVariableTarget]::User)\nif ($currentPath -notlike "*$binDir*") {\n $newPath = "$currentPath;$binDir"\n [System.Environment]::SetEnvironmentVariable(\'PATH\', $newPath, [System.EnvironmentVariableTarget]::User)\n $env:Path = $newPath\n}\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["With the ",(0,s.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,s.jsx)(n.code,{children:"zrok"})," directly."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"\n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | <\n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"wintun-for-zrok-vpn",children:"Wintun for zrok VPN"}),"\n",(0,s.jsxs)(n.p,{children:["On Windows, you must install Wintun to use zrok's VPN backend mode. See the ",(0,s.jsx)(n.a,{href:"/docs/guides/vpn/",children:"VPN guide"})," for more details."]})]})}function w(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},8151:(e,n,t)=>{t.d(n,{F:()=>a,d:()=>i});var r=t(6540),s=t(4848);const o=(0,r.createContext)([]),i=()=>(0,r.useContext)(o),a=e=>{let{children:n}=e;const[t,i]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),i(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,s.jsx)(o.Provider,{value:t,children:n})}},595:(e,n,t)=>{t.d(n,{A:()=>l});t(6540);var r=t(8151),s=t(1342),o=t(5293),i=t(4848);const a=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:t,infoText:l,guideLink:d}=e;const{colorMode:c}=(0,o.G)(),u=(0,r.d)();console.log("Assets in DownloadCard:",u);const h=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=u.filter((e=>e.name.includes(h)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,i.jsxs)("div",{className:s.A.downloadCard,children:[(0,i.jsx)("div",{className:s.A.imgContainer,children:(0,i.jsx)("img",{src:t,alt:`${n} logo`})}),(0,i.jsx)("h3",{children:n}),m.length>0&&(0,i.jsx)("ul",{children:m.map(((e,n)=>(0,i.jsx)("li",{className:s.A.downloadButtons,children:(0,i.jsx)("a",{href:e.url,className:s.A.downloadLinks,children:a(e.arch)})},n)))}),d&&(0,i.jsxs)("div",{className:s.A.cardFooter,children:[(0,i.jsx)("p",{children:l}),(0,i.jsx)("a",{href:d,children:"GUIDE"}),(0,i.jsx)("p",{})]})]})}},1342:(e,n,t)=>{t.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var r=t(6540);const s={},o=r.createContext(s);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c304be44.8987dfa6.js b/assets/js/c304be44.8987dfa6.js new file mode 100644 index 00000000..56183ad5 --- /dev/null +++ b/assets/js/c304be44.8987dfa6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3786],{6143:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>w,frontMatter:()=>d,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"guides/install/windows","title":"Install zrok in Windows","description":"Windows Binary","source":"@site/../docs/guides/install/windows.mdx","sourceDirName":"guides/install","slug":"/guides/install/windows","permalink":"/docs/next/guides/install/windows","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/install/windows.mdx","tags":[],"version":"current","frontMatter":{"title":"Install zrok in Windows","sidebar_label":"Windows"},"sidebar":"tutorialSidebar","previous":{"title":"macOS","permalink":"/docs/next/guides/install/macos"},"next":{"title":"frontdoor","permalink":"/docs/next/guides/frontdoor"}}');var s=t(4848),o=t(8453),i=t(8151),a=t(595),l=t(1342);const d={title:"Install zrok in Windows",sidebar_label:"Windows"},c=void 0,u={},h=[{value:"Windows Binary",id:"windows-binary",level:2},{value:"Wintun for zrok VPN",id:"wintun-for-zrok-vpn",level:2}];function m(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"windows-binary",children:"Windows Binary"}),"\n",(0,s.jsx)(i.F,{children:(0,s.jsx)("div",{className:l.A.downloadContainer,children:(0,s.jsx)(a.A,{osName:"Windows",osLogo:"/img/logo-windows.svg"})})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"In PowerShell, change to the directory where you downloaded zrok."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:'cd "$env:USERPROFILE\\Downloads"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In PowerShell, install zrok in your home directory (",(0,s.jsx)(n.code,{children:"bin\\zrok.exe"}),"), and permanently set the executable search path."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:'$binDir = Join-Path -Path $env:USERPROFILE -ChildPath "bin"\nNew-Item -Path $binDir -ItemType Directory -ErrorAction SilentlyContinue\n$latest = Get-ChildItem -Path .\\zrok*windows*.tar.gz | Sort-Object LastWriteTime | Select-Object -Last 1\ntar -xf $latest.FullName -C $binDir zrok.exe\n$currentPath = [System.Environment]::GetEnvironmentVariable(\'PATH\', [System.EnvironmentVariableTarget]::User)\nif ($currentPath -notlike "*$binDir*") {\n $newPath = "$currentPath;$binDir"\n [System.Environment]::SetEnvironmentVariable(\'PATH\', $newPath, [System.EnvironmentVariableTarget]::User)\n $env:Path = $newPath\n}\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["With the ",(0,s.jsx)(n.code,{children:"zrok"})," executable in your path, you can then execute the ",(0,s.jsx)(n.code,{children:"zrok"})," directly."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"zrok version\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"\n _____ __ ___ | | __\n|_ / '__/ _ \\| |/ /\n / /| | | (_) | <\n/___|_| \\___/|_|\\_\\\n\nv0.4.0 [c889005]\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"wintun-for-zrok-vpn",children:"Wintun for zrok VPN"}),"\n",(0,s.jsxs)(n.p,{children:["On Windows, you must install Wintun to use zrok's VPN backend mode. See the ",(0,s.jsx)(n.a,{href:"/docs/next/guides/vpn/",children:"VPN guide"})," for more details."]})]})}function w(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},8151:(e,n,t)=>{t.d(n,{F:()=>a,d:()=>i});var r=t(6540),s=t(4848);const o=(0,r.createContext)([]),i=()=>(0,r.useContext)(o),a=e=>{let{children:n}=e;const[t,i]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),i(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,s.jsx)(o.Provider,{value:t,children:n})}},595:(e,n,t)=>{t.d(n,{A:()=>l});t(6540);var r=t(8151),s=t(1342),o=t(5293),i=t(4848);const a=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},l=e=>{let{osName:n,osLogo:t,infoText:l,guideLink:d}=e;const{colorMode:c}=(0,o.G)(),u=(0,r.d)();console.log("Assets in DownloadCard:",u);const h=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=u.filter((e=>e.name.includes(h)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,i.jsxs)("div",{className:s.A.downloadCard,children:[(0,i.jsx)("div",{className:s.A.imgContainer,children:(0,i.jsx)("img",{src:t,alt:`${n} logo`})}),(0,i.jsx)("h3",{children:n}),m.length>0&&(0,i.jsx)("ul",{children:m.map(((e,n)=>(0,i.jsx)("li",{className:s.A.downloadButtons,children:(0,i.jsx)("a",{href:e.url,className:s.A.downloadLinks,children:a(e.arch)})},n)))}),d&&(0,i.jsxs)("div",{className:s.A.cardFooter,children:[(0,i.jsx)("p",{children:l}),(0,i.jsx)("a",{href:d,children:"GUIDE"}),(0,i.jsx)("p",{})]})]})}},1342:(e,n,t)=>{t.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var r=t(6540);const s={},o=r.createContext(s);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c88279fc.ad9139d6.js b/assets/js/c88279fc.ad9139d6.js new file mode 100644 index 00000000..4639b15b --- /dev/null +++ b/assets/js/c88279fc.ad9139d6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3165],{3154:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"guides/docker-share/docker_public_share_guide","title":"Docker Compose Public Share","description":"Goal","source":"@site/versioned_docs/version-0.4/guides/docker-share/docker_public_share_guide.md","sourceDirName":"guides/docker-share","slug":"/guides/docker-share/docker_public_share_guide","permalink":"/docs/guides/docker-share/docker_public_share_guide","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/docker-share/docker_public_share_guide.md","tags":[],"version":"0.4","sidebarPosition":10,"frontMatter":{"title":"Docker Compose Public Share","sidebar_position":10,"sidebar_label":"Public Share"},"sidebar":"tutorialSidebar","previous":{"title":"Getting Started with Docker","permalink":"/docs/guides/docker-share/"},"next":{"title":"Private Share","permalink":"/docs/guides/docker-share/docker_private_share_guide"}}');var o=n(4848),i=n(8453);const t={title:"Docker Compose Public Share",sidebar_position:10,sidebar_label:"Public Share"},a=void 0,c={},d=[{value:"Goal",id:"goal",level:2},{value:"Overview",id:"overview",level:2},{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"How it Works",id:"how-it-works",level:2},{value:"Create the Docker Project",id:"create-the-docker-project",level:2},{value:"Proxy Any Web Server",id:"proxy-any-web-server",level:2},{value:"Require Authentication",id:"require-authentication",level:2},{value:"OAuth Email",id:"oauth-email",level:3},{value:"Caddy is Powerful",id:"caddy-is-powerful",level:2}];function l(e){const r={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.h2,{id:"goal",children:"Goal"}),"\n",(0,o.jsx)(r.p,{children:"Publicly share a Docker Compose service with a separate zrok environment and a permanent zrok share URL."}),"\n",(0,o.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsx)(r.p,{children:"With zrok, you can publicly share a service that's running in Docker. You need a zrok public share running somewhere that it can reach the service you're sharing. As long as that public share is running and your service is available, anyone with the address can use your service."}),"\n",(0,o.jsxs)(r.p,{children:["Here's a short article with an overview of ",(0,o.jsx)(r.a,{href:"/docs/concepts/sharing-public",children:"public sharing with zrok"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,o.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/ycov--9ZtB4",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,o.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),"\n",(0,o.jsx)(r.p,{children:"The Docker Compose project uses your zrok account token to reserve a public subdomain and keep sharing the backend\ntarget."}),"\n",(0,o.jsx)(r.p,{children:"When the project runs it will:"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["enable a zrok environment unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/environment.json"})," exists in the ",(0,o.jsx)(r.code,{children:"zrok_env"})," volume"]}),"\n",(0,o.jsxs)(r.li,{children:["reserve a public subdomain for the service unless ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," exists"]}),"\n",(0,o.jsxs)(r.li,{children:["start sharing the target specified in the ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," environment variable"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"create-the-docker-project",children:"Create the Docker Project"}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Make a folder on your computer to use as a Docker Compose project for your zrok public share with a reserved subdomain and switch to the new directory in your terminal."}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Download ",(0,o.jsxs)(r.a,{href:"pathname:///zrok-public-reserved/compose.yml",children:["the reserved public share ",(0,o.jsx)(r.code,{children:"compose.yml"})," project file"]})," into the same directory."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Copy your zrok account's enable token from the zrok web console to your clipboard and paste it in a file named ",(0,o.jsx)(r.code,{children:".env"})," in the same folder like this:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_ENABLE_TOKEN="8UL9-48rN0ua"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Name the Share"}),"\n",(0,o.jsxs)(r.p,{children:["This unique name becomes part of the domain name of the share, e.g. ",(0,o.jsx)(r.code,{children:"https://my-prod-app.in.zrok.io"}),". A random name is generated if you don't specify one."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_UNIQUE_NAME="my-prod-app"\n'})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Run the Compose project to start sharing the built-in demo web server. Be sure to ",(0,o.jsx)(r.code,{children:"--detach"})," so the project runs in the background if you want it to auto-restart when your computer reboots."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up --detach\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Get the public share URL from the output of the ",(0,o.jsx)(r.code,{children:"zrok-share"})," service or by peeking in the zrok console where the share will appear in the graph."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose logs zrok-share\n"})}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-buttonless",metastring:'title="Output"',children:"zrok-public-share-1 | https://w6r1vesearkj.in.zrok.io/\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.p,{children:"This concludes the minimum steps to begin sharing the demo web server. Read on to learn how to pivot to sharing any website or web service by leveraging additional zrok backend modes."}),"\n",(0,o.jsx)(r.h2,{id:"proxy-any-web-server",children:"Proxy Any Web Server"}),"\n",(0,o.jsxs)(r.p,{children:["The simplest way to share your existing HTTP server is to set ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," (e.g. ",(0,o.jsx)(r.code,{children:"https://example.com"}),") in the environment of the ",(0,o.jsx)(r.code,{children:"docker compose up"})," command. When you restart the share will auto-configure for that URL."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_TARGET="http://example.com:8080"\n'})}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose down && docker compose up\n"})}),"\n",(0,o.jsx)(r.h2,{id:"require-authentication",children:"Require Authentication"}),"\n",(0,o.jsx)(r.p,{children:"You can require a password or an OAuth login with certain email addresses."}),"\n",(0,o.jsx)(r.h3,{id:"oauth-email",children:"OAuth Email"}),"\n",(0,o.jsxs)(r.p,{children:["You can allow specific email addresse patterns by setting ",(0,o.jsx)(r.code,{children:"ZROK_OAUTH_PROVIDER"})," to ",(0,o.jsx)(r.code,{children:"github"})," or ",(0,o.jsx)(r.code,{children:"google"})," and\n",(0,o.jsx)(r.code,{children:"ZROK_OAUTH_EMAILS"}),". Read more about the OAuth features in ",(0,o.jsx)(r.a,{href:"https://blog.openziti.io/the-zrok-oauth-public-frontend",children:"this blog\npost"}),"."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",metastring:'title=".env"',children:'ZROK_OAUTH_PROVIDER="github"\nZROK_OAUTH_EMAILS="alice@example.com *@acme.example.com"\n'})}),"\n",(0,o.jsx)(r.h2,{id:"caddy-is-powerful",children:"Caddy is Powerful"}),"\n",(0,o.jsxs)(r.p,{children:["The reserved public share project uses zrok's default backend mode, ",(0,o.jsx)(r.code,{children:"proxy"}),". Another backend mode, ",(0,o.jsx)(r.code,{children:"caddy"}),", accepts a path to ",(0,o.jsx)(r.a,{href:"https://caddyserver.com/docs/caddyfile",children:"a Caddyfile"})," as the value of ",(0,o.jsx)(r.code,{children:"ZROK_TARGET"})," (",(0,o.jsx)(r.a,{href:"https://github.com/openziti/zrok/tree/main/etc/caddy",children:"zrok Caddyfile examples"}),")."]}),"\n",(0,o.jsxs)(r.p,{children:["Caddy is the most powerful and flexible backend mode in zrok. You must reserve a new public subdomain whenever you switch the backend mode, so using ",(0,o.jsx)(r.code,{children:"caddy"})," reduces the risk that you'll have to share a new frontend URL with your users."]}),"\n",(0,o.jsx)(r.p,{children:"With Caddy, you can balance the workload for websites or web services or share static sites and files or all of the above at the same time. You can update the Caddyfile and restart the Docker Compose project to start sharing the new configuration with the same reserved public subdomain."}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Create a Caddyfile. This example demonstrates proxying two HTTP servers with a weighted round-robin load balancer."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-console",metastring:'title="Caddyfile"',children:"http:// {\n # zrok requires this bind address template\n bind {{ .ZrokBindAddress }}\n reverse_proxy /* {\n to http://httpbin1:8080 http://httpbin2:8080\n lb_policy weighted_round_robin 3 2\n }\n}\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Create a file ",(0,o.jsx)(r.code,{children:"compose.override.yml"}),". This example adds two ",(0,o.jsx)(r.code,{children:"httpbin"})," containers for load balancing, and mounts the Caddyfile into the container."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-yaml",metastring:'title="compose.override.yml"',children:"services:\n httpbin1:\n image: mccutchen/go-httpbin\n expose: 8080\n httpbin2:\n image: mccutchen/go-httpbin\n expose: 8080\n zrok-share:\n volumes:\n - ./Caddyfile:/mnt/.zrok/Caddyfile\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Start a new Docker Compose project or delete the existing state volume."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose down --volumes\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(r.p,{children:["If you prefer to keep using the same zrok environment with the new share then delete ",(0,o.jsx)(r.code,{children:"/mnt/.zrok/reserved.json"})," instead of the entire volume."]}),"\n",(0,o.jsxs)(r.ol,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Run the project to load the new configuration."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose up --detach\n"})}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:"Note the new reserved share URL from the log."}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"docker compose logs zrok-share\n"})}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-buttonless",metastring:'title="Output"',children:"INFO: zrok public URL: https://88s803f2qvao.in.zrok.io/\n"})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>a});var s=n(6540);const o={},i=s.createContext(o);function t(e){const r=s.useContext(i);return s.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:t(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cda0d2e5.0f474a3d.js b/assets/js/cda0d2e5.0f474a3d.js deleted file mode 100644 index 258f4271..00000000 --- a/assets/js/cda0d2e5.0f474a3d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2757],{633:(e,r,n)=>{n.d(r,{Ay:()=>a,RM:()=>t});var s=n(4848),i=n(8453);const t=[];function o(e){const r={a:"a",code:"code",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Set up ",(0,s.jsx)(r.code,{children:"zrok"}),"'s Linux package repository by following ",(0,s.jsx)(r.a,{href:"/docs/guides/install/linux#install-zrok-from-the-repository",children:"the Linux install guide"}),", or run this one-liner to complete the repo setup and install packages."]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",children:"curl -sSLf https://get.openziti.io/install.bash \\\n| sudo bash -s zrok-share\n"})}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["If you set up the repository by following the guide, then also install the ",(0,s.jsx)(r.code,{children:"zrok-share"})," package. This package provides the systemd service."]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:'title="Ubuntu, Debian"',children:"sudo apt install zrok-share\n"})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:'title="Fedora, Rocky"',children:"sudo dnf install zrok-share\n"})}),"\n"]}),"\n"]})}function a(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},7557:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>y,contentTitle:()=>j,default:()=>w,frontMatter:()=>k,metadata:()=>s,toc:()=>f});const s=JSON.parse('{"id":"guides/frontdoor","title":"zrok frontdoor","description":"zrok frontdoor is the heavy-duty front door to your app or site. It makes your website or app available to your online audience through the shield of zrok.io\'s hardened, managed frontends.","source":"@site/../docs/guides/frontdoor.mdx","sourceDirName":"guides","slug":"/guides/frontdoor","permalink":"/docs/guides/frontdoor","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/frontdoor.mdx","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"title":"zrok frontdoor","sidebar_label":"frontdoor","sidebar_position":20,"hide_table_of_contents":true},"sidebar":"tutorialSidebar","previous":{"title":"Windows","permalink":"/docs/guides/install/windows"},"next":{"title":"Permission Modes","permalink":"/docs/guides/permission-modes"}}');var i=n(4848),t=n(8453),o=n(6540),a=n(1470),l=n(159);const d=function(e){const[r,n]=(0,o.useState)(null);return(0,o.useEffect)((()=>{["Mac OS","Windows"].includes(l.wH)?n("Docker"):n("Linux")}),[]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(a.A,{...e,defaultValue:r,children:e.children})})};var c=n(9365),h=n(633),p=n(397),u=n(3902);const m=[{value:"Installation",id:"installation",level:2},...h.RM,{value:"Enable",id:"enable",level:2},{value:"Name your Share",id:"name-your-share",level:2},{value:"Use Cases",id:"use-cases",level:2},{value:"Proxy a Web Server",id:"proxy-a-web-server",level:3},{value:"Serve Static Files",id:"serve-static-files",level:3},{value:"Caddy Server",id:"caddy-server",level:3},{value:"Network Drive",id:"network-drive",level:3},{value:"Authentication",id:"authentication",level:2},{value:"OAuth",id:"oauth",level:3},{value:"Password",id:"password",level:3},{value:"Start the Service",id:"start-the-service",level:2},{value:"Compatibility",id:"compatibility",level:2},{value:"Package Contents",id:"package-contents",level:2}];function g(e){const r={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsx)(h.Ay,{}),"\n",(0,i.jsxs)(n,{children:[(0,i.jsx)("summary",{children:"Ansible Playbook"}),(0,i.jsxs)(u.A,{title:"Set up package repository and install zrok-share",children:[p.A,"\n- name: Install zrok-share package\ngather_facts: false\nhosts: all \nbecome: true\ntasks:\n- name: Install zrok-share\n ansible.builtin.package:\n name: zrok-share\n state: present\n\n- name: Copy env config from Ansible controller to target\n copy:\n dest: /opt/openziti/etc/zrok/zrok-share.env\n src: /opt/openziti/etc/zrok/zrok-share.env\n\n- name: Enable and restart service\n systemd:\n name: zrok-share\n enabled: yes\n state: restarted\n daemon_reload: yes\n\n- name: Wait for service\n systemd:\n name: zrok-share\n state: started\n register: service_status\n until: service_status.status.ActiveState == 'active'\n retries: 30\n delay: 1\n"]})]}),"\n",(0,i.jsx)(r.h2,{id:"enable",children:"Enable"}),"\n",(0,i.jsx)(r.p,{children:"Save the enable token from the zrok console in the configuration file."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_ENABLE_TOKEN="14cbfca9772f"\n'})}),"\n",(0,i.jsx)(r.h2,{id:"name-your-share",children:"Name your Share"}),"\n",(0,i.jsxs)(r.p,{children:["This unique name becomes part of the domain name of the share, e.g. ",(0,i.jsx)(r.code,{children:"https://my-prod-app.in.zrok.io"}),". A random name is generated if you don't specify one."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_UNIQUE_NAME="my-prod-app"\n'})}),"\n",(0,i.jsx)(r.h2,{id:"use-cases",children:"Use Cases"}),"\n",(0,i.jsxs)(r.p,{children:["You may change the target for the current backend mode, e.g. ",(0,i.jsx)(r.code,{children:"proxy"}),", by editing the configuration file and restarting the service. The reserved subdomain will remain the same."]}),"\n",(0,i.jsxs)(r.p,{children:["You may switch between backend modes or change authentication options by deleting ",(0,i.jsx)(r.code,{children:"/var/lib/zrok-share/.zrok/reserved.json"})," and restarting the service. A new subdomain will be reserved."]}),"\n",(0,i.jsx)(r.h3,{id:"proxy-a-web-server",children:"Proxy a Web Server"}),"\n",(0,i.jsx)(r.p,{children:"Proxy a reserved subdomain to an existing web server. The web server could be on a private network or on the same host as zrok."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="http://127.0.0.1:3000"\nZROK_BACKEND_MODE="proxy"\n'})}),"\n",(0,i.jsxs)(r.p,{children:["If your HTTPS server has an unverifiable TLS server certificate then you must set ",(0,i.jsx)(r.code,{children:"--insecure"}),"."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_INSECURE="--insecure"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"serve-static-files",children:"Serve Static Files"}),"\n",(0,i.jsxs)(r.p,{children:["Run zrok's embedded web server to serve the files in a directory. If there's an ",(0,i.jsx)(r.code,{children:"index.html"})," file in the directory then visitors will see that web page in their browser, otherwise they'll see a generated index of the files. The directory must be readable by 'other', e.g. ",(0,i.jsx)(r.code,{children:"chmod -R o+rX /var/www/html"}),"."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="/var/www/html"\nZROK_BACKEND_MODE="web"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"caddy-server",children:"Caddy Server"}),"\n",(0,i.jsx)(r.p,{children:"Use zrok's built-in Caddy server to serve static files or as a reverse proxy to multiple web servers with various HTTP routes or as a load-balanced set. A sample Caddyfile is available in the path shown."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="/opt/openziti/etc/zrok/multiple_upstream.Caddyfile"\nZROK_BACKEND_MODE="caddy"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"network-drive",children:"Network Drive"}),"\n",(0,i.jsxs)(r.p,{children:["This uses zrok's ",(0,i.jsx)(r.code,{children:"drive"})," backend mode to serve a directory of static files as a virtual network drive. The directory must be readable by 'other', e.g. ",(0,i.jsx)(r.code,{children:"chmod -R o+rX /usr/share/doc"}),"."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="/usr/share/doc"\nZROK_BACKEND_MODE="drive"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.a,{href:"https://blog.openziti.io/zrok-drives-an-early-preview",children:"Learn more about this feature in this blog post"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"authentication",children:"Authentication"}),"\n",(0,i.jsx)(r.p,{children:"You can limit access to certain email addresses with OAuth or require a password."}),"\n",(0,i.jsx)(r.h3,{id:"oauth",children:"OAuth"}),"\n",(0,i.jsx)(r.p,{children:"You can require that visitors authenticate with an email address that matches at least one of the suffixes you specify. Add the following to the configuration file."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_OAUTH_PROVIDER="github" # or google\nZROK_OAUTH_EMAILS="alice@example.com *@acme.example.com"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"password",children:"Password"}),"\n",(0,i.jsx)(r.p,{children:"Enable HTTP basic authentication by adding the following to the configuration file."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_BASIC_AUTH="user:passwd"\n'})}),"\n",(0,i.jsx)(r.h2,{id:"start-the-service",children:"Start the Service"}),"\n",(0,i.jsx)(r.p,{children:"Start the service, and check the zrok console or the service log for the reserved subdomain."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="run now and at startup"',children:"sudo systemctl enable --now zrok-share.service\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="run now"',children:"sudo systemctl restart zrok-share.service\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"journalctl -u zrok-share.service\n"})}),"\n",(0,i.jsx)(r.h2,{id:"compatibility",children:"Compatibility"}),"\n",(0,i.jsxs)(r.p,{children:["The Linux distribution must have a package manager that understands the ",(0,i.jsx)(r.code,{children:".deb"})," or ",(0,i.jsx)(r.code,{children:".rpm"})," format and be running systemd v232 or newer. The service was tested with:"]}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsx)(r.li,{children:"Ubuntu 20.04, 22.04, 23.04"}),"\n",(0,i.jsx)(r.li,{children:"Debian 11 12"}),"\n",(0,i.jsx)(r.li,{children:"Rocky 8, 9"}),"\n",(0,i.jsx)(r.li,{children:"Fedora 37, 38"}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"package-contents",children:"Package Contents"}),"\n",(0,i.jsxs)(r.p,{children:["The files included in the ",(0,i.jsx)(r.code,{children:"zrok-share"})," package are sourced ",(0,i.jsx)(r.a,{href:"https://github.com/openziti/zrok/tree/main/nfpm",children:"here in GitHub"}),"."]})]})}function b(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(g,{...e})}):g(e)}var x=n(1122),v=n(6025);const k={title:"zrok frontdoor",sidebar_label:"frontdoor",sidebar_position:20,hide_table_of_contents:!0},j=void 0,y={},f=[{value:"Overview",id:"overview",level:2},{value:"Choose your OS",id:"choose-your-os",level:2},{value:"Goal",id:"goal",level:2},{value:"How it Works",id:"how-it-works",level:2},...m,{value:"Concepts",id:"concepts",level:2}];function z(e){const r={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"zrok frontdoor"})," is the heavy-duty front door to your app or site. It makes your website or app available to your online audience through the shield of zrok.io's hardened, managed frontends."]}),"\n",(0,i.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/5Vi8GKuTi_I",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,i.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(r.p,{children:["zrok frontends are the parts of zrok that proxy incoming public web traffic to zrok backend shares via OpenZiti. When you use zrok with a ",(0,i.jsx)(r.code,{children:"zrok.io"})," frontend, you're using ",(0,i.jsx)(r.strong,{children:"zrok frontdoor"}),". ",(0,i.jsx)(r.code,{children:"zrok.io"})," is zrok-as-a-service by NetFoundry, the team behind OpenZiti. You need a free account to use ",(0,i.jsx)(r.strong,{children:"zrok frontdoor"}),"."]}),"\n",(0,i.jsx)(x.A,{alt:"frontdoor diagram",sources:{light:(0,v.Ay)("/img/zrok-frontdoor-light-mode.svg"),dark:(0,v.Ay)("/img/zrok-frontdoor-dark-mode.svg")}}),"\n",(0,i.jsx)(r.h2,{id:"choose-your-os",children:"Choose your OS"}),"\n",(0,i.jsx)(r.p,{children:"Choose between installing the Linux package or running zrok with Docker (Linux, macOS, or Windows)."}),"\n","\n",(0,i.jsxs)(d,{queryString:"os",values:[{label:"Linux",value:"Linux"},{label:"Docker",value:"Docker"}],children:[(0,i.jsxs)(c.A,{value:"Linux",children:[(0,i.jsxs)(r.p,{children:["On Linux, zrok frontdoor is implemented natively as a system service provided by the ",(0,i.jsx)(r.code,{children:"zrok-share"})," DEB or RPM package."]}),(0,i.jsx)(r.h2,{id:"goal",children:"Goal"}),(0,i.jsx)(r.p,{children:"Proxy a reserved public subdomain to a backend target with an always-on Linux system service."}),(0,i.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"zrok-share"})," package creates a ",(0,i.jsx)(r.code,{children:"zrok-share.service"})," unit in systemd. The administrator edits the service's configuration file to specify the:"]}),(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsx)(r.li,{children:"zrok account token"}),"\n",(0,i.jsxs)(r.li,{children:["target URL or files to be shared and backend mode, e.g. ",(0,i.jsx)(r.code,{children:"proxy"})]}),"\n",(0,i.jsx)(r.li,{children:"authentication options, if wanted"}),"\n"]}),(0,i.jsx)(r.p,{children:"When the service starts it will:"}),(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["enable the zrok environment unless ",(0,i.jsx)(r.code,{children:"/var/lib/zrok-share/.zrok/environment.json"})," exists"]}),"\n",(0,i.jsxs)(r.li,{children:["reserve a public subdomain for the service unless ",(0,i.jsx)(r.code,{children:"/var/lib/zrok-share/.zrok/reserved.json"})," exists"]}),"\n",(0,i.jsxs)(r.li,{children:["start sharing the target specified as ",(0,i.jsx)(r.code,{children:"ZROK_TARGET"})," in the environment file"]}),"\n"]}),(0,i.jsx)(b,{})]}),(0,i.jsx)(c.A,{value:"Docker",children:(0,i.jsxs)(r.p,{children:["On macOS and Windows, zrok frontdoor is implemented as a Docker Compose project which reserves a public subdomain for your website or service and manages a zrok environment that's separate from the Docker host. ",(0,i.jsx)(r.a,{href:"/docs/guides/docker-share/docker_public_share_guide",children:"Link to the Docker Public Share Guide"})]})})]}),"\n",(0,i.jsx)(r.h2,{id:"concepts",children:"Concepts"}),"\n",(0,i.jsxs)(r.p,{children:["Overview of ",(0,i.jsx)(r.a,{href:"/docs/concepts/sharing-reserved",children:"zrok reserved shares"})]})]})}function w(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(z,{...e})}):z(e)}},3902:(e,r,n)=>{n.d(r,{A:()=>o});n(6540);var s=n(382),i=n(1432),t=n(4848);const o=e=>{let{title:r,children:n}=e;const o=n.map((e=>"string"==typeof e?e.trim():s.Ay.dump(e).trim())).join("\n\n");return(0,t.jsx)("div",{children:(0,t.jsx)(i.A,{language:"yaml",title:r,children:o})})}},397:(e,r,n)=>{n.d(r,{A:()=>s});const s=[{name:"Set up zrok Package Repo",gather_facts:!0,hosts:"all",become:!0,tasks:[{name:"Set up apt repo",when:'ansible_os_family == "Debian"',block:[{name:"Install playbook dependencies","ansible.builtin.package":{name:["gnupg"],state:"present"}},{name:"Fetch armored pubkey","ansible.builtin.uri":{url:"https://get.openziti.io/tun/package-repos.gpg",return_content:"yes"},register:"armored_pubkey"},{name:"Dearmor pubkey","ansible.builtin.shell":'gpg --dearmor --output /usr/share/keyrings/openziti.gpg <<< "{{ armored_pubkey.content }}"\n',args:{creates:"/usr/share/keyrings/openziti.gpg",executable:"/bin/bash"}},{name:"Set pubkey filemode","ansible.builtin.file":{path:"/usr/share/keyrings/openziti.gpg",mode:"a+rX"}},{name:"Install OpenZiti repo deb source","ansible.builtin.copy":{dest:"/etc/apt/sources.list.d/openziti-release.list",content:"deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main\n"}},{name:"Refresh Repo Sources","ansible.builtin.apt":{update_cache:"yes",cache_valid_time:3600}}]},{name:"Set up yum repo",when:'ansible_os_family == "RedHat"',block:[{name:"Install OpenZiti repo rpm source","ansible.builtin.yum_repository":{name:"OpenZitiRelease",description:"OpenZiti Release",baseurl:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch",enabled:"yes",gpgkey:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key",repo_gpgcheck:"yes",gpgcheck:"no"}}]}]}]}}]); \ No newline at end of file diff --git a/assets/js/cda0d2e5.1f575585.js b/assets/js/cda0d2e5.1f575585.js new file mode 100644 index 00000000..63c9f3a3 --- /dev/null +++ b/assets/js/cda0d2e5.1f575585.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2757],{633:(e,r,n)=>{n.d(r,{Ay:()=>a,RM:()=>t});var s=n(4848),i=n(8453);const t=[];function o(e){const r={a:"a",code:"code",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Set up ",(0,s.jsx)(r.code,{children:"zrok"}),"'s Linux package repository by following ",(0,s.jsx)(r.a,{href:"/docs/next/guides/install/linux#install-zrok-from-the-repository",children:"the Linux install guide"}),", or run this one-liner to complete the repo setup and install packages."]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",children:"curl -sSLf https://get.openziti.io/install.bash \\\n| sudo bash -s zrok-share\n"})}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["If you set up the repository by following the guide, then also install the ",(0,s.jsx)(r.code,{children:"zrok-share"})," package. This package provides the systemd service."]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:'title="Ubuntu, Debian"',children:"sudo apt install zrok-share\n"})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:'title="Fedora, Rocky"',children:"sudo dnf install zrok-share\n"})}),"\n"]}),"\n"]})}function a(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},4888:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>v,contentTitle:()=>b,default:()=>y,frontMatter:()=>x,metadata:()=>s,toc:()=>k});const s=JSON.parse('{"id":"guides/frontdoor","title":"zrok frontdoor","description":"zrok frontdoor is the heavy-duty front door to your app or site. It makes your website or app available to your online audience through the shield of zrok.io\'s hardened, managed frontends.","source":"@site/../docs/guides/frontdoor.mdx","sourceDirName":"guides","slug":"/guides/frontdoor","permalink":"/docs/next/guides/frontdoor","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/frontdoor.mdx","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"title":"zrok frontdoor","sidebar_label":"frontdoor","sidebar_position":20,"hide_table_of_contents":true},"sidebar":"tutorialSidebar","previous":{"title":"Windows","permalink":"/docs/next/guides/install/windows"},"next":{"title":"Permission Modes","permalink":"/docs/next/guides/permission-modes"}}');var i=n(4848),t=n(8453),o=n(9028),a=n(9365),l=n(633),d=n(397),c=n(3902);const h=[{value:"Installation",id:"installation",level:2},...l.RM,{value:"Enable",id:"enable",level:2},{value:"Name your Share",id:"name-your-share",level:2},{value:"Use Cases",id:"use-cases",level:2},{value:"Proxy a Web Server",id:"proxy-a-web-server",level:3},{value:"Serve Static Files",id:"serve-static-files",level:3},{value:"Caddy Server",id:"caddy-server",level:3},{value:"Network Drive",id:"network-drive",level:3},{value:"Authentication",id:"authentication",level:2},{value:"OAuth",id:"oauth",level:3},{value:"Password",id:"password",level:3},{value:"Start the Service",id:"start-the-service",level:2},{value:"Compatibility",id:"compatibility",level:2},{value:"Package Contents",id:"package-contents",level:2}];function p(e){const r={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsx)(l.Ay,{}),"\n",(0,i.jsxs)(n,{children:[(0,i.jsx)("summary",{children:"Ansible Playbook"}),(0,i.jsxs)(c.A,{title:"Set up package repository and install zrok-share",children:[d.A,"\n- name: Install zrok-share package\ngather_facts: false\nhosts: all \nbecome: true\ntasks:\n- name: Install zrok-share\n ansible.builtin.package:\n name: zrok-share\n state: present\n\n- name: Copy env config from Ansible controller to target\n copy:\n dest: /opt/openziti/etc/zrok/zrok-share.env\n src: /opt/openziti/etc/zrok/zrok-share.env\n\n- name: Enable and restart service\n systemd:\n name: zrok-share\n enabled: yes\n state: restarted\n daemon_reload: yes\n\n- name: Wait for service\n systemd:\n name: zrok-share\n state: started\n register: service_status\n until: service_status.status.ActiveState == 'active'\n retries: 30\n delay: 1\n"]})]}),"\n",(0,i.jsx)(r.h2,{id:"enable",children:"Enable"}),"\n",(0,i.jsx)(r.p,{children:"Save the enable token from the zrok console in the configuration file."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_ENABLE_TOKEN="14cbfca9772f"\n'})}),"\n",(0,i.jsx)(r.h2,{id:"name-your-share",children:"Name your Share"}),"\n",(0,i.jsxs)(r.p,{children:["This unique name becomes part of the domain name of the share, e.g. ",(0,i.jsx)(r.code,{children:"https://my-prod-app.in.zrok.io"}),". A random name is generated if you don't specify one."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_UNIQUE_NAME="my-prod-app"\n'})}),"\n",(0,i.jsx)(r.h2,{id:"use-cases",children:"Use Cases"}),"\n",(0,i.jsxs)(r.p,{children:["You may change the target for the current backend mode, e.g. ",(0,i.jsx)(r.code,{children:"proxy"}),", by editing the configuration file and restarting the service. The reserved subdomain will remain the same."]}),"\n",(0,i.jsxs)(r.p,{children:["You may switch between backend modes or change authentication options by deleting ",(0,i.jsx)(r.code,{children:"/var/lib/zrok-share/.zrok/reserved.json"})," and restarting the service. A new subdomain will be reserved."]}),"\n",(0,i.jsx)(r.h3,{id:"proxy-a-web-server",children:"Proxy a Web Server"}),"\n",(0,i.jsx)(r.p,{children:"Proxy a reserved subdomain to an existing web server. The web server could be on a private network or on the same host as zrok."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="http://127.0.0.1:3000"\nZROK_BACKEND_MODE="proxy"\n'})}),"\n",(0,i.jsxs)(r.p,{children:["If your HTTPS server has an unverifiable TLS server certificate then you must set ",(0,i.jsx)(r.code,{children:"--insecure"}),"."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_INSECURE="--insecure"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"serve-static-files",children:"Serve Static Files"}),"\n",(0,i.jsxs)(r.p,{children:["Run zrok's embedded web server to serve the files in a directory. If there's an ",(0,i.jsx)(r.code,{children:"index.html"})," file in the directory then visitors will see that web page in their browser, otherwise they'll see a generated index of the files. The directory must be readable by 'other', e.g. ",(0,i.jsx)(r.code,{children:"chmod -R o+rX /var/www/html"}),"."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="/var/www/html"\nZROK_BACKEND_MODE="web"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"caddy-server",children:"Caddy Server"}),"\n",(0,i.jsx)(r.p,{children:"Use zrok's built-in Caddy server to serve static files or as a reverse proxy to multiple web servers with various HTTP routes or as a load-balanced set. A sample Caddyfile is available in the path shown."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="/opt/openziti/etc/zrok/multiple_upstream.Caddyfile"\nZROK_BACKEND_MODE="caddy"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"network-drive",children:"Network Drive"}),"\n",(0,i.jsxs)(r.p,{children:["This uses zrok's ",(0,i.jsx)(r.code,{children:"drive"})," backend mode to serve a directory of static files as a virtual network drive. The directory must be readable by 'other', e.g. ",(0,i.jsx)(r.code,{children:"chmod -R o+rX /usr/share/doc"}),"."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="/usr/share/doc"\nZROK_BACKEND_MODE="drive"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.a,{href:"https://blog.openziti.io/zrok-drives-an-early-preview",children:"Learn more about this feature in this blog post"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"authentication",children:"Authentication"}),"\n",(0,i.jsx)(r.p,{children:"You can limit access to certain email addresses with OAuth or require a password."}),"\n",(0,i.jsx)(r.h3,{id:"oauth",children:"OAuth"}),"\n",(0,i.jsx)(r.p,{children:"You can require that visitors authenticate with an email address that matches at least one of the suffixes you specify. Add the following to the configuration file."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_OAUTH_PROVIDER="github" # or google\nZROK_OAUTH_EMAILS="alice@example.com *@acme.example.com"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"password",children:"Password"}),"\n",(0,i.jsx)(r.p,{children:"Enable HTTP basic authentication by adding the following to the configuration file."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_BASIC_AUTH="user:passwd"\n'})}),"\n",(0,i.jsx)(r.h2,{id:"start-the-service",children:"Start the Service"}),"\n",(0,i.jsx)(r.p,{children:"Start the service, and check the zrok console or the service log for the reserved subdomain."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="run now and at startup"',children:"sudo systemctl enable --now zrok-share.service\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="run now"',children:"sudo systemctl restart zrok-share.service\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"journalctl -u zrok-share.service\n"})}),"\n",(0,i.jsx)(r.h2,{id:"compatibility",children:"Compatibility"}),"\n",(0,i.jsxs)(r.p,{children:["The Linux distribution must have a package manager that understands the ",(0,i.jsx)(r.code,{children:".deb"})," or ",(0,i.jsx)(r.code,{children:".rpm"})," format and be running systemd v232 or newer. The service was tested with:"]}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsx)(r.li,{children:"Ubuntu 20.04, 22.04, 23.04"}),"\n",(0,i.jsx)(r.li,{children:"Debian 11 12"}),"\n",(0,i.jsx)(r.li,{children:"Rocky 8, 9"}),"\n",(0,i.jsx)(r.li,{children:"Fedora 37, 38"}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"package-contents",children:"Package Contents"}),"\n",(0,i.jsxs)(r.p,{children:["The files included in the ",(0,i.jsx)(r.code,{children:"zrok-share"})," package are sourced ",(0,i.jsx)(r.a,{href:"https://github.com/openziti/zrok/tree/main/nfpm",children:"here in GitHub"}),"."]})]})}function u(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}var m=n(1122),g=n(6025);const x={title:"zrok frontdoor",sidebar_label:"frontdoor",sidebar_position:20,hide_table_of_contents:!0},b=void 0,v={},k=[{value:"Overview",id:"overview",level:2},{value:"Choose your OS",id:"choose-your-os",level:2},{value:"Goal",id:"goal",level:2},{value:"How it Works",id:"how-it-works",level:2},...h,{value:"Concepts",id:"concepts",level:2}];function j(e){const r={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"zrok frontdoor"})," is the heavy-duty front door to your app or site. It makes your website or app available to your online audience through the shield of zrok.io's hardened, managed frontends."]}),"\n",(0,i.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/5Vi8GKuTi_I",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,i.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(r.p,{children:["zrok frontends are the parts of zrok that proxy incoming public web traffic to zrok backend shares via OpenZiti. When you use zrok with a ",(0,i.jsx)(r.code,{children:"zrok.io"})," frontend, you're using ",(0,i.jsx)(r.strong,{children:"zrok frontdoor"}),". ",(0,i.jsx)(r.code,{children:"zrok.io"})," is zrok-as-a-service by NetFoundry, the team behind OpenZiti. You need a free account to use ",(0,i.jsx)(r.strong,{children:"zrok frontdoor"}),"."]}),"\n",(0,i.jsx)(m.A,{alt:"frontdoor diagram",sources:{light:(0,g.Ay)("/img/zrok-frontdoor-light-mode.svg"),dark:(0,g.Ay)("/img/zrok-frontdoor-dark-mode.svg")}}),"\n",(0,i.jsx)(r.h2,{id:"choose-your-os",children:"Choose your OS"}),"\n",(0,i.jsx)(r.p,{children:"Choose between installing the Linux package or running zrok with Docker (Linux, macOS, or Windows)."}),"\n","\n",(0,i.jsxs)(o.A,{queryString:"os",values:[{label:"Linux",value:"Linux"},{label:"Docker",value:"Docker"}],children:[(0,i.jsxs)(a.A,{value:"Linux",children:[(0,i.jsxs)(r.p,{children:["On Linux, zrok frontdoor is implemented natively as a system service provided by the ",(0,i.jsx)(r.code,{children:"zrok-share"})," DEB or RPM package."]}),(0,i.jsx)(r.h2,{id:"goal",children:"Goal"}),(0,i.jsx)(r.p,{children:"Proxy a reserved public subdomain to a backend target with an always-on Linux system service."}),(0,i.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"zrok-share"})," package creates a ",(0,i.jsx)(r.code,{children:"zrok-share.service"})," unit in systemd. The administrator edits the service's configuration file to specify the:"]}),(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsx)(r.li,{children:"zrok account token"}),"\n",(0,i.jsxs)(r.li,{children:["target URL or files to be shared and backend mode, e.g. ",(0,i.jsx)(r.code,{children:"proxy"})]}),"\n",(0,i.jsx)(r.li,{children:"authentication options, if wanted"}),"\n"]}),(0,i.jsx)(r.p,{children:"When the service starts it will:"}),(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["enable the zrok environment unless ",(0,i.jsx)(r.code,{children:"/var/lib/zrok-share/.zrok/environment.json"})," exists"]}),"\n",(0,i.jsxs)(r.li,{children:["reserve a public subdomain for the service unless ",(0,i.jsx)(r.code,{children:"/var/lib/zrok-share/.zrok/reserved.json"})," exists"]}),"\n",(0,i.jsxs)(r.li,{children:["start sharing the target specified as ",(0,i.jsx)(r.code,{children:"ZROK_TARGET"})," in the environment file"]}),"\n"]}),(0,i.jsx)(u,{})]}),(0,i.jsx)(a.A,{value:"Docker",children:(0,i.jsxs)(r.p,{children:["On macOS and Windows, zrok frontdoor is implemented as a Docker Compose project which reserves a public subdomain for your website or service and manages a zrok environment that's separate from the Docker host. ",(0,i.jsx)(r.a,{href:"/docs/next/guides/docker-share/docker_public_share_guide",children:"Link to the Docker Public Share Guide"})]})})]}),"\n",(0,i.jsx)(r.h2,{id:"concepts",children:"Concepts"}),"\n",(0,i.jsxs)(r.p,{children:["Overview of ",(0,i.jsx)(r.a,{href:"/docs/next/concepts/sharing-reserved",children:"zrok reserved shares"})]})]})}function y(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(j,{...e})}):j(e)}},3902:(e,r,n)=>{n.d(r,{A:()=>o});n(6540);var s=n(382),i=n(1432),t=n(4848);const o=e=>{let{title:r,children:n}=e;const o=n.map((e=>"string"==typeof e?e.trim():s.Ay.dump(e).trim())).join("\n\n");return(0,t.jsx)("div",{children:(0,t.jsx)(i.A,{language:"yaml",title:r,children:o})})}},9028:(e,r,n)=>{n.d(r,{A:()=>a});var s=n(6540),i=n(1470),t=n(159),o=n(4848);const a=function(e){const[r,n]=(0,s.useState)(null);return(0,s.useEffect)((()=>{["Mac OS","Windows"].includes(t.wH)?n("Docker"):n("Linux")}),[]),(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(i.A,{...e,defaultValue:r,children:e.children})})}},397:(e,r,n)=>{n.d(r,{A:()=>s});const s=[{name:"Set up zrok Package Repo",gather_facts:!0,hosts:"all",become:!0,tasks:[{name:"Set up apt repo",when:'ansible_os_family == "Debian"',block:[{name:"Install playbook dependencies","ansible.builtin.package":{name:["gnupg"],state:"present"}},{name:"Fetch armored pubkey","ansible.builtin.uri":{url:"https://get.openziti.io/tun/package-repos.gpg",return_content:"yes"},register:"armored_pubkey"},{name:"Dearmor pubkey","ansible.builtin.shell":'gpg --dearmor --output /usr/share/keyrings/openziti.gpg <<< "{{ armored_pubkey.content }}"\n',args:{creates:"/usr/share/keyrings/openziti.gpg",executable:"/bin/bash"}},{name:"Set pubkey filemode","ansible.builtin.file":{path:"/usr/share/keyrings/openziti.gpg",mode:"a+rX"}},{name:"Install OpenZiti repo deb source","ansible.builtin.copy":{dest:"/etc/apt/sources.list.d/openziti-release.list",content:"deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main\n"}},{name:"Refresh Repo Sources","ansible.builtin.apt":{update_cache:"yes",cache_valid_time:3600}}]},{name:"Set up yum repo",when:'ansible_os_family == "RedHat"',block:[{name:"Install OpenZiti repo rpm source","ansible.builtin.yum_repository":{name:"OpenZitiRelease",description:"OpenZiti Release",baseurl:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch",enabled:"yes",gpgkey:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key",repo_gpgcheck:"yes",gpgcheck:"no"}}]}]}]}}]); \ No newline at end of file diff --git a/assets/js/ce04f2ae.5a1fc859.js b/assets/js/ce04f2ae.5a1fc859.js new file mode 100644 index 00000000..a7cd87cc --- /dev/null +++ b/assets/js/ce04f2ae.5a1fc859.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6289],{9429:(e,s,r)=>{r.d(s,{Ay:()=>c,RM:()=>o});var n=r(4848),t=r(8453);const o=[];function i(e){const s={a:"a",code:"code",li:"li",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"proxy"})," mode forwards requests received by the frontend to the target server (",(0,n.jsx)(s.a,{href:"/docs/next/concepts/http",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"web"})," mode serves a target folder as a file index web page (",(0,n.jsx)(s.a,{href:"/docs/next/concepts/files",children:"more"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"drive"})," mode serves a target folder with WebDAV (",(0,n.jsx)(s.a,{href:"/docs/next/guides/drives",children:"guide"}),")"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"caddy"})," mode runs the built-in Caddy server with the targeted Caddyfile (",(0,n.jsx)(s.a,{href:"pathname:///simple_reverse_proxy.Caddyfile",children:"example"}),")"]}),"\n"]})}function c(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(i,{...e})}):i(e)}},3222:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>c,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"concepts/sharing-private","title":"Private Shares","description":"zrok was built to share and access digital resources. A private share allows a resource to be","source":"@site/versioned_docs/version-0.4/concepts/sharing-private.mdx","sourceDirName":"concepts","slug":"/concepts/sharing-private","permalink":"/docs/concepts/sharing-private","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/concepts/sharing-private.mdx","tags":[],"version":"0.4","sidebarPosition":0,"frontMatter":{"sidebar_position":0},"sidebar":"tutorialSidebar","previous":{"title":"Concepts","permalink":"/docs/concepts/"},"next":{"title":"Public Shares","permalink":"/docs/concepts/sharing-public"}}');var t=r(4848),o=r(8453),i=r(9429);const c={sidebar_position:0},a="Private Shares",d={},h=[{value:"Peer to Peer",id:"peer-to-peer",level:2},{value:"Private Backend Modes",id:"private-backend-modes",level:2},...i.RM];function l(e){const s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"private-shares",children:"Private Shares"})}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"zrok"})," was built to share and access digital resources. A ",(0,t.jsx)(s.code,{children:"private"})," share allows a resource to be\naccessed on another user's system as if it were local to them. Privately shared resources can only be accessed by another ",(0,t.jsx)(s.code,{children:"zrok"})," user who has the details of your unique share. You are in control of who can access your ",(0,t.jsx)(s.code,{children:"private"})," shares by sharing the share token."]}),"\n",(0,t.jsxs)(s.p,{children:["Peer-to-peer private resource sharing is one of the things that makes ",(0,t.jsx)(s.code,{children:"zrok"})," unique."]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"zrok"})," also provides ",(0,t.jsx)(s.code,{children:"public"})," sharing of resources with non-",(0,t.jsx)(s.code,{children:"zrok"})," users. Public resource sharing is limited to only resources that can be accessed over ",(0,t.jsx)(s.code,{children:"HTTP"})," or ",(0,t.jsx)(s.code,{children:"HTTPS"}),". ",(0,t.jsx)(s.code,{children:"private"})," sharing works with all of the resources types that ",(0,t.jsx)(s.code,{children:"zrok"})," supports."]}),"\n",(0,t.jsx)(s.p,{children:"Here's how private sharing works:"}),"\n",(0,t.jsx)(s.h2,{id:"peer-to-peer",children:"Peer to Peer"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"zrok_public_share",src:r(7827).A+"",width:"2200",height:"922"})}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"private"})," shares are accessed using the ",(0,t.jsx)(s.code,{children:"zrok access"})," command, and require the accessing user to have a ",(0,t.jsx)(s.code,{children:"zrok enable"}),"-d account on the same service instance where the share was created."]}),"\n",(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.code,{children:"private"})," share is identified by a ",(0,t.jsx)(s.em,{children:"share token"}),". The accessing user will use the share token, along with the ",(0,t.jsx)(s.code,{children:"zrok access"})," command to create a local endpoint on their system, which lets them use the shared resource as if it were local to their system."]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"zrok"})," does not require you to open any firewall ports or otherwise compromise the security of your local system; there is never an attack surface open to the public internet. As soon as you terminate the ",(0,t.jsx)(s.code,{children:"zrok share"})," process, you immediately terminate any possible access to your shared resource."]}),"\n",(0,t.jsxs)(s.p,{children:["The shared resource can be a development web server to share with friends and colleagues, a webhook from a server running in the cloud which has ",(0,t.jsx)(s.code,{children:"zrok"})," running and has been instructed to ",(0,t.jsx)(s.code,{children:"access"})," the private resource. ",(0,t.jsx)(s.code,{children:"zrok"})," can also share files, websites, and low-level TCP and UDP network connections using the ",(0,t.jsx)(s.code,{children:"tunnel"})," backend. What matters is that the access to the shared resource is not done in a public way, and can only be accessed by other ",(0,t.jsx)(s.code,{children:"zrok"})," users that have access to your share token."]}),"\n",(0,t.jsxs)(s.p,{children:["The peer-to-peer capabilities of ",(0,t.jsx)(s.code,{children:"zrok"})," are an important property of the underlying ",(0,t.jsx)(s.a,{href:"https://docs.openziti.io/docs/learn/introduction/",children:"OpenZiti"})," network that ",(0,t.jsx)(s.code,{children:"zrok"})," uses to provide connectivity between users and resources."]}),"\n",(0,t.jsxs)(s.p,{children:["Creating ",(0,t.jsx)(s.code,{children:"private"})," shares is easy and is accomplished using the ",(0,t.jsx)(s.code,{children:"zrok share private"})," command. Run ",(0,t.jsx)(s.code,{children:"zrok share private"})," to see the usage output and to further learn how to use the command."]}),"\n",(0,t.jsx)(s.h2,{id:"private-backend-modes",children:"Private Backend Modes"}),"\n",(0,t.jsxs)(s.p,{children:["The default backend mode is ",(0,t.jsx)(s.code,{children:"proxy"})," which targets an HTTP URL that must be reachable by the backend."]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",metastring:'title="proxy example"',children:"zrok share private 80\n"})}),"\n",(0,t.jsx)(i.Ay,{}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"tcpTunnel"}),", ",(0,t.jsx)(s.code,{children:"udpTunnel"})," modes forward the data payload to the target server (",(0,t.jsx)(s.a,{href:"/docs/concepts/tunnels",children:"more"}),")"]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"socks"})," mode provides a SOCKS5 dynamic proxy on the private access bind port that tunnels TCP payloads to the share backend where they are forwarded to their destinations (",(0,t.jsx)(s.a,{href:"https://blog.openziti.io/the-zrok-socks-backend",children:"blog"}),")"]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"vpn"})," mode provides a network layer tunnel between the private access and the share backend (",(0,t.jsx)(s.a,{href:"/docs/guides/vpn/",children:"guide"}),")"]}),"\n"]})]})}function p(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},7827:(e,s,r)=>{r.d(s,{A:()=>n});const n=r.p+"assets/images/zrok_private_share-3b4b2f89f7b5e6704d0b9078a701161e.png"},8453:(e,s,r)=>{r.d(s,{R:()=>i,x:()=>c});var n=r(6540);const t={},o=n.createContext(t);function i(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d069dfd8.1b30527e.js b/assets/js/d069dfd8.1b30527e.js new file mode 100644 index 00000000..777c56ef --- /dev/null +++ b/assets/js/d069dfd8.1b30527e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9650],{1220:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Guides","slug":"/category/guides","permalink":"/docs/next/category/guides","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"Hosting","permalink":"/docs/next/concepts/hosting"},"next":{"title":"Install","permalink":"/docs/next/guides/install/"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/d3a54718.f6050e84.js b/assets/js/d3a54718.f6050e84.js new file mode 100644 index 00000000..0ceea350 --- /dev/null +++ b/assets/js/d3a54718.f6050e84.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1346],{2758:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"guides/self-hosting/linux/nginx","title":"NGINX Reverse Proxy for zrok","description":"Walkthrough Video","source":"@site/versioned_docs/version-0.4/guides/self-hosting/linux/nginx.mdx","sourceDirName":"guides/self-hosting/linux","slug":"/guides/self-hosting/linux/nginx","permalink":"/docs/guides/self-hosting/linux/nginx","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/self-hosting/linux/nginx.mdx","tags":[],"version":"0.4","sidebarPosition":50,"frontMatter":{"sidebar_position":50,"sidebar_label":"NGINX TLS"},"sidebar":"tutorialSidebar","previous":{"title":"Linux","permalink":"/docs/guides/self-hosting/linux/"},"next":{"title":"Interstitial Pages","permalink":"/docs/guides/self-hosting/interstitial-page"}}');var o=r(4848),i=r(8453);const s={sidebar_position:50,sidebar_label:"NGINX TLS"},l="NGINX Reverse Proxy for zrok",a={},c=[{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"Before You Begin",id:"before-you-begin",level:2},{value:"Choose a Reverse Proxy Address",id:"choose-a-reverse-proxy-address",level:2},{value:"Obtain a Wildcard Server Certificate",id:"obtain-a-wildcard-server-certificate",level:2},{value:"Install NGINX",id:"install-nginx",level:2},{value:"Configure NGINX",id:"configure-nginx",level:2},{value:"Restart NGINX",id:"restart-nginx",level:2},{value:"Check the Firewall",id:"check-the-firewall",level:2},{value:"Update the zrok Frontend",id:"update-the-zrok-frontend",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"nginx-reverse-proxy-for-zrok",children:"NGINX Reverse Proxy for zrok"})}),"\n",(0,o.jsx)(n.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,o.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/870A5dke_u4?start=1080",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,o.jsx)(n.h2,{id:"before-you-begin",children:"Before You Begin"}),"\n",(0,o.jsxs)(n.p,{children:["I'll assume you have a running ",(0,o.jsx)(n.code,{children:"zrok"})," controller and frontend and wish to front both with NGINX providing server TLS. Go back to ",(0,o.jsx)(n.a,{href:"/docs/guides/self-hosting/linux/",children:"Self-Hosting Guide"})," if you still need to spin those up."]}),"\n",(0,o.jsx)(n.h2,{id:"choose-a-reverse-proxy-address",children:"Choose a Reverse Proxy Address"}),"\n",(0,o.jsxs)(n.p,{children:["I'll use ",(0,o.jsx)(n.code,{children:"https://api.zrok.quigley.com:443"})," in this example, and assume you already set up wildcard DNS like ",(0,o.jsx)(n.code,{children:"*.zrok.quigley.com"}),". This lets us elect ",(0,o.jsx)(n.code,{children:"api.zrok.quigley.com"})," as the controller DNS name, and forward any other incoming requests to the zrok public frontend."]}),"\n",(0,o.jsx)(n.h2,{id:"obtain-a-wildcard-server-certificate",children:"Obtain a Wildcard Server Certificate"}),"\n",(0,o.jsx)(n.p,{children:"You must complete a DNS challenge to obtain a wildcard certificate from Let's Encrypt. I'll assume you know how to create the necessary TXT record in the DNS zone you're using with zrok."}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Install certbot: ",(0,o.jsx)(n.a,{href:"https://eff-certbot.readthedocs.io/en/stable/install.html",children:"https://eff-certbot.readthedocs.io/en/stable/install.html"})]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Run certbot with the manual plugin: ",(0,o.jsx)(n.a,{href:"https://certbot.eff.org/docs/using.html#manual",children:"https://certbot.eff.org/docs/using.html#manual"})]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"# install cert for *.zrok.quigley.com in /etc/letsencrypt\nsudo certbot certonly --manual\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"install-nginx",children:(0,o.jsx)(n.a,{href:"https://www.nginx.com/resources/wiki/start/topics/tutorials/install/",children:"Install NGINX"})}),"\n",(0,o.jsx)(n.h2,{id:"configure-nginx",children:"Configure NGINX"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"server {\n listen 443 ssl;\n server_name api.zrok.quigley.com;\n ssl_certificate /etc/letsencrypt/live/zrok.quigley.com/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/zrok.quigley.com/privkey.pem;\n ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\n ssl_ciphers HIGH:!aNULL:!MD5;\n\n location / {\n proxy_pass http://127.0.0.1:18080;\n error_log /var/log/nginx/zrok-controller.log;\n }\n\n}\n\nmap $http_upgrade $connection_upgrade {\n default keep-alive;\n 'websocket' upgrade;\n '' close;\n}\n\nserver {\n listen 443 ssl;\n server_name *.zrok.quigley.com;\n ssl_certificate /etc/letsencrypt/live/zrok.quigley.com/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/zrok.quigley.com/privkey.pem;\n ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\n ssl_ciphers HIGH:!aNULL:!MD5;\n\n location / {\n proxy_pass http://127.0.0.1:8080;\n proxy_set_header Host $host;\n error_log /var/log/nginx/zrok-frontend.log;\n proxy_busy_buffers_size 512k;\n proxy_buffers 4 512k;\n proxy_buffer_size 256k;\n\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}\n"})}),"\n",(0,o.jsx)(n.h2,{id:"restart-nginx",children:"Restart NGINX"}),"\n",(0,o.jsx)(n.p,{children:"Load the new configuration by restarting NGINX. Check the logs to make sure it's happy."}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsx)(n.p,{children:"Started A high performance web server and a reverse proxy server."}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"check-the-firewall",children:"Check the Firewall"}),"\n",(0,o.jsx)(n.p,{children:"If you followed the non-TLS quickstart then you may have opened 8080,108080/tcp in your firewall. You can go ahead and replace those exceptions with 443/tcp because only NGINX needs to be reachable for zrok to function."}),"\n",(0,o.jsx)(n.h2,{id:"update-the-zrok-frontend",children:"Update the zrok Frontend"}),"\n",(0,o.jsxs)(n.p,{children:['List available frontends to obtain the token identifier of the frontend named "public". You may need to set ',(0,o.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," or ",(0,o.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," before running ",(0,o.jsx)(n.code,{children:"zrok admin"}),"."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"$ zrok admin list frontends\n\n TOKEN ZID PUBLIC NAME URL TEMPLATE CREATED AT UPDATED AT \n 2NiDTRYUww18 7DsLh9DXG public http://{token}.zrok.quigley.com:8080 2023-01-19 05:29:20.793 +0000 UTC 2023-01-19 06:17:25 +0000 UTC \n"})}),"\n",(0,o.jsx)(n.p,{children:"Update the URL template to use NGINX."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"$ zrok admin update frontend 2NiDTRYUww18 --url-template https://{token}.zrok.quigley.com:443\n[ 0.028] INFO main.(*adminUpdateFrontendCommand).run: updated global frontend '2NiDTRYUww18'\n"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>l});var t=r(6540);const o={},i=t.createContext(o);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d768dc0f.2a7d58f9.js b/assets/js/d768dc0f.2a7d58f9.js new file mode 100644 index 00000000..31227f44 --- /dev/null +++ b/assets/js/d768dc0f.2a7d58f9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4247],{1916:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"guides/self-hosting/linux/index","title":"Self-Hosting Guide for Linux","description":"Walkthrough Video","source":"@site/../docs/guides/self-hosting/linux/index.mdx","sourceDirName":"guides/self-hosting/linux","slug":"/guides/self-hosting/linux/","permalink":"/docs/next/guides/self-hosting/linux/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/linux/index.mdx","tags":[],"version":"current","sidebarPosition":40,"frontMatter":{"sidebar_position":40,"title":"Self-Hosting Guide for Linux","sidebar_label":"Linux"},"sidebar":"tutorialSidebar","previous":{"title":"Self Hosting","permalink":"/docs/next/category/self-hosting"},"next":{"title":"NGINX TLS","permalink":"/docs/next/guides/self-hosting/linux/nginx"}}');var t=r(4848),i=r(8453);const s={sidebar_position:40,title:"Self-Hosting Guide for Linux",sidebar_label:"Linux"},l=void 0,c={},d=[{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"Before you Begin",id:"before-you-begin",level:2},{value:"OpenZiti",id:"openziti",level:2},{value:"Install zrok",id:"install-zrok",level:2},{value:"Configure the Controller",id:"configure-the-controller",level:2},{value:"Environment Variables",id:"environment-variables",level:2},{value:"Bootstrap OpenZiti for zrok",id:"bootstrap-openziti-for-zrok",level:2},{value:"Run zrok Controller",id:"run-zrok-controller",level:2},{value:"Create zrok Frontend",id:"create-zrok-frontend",level:2},{value:"Configure the Public Frontend",id:"configure-the-public-frontend",level:2},{value:"Start Public Frontend",id:"start-public-frontend",level:2},{value:"Create a User Account",id:"create-a-user-account",level:2},{value:"Invite Additional Users",id:"invite-additional-users",level:2},{value:"Enable Your Environment",id:"enable-your-environment",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,t.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/870A5dke_u4",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,t.jsx)(n.h2,{id:"before-you-begin",children:"Before you Begin"}),"\n",(0,t.jsxs)(n.p,{children:["This will get you up and running with a self-hosted instance of ",(0,t.jsx)(n.code,{children:"zrok"}),". I'll assume you have the following:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"a Linux server with a public IP"}),"\n",(0,t.jsxs)(n.li,{children:["a wildcard DNS record like ",(0,t.jsx)(n.code,{children:"*.zrok.quigley.com"})," that resolves to the server IP"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"openziti",children:"OpenZiti"}),"\n",(0,t.jsxs)(n.p,{children:['OpenZiti (a.k.a. "Ziti") provides secure network backhaul for ',(0,t.jsx)(n.code,{children:"zrok"})," public and private shares. You need a Ziti Controller and a Ziti Router. You can run everything on the same Linux VPS."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the Ziti Controller package by following the ",(0,t.jsx)(n.a,{href:"https://openziti.io/docs/category/deployments",children:"Linux controller deployment guide"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Ensure your answer file (",(0,t.jsx)(n.code,{children:"/opt/openziti/etc/controller/bootstrap.env"}),") has the FQDN of your Linux server and an admin password defined."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Ensure your firewall allows the controller port from the answer file."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start the controller service (",(0,t.jsx)(n.code,{children:"ziti-controller.service"}),") and check the status."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Log in to the Ziti Controller"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"ziti edge login localhost:1280 -u admin -p \n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Administratively Create a Ziti Router"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'ziti edge create edge-router "router1" -o /tmp/router1.jwt\n'})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the Ziti Router package by following ",(0,t.jsx)(n.a,{href:"https://openziti.io/docs/category/deployments",children:"the Linux router deployment guide"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Ensure your answer file (",(0,t.jsx)(n.code,{children:"/opt/openziti/etc/router/bootstrap.env"}),") has the FQDN of your Linux server for both controller and router addresses and the enrollment token from the previous step."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Ensure your firewall allows the router port from the answer file."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start the router service (",(0,t.jsx)(n.code,{children:"ziti-router.service"}),") and check the status."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Verify the new router is online."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"ziti edge list edge-routers\n"})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"install-zrok",children:"Install zrok"}),"\n",(0,t.jsxs)(n.p,{children:["Debian and RPM packages are available for ",(0,t.jsx)(n.code,{children:"zrok"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo apt install zrok\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Follow ",(0,t.jsx)(n.a,{href:"/docs/next/guides/install/linux",children:"the Linux installation guide"})," to install the ",(0,t.jsx)(n.code,{children:"zrok"})," package from the repository or manually install the binary for your platform."]}),"\n",(0,t.jsx)(n.h2,{id:"configure-the-controller",children:"Configure the Controller"}),"\n",(0,t.jsxs)(n.p,{children:["Create a ",(0,t.jsx)(n.code,{children:"zrok"})," controller configuration file in ",(0,t.jsx)(n.code,{children:"etc/ctrl.yml"}),". The controller can terminate TLS or you may front the server with a reverse proxy that continually renews the necessary wildcard certificate (e.g., Caddy w/ a DNS provider plugin). This example will expose the non-TLS listener for the controller."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# _____ __ ___ | | __\n# |_ / \'__/ _ \\| |/ /\n# / /| | | (_) | <\n# /___|_| \\___/|_|\\_\\\n# controller configuration\n\nv: 3\n\nadmin:\n # generate these admin tokens from a source of randomness, e.g. \n # LC_ALL=C tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c32\n secrets:\n - Q8V0LqnNb5wNX9kE1fgQ0H6VlcvJybB1 # be sure to change this!\n\nendpoint:\n host: 0.0.0.0\n port: 18080\n\ninvites:\n invites_open: true\n\nstore:\n path: zrok.db\n type: sqlite3\n\nziti:\n api_endpoint: "https://127.0.0.1:1280"\n username: admin\n password: "XO0xHp75uuyeireO2xmmVlK91T7B9fpD"\n\n# you can use certbot to renew the wildcard cert for the controller with a DNS provider API token or front this `zrok` # controller with Caddy\n#tls:\n# cert_path: "/Path/To/Cert/zrok.crt"\n# key_path: "/Path/To/Cert/zrok.key"\n\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"admin"})," section defines privileged administrative credentials and must be set in the ",(0,t.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," environment variable in shells where you want to run ",(0,t.jsx)(n.code,{children:"zrok admin"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"endpoint"})," section defines where your ",(0,t.jsx)(n.code,{children:"zrok"})," controller will listen."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"store"})," section defines the local ",(0,t.jsx)(n.code,{children:"sqlite3"})," database used by the controller."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"ziti"})," section defines how the ",(0,t.jsx)(n.code,{children:"zrok"})," controller should communicate with your OpenZiti installation. When using the OpenZiti quickstart, an administrative password will be generated; the ",(0,t.jsx)(n.code,{children:"password"})," in the ",(0,t.jsx)(n.code,{children:"ziti"})," stanza should reflect this password."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.p,{children:["Be sure to see the ",(0,t.jsxs)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:r(9873).A+"",children:["reference configuration at ",(0,t.jsx)(n.code,{children:"etc/ctrl.yml"})]})," for the complete documentation of the current configuration file format for the ",(0,t.jsx)(n.code,{children:"zrok"})," controller and service instance components."]}),(0,t.jsxs)(n.p,{children:["See the separate guides on ",(0,t.jsx)(n.a,{href:"/docs/next/guides/self-hosting/metrics-and-limits/configuring-metrics",children:"configuring metrics"})," and ",(0,t.jsx)(n.a,{href:"/docs/next/guides/self-hosting/metrics-and-limits/configuring-limits",children:"configuring limits"})," for details about both of these specialized areas of service instance configuration."]})]}),"\n",(0,t.jsx)(n.h2,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok"})," binaries are configured to work with the global ",(0,t.jsx)(n.code,{children:"zrok.io"})," service, and default to using ",(0,t.jsx)(n.code,{children:"api.zrok.io"})," as the endpoint for communicating with the service."]}),"\n",(0,t.jsxs)(n.p,{children:["To work with a self-hosted ",(0,t.jsx)(n.code,{children:"zrok"})," deployment, you'll need to set the ",(0,t.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," environment variable to point to the address where your ",(0,t.jsx)(n.code,{children:"zrok"})," controller will be listening, according to ",(0,t.jsx)(n.code,{children:"endpoint"})," in the configuration file above."]}),"\n",(0,t.jsx)(n.p,{children:"In my case, I've set:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"export ZROK_API_ENDPOINT=http://127.0.0.1:18080\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsxs)(n.a,{href:"/docs/next/guides/self-hosting/instance-configuration",children:["Read more about configuring your self-hosted ",(0,t.jsx)(n.code,{children:"zrok"})," instance"]}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"bootstrap-openziti-for-zrok",children:"Bootstrap OpenZiti for zrok"}),"\n",(0,t.jsxs)(n.p,{children:["With your OpenZiti network running and your configuration saved to a local file (I refer to mine as ",(0,t.jsx)(n.code,{children:"etc/ctrl.yml"})," in these examples), you're ready to bootstrap the Ziti network."]}),"\n",(0,t.jsxs)(n.p,{children:["Use the ",(0,t.jsx)(n.code,{children:"zrok admin bootstrap"})," command to bootstrap like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok admin bootstrap etc/ctrl.yml\n[ 0.002] INFO main.(*adminBootstrap).run: {\n\t...\n}\n[ 0.002] INFO zrok/controller/store.Open: database connected\n[ 0.006] INFO zrok/controller/store.(*Store).migrate: applied 0 migrations\n[ 0.006] INFO zrok/controller.Bootstrap: connecting to the ziti edge management api\n[ 0.039] INFO zrok/controller.Bootstrap: creating identity for controller ziti access\n[ 0.071] INFO zrok/controller.Bootstrap: controller identity: jKd8AINSz\n[ 0.082] INFO zrok/controller.assertIdentity: asserted identity 'jKd8AINSz'\n[ 0.085] INFO zrok/controller.assertErpForIdentity: asserted erps for 'ctrl' (jKd8AINSz)\n[ 0.085] INFO zrok/controller.Bootstrap: creating identity for frontend ziti access\n[ 0.118] INFO zrok/controller.Bootstrap: frontend identity: sqJRAINSiB\n[ 0.119] INFO zrok/controller.assertIdentity: asserted identity 'sqJRAINSiB'\n[ 0.120] INFO zrok/controller.assertErpForIdentity: asserted erps for 'frontend' (sqJRAINSiB)\n[ 0.120] WARNING zrok/controller.Bootstrap: missing public frontend for ziti id 'sqJRAINSiB'; please use 'zrok admin create frontend sqJRAINSiB public https://{token}.your.dns.name' to create a frontend instance\n[ 0.123] INFO zrok/controller.assertZrokProxyConfigType: found 'zrok.proxy.v1' config type with id '33CyjNbIepkXHN5VzGDA8L'\n[ 0.124] INFO zrok/controller.assertMetricsService: creating 'metrics' service\n[ 0.126] INFO zrok/controller.assertMetricsService: asserted 'metrics' service (5RpPZZ7T8bZf1ENjwGiPc3)\n[ 0.128] INFO zrok/controller.assertMetricsSerp: creating 'metrics' serp\n[ 0.130] INFO zrok/controller.assertMetricsSerp: asserted 'metrics' serp\n[ 0.134] INFO zrok/controller.assertCtrlMetricsBind: creating 'ctrl-metrics-bind' service policy\n[ 0.135] INFO zrok/controller.assertCtrlMetricsBind: asserted 'ctrl-metrics-bind' service policy\n[ 0.138] INFO zrok/controller.assertFrontendMetricsDial: creating 'frontend-metrics-dial' service policy\n[ 0.140] INFO zrok/controller.assertFrontendMetricsDial: asserted 'frontend-metrics-dial' service policy\n[ 0.140] INFO main.(*adminBootstrap).run: bootstrap complete!\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok admin bootstrap"})," command configures the ",(0,t.jsx)(n.code,{children:"zrok"})," database, the necessary OpenZiti identities, and all of the OpenZiti policies required to run a ",(0,t.jsx)(n.code,{children:"zrok"})," service."]}),"\n",(0,t.jsx)(n.p,{children:"Notice this warning:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[ 0.120] WARNING zrok/controller.Bootstrap: missing public frontend for ziti id 'sqJRAINSiB'; please use 'zrok admin create frontend sqJRAINSiB public https://{token}.your.dns.name' to create a frontend instance\n"})}),"\n",(0,t.jsxs)(n.p,{children:["If you find it necessary to re-run the ",(0,t.jsx)(n.code,{children:"zrok admin bootstrap"})," command, you may need to add the ",(0,t.jsx)(n.code,{children:"--skip-frontend"})," flag to avoid re-creating the default ",(0,t.jsx)(n.code,{children:"public"})," frontend's Ziti identity and router policy."]}),"\n",(0,t.jsx)(n.h2,{id:"run-zrok-controller",children:"Run zrok Controller"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok"}),' bootstrap process wants us to create a "public frontend" for our service. ',(0,t.jsx)(n.code,{children:"zrok"})," uses public frontends to allow users to specify where they would like public traffic to ingress from."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok admin create frontend"})," command requires a running ",(0,t.jsx)(n.code,{children:"zrok"})," controller, so let's start that up first:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok controller etc/ctrl.yml \n[ 0.003] INFO main.(*controllerCommand).run: {\n\t...\n}\n[ 0.016] INFO zrok/controller.inspectZiti: inspecting ziti controller configuration\n[ 0.048] INFO zrok/controller.findZrokProxyConfigType: found 'zrok.proxy.v1' config type with id '33CyjNbIepkXHN5VzGDA8L'\n[ 0.048] INFO zrok/controller/store.Open: database connected\n[ 0.048] INFO zrok/controller/store.(*Store).migrate: applied 0 migrations\n[ 0.049] INFO zrok/controller.(*metricsAgent).run: starting\n[ 0.064] INFO zrok/rest_server_zrok.setupGlobalMiddleware: configuring\n[ 0.064] INFO zrok/ui.StaticBuilder: building\n[ 0.065] INFO zrok/rest_server_zrok.(*Server).Logf: Serving zrok at http://[::]:18080\n[ 0.085] INFO zrok/controller.(*metricsAgent).listen: started\n"})}),"\n",(0,t.jsx)(n.h2,{id:"create-zrok-frontend",children:"Create zrok Frontend"}),"\n",(0,t.jsxs)(n.p,{children:["With our ",(0,t.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," and ",(0,t.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," environment variables set, we can create our public frontend like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok admin create frontend sqJRAINSiB public http://{token}.zrok.quigley.com:8080\n[ 0.037] INFO main.(*adminCreateFrontendCommand).run: created global public frontend 'WEirJNHVlcW9'\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The id of the frontend was emitted earlier in by the ",(0,t.jsx)(n.code,{children:"zrok"})," controller when we ran the bootstrap command. If you don't have that log message the you can find the id again with the ",(0,t.jsx)(n.code,{children:"ziti"})," CLI like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# log in as admin (example)\nziti edge login localhost:1280 -u admin -p XO0xHp75uuyeireO2xmmVlK91T7B9fpD\n\n# list Ziti identities created by the quickstart and bootstrap\nziti edge list identities\n"})}),"\n",(0,t.jsx)(n.p,{children:'The id is shown for the frontend identity named "public."'}),"\n",(0,t.jsxs)(n.p,{children:["Nice work! The ",(0,t.jsx)(n.code,{children:"zrok"})," controller is fully configured now that you have created the ",(0,t.jsx)(n.code,{children:"zrok"})," frontend."]}),"\n",(0,t.jsx)(n.h2,{id:"configure-the-public-frontend",children:"Configure the Public Frontend"}),"\n",(0,t.jsxs)(n.p,{children:["Create an http frontend configuration file in ",(0,t.jsx)(n.code,{children:"etc/http-frontend.yml"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"v: 3\nhost_match: zrok.quigley.com\naddress: 0.0.0.0:8080\n"})}),"\n",(0,t.jsxs)(n.p,{children:["This frontend config file has a ",(0,t.jsx)(n.code,{children:"host_match"})," pattern that represents the DNS zone you're using with this instance of ",(0,t.jsx)(n.code,{children:"zrok"}),". Incoming HTTP requests with a matching ",(0,t.jsx)(n.code,{children:"Host"})," header will be handled by this frontend. You may also specify the interface address where the frontend will listen for public access requests."]}),"\n",(0,t.jsxs)(n.p,{children:["The frontend does not provide server TLS, but you may front the server with a reverse proxy. The reverse proxy must forward the ",(0,t.jsx)(n.code,{children:"Host"})," header supplied by the viewer. This example will expose the non-TLS listener for the frontend."]}),"\n",(0,t.jsxs)(n.p,{children:["You can also specify an ",(0,t.jsx)(n.code,{children:"oauth"})," configuration in this file, full details of are found in ",(0,t.jsx)(n.a,{href:"/docs/next/guides/self-hosting/oauth/configuring-oauth#configuring-your-public-frontend",children:"OAuth Public Frontend Configuration"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"start-public-frontend",children:"Start Public Frontend"}),"\n",(0,t.jsx)(n.p,{children:"In another terminal window, run:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok access public etc/http-frontend.yml\n[ 0.002] INFO main.(*accessPublicCommand).run: {\n\t...\n}\n[ 0.002] INFO zrok/endpoints/public_frontend.newMetricsAgent: loaded 'public' identity\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok"})," frontend uses the ",(0,t.jsx)(n.code,{children:"public"})," identity created during the bootstrap process to securely access zrok backends. to provide public access for the ",(0,t.jsx)(n.code,{children:"zrok"})," deployment. It is expected that the configured listener for this frontend corresponds to the DNS template specified when creating the public frontend record above."]}),"\n",(0,t.jsx)(n.h2,{id:"create-a-user-account",children:"Create a User Account"}),"\n",(0,t.jsxs)(n.p,{children:["With our ",(0,t.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," and ",(0,t.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," environment variables set, we can create our first user account."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"zrok admin create account \n"})}),"\n",(0,t.jsx)(n.p,{children:"The output is the account token you will use to enable each device's zrok environment."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"SuGzRPjVDIcF\n"})}),"\n",(0,t.jsx)(n.h2,{id:"invite-additional-users",children:"Invite Additional Users"}),"\n",(0,t.jsxs)(n.p,{children:["Offer this onboarding method to your users if you have configured an email-sending service in your ",(0,t.jsx)(n.code,{children:"zrok"})," controller configuration."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok invite\nNew Email: user@domain.com\nConfirm Email: user@domain.com\ninvitation sent to 'user@domain.com'!\n"})}),"\n",(0,t.jsxs)(n.p,{children:["If you look at the console output from your ",(0,t.jsx)(n.code,{children:"zrok"})," controller, you'll see a message like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[ 238.168] INFO zrok/controller.(*inviteHandler).Handle: account request for 'user@domain.com' has registration token 'U2Ewt1UCn3ql'\n"})}),"\n",(0,t.jsxs)(n.p,{children:["You can access your ",(0,t.jsx)(n.code,{children:"zrok"})," controller's registration UI by pointing a web browser at:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"http://localhost:18080/register/U2Ewt1UCn3ql\n"})}),"\n",(0,t.jsx)(n.p,{children:"The UI will ask you to set a password for your new account. Go ahead and do that."}),"\n",(0,t.jsx)(n.p,{children:"After doing that, I see the following output in my controller console:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[ 516.778] INFO zrok/controller.(*registerHandler).Handle: created account 'user@domain.com' with token 'SuGzRPjVDIcF'\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Keep track of the token listed above (",(0,t.jsx)(n.code,{children:"SuGzRPjVDIcF"}),"). We'll use this to enable our shell for this ",(0,t.jsx)(n.code,{children:"zrok"})," deployment."]}),"\n",(0,t.jsx)(n.h2,{id:"enable-your-environment",children:"Enable Your Environment"}),"\n",(0,t.jsx)(n.p,{children:"On another device that can reach your Linux server by FQDN, configure the API endpoint and enable the environment with the account token you received when you created the first user account."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"export ZROK_API_ENDPOINT=https://zrok.quigley.com\n# or\nzrok config set apiEndpoint https://zrok.quigley.com\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"zrok enable SuGzRPjVDIcF\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"zrok environment '2AS1WZ3Sz' enabled for 'SuGzRPjVDIcF'\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"zrok status --secrets\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"Config:\n\n CONFIG VALUE SOURCE\n apiEndpoint https://zrok.quigley.com env\n\nEnvironment:\n\n PROPERTY VALUE\n Secret Token SuGzRPjVDIcF\n Ziti Identity 2AS1WZ3Sz\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Congratulations. You have a working ",(0,t.jsx)(n.code,{children:"zrok"})," environment!"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},9873:(e,n,r)=>{r.d(n,{A:()=>o});const o=r.p+"assets/files/ctrl-8eb59af1ca236b4f04e9461ebb345a53.yml"},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>l});var o=r(6540);const t={},i=o.createContext(t);function s(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d768dc0f.a434dad2.js b/assets/js/d768dc0f.a434dad2.js deleted file mode 100644 index 738c91c4..00000000 --- a/assets/js/d768dc0f.a434dad2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4247],{1916:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"guides/self-hosting/linux/index","title":"Self-Hosting Guide for Linux","description":"Walkthrough Video","source":"@site/../docs/guides/self-hosting/linux/index.mdx","sourceDirName":"guides/self-hosting/linux","slug":"/guides/self-hosting/linux/","permalink":"/docs/guides/self-hosting/linux/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/linux/index.mdx","tags":[],"version":"current","sidebarPosition":40,"frontMatter":{"sidebar_position":40,"title":"Self-Hosting Guide for Linux","sidebar_label":"Linux"},"sidebar":"tutorialSidebar","previous":{"title":"Self Hosting","permalink":"/docs/category/self-hosting"},"next":{"title":"NGINX TLS","permalink":"/docs/guides/self-hosting/linux/nginx"}}');var t=r(4848),i=r(8453);const s={sidebar_position:40,title:"Self-Hosting Guide for Linux",sidebar_label:"Linux"},l=void 0,c={},d=[{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"Before you Begin",id:"before-you-begin",level:2},{value:"OpenZiti",id:"openziti",level:2},{value:"Install zrok",id:"install-zrok",level:2},{value:"Configure the Controller",id:"configure-the-controller",level:2},{value:"Environment Variables",id:"environment-variables",level:2},{value:"Bootstrap OpenZiti for zrok",id:"bootstrap-openziti-for-zrok",level:2},{value:"Run zrok Controller",id:"run-zrok-controller",level:2},{value:"Create zrok Frontend",id:"create-zrok-frontend",level:2},{value:"Configure the Public Frontend",id:"configure-the-public-frontend",level:2},{value:"Start Public Frontend",id:"start-public-frontend",level:2},{value:"Create a User Account",id:"create-a-user-account",level:2},{value:"Invite Additional Users",id:"invite-additional-users",level:2},{value:"Enable Your Environment",id:"enable-your-environment",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,t.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/870A5dke_u4",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,t.jsx)(n.h2,{id:"before-you-begin",children:"Before you Begin"}),"\n",(0,t.jsxs)(n.p,{children:["This will get you up and running with a self-hosted instance of ",(0,t.jsx)(n.code,{children:"zrok"}),". I'll assume you have the following:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"a Linux server with a public IP"}),"\n",(0,t.jsxs)(n.li,{children:["a wildcard DNS record like ",(0,t.jsx)(n.code,{children:"*.zrok.quigley.com"})," that resolves to the server IP"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"openziti",children:"OpenZiti"}),"\n",(0,t.jsxs)(n.p,{children:['OpenZiti (a.k.a. "Ziti") provides secure network backhaul for ',(0,t.jsx)(n.code,{children:"zrok"})," public and private shares. You need a Ziti Controller and a Ziti Router. You can run everything on the same Linux VPS."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the Ziti Controller package by following the ",(0,t.jsx)(n.a,{href:"https://openziti.io/docs/category/deployments",children:"Linux controller deployment guide"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Ensure your answer file (",(0,t.jsx)(n.code,{children:"/opt/openziti/etc/controller/bootstrap.env"}),") has the FQDN of your Linux server and an admin password defined."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Ensure your firewall allows the controller port from the answer file."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start the controller service (",(0,t.jsx)(n.code,{children:"ziti-controller.service"}),") and check the status."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Log in to the Ziti Controller"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"ziti edge login localhost:1280 -u admin -p \n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Administratively Create a Ziti Router"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'ziti edge create edge-router "router1" -o /tmp/router1.jwt\n'})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Install the Ziti Router package by following ",(0,t.jsx)(n.a,{href:"https://openziti.io/docs/category/deployments",children:"the Linux router deployment guide"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Ensure your answer file (",(0,t.jsx)(n.code,{children:"/opt/openziti/etc/router/bootstrap.env"}),") has the FQDN of your Linux server for both controller and router addresses and the enrollment token from the previous step."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Ensure your firewall allows the router port from the answer file."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start the router service (",(0,t.jsx)(n.code,{children:"ziti-router.service"}),") and check the status."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Verify the new router is online."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"ziti edge list edge-routers\n"})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"install-zrok",children:"Install zrok"}),"\n",(0,t.jsxs)(n.p,{children:["Debian and RPM packages are available for ",(0,t.jsx)(n.code,{children:"zrok"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo apt install zrok\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Follow ",(0,t.jsx)(n.a,{href:"/docs/guides/install/linux",children:"the Linux installation guide"})," to install the ",(0,t.jsx)(n.code,{children:"zrok"})," package from the repository or manually install the binary for your platform."]}),"\n",(0,t.jsx)(n.h2,{id:"configure-the-controller",children:"Configure the Controller"}),"\n",(0,t.jsxs)(n.p,{children:["Create a ",(0,t.jsx)(n.code,{children:"zrok"})," controller configuration file in ",(0,t.jsx)(n.code,{children:"etc/ctrl.yml"}),". The controller can terminate TLS or you may front the server with a reverse proxy that continually renews the necessary wildcard certificate (e.g., Caddy w/ a DNS provider plugin). This example will expose the non-TLS listener for the controller."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'# _____ __ ___ | | __\n# |_ / \'__/ _ \\| |/ /\n# / /| | | (_) | <\n# /___|_| \\___/|_|\\_\\\n# controller configuration\n\nv: 3\n\nadmin:\n # generate these admin tokens from a source of randomness, e.g. \n # LC_ALL=C tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c32\n secrets:\n - Q8V0LqnNb5wNX9kE1fgQ0H6VlcvJybB1 # be sure to change this!\n\nendpoint:\n host: 0.0.0.0\n port: 18080\n\ninvites:\n invites_open: true\n\nstore:\n path: zrok.db\n type: sqlite3\n\nziti:\n api_endpoint: "https://127.0.0.1:1280"\n username: admin\n password: "XO0xHp75uuyeireO2xmmVlK91T7B9fpD"\n\n# you can use certbot to renew the wildcard cert for the controller with a DNS provider API token or front this `zrok` # controller with Caddy\n#tls:\n# cert_path: "/Path/To/Cert/zrok.crt"\n# key_path: "/Path/To/Cert/zrok.key"\n\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"admin"})," section defines privileged administrative credentials and must be set in the ",(0,t.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," environment variable in shells where you want to run ",(0,t.jsx)(n.code,{children:"zrok admin"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"endpoint"})," section defines where your ",(0,t.jsx)(n.code,{children:"zrok"})," controller will listen."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"store"})," section defines the local ",(0,t.jsx)(n.code,{children:"sqlite3"})," database used by the controller."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"ziti"})," section defines how the ",(0,t.jsx)(n.code,{children:"zrok"})," controller should communicate with your OpenZiti installation. When using the OpenZiti quickstart, an administrative password will be generated; the ",(0,t.jsx)(n.code,{children:"password"})," in the ",(0,t.jsx)(n.code,{children:"ziti"})," stanza should reflect this password."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.p,{children:["Be sure to see the ",(0,t.jsxs)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:r(9873).A+"",children:["reference configuration at ",(0,t.jsx)(n.code,{children:"etc/ctrl.yml"})]})," for the complete documentation of the current configuration file format for the ",(0,t.jsx)(n.code,{children:"zrok"})," controller and service instance components."]}),(0,t.jsxs)(n.p,{children:["See the separate guides on ",(0,t.jsx)(n.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics",children:"configuring metrics"})," and ",(0,t.jsx)(n.a,{href:"/docs/guides/self-hosting/metrics-and-limits/configuring-limits",children:"configuring limits"})," for details about both of these specialized areas of service instance configuration."]})]}),"\n",(0,t.jsx)(n.h2,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok"})," binaries are configured to work with the global ",(0,t.jsx)(n.code,{children:"zrok.io"})," service, and default to using ",(0,t.jsx)(n.code,{children:"api.zrok.io"})," as the endpoint for communicating with the service."]}),"\n",(0,t.jsxs)(n.p,{children:["To work with a self-hosted ",(0,t.jsx)(n.code,{children:"zrok"})," deployment, you'll need to set the ",(0,t.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," environment variable to point to the address where your ",(0,t.jsx)(n.code,{children:"zrok"})," controller will be listening, according to ",(0,t.jsx)(n.code,{children:"endpoint"})," in the configuration file above."]}),"\n",(0,t.jsx)(n.p,{children:"In my case, I've set:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"export ZROK_API_ENDPOINT=http://127.0.0.1:18080\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsxs)(n.a,{href:"/docs/guides/self-hosting/instance-configuration",children:["Read more about configuring your self-hosted ",(0,t.jsx)(n.code,{children:"zrok"})," instance"]}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"bootstrap-openziti-for-zrok",children:"Bootstrap OpenZiti for zrok"}),"\n",(0,t.jsxs)(n.p,{children:["With your OpenZiti network running and your configuration saved to a local file (I refer to mine as ",(0,t.jsx)(n.code,{children:"etc/ctrl.yml"})," in these examples), you're ready to bootstrap the Ziti network."]}),"\n",(0,t.jsxs)(n.p,{children:["Use the ",(0,t.jsx)(n.code,{children:"zrok admin bootstrap"})," command to bootstrap like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok admin bootstrap etc/ctrl.yml\n[ 0.002] INFO main.(*adminBootstrap).run: {\n\t...\n}\n[ 0.002] INFO zrok/controller/store.Open: database connected\n[ 0.006] INFO zrok/controller/store.(*Store).migrate: applied 0 migrations\n[ 0.006] INFO zrok/controller.Bootstrap: connecting to the ziti edge management api\n[ 0.039] INFO zrok/controller.Bootstrap: creating identity for controller ziti access\n[ 0.071] INFO zrok/controller.Bootstrap: controller identity: jKd8AINSz\n[ 0.082] INFO zrok/controller.assertIdentity: asserted identity 'jKd8AINSz'\n[ 0.085] INFO zrok/controller.assertErpForIdentity: asserted erps for 'ctrl' (jKd8AINSz)\n[ 0.085] INFO zrok/controller.Bootstrap: creating identity for frontend ziti access\n[ 0.118] INFO zrok/controller.Bootstrap: frontend identity: sqJRAINSiB\n[ 0.119] INFO zrok/controller.assertIdentity: asserted identity 'sqJRAINSiB'\n[ 0.120] INFO zrok/controller.assertErpForIdentity: asserted erps for 'frontend' (sqJRAINSiB)\n[ 0.120] WARNING zrok/controller.Bootstrap: missing public frontend for ziti id 'sqJRAINSiB'; please use 'zrok admin create frontend sqJRAINSiB public https://{token}.your.dns.name' to create a frontend instance\n[ 0.123] INFO zrok/controller.assertZrokProxyConfigType: found 'zrok.proxy.v1' config type with id '33CyjNbIepkXHN5VzGDA8L'\n[ 0.124] INFO zrok/controller.assertMetricsService: creating 'metrics' service\n[ 0.126] INFO zrok/controller.assertMetricsService: asserted 'metrics' service (5RpPZZ7T8bZf1ENjwGiPc3)\n[ 0.128] INFO zrok/controller.assertMetricsSerp: creating 'metrics' serp\n[ 0.130] INFO zrok/controller.assertMetricsSerp: asserted 'metrics' serp\n[ 0.134] INFO zrok/controller.assertCtrlMetricsBind: creating 'ctrl-metrics-bind' service policy\n[ 0.135] INFO zrok/controller.assertCtrlMetricsBind: asserted 'ctrl-metrics-bind' service policy\n[ 0.138] INFO zrok/controller.assertFrontendMetricsDial: creating 'frontend-metrics-dial' service policy\n[ 0.140] INFO zrok/controller.assertFrontendMetricsDial: asserted 'frontend-metrics-dial' service policy\n[ 0.140] INFO main.(*adminBootstrap).run: bootstrap complete!\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok admin bootstrap"})," command configures the ",(0,t.jsx)(n.code,{children:"zrok"})," database, the necessary OpenZiti identities, and all of the OpenZiti policies required to run a ",(0,t.jsx)(n.code,{children:"zrok"})," service."]}),"\n",(0,t.jsx)(n.p,{children:"Notice this warning:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[ 0.120] WARNING zrok/controller.Bootstrap: missing public frontend for ziti id 'sqJRAINSiB'; please use 'zrok admin create frontend sqJRAINSiB public https://{token}.your.dns.name' to create a frontend instance\n"})}),"\n",(0,t.jsxs)(n.p,{children:["If you find it necessary to re-run the ",(0,t.jsx)(n.code,{children:"zrok admin bootstrap"})," command, you may need to add the ",(0,t.jsx)(n.code,{children:"--skip-frontend"})," flag to avoid re-creating the default ",(0,t.jsx)(n.code,{children:"public"})," frontend's Ziti identity and router policy."]}),"\n",(0,t.jsx)(n.h2,{id:"run-zrok-controller",children:"Run zrok Controller"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok"}),' bootstrap process wants us to create a "public frontend" for our service. ',(0,t.jsx)(n.code,{children:"zrok"})," uses public frontends to allow users to specify where they would like public traffic to ingress from."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok admin create frontend"})," command requires a running ",(0,t.jsx)(n.code,{children:"zrok"})," controller, so let's start that up first:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok controller etc/ctrl.yml \n[ 0.003] INFO main.(*controllerCommand).run: {\n\t...\n}\n[ 0.016] INFO zrok/controller.inspectZiti: inspecting ziti controller configuration\n[ 0.048] INFO zrok/controller.findZrokProxyConfigType: found 'zrok.proxy.v1' config type with id '33CyjNbIepkXHN5VzGDA8L'\n[ 0.048] INFO zrok/controller/store.Open: database connected\n[ 0.048] INFO zrok/controller/store.(*Store).migrate: applied 0 migrations\n[ 0.049] INFO zrok/controller.(*metricsAgent).run: starting\n[ 0.064] INFO zrok/rest_server_zrok.setupGlobalMiddleware: configuring\n[ 0.064] INFO zrok/ui.StaticBuilder: building\n[ 0.065] INFO zrok/rest_server_zrok.(*Server).Logf: Serving zrok at http://[::]:18080\n[ 0.085] INFO zrok/controller.(*metricsAgent).listen: started\n"})}),"\n",(0,t.jsx)(n.h2,{id:"create-zrok-frontend",children:"Create zrok Frontend"}),"\n",(0,t.jsxs)(n.p,{children:["With our ",(0,t.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," and ",(0,t.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," environment variables set, we can create our public frontend like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok admin create frontend sqJRAINSiB public http://{token}.zrok.quigley.com:8080\n[ 0.037] INFO main.(*adminCreateFrontendCommand).run: created global public frontend 'WEirJNHVlcW9'\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The id of the frontend was emitted earlier in by the ",(0,t.jsx)(n.code,{children:"zrok"})," controller when we ran the bootstrap command. If you don't have that log message the you can find the id again with the ",(0,t.jsx)(n.code,{children:"ziti"})," CLI like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# log in as admin (example)\nziti edge login localhost:1280 -u admin -p XO0xHp75uuyeireO2xmmVlK91T7B9fpD\n\n# list Ziti identities created by the quickstart and bootstrap\nziti edge list identities\n"})}),"\n",(0,t.jsx)(n.p,{children:'The id is shown for the frontend identity named "public."'}),"\n",(0,t.jsxs)(n.p,{children:["Nice work! The ",(0,t.jsx)(n.code,{children:"zrok"})," controller is fully configured now that you have created the ",(0,t.jsx)(n.code,{children:"zrok"})," frontend."]}),"\n",(0,t.jsx)(n.h2,{id:"configure-the-public-frontend",children:"Configure the Public Frontend"}),"\n",(0,t.jsxs)(n.p,{children:["Create an http frontend configuration file in ",(0,t.jsx)(n.code,{children:"etc/http-frontend.yml"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"v: 3\nhost_match: zrok.quigley.com\naddress: 0.0.0.0:8080\n"})}),"\n",(0,t.jsxs)(n.p,{children:["This frontend config file has a ",(0,t.jsx)(n.code,{children:"host_match"})," pattern that represents the DNS zone you're using with this instance of ",(0,t.jsx)(n.code,{children:"zrok"}),". Incoming HTTP requests with a matching ",(0,t.jsx)(n.code,{children:"Host"})," header will be handled by this frontend. You may also specify the interface address where the frontend will listen for public access requests."]}),"\n",(0,t.jsxs)(n.p,{children:["The frontend does not provide server TLS, but you may front the server with a reverse proxy. The reverse proxy must forward the ",(0,t.jsx)(n.code,{children:"Host"})," header supplied by the viewer. This example will expose the non-TLS listener for the frontend."]}),"\n",(0,t.jsxs)(n.p,{children:["You can also specify an ",(0,t.jsx)(n.code,{children:"oauth"})," configuration in this file, full details of are found in ",(0,t.jsx)(n.a,{href:"/docs/guides/self-hosting/oauth/configuring-oauth#configuring-your-public-frontend",children:"OAuth Public Frontend Configuration"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"start-public-frontend",children:"Start Public Frontend"}),"\n",(0,t.jsx)(n.p,{children:"In another terminal window, run:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok access public etc/http-frontend.yml\n[ 0.002] INFO main.(*accessPublicCommand).run: {\n\t...\n}\n[ 0.002] INFO zrok/endpoints/public_frontend.newMetricsAgent: loaded 'public' identity\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"zrok"})," frontend uses the ",(0,t.jsx)(n.code,{children:"public"})," identity created during the bootstrap process to securely access zrok backends. to provide public access for the ",(0,t.jsx)(n.code,{children:"zrok"})," deployment. It is expected that the configured listener for this frontend corresponds to the DNS template specified when creating the public frontend record above."]}),"\n",(0,t.jsx)(n.h2,{id:"create-a-user-account",children:"Create a User Account"}),"\n",(0,t.jsxs)(n.p,{children:["With our ",(0,t.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," and ",(0,t.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," environment variables set, we can create our first user account."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"zrok admin create account \n"})}),"\n",(0,t.jsx)(n.p,{children:"The output is the account token you will use to enable each device's zrok environment."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"SuGzRPjVDIcF\n"})}),"\n",(0,t.jsx)(n.h2,{id:"invite-additional-users",children:"Invite Additional Users"}),"\n",(0,t.jsxs)(n.p,{children:["Offer this onboarding method to your users if you have configured an email-sending service in your ",(0,t.jsx)(n.code,{children:"zrok"})," controller configuration."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"$ zrok invite\nNew Email: user@domain.com\nConfirm Email: user@domain.com\ninvitation sent to 'user@domain.com'!\n"})}),"\n",(0,t.jsxs)(n.p,{children:["If you look at the console output from your ",(0,t.jsx)(n.code,{children:"zrok"})," controller, you'll see a message like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[ 238.168] INFO zrok/controller.(*inviteHandler).Handle: account request for 'user@domain.com' has registration token 'U2Ewt1UCn3ql'\n"})}),"\n",(0,t.jsxs)(n.p,{children:["You can access your ",(0,t.jsx)(n.code,{children:"zrok"})," controller's registration UI by pointing a web browser at:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"http://localhost:18080/register/U2Ewt1UCn3ql\n"})}),"\n",(0,t.jsx)(n.p,{children:"The UI will ask you to set a password for your new account. Go ahead and do that."}),"\n",(0,t.jsx)(n.p,{children:"After doing that, I see the following output in my controller console:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[ 516.778] INFO zrok/controller.(*registerHandler).Handle: created account 'user@domain.com' with token 'SuGzRPjVDIcF'\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Keep track of the token listed above (",(0,t.jsx)(n.code,{children:"SuGzRPjVDIcF"}),"). We'll use this to enable our shell for this ",(0,t.jsx)(n.code,{children:"zrok"})," deployment."]}),"\n",(0,t.jsx)(n.h2,{id:"enable-your-environment",children:"Enable Your Environment"}),"\n",(0,t.jsx)(n.p,{children:"On another device that can reach your Linux server by FQDN, configure the API endpoint and enable the environment with the account token you received when you created the first user account."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"export ZROK_API_ENDPOINT=https://zrok.quigley.com\n# or\nzrok config set apiEndpoint https://zrok.quigley.com\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"zrok enable SuGzRPjVDIcF\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"zrok environment '2AS1WZ3Sz' enabled for 'SuGzRPjVDIcF'\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"zrok status --secrets\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"Config:\n\n CONFIG VALUE SOURCE\n apiEndpoint https://zrok.quigley.com env\n\nEnvironment:\n\n PROPERTY VALUE\n Secret Token SuGzRPjVDIcF\n Ziti Identity 2AS1WZ3Sz\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Congratulations. You have a working ",(0,t.jsx)(n.code,{children:"zrok"})," environment!"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},9873:(e,n,r)=>{r.d(n,{A:()=>o});const o=r.p+"assets/files/ctrl-8eb59af1ca236b4f04e9461ebb345a53.yml"},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>l});var o=r(6540);const t={},i=o.createContext(t);function s(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e1dfe4fe.064a8faa.js b/assets/js/e1dfe4fe.064a8faa.js deleted file mode 100644 index b006df7f..00000000 --- a/assets/js/e1dfe4fe.064a8faa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3423],{8347:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>h});const o=JSON.parse('{"id":"guides/self-hosting/docker","title":"Self-hosting guide for Docker","description":"","source":"@site/../docs/guides/self-hosting/docker.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/docker","permalink":"/docs/guides/self-hosting/docker","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/docker.mdx","tags":[],"version":"current","sidebarPosition":45,"frontMatter":{"title":"Self-hosting guide for Docker","sidebar_label":"Docker","sidebar_position":45},"sidebar":"tutorialSidebar","previous":{"title":"Personalized Frontend","permalink":"/docs/guides/self-hosting/personalized-frontend"},"next":{"title":"Kubernetes","permalink":"/docs/guides/self-hosting/kubernetes"}}');var i=r(4848),t=r(8453);function s(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"docker-instance",children:"Docker Instance"}),"\n",(0,i.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/70zJ_h4uiD8",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,i.jsx)(n.p,{children:"This Docker Compose project creates a zrok instance and includes a ziti controller and router. An optional Caddy container is included to provide HTTPS and reverse proxy services for the zrok API and public shares."}),"\n",(0,i.jsx)(n.h3,{id:"dns-configuration",children:"DNS Configuration"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["A wildcard record exists for the IP address where the zrok instance will run, e.g. if your DNS zone is ",(0,i.jsx)(n.code,{children:"share.example.com"}),", then your wildcard record is ",(0,i.jsx)(n.code,{children:"*.share.example.com"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"additional-dns-configuration-for-caddy-tls",children:"Additional DNS Configuration for Caddy TLS"}),"\n",(0,i.jsxs)(n.p,{children:["The included Caddy container can automatically manage a wildcard certificate for your zrok instance. You can enable Caddy in this compose project by renaming ",(0,i.jsx)(n.code,{children:"compose.caddy.yml"})," as ",(0,i.jsx)(n.code,{children:"compose.override.yml"}),"."]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Ensure A Caddy DNS plugin is available for your DNS provider (see ",(0,i.jsx)(n.a,{href:"https://github.com/orgs/caddy-dns/repositories?type=all&q=sort%3Aname-asc",children:"github.com/caddy-dns"}),")."]}),"\n",(0,i.jsxs)(n.li,{children:["Designate A DNS zone for zrok, e.g. ",(0,i.jsx)(n.code,{children:"example.com"})," or ",(0,i.jsx)(n.code,{children:"share.example.com"})," and create the zone on your DNS provider's platform."]}),"\n",(0,i.jsx)(n.li,{children:"Created an API token in your DNS provider that has permission to manage zrok's DNS zone."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"create-the-docker-compose-project",children:"Create the Docker Compose Project"}),"\n",(0,i.jsx)(n.p,{children:"Create a working directory on your Docker host and save these Docker Compose project files."}),"\n",(0,i.jsx)(n.h4,{id:"shortcut-option",children:"Shortcut Option"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Run this script to download the files in the current directory."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl https://get.openziti.io/zrok-instance/fetch.bash | bash\n"})}),"\n",(0,i.jsx)(n.p,{children:"Or, specify the Compose project directory."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl https://get.openziti.io/zrok-instance/fetch.bash | bash -s /path/to/compose/project/dir\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"manual-option",children:"Manual Option"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Get the zrok repo ZIP file."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"wget https://github.com/openziti/zrok/archive/refs/heads/main.zip\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Unzip the zrok-instance files into the project directory."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"unzip -j -d . main.zip '*/docker/compose/zrok-instance/*'\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"configure-the-docker-compose-project-environment",children:"Configure the Docker Compose Project Environment"}),"\n",(0,i.jsxs)(n.p,{children:["Create an ",(0,i.jsx)(n.code,{children:".env"})," file in the working directory."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",metastring:'title=".env required"',children:"ZROK_DNS_ZONE=share.example.com\n\nZROK_USER_EMAIL=me@example.com\nZROK_USER_PWD=zrokuserpw\n\nZITI_PWD=zitiadminpw\nZROK_ADMIN_TOKEN=zroktoken\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",metastring:'title=".env options"',children:"# Caddy TLS option: rename compose.caddy.yml to compose.override.yml and set these vars; allow 80,443 in firewall\n\n#\n## set these in .env for providers other than Route53\n#\n# plugin name for your DNS provider\nCADDY_DNS_PLUGIN=cloudflare\n# API token from your DNS provider\nCADDY_DNS_PLUGIN_TOKEN=abcd1234\n# use the staging API until you're sure everything is working to avoid hitting the rate limit\nCADDY_ACME_API=https://acme-staging-v02.api.letsencrypt.org/directory\n\n#\n## set these in .env for Route53\n#\n# AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}\n# AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}\n# AWS_REGION: ${AWS_REGION}\n# AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN} # if temporary credential, e.g., from STS\n\n#\n## if not using Caddy for TLS, uncomment to publish the insecure ports to the internet\n#\n#ZROK_INSECURE_INTERFACE=0.0.0.0\n\n# these insecure ports must be proxied with TLS for security\nZROK_CTRL_PORT=18080\nZROK_FRONTEND_PORT=8080\nZROK_OAUTH_PORT=8081\n\n# these secure ziti ports must be published to the internet\nZITI_CTRL_ADVERTISED_PORT=80\nZITI_ROUTER_PORT=3022\n\n# optionally configure oauth for public shares\n#ZROK_OAUTH_HASH_KEY=oauthhashkeysecret\n#ZROK_OAUTH_GITHUB_CLIENT_ID=abcd1234\n#ZROK_OAUTH_GITHUB_CLIENT_SECRET=abcd1234\n#ZROK_OAUTH_GOOGLE_CLIENT_ID=abcd1234\n#ZROK_OAUTH_GOOGLE_CLIENT_SECRET=abcd1234\n\n# zrok version, e.g., 1.0.0\nZROK_CLI_TAG=latest\n# ziti version, e.g., 1.0.0\nZITI_CLI_TAG=latest\n"})}),"\n",(0,i.jsx)(n.h3,{id:"start-the-docker-compose-project",children:"Start the Docker Compose Project"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Start the zrok instance."}),"\n",(0,i.jsxs)(n.p,{children:["The container images for zrok (including caddy) are built in this step. This provides a simple configuration to get started. You can modify the templates named like ",(0,i.jsx)(n.code,{children:"*.envsubst"})," or mount a customized configuration file to mask the one that was built in."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker compose up --build --detach\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"set-up-a-user-account",children:"Set up a User Account"}),"\n",(0,i.jsxs)(n.p,{children:["This step creates a user account. You will log in to the zrok web console with the account password created in this step. The ZROK_USER_EMAIL and ZROK_USER_PWD variables are set in the ",(0,i.jsx)(n.code,{children:".env"})," file. You can create more user accounts the same way by substituting a different email and password."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",metastring:'title="Create the first user account"',children:"docker compose exec zrok-controller bash -xc 'zrok admin create account ${ZROK_USER_EMAIL} ${ZROK_USER_PWD}'\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"+ zrok admin create account me@example.com zrokuserpw\n[ 0.000] INFO zrok/controller/store.Open: database connected\n[ 0.002] INFO zrok/controller/store.(*Store).migrate: applied 0 migrations\nheMqncCyxZcx\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create additional users by running the command again with a different email and password."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",metastring:'title="Create another user"',children:"docker compose exec zrok-controller zrok admin create account \n"})}),"\n",(0,i.jsx)(n.h3,{id:"enable-the-user-environment",children:"Enable the User Environment"}),"\n",(0,i.jsx)(n.p,{children:"You must enable each device environment with the account token obtained when the account was created. This is separate from the account password that's used to log in to the web console."}),"\n",(0,i.jsxs)(n.p,{children:["Follow ",(0,i.jsx)(n.a,{href:"/docs/getting-started#installing-the-zrok-command",children:"the getting started guide"})," to install the zrok CLI on some device and enable a zrok environment."]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Configure the environment with the zrok API. Substitute the API endpoint with the one you're using, e.g. ",(0,i.jsx)(n.code,{children:"https://zrok.${ZROK_DNS_ZONE}"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"zrok config set apiEndpoint https://zrok.share.example.com\n"})}),"\n",(0,i.jsx)(n.p,{children:"or, if not using Caddy for TLS:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"zrok config set apiEndpoint http://zrok.share.example.com:18080\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Enable an environment on this device with the account token from the previous step."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"zrok enable heMqncCyxZcx\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"firewall-configuration",children:"Firewall Configuration"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"ziti-quickstart"})," and ",(0,i.jsx)(n.code,{children:"caddy"})," containers publish ports to all devices that use zrok shares. The ",(0,i.jsx)(n.code,{children:"zrok-controller"})," and ",(0,i.jsx)(n.code,{children:"zrok-frontend"})," containers expose ports only to the ",(0,i.jsx)(n.code,{children:"caddy"})," container and the Docker host's loopback interface."]}),"\n",(0,i.jsx)(n.h4,{id:"required",children:"Required"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"443/tcp"})," - reverse proxy handles HTTPS requests for zrok API, OAuth, and public shares (published by container ",(0,i.jsx)(n.code,{children:"caddy"}),")"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"80/tcp"})," - ziti ctrl plane (published by container ",(0,i.jsx)(n.code,{children:"ziti-quickstart"}),")"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"3022/tcp"})," - ziti data plane (published by container ",(0,i.jsx)(n.code,{children:"ziti-quickstart"}),")"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:'See "My internet connection can only send traffic to common ports" below about changing the required ports.'}),"\n",(0,i.jsx)(n.h3,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Check the ziti and zrok logs."}),"\n",(0,i.jsxs)(n.p,{children:["You can substitute the service container name of each to check their logs individually: ",(0,i.jsx)(n.code,{children:"ziti-quickstart"}),", ",(0,i.jsx)(n.code,{children:"zrok-controller"}),", ",(0,i.jsx)(n.code,{children:"zrok-frontend"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker compose logs zrok-controller\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Check the Caddy logs."}),"\n",(0,i.jsxs)(n.p,{children:["It can take a few minutes for Caddy to obtain the wildcard certificate. You can check the logs to see if there were any errors completing the DNS challenge which involves using the Caddy DNS plugin to create a TXT record in your DNS zone. This leverages the API token you provided in the ",(0,i.jsx)(n.code,{children:".env"})," file, which must have permission to create DNS records in the zrok DNS zone."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker compose logs caddy\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Caddy keeps failing to obtain a wildcard certificate because it timed out waiting for DNS."}),"\n",(0,i.jsx)(n.p,{children:"Symptom: the Caddy log contains \"timed out waiting for record to fully propagate.\" This means that Caddy added a DNS record with your DNS provider's API to prove to the CA it controls the zrok DNS zone, but it wasn't able to verify the record was created successfully with a DNS query."}),"\n",(0,i.jsx)(n.p,{children:"Solutions:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Add ",(0,i.jsx)(n.code,{children:"propagation_delay"})," in your ",(0,i.jsx)(n.code,{children:"Caddyfile"})," to delay the first DNS verification query. This avoids caching a verification query failure by waiting a few minutes for the record to become available so the verification query will succeed on the first attempt. Caddy will be unable to verify the DNS record if the failure remains in the cache too long."]}),"\n",(0,i.jsxs)(n.li,{children:["If the prior solution fails, you can override the default resolves/nameservers with ",(0,i.jsx)(n.code,{children:"resolvers"}),", a space-separated list of DNS servers. This gives you more control over if and where the verification query result is cached."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"tls {\n dns {CADDY_DNS_PLUGIN} {CADDY_DNS_PLUGIN_TOKEN}\n\tpropagation_timeout 60m # default 2m\n propagation_delay 5m # default 0m\n}\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok enable"})," fails certificate verification: ensure you are not using the staging API for Let's Encrypt."]}),"\n",(0,i.jsxs)(n.p,{children:["If you are using the staging API, you will see an error about the API certificate when you use the zrok CLI. You can switch to the production API by removing the overriding assignment of the ",(0,i.jsx)(n.code,{children:"CADDY_ACME_API"})," variable."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:'there was a problem enabling your environment!\nyou are trying to use the zrok service at: https://zrok.share.example.com\nyou can change your zrok service endpoint using this command:\n\n$ zrok config set apiEndpoint \n\n(where newEndpoint is something like: https://some.zrok.io)\n[ERROR]: error creating service client (error getting version from api endpoint \'https://zrok.share.example.com\': Get "https://zrok.share.example.com/api/v1/version": tls: failed to verify certificate: x509: certificate signed by unknown authority: Get "https://zrok.share.example.com/api/v1/version": tls: failed to verify certificate: x509: certificate signed by unknown authority)\n'})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Validate the Caddyfile."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker compose exec caddy caddy validate --config /etc/caddy/Caddyfile\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Verify the correct DNS provider module was built-in to Caddy."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker compose exec caddy caddy list-modules | grep dns.providers\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"dns.providers.cloudflare\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Use the Caddy admin API."}),"\n",(0,i.jsxs)(n.p,{children:["You can use the Caddy admin API to check the status of the Caddy instance. The admin API is available on port ",(0,i.jsx)(n.code,{children:"2019/tcp"})," inside the Docker Compose project. You can modify ",(0,i.jsx)(n.code,{children:"compose.override.yml"})," to publish the port if you want to access the admin API from the Docker host or elsewhere."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker compose exec caddy curl http://localhost:2019/config/ | jq\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"My DNS provider credential is composed of several values, not a single API token."}),"\n",(0,i.jsxs)(n.p,{children:["As long as your DNS provider is supported by Caddy then it will work. Here's a checklist for DNS providers like Route53 with credentials expressed as multiple values, e.g., ",(0,i.jsx)(n.code,{children:"AWS_ACCESS_KEY_ID"}),", ",(0,i.jsx)(n.code,{children:"AWS_SECRET_ACCESS_KEY"}),"."]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Define env vars in ",(0,i.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,i.jsxs)(n.li,{children:["Declare env vars in ",(0,i.jsx)(n.code,{children:"compose.override.yml"})," file on ",(0,i.jsx)(n.code,{children:"caddy"}),"'s ",(0,i.jsx)(n.code,{children:"environment"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Modify ",(0,i.jsx)(n.code,{children:"Caddyfile"})," according to the DNS plugin author's instructions (",(0,i.jsx)(n.a,{href:"https://github.com/caddy-dns/route53",children:"link to Route53 README"}),"). This means modifying the ",(0,i.jsx)(n.code,{children:"Caddyfile"})," to reference the env vars. The provided file ",(0,i.jsx)(n.code,{children:"route53.Caddyfile"})," serves as an example."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"My internet connection can only send traffic to common ports like 80, 443, and 3389."}),"\n",(0,i.jsxs)(n.p,{children:["You can change the required ports in the ",(0,i.jsx)(n.code,{children:".env"})," file. Caddy will still use port 443 for zrok shares and API if you renamed ",(0,i.jsx)(n.code,{children:"compose.caddy.yml"})," as ",(0,i.jsx)(n.code,{children:"compose.override.yml"})," to enable Caddy."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",metastring:'title=".env"',children:"ZITI_CTRL_ADVERTISED_PORT=80\nZITI_ROUTER_PORT=3389\n"})}),"\n"]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(s,{...e})}):s(e)}const a={title:"Self-hosting guide for Docker",sidebar_label:"Docker",sidebar_position:45},d=void 0,l={},h=[{value:"Docker Instance",id:"docker-instance",level:2},{value:"DNS Configuration",id:"dns-configuration",level:3},{value:"Additional DNS Configuration for Caddy TLS",id:"additional-dns-configuration-for-caddy-tls",level:4},{value:"Create the Docker Compose Project",id:"create-the-docker-compose-project",level:3},{value:"Shortcut Option",id:"shortcut-option",level:4},{value:"Manual Option",id:"manual-option",level:4},{value:"Configure the Docker Compose Project Environment",id:"configure-the-docker-compose-project-environment",level:3},{value:"Start the Docker Compose Project",id:"start-the-docker-compose-project",level:3},{value:"Set up a User Account",id:"set-up-a-user-account",level:3},{value:"Enable the User Environment",id:"enable-the-user-environment",level:3},{value:"Firewall Configuration",id:"firewall-configuration",level:3},{value:"Required",id:"required",level:4},{value:"Troubleshooting",id:"troubleshooting",level:3}];function u(e){return(0,i.jsx)(c,{})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u()}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>c});var o=r(6540);const i={},t=o.createContext(i);function s(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e1dfe4fe.d2f3f2ad.js b/assets/js/e1dfe4fe.d2f3f2ad.js new file mode 100644 index 00000000..89f2624b --- /dev/null +++ b/assets/js/e1dfe4fe.d2f3f2ad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3423],{1181:(e,n,r)=>{r.d(n,{Ay:()=>c,RM:()=>t});var o=r(4848),i=r(8453);const t=[{value:"Docker Instance",id:"docker-instance",level:2},{value:"DNS Configuration",id:"dns-configuration",level:3},{value:"Additional DNS Configuration for Caddy TLS",id:"additional-dns-configuration-for-caddy-tls",level:4},{value:"Create the Docker Compose Project",id:"create-the-docker-compose-project",level:3},{value:"Shortcut Option",id:"shortcut-option",level:4},{value:"Manual Option",id:"manual-option",level:4},{value:"Configure the Docker Compose Project Environment",id:"configure-the-docker-compose-project-environment",level:3},{value:"Start the Docker Compose Project",id:"start-the-docker-compose-project",level:3},{value:"Set up a User Account",id:"set-up-a-user-account",level:3},{value:"Enable the User Environment",id:"enable-the-user-environment",level:3},{value:"Firewall Configuration",id:"firewall-configuration",level:3},{value:"Required",id:"required",level:4},{value:"Troubleshooting",id:"troubleshooting",level:3}];function s(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"docker-instance",children:"Docker Instance"}),"\n",(0,o.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/70zJ_h4uiD8",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,o.jsx)(n.p,{children:"This Docker Compose project creates a zrok instance and includes a ziti controller and router. An optional Caddy container is included to provide HTTPS and reverse proxy services for the zrok API and public shares."}),"\n",(0,o.jsx)(n.h3,{id:"dns-configuration",children:"DNS Configuration"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["A wildcard record exists for the IP address where the zrok instance will run, e.g. if your DNS zone is ",(0,o.jsx)(n.code,{children:"share.example.com"}),", then your wildcard record is ",(0,o.jsx)(n.code,{children:"*.share.example.com"}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"additional-dns-configuration-for-caddy-tls",children:"Additional DNS Configuration for Caddy TLS"}),"\n",(0,o.jsxs)(n.p,{children:["The included Caddy container can automatically manage a wildcard certificate for your zrok instance. You can enable Caddy in this compose project by renaming ",(0,o.jsx)(n.code,{children:"compose.caddy.yml"})," as ",(0,o.jsx)(n.code,{children:"compose.override.yml"}),"."]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Ensure A Caddy DNS plugin is available for your DNS provider (see ",(0,o.jsx)(n.a,{href:"https://github.com/orgs/caddy-dns/repositories?type=all&q=sort%3Aname-asc",children:"github.com/caddy-dns"}),")."]}),"\n",(0,o.jsxs)(n.li,{children:["Designate A DNS zone for zrok, e.g. ",(0,o.jsx)(n.code,{children:"example.com"})," or ",(0,o.jsx)(n.code,{children:"share.example.com"})," and create the zone on your DNS provider's platform."]}),"\n",(0,o.jsx)(n.li,{children:"Created an API token in your DNS provider that has permission to manage zrok's DNS zone."}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"create-the-docker-compose-project",children:"Create the Docker Compose Project"}),"\n",(0,o.jsx)(n.p,{children:"Create a working directory on your Docker host and save these Docker Compose project files."}),"\n",(0,o.jsx)(n.h4,{id:"shortcut-option",children:"Shortcut Option"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Run this script to download the files in the current directory."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"curl https://get.openziti.io/zrok-instance/fetch.bash | bash\n"})}),"\n",(0,o.jsx)(n.p,{children:"Or, specify the Compose project directory."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"curl https://get.openziti.io/zrok-instance/fetch.bash | bash -s /path/to/compose/project/dir\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"manual-option",children:"Manual Option"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Get the zrok repo ZIP file."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"wget https://github.com/openziti/zrok/archive/refs/heads/main.zip\n"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Unzip the zrok-instance files into the project directory."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"unzip -j -d . main.zip '*/docker/compose/zrok-instance/*'\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"configure-the-docker-compose-project-environment",children:"Configure the Docker Compose Project Environment"}),"\n",(0,o.jsxs)(n.p,{children:["Create an ",(0,o.jsx)(n.code,{children:".env"})," file in the working directory."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",metastring:'title=".env required"',children:"ZROK_DNS_ZONE=share.example.com\n\nZROK_USER_EMAIL=me@example.com\nZROK_USER_PWD=zrokuserpw\n\nZITI_PWD=zitiadminpw\nZROK_ADMIN_TOKEN=zroktoken\n"})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",metastring:'title=".env options"',children:"# Caddy TLS option: rename compose.caddy.yml to compose.override.yml and set these vars; allow 80,443 in firewall\n\n#\n## set these in .env for providers other than Route53\n#\n# plugin name for your DNS provider\nCADDY_DNS_PLUGIN=cloudflare\n# API token from your DNS provider\nCADDY_DNS_PLUGIN_TOKEN=abcd1234\n# use the staging API until you're sure everything is working to avoid hitting the rate limit\nCADDY_ACME_API=https://acme-staging-v02.api.letsencrypt.org/directory\n\n#\n## set these in .env for Route53\n#\n# AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}\n# AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}\n# AWS_REGION: ${AWS_REGION}\n# AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN} # if temporary credential, e.g., from STS\n\n#\n## if not using Caddy for TLS, uncomment to publish the insecure ports to the internet\n#\n#ZROK_INSECURE_INTERFACE=0.0.0.0\n\n# these insecure ports must be proxied with TLS for security\nZROK_CTRL_PORT=18080\nZROK_FRONTEND_PORT=8080\nZROK_OAUTH_PORT=8081\n\n# these secure ziti ports must be published to the internet\nZITI_CTRL_ADVERTISED_PORT=80\nZITI_ROUTER_PORT=3022\n\n# optionally configure oauth for public shares\n#ZROK_OAUTH_HASH_KEY=oauthhashkeysecret\n#ZROK_OAUTH_GITHUB_CLIENT_ID=abcd1234\n#ZROK_OAUTH_GITHUB_CLIENT_SECRET=abcd1234\n#ZROK_OAUTH_GOOGLE_CLIENT_ID=abcd1234\n#ZROK_OAUTH_GOOGLE_CLIENT_SECRET=abcd1234\n\n# zrok version, e.g., 1.0.0\nZROK_CLI_TAG=latest\n# ziti version, e.g., 1.0.0\nZITI_CLI_TAG=latest\n"})}),"\n",(0,o.jsx)(n.h3,{id:"start-the-docker-compose-project",children:"Start the Docker Compose Project"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Start the zrok instance."}),"\n",(0,o.jsxs)(n.p,{children:["The container images for zrok (including caddy) are built in this step. This provides a simple configuration to get started. You can modify the templates named like ",(0,o.jsx)(n.code,{children:"*.envsubst"})," or mount a customized configuration file to mask the one that was built in."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"docker compose up --build --detach\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"set-up-a-user-account",children:"Set up a User Account"}),"\n",(0,o.jsxs)(n.p,{children:["This step creates a user account. You will log in to the zrok web console with the account password created in this step. The ZROK_USER_EMAIL and ZROK_USER_PWD variables are set in the ",(0,o.jsx)(n.code,{children:".env"})," file. You can create more user accounts the same way by substituting a different email and password."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",metastring:'title="Create the first user account"',children:"docker compose exec zrok-controller bash -xc 'zrok admin create account ${ZROK_USER_EMAIL} ${ZROK_USER_PWD}'\n"})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"+ zrok admin create account me@example.com zrokuserpw\n[ 0.000] INFO zrok/controller/store.Open: database connected\n[ 0.002] INFO zrok/controller/store.(*Store).migrate: applied 0 migrations\nheMqncCyxZcx\n"})}),"\n",(0,o.jsx)(n.p,{children:"Create additional users by running the command again with a different email and password."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",metastring:'title="Create another user"',children:"docker compose exec zrok-controller zrok admin create account \n"})}),"\n",(0,o.jsx)(n.h3,{id:"enable-the-user-environment",children:"Enable the User Environment"}),"\n",(0,o.jsx)(n.p,{children:"You must enable each device environment with the account token obtained when the account was created. This is separate from the account password that's used to log in to the web console."}),"\n",(0,o.jsxs)(n.p,{children:["Follow ",(0,o.jsx)(n.a,{href:"/docs/getting-started#installing-the-zrok-command",children:"the getting started guide"})," to install the zrok CLI on some device and enable a zrok environment."]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Configure the environment with the zrok API. Substitute the API endpoint with the one you're using, e.g. ",(0,o.jsx)(n.code,{children:"https://zrok.${ZROK_DNS_ZONE}"}),"."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"zrok config set apiEndpoint https://zrok.share.example.com\n"})}),"\n",(0,o.jsx)(n.p,{children:"or, if not using Caddy for TLS:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"zrok config set apiEndpoint http://zrok.share.example.com:18080\n"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Enable an environment on this device with the account token from the previous step."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"zrok enable heMqncCyxZcx\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"firewall-configuration",children:"Firewall Configuration"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"ziti-quickstart"})," and ",(0,o.jsx)(n.code,{children:"caddy"})," containers publish ports to all devices that use zrok shares. The ",(0,o.jsx)(n.code,{children:"zrok-controller"})," and ",(0,o.jsx)(n.code,{children:"zrok-frontend"})," containers expose ports only to the ",(0,o.jsx)(n.code,{children:"caddy"})," container and the Docker host's loopback interface."]}),"\n",(0,o.jsx)(n.h4,{id:"required",children:"Required"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"443/tcp"})," - reverse proxy handles HTTPS requests for zrok API, OAuth, and public shares (published by container ",(0,o.jsx)(n.code,{children:"caddy"}),")"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"80/tcp"})," - ziti ctrl plane (published by container ",(0,o.jsx)(n.code,{children:"ziti-quickstart"}),")"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"3022/tcp"})," - ziti data plane (published by container ",(0,o.jsx)(n.code,{children:"ziti-quickstart"}),")"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:'See "My internet connection can only send traffic to common ports" below about changing the required ports.'}),"\n",(0,o.jsx)(n.h3,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Check the ziti and zrok logs."}),"\n",(0,o.jsxs)(n.p,{children:["You can substitute the service container name of each to check their logs individually: ",(0,o.jsx)(n.code,{children:"ziti-quickstart"}),", ",(0,o.jsx)(n.code,{children:"zrok-controller"}),", ",(0,o.jsx)(n.code,{children:"zrok-frontend"}),"."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"docker compose logs zrok-controller\n"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Check the Caddy logs."}),"\n",(0,o.jsxs)(n.p,{children:["It can take a few minutes for Caddy to obtain the wildcard certificate. You can check the logs to see if there were any errors completing the DNS challenge which involves using the Caddy DNS plugin to create a TXT record in your DNS zone. This leverages the API token you provided in the ",(0,o.jsx)(n.code,{children:".env"})," file, which must have permission to create DNS records in the zrok DNS zone."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"docker compose logs caddy\n"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Caddy keeps failing to obtain a wildcard certificate because it timed out waiting for DNS."}),"\n",(0,o.jsx)(n.p,{children:"Symptom: the Caddy log contains \"timed out waiting for record to fully propagate.\" This means that Caddy added a DNS record with your DNS provider's API to prove to the CA it controls the zrok DNS zone, but it wasn't able to verify the record was created successfully with a DNS query."}),"\n",(0,o.jsx)(n.p,{children:"Solutions:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Add ",(0,o.jsx)(n.code,{children:"propagation_delay"})," in your ",(0,o.jsx)(n.code,{children:"Caddyfile"})," to delay the first DNS verification query. This avoids caching a verification query failure by waiting a few minutes for the record to become available so the verification query will succeed on the first attempt. Caddy will be unable to verify the DNS record if the failure remains in the cache too long."]}),"\n",(0,o.jsxs)(n.li,{children:["If the prior solution fails, you can override the default resolves/nameservers with ",(0,o.jsx)(n.code,{children:"resolvers"}),", a space-separated list of DNS servers. This gives you more control over if and where the verification query result is cached."]}),"\n"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"tls {\n dns {CADDY_DNS_PLUGIN} {CADDY_DNS_PLUGIN_TOKEN}\n\tpropagation_timeout 60m # default 2m\n propagation_delay 5m # default 0m\n}\n"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"zrok enable"})," fails certificate verification: ensure you are not using the staging API for Let's Encrypt."]}),"\n",(0,o.jsxs)(n.p,{children:["If you are using the staging API, you will see an error about the API certificate when you use the zrok CLI. You can switch to the production API by removing the overriding assignment of the ",(0,o.jsx)(n.code,{children:"CADDY_ACME_API"})," variable."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:'there was a problem enabling your environment!\nyou are trying to use the zrok service at: https://zrok.share.example.com\nyou can change your zrok service endpoint using this command:\n\n$ zrok config set apiEndpoint \n\n(where newEndpoint is something like: https://some.zrok.io)\n[ERROR]: error creating service client (error getting version from api endpoint \'https://zrok.share.example.com\': Get "https://zrok.share.example.com/api/v1/version": tls: failed to verify certificate: x509: certificate signed by unknown authority: Get "https://zrok.share.example.com/api/v1/version": tls: failed to verify certificate: x509: certificate signed by unknown authority)\n'})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Validate the Caddyfile."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"docker compose exec caddy caddy validate --config /etc/caddy/Caddyfile\n"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Verify the correct DNS provider module was built-in to Caddy."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"docker compose exec caddy caddy list-modules | grep dns.providers\n"})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example output"',children:"dns.providers.cloudflare\n"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Use the Caddy admin API."}),"\n",(0,o.jsxs)(n.p,{children:["You can use the Caddy admin API to check the status of the Caddy instance. The admin API is available on port ",(0,o.jsx)(n.code,{children:"2019/tcp"})," inside the Docker Compose project. You can modify ",(0,o.jsx)(n.code,{children:"compose.override.yml"})," to publish the port if you want to access the admin API from the Docker host or elsewhere."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"docker compose exec caddy curl http://localhost:2019/config/ | jq\n"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"My DNS provider credential is composed of several values, not a single API token."}),"\n",(0,o.jsxs)(n.p,{children:["As long as your DNS provider is supported by Caddy then it will work. Here's a checklist for DNS providers like Route53 with credentials expressed as multiple values, e.g., ",(0,o.jsx)(n.code,{children:"AWS_ACCESS_KEY_ID"}),", ",(0,o.jsx)(n.code,{children:"AWS_SECRET_ACCESS_KEY"}),"."]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Define env vars in ",(0,o.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,o.jsxs)(n.li,{children:["Declare env vars in ",(0,o.jsx)(n.code,{children:"compose.override.yml"})," file on ",(0,o.jsx)(n.code,{children:"caddy"}),"'s ",(0,o.jsx)(n.code,{children:"environment"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Modify ",(0,o.jsx)(n.code,{children:"Caddyfile"})," according to the DNS plugin author's instructions (",(0,o.jsx)(n.a,{href:"https://github.com/caddy-dns/route53",children:"link to Route53 README"}),"). This means modifying the ",(0,o.jsx)(n.code,{children:"Caddyfile"})," to reference the env vars. The provided file ",(0,o.jsx)(n.code,{children:"route53.Caddyfile"})," serves as an example."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"My internet connection can only send traffic to common ports like 80, 443, and 3389."}),"\n",(0,o.jsxs)(n.p,{children:["You can change the required ports in the ",(0,o.jsx)(n.code,{children:".env"})," file. Caddy will still use port 443 for zrok shares and API if you renamed ",(0,o.jsx)(n.code,{children:"compose.caddy.yml"})," as ",(0,o.jsx)(n.code,{children:"compose.override.yml"})," to enable Caddy."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",metastring:'title=".env"',children:"ZITI_CTRL_ADVERTISED_PORT=80\nZITI_ROUTER_PORT=3389\n"})}),"\n"]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(s,{...e})}):s(e)}},2465:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"guides/self-hosting/docker","title":"Self-hosting guide for Docker","description":"","source":"@site/../docs/guides/self-hosting/docker.mdx","sourceDirName":"guides/self-hosting","slug":"/guides/self-hosting/docker","permalink":"/docs/next/guides/self-hosting/docker","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/docker.mdx","tags":[],"version":"current","sidebarPosition":45,"frontMatter":{"title":"Self-hosting guide for Docker","sidebar_label":"Docker","sidebar_position":45},"sidebar":"tutorialSidebar","previous":{"title":"Personalized Frontend","permalink":"/docs/next/guides/self-hosting/personalized-frontend"},"next":{"title":"Kubernetes","permalink":"/docs/next/guides/self-hosting/kubernetes"}}');var i=r(4848),t=r(8453),s=r(1181);const c={title:"Self-hosting guide for Docker",sidebar_label:"Docker",sidebar_position:45},a=void 0,d={},l=[...s.RM];function h(e){return(0,i.jsx)(s.Ay,{})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h()}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>c});var o=r(6540);const i={},t=o.createContext(i);function s(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e43344f0.91a098d4.js b/assets/js/e43344f0.91a098d4.js new file mode 100644 index 00000000..41555e80 --- /dev/null +++ b/assets/js/e43344f0.91a098d4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1972],{2269:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Self Hosting","slug":"/category/self-hosting","permalink":"/docs/next/category/self-hosting","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"Linux User Share","permalink":"/docs/next/guides/linux-user-share/"},"next":{"title":"Linux","permalink":"/docs/next/guides/self-hosting/linux/"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/ebc0e2a0.e6ef86ef.js b/assets/js/ebc0e2a0.e6ef86ef.js new file mode 100644 index 00000000..6402a243 --- /dev/null +++ b/assets/js/ebc0e2a0.e6ef86ef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[37],{834:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>k,contentTitle:()=>v,default:()=>y,frontMatter:()=>x,metadata:()=>s,toc:()=>j});const s=JSON.parse('{"id":"guides/frontdoor","title":"zrok frontdoor","description":"zrok frontdoor is the heavy-duty front door to your app or site. It makes your website or app available to your online audience through the shield of zrok.io\'s hardened, managed frontends.","source":"@site/versioned_docs/version-0.4/guides/frontdoor.mdx","sourceDirName":"guides","slug":"/guides/frontdoor","permalink":"/docs/guides/frontdoor","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/frontdoor.mdx","tags":[],"version":"0.4","sidebarPosition":20,"frontMatter":{"title":"zrok frontdoor","sidebar_label":"frontdoor","sidebar_position":20,"hide_table_of_contents":true},"sidebar":"tutorialSidebar","previous":{"title":"Windows","permalink":"/docs/guides/install/windows"},"next":{"title":"Permission Modes","permalink":"/docs/guides/permission-modes"}}');var i=n(4848),t=n(8453),o=n(9028),a=n(9365);function l(e){const r={a:"a",code:"code",li:"li",ol:"ol",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["Set up ",(0,i.jsx)(r.code,{children:"zrok"}),"'s Linux package repository by following ",(0,i.jsx)(r.a,{href:"/docs/guides/install/linux#install-zrok-from-the-repository",children:"the Linux install guide"}),", or run this one-liner to complete the repo setup and install packages."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"curl -sSLf https://get.openziti.io/install.bash \\\n| sudo bash -s zrok-share\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["\n",(0,i.jsxs)(r.p,{children:["If you set up the repository by following the guide, then also install the ",(0,i.jsx)(r.code,{children:"zrok-share"})," package. This package provides the systemd service."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="Ubuntu, Debian"',children:"sudo apt install zrok-share\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="Fedora, Rocky"',children:"sudo dnf install zrok-share\n"})}),"\n"]}),"\n"]})}function d(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}var c=n(6559),h=n(3902);const p=[{value:"Installation",id:"installation",level:2},{value:"Enable",id:"enable",level:2},{value:"Name your Share",id:"name-your-share",level:2},{value:"Use Cases",id:"use-cases",level:2},{value:"Proxy a Web Server",id:"proxy-a-web-server",level:3},{value:"Serve Static Files",id:"serve-static-files",level:3},{value:"Caddy Server",id:"caddy-server",level:3},{value:"Network Drive",id:"network-drive",level:3},{value:"Authentication",id:"authentication",level:2},{value:"OAuth",id:"oauth",level:3},{value:"Password",id:"password",level:3},{value:"Start the Service",id:"start-the-service",level:2},{value:"Compatibility",id:"compatibility",level:2},{value:"Package Contents",id:"package-contents",level:2}];function u(e){const r={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsx)(d,{}),"\n",(0,i.jsxs)(n,{children:[(0,i.jsx)("summary",{children:"Ansible Playbook"}),(0,i.jsxs)(h.A,{title:"Set up package repository and install zrok-share",children:[c.A,"\n- name: Install zrok-share package\ngather_facts: false\nhosts: all \nbecome: true\ntasks:\n- name: Install zrok-share\n ansible.builtin.package:\n name: zrok-share\n state: present\n\n- name: Copy env config from Ansible controller to target\n copy:\n dest: /opt/openziti/etc/zrok/zrok-share.env\n src: /opt/openziti/etc/zrok/zrok-share.env\n\n- name: Enable and restart service\n systemd:\n name: zrok-share\n enabled: yes\n state: restarted\n daemon_reload: yes\n\n- name: Wait for service\n systemd:\n name: zrok-share\n state: started\n register: service_status\n until: service_status.status.ActiveState == 'active'\n retries: 30\n delay: 1\n"]})]}),"\n",(0,i.jsx)(r.h2,{id:"enable",children:"Enable"}),"\n",(0,i.jsx)(r.p,{children:"Save the enable token from the zrok console in the configuration file."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_ENABLE_TOKEN="14cbfca9772f"\n'})}),"\n",(0,i.jsx)(r.h2,{id:"name-your-share",children:"Name your Share"}),"\n",(0,i.jsxs)(r.p,{children:["This unique name becomes part of the domain name of the share, e.g. ",(0,i.jsx)(r.code,{children:"https://my-prod-app.in.zrok.io"}),". A random name is generated if you don't specify one."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_UNIQUE_NAME="my-prod-app"\n'})}),"\n",(0,i.jsx)(r.h2,{id:"use-cases",children:"Use Cases"}),"\n",(0,i.jsxs)(r.p,{children:["You may change the target for the current backend mode, e.g. ",(0,i.jsx)(r.code,{children:"proxy"}),", by editing the configuration file and restarting the service. The reserved subdomain will remain the same."]}),"\n",(0,i.jsxs)(r.p,{children:["You may switch between backend modes or change authentication options by deleting ",(0,i.jsx)(r.code,{children:"/var/lib/zrok-share/.zrok/reserved.json"})," and restarting the service. A new subdomain will be reserved."]}),"\n",(0,i.jsx)(r.h3,{id:"proxy-a-web-server",children:"Proxy a Web Server"}),"\n",(0,i.jsx)(r.p,{children:"Proxy a reserved subdomain to an existing web server. The web server could be on a private network or on the same host as zrok."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="http://127.0.0.1:3000"\nZROK_BACKEND_MODE="proxy"\n'})}),"\n",(0,i.jsxs)(r.p,{children:["If your HTTPS server has an unverifiable TLS server certificate then you must set ",(0,i.jsx)(r.code,{children:"--insecure"}),"."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_INSECURE="--insecure"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"serve-static-files",children:"Serve Static Files"}),"\n",(0,i.jsxs)(r.p,{children:["Run zrok's embedded web server to serve the files in a directory. If there's an ",(0,i.jsx)(r.code,{children:"index.html"})," file in the directory then visitors will see that web page in their browser, otherwise they'll see a generated index of the files. The directory must be readable by 'other', e.g. ",(0,i.jsx)(r.code,{children:"chmod -R o+rX /var/www/html"}),"."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="/var/www/html"\nZROK_BACKEND_MODE="web"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"caddy-server",children:"Caddy Server"}),"\n",(0,i.jsx)(r.p,{children:"Use zrok's built-in Caddy server to serve static files or as a reverse proxy to multiple web servers with various HTTP routes or as a load-balanced set. A sample Caddyfile is available in the path shown."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="/opt/openziti/etc/zrok/multiple_upstream.Caddyfile"\nZROK_BACKEND_MODE="caddy"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"network-drive",children:"Network Drive"}),"\n",(0,i.jsxs)(r.p,{children:["This uses zrok's ",(0,i.jsx)(r.code,{children:"drive"})," backend mode to serve a directory of static files as a virtual network drive. The directory must be readable by 'other', e.g. ",(0,i.jsx)(r.code,{children:"chmod -R o+rX /usr/share/doc"}),"."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_TARGET="/usr/share/doc"\nZROK_BACKEND_MODE="drive"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.a,{href:"https://blog.openziti.io/zrok-drives-an-early-preview",children:"Learn more about this feature in this blog post"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"authentication",children:"Authentication"}),"\n",(0,i.jsx)(r.p,{children:"You can limit access to certain email addresses with OAuth or require a password."}),"\n",(0,i.jsx)(r.h3,{id:"oauth",children:"OAuth"}),"\n",(0,i.jsx)(r.p,{children:"You can require that visitors authenticate with an email address that matches at least one of the suffixes you specify. Add the following to the configuration file."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_OAUTH_PROVIDER="github" # or google\nZROK_OAUTH_EMAILS="alice@example.com *@acme.example.com"\n'})}),"\n",(0,i.jsx)(r.h3,{id:"password",children:"Password"}),"\n",(0,i.jsx)(r.p,{children:"Enable HTTP basic authentication by adding the following to the configuration file."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="/opt/openziti/etc/zrok/zrok-share.env"',children:'ZROK_BASIC_AUTH="user:passwd"\n'})}),"\n",(0,i.jsx)(r.h2,{id:"start-the-service",children:"Start the Service"}),"\n",(0,i.jsx)(r.p,{children:"Start the service, and check the zrok console or the service log for the reserved subdomain."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="run now and at startup"',children:"sudo systemctl enable --now zrok-share.service\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",metastring:'title="run now"',children:"sudo systemctl restart zrok-share.service\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"journalctl -u zrok-share.service\n"})}),"\n",(0,i.jsx)(r.h2,{id:"compatibility",children:"Compatibility"}),"\n",(0,i.jsxs)(r.p,{children:["The Linux distribution must have a package manager that understands the ",(0,i.jsx)(r.code,{children:".deb"})," or ",(0,i.jsx)(r.code,{children:".rpm"})," format and be running systemd v232 or newer. The service was tested with:"]}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsx)(r.li,{children:"Ubuntu 20.04, 22.04, 23.04"}),"\n",(0,i.jsx)(r.li,{children:"Debian 11 12"}),"\n",(0,i.jsx)(r.li,{children:"Rocky 8, 9"}),"\n",(0,i.jsx)(r.li,{children:"Fedora 37, 38"}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"package-contents",children:"Package Contents"}),"\n",(0,i.jsxs)(r.p,{children:["The files included in the ",(0,i.jsx)(r.code,{children:"zrok-share"})," package are sourced ",(0,i.jsx)(r.a,{href:"https://github.com/openziti/zrok/tree/main/nfpm",children:"here in GitHub"}),"."]})]})}function m(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}var g=n(1122),b=n(6025);const x={title:"zrok frontdoor",sidebar_label:"frontdoor",sidebar_position:20,hide_table_of_contents:!0},v=void 0,k={},j=[{value:"Overview",id:"overview",level:2},{value:"Choose your OS",id:"choose-your-os",level:2},{value:"Goal",id:"goal",level:2},{value:"How it Works",id:"how-it-works",level:2},...p,{value:"Concepts",id:"concepts",level:2}];function f(e){const r={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"zrok frontdoor"})," is the heavy-duty front door to your app or site. It makes your website or app available to your online audience through the shield of zrok.io's hardened, managed frontends."]}),"\n",(0,i.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/5Vi8GKuTi_I",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,i.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(r.p,{children:["zrok frontends are the parts of zrok that proxy incoming public web traffic to zrok backend shares via OpenZiti. When you use zrok with a ",(0,i.jsx)(r.code,{children:"zrok.io"})," frontend, you're using ",(0,i.jsx)(r.strong,{children:"zrok frontdoor"}),". ",(0,i.jsx)(r.code,{children:"zrok.io"})," is zrok-as-a-service by NetFoundry, the team behind OpenZiti. You need a free account to use ",(0,i.jsx)(r.strong,{children:"zrok frontdoor"}),"."]}),"\n",(0,i.jsx)(g.A,{alt:"frontdoor diagram",sources:{light:(0,b.Ay)("/img/zrok-frontdoor-light-mode.svg"),dark:(0,b.Ay)("/img/zrok-frontdoor-dark-mode.svg")}}),"\n",(0,i.jsx)(r.h2,{id:"choose-your-os",children:"Choose your OS"}),"\n",(0,i.jsx)(r.p,{children:"Choose between installing the Linux package or running zrok with Docker (Linux, macOS, or Windows)."}),"\n","\n",(0,i.jsxs)(o.A,{queryString:"os",values:[{label:"Linux",value:"Linux"},{label:"Docker",value:"Docker"}],children:[(0,i.jsxs)(a.A,{value:"Linux",children:[(0,i.jsxs)(r.p,{children:["On Linux, zrok frontdoor is implemented natively as a system service provided by the ",(0,i.jsx)(r.code,{children:"zrok-share"})," DEB or RPM package."]}),(0,i.jsx)(r.h2,{id:"goal",children:"Goal"}),(0,i.jsx)(r.p,{children:"Proxy a reserved public subdomain to a backend target with an always-on Linux system service."}),(0,i.jsx)(r.h2,{id:"how-it-works",children:"How it Works"}),(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"zrok-share"})," package creates a ",(0,i.jsx)(r.code,{children:"zrok-share.service"})," unit in systemd. The administrator edits the service's configuration file to specify the:"]}),(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsx)(r.li,{children:"zrok account token"}),"\n",(0,i.jsxs)(r.li,{children:["target URL or files to be shared and backend mode, e.g. ",(0,i.jsx)(r.code,{children:"proxy"})]}),"\n",(0,i.jsx)(r.li,{children:"authentication options, if wanted"}),"\n"]}),(0,i.jsx)(r.p,{children:"When the service starts it will:"}),(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["enable the zrok environment unless ",(0,i.jsx)(r.code,{children:"/var/lib/zrok-share/.zrok/environment.json"})," exists"]}),"\n",(0,i.jsxs)(r.li,{children:["reserve a public subdomain for the service unless ",(0,i.jsx)(r.code,{children:"/var/lib/zrok-share/.zrok/reserved.json"})," exists"]}),"\n",(0,i.jsxs)(r.li,{children:["start sharing the target specified as ",(0,i.jsx)(r.code,{children:"ZROK_TARGET"})," in the environment file"]}),"\n"]}),(0,i.jsx)(m,{})]}),(0,i.jsx)(a.A,{value:"Docker",children:(0,i.jsxs)(r.p,{children:["On macOS and Windows, zrok frontdoor is implemented as a Docker Compose project which reserves a public subdomain for your website or service and manages a zrok environment that's separate from the Docker host. ",(0,i.jsx)(r.a,{href:"/docs/guides/docker-share/docker_public_share_guide",children:"Link to the Docker Public Share Guide"})]})})]}),"\n",(0,i.jsx)(r.h2,{id:"concepts",children:"Concepts"}),"\n",(0,i.jsxs)(r.p,{children:["Overview of ",(0,i.jsx)(r.a,{href:"/docs/concepts/sharing-reserved",children:"zrok reserved shares"})]})]})}function y(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(f,{...e})}):f(e)}},3902:(e,r,n)=>{n.d(r,{A:()=>o});n(6540);var s=n(382),i=n(1432),t=n(4848);const o=e=>{let{title:r,children:n}=e;const o=n.map((e=>"string"==typeof e?e.trim():s.Ay.dump(e).trim())).join("\n\n");return(0,t.jsx)("div",{children:(0,t.jsx)(i.A,{language:"yaml",title:r,children:o})})}},9028:(e,r,n)=>{n.d(r,{A:()=>a});var s=n(6540),i=n(1470),t=n(159),o=n(4848);const a=function(e){const[r,n]=(0,s.useState)(null);return(0,s.useEffect)((()=>{["Mac OS","Windows"].includes(t.wH)?n("Docker"):n("Linux")}),[]),(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(i.A,{...e,defaultValue:r,children:e.children})})}},6559:(e,r,n)=>{n.d(r,{A:()=>s});const s=[{name:"Set up zrok Package Repo",gather_facts:!0,hosts:"all",become:!0,tasks:[{name:"Set up apt repo",when:'ansible_os_family == "Debian"',block:[{name:"Install playbook dependencies","ansible.builtin.package":{name:["gnupg"],state:"present"}},{name:"Fetch armored pubkey","ansible.builtin.uri":{url:"https://get.openziti.io/tun/package-repos.gpg",return_content:"yes"},register:"armored_pubkey"},{name:"Dearmor pubkey","ansible.builtin.shell":'gpg --dearmor --output /usr/share/keyrings/openziti.gpg <<< "{{ armored_pubkey.content }}"\n',args:{creates:"/usr/share/keyrings/openziti.gpg",executable:"/bin/bash"}},{name:"Set pubkey filemode","ansible.builtin.file":{path:"/usr/share/keyrings/openziti.gpg",mode:"a+rX"}},{name:"Install OpenZiti repo deb source","ansible.builtin.copy":{dest:"/etc/apt/sources.list.d/openziti-release.list",content:"deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable debian main\n"}},{name:"Refresh Repo Sources","ansible.builtin.apt":{update_cache:"yes",cache_valid_time:3600}}]},{name:"Set up yum repo",when:'ansible_os_family == "RedHat"',block:[{name:"Install OpenZiti repo rpm source","ansible.builtin.yum_repository":{name:"OpenZitiRelease",description:"OpenZiti Release",baseurl:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch",enabled:"yes",gpgkey:"https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat/$basearch/repodata/repomd.xml.key",repo_gpgcheck:"yes",gpgcheck:"no"}}]}]}]}}]); \ No newline at end of file diff --git a/assets/js/ecf841c3.43088d3f.js b/assets/js/ecf841c3.43088d3f.js new file mode 100644 index 00000000..fd7b00b9 --- /dev/null +++ b/assets/js/ecf841c3.43088d3f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9002],{3964:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"concepts/tunnels","title":"Sharing TCP and UDP Servers","description":"zrok includes support for sharing low-level TCP and UDP network resources using the tcpTunnel and udpTunnel backend modes.","source":"@site/versioned_docs/version-0.4/concepts/tunnels.md","sourceDirName":"concepts","slug":"/concepts/tunnels","permalink":"/docs/concepts/tunnels","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/concepts/tunnels.md","tags":[],"version":"0.4","sidebarPosition":25,"frontMatter":{"sidebar_position":25},"sidebar":"tutorialSidebar","previous":{"title":"Sharing HTTP Servers","permalink":"/docs/concepts/http"},"next":{"title":"Sharing Websites and Files","permalink":"/docs/concepts/files"}}');var c=s(4848),t=s(8453);const o={sidebar_position:25},i="Sharing TCP and UDP Servers",d={},a=[];function l(e){const n={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.header,{children:(0,c.jsx)(n.h1,{id:"sharing-tcp-and-udp-servers",children:"Sharing TCP and UDP Servers"})}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"zrok"})," includes support for sharing low-level TCP and UDP network resources using the ",(0,c.jsx)(n.code,{children:"tcpTunnel"})," and ",(0,c.jsx)(n.code,{children:"udpTunnel"})," backend modes."]}),"\n",(0,c.jsxs)(n.p,{children:["As of version ",(0,c.jsx)(n.code,{children:"v0.4"}),", ",(0,c.jsx)(n.code,{children:"zrok"})," supports sharing TCP and UDP network resources using ",(0,c.jsx)(n.code,{children:"private"})," sharing."]}),"\n",(0,c.jsxs)(n.p,{children:["To share a raw network resource using ",(0,c.jsx)(n.code,{children:"zrok"}),", you'll want to use the ",(0,c.jsx)(n.code,{children:"zrok share private"})," command from your ",(0,c.jsx)(n.code,{children:"enable"}),"-d environment, like this:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"$ zrok share private --backend-mode tcpTunnel 192.168.9.1:22\n"})}),"\n",(0,c.jsx)(n.p,{children:"This will result in a share client starting, which looks like this:"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 access your share with: zrok access private 5adagwfl888k \u2502\u2502[PRIVATE][TCPTUNNEL]\u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsxs)(n.p,{children:["Then on the system where you want to access your shared resource (an SSH endpoint in this case), you'll need an ",(0,c.jsx)(n.code,{children:"enable"}),"-d ",(0,c.jsx)(n.code,{children:"zrok"})," environment. Run the following command (shown in the banner at the top of the ",(0,c.jsx)(n.code,{children:"zrok share"})," client above):"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"$ zrok access private 5adagwfl888k\n"})}),"\n",(0,c.jsxs)(n.p,{children:["This will start an ",(0,c.jsx)(n.code,{children:"access"})," client on this system:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 tcp://127.0.0.1:9191 -> 5adagwfl888k \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"access"})," client shows the endpoint at the top where the service can be accessed. In this case, you'll want to connect your SSH client to ",(0,c.jsx)(n.code,{children:"127.0.0.1:9191"}),". We'll just use ",(0,c.jsx)(n.code,{children:"nc"})," (netcat) to access the shared TCP port:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"$ nc 127.0.0.1 9191\nSSH-2.0-OpenSSH_9.2 FreeBSD-openssh-portable-9.2.p1,1\n"})}),"\n",(0,c.jsxs)(n.p,{children:["And both the ",(0,c.jsx)(n.code,{children:"share"})," client and the ",(0,c.jsx)(n.code,{children:"access"})," client show the traffic:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 access your share with: zrok access private 5adagwfl888k \u2502\u2502[PRIVATE] [TCPTUNNEL]\u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502Friday, 23-Jun-23 15:33:10 EDT ziti-edge-router \u2502\n\u2502connId=2147483648, logical=ziti- \u2502\n\u2502sdk[router=tls:ziti-lx:3022] -> ACCEPT 192.168.9.1:22 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:"\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 tcp://127.0.0.1:9191 -> 5adagwfl888k \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502Friday, 23-Jun-23 15:33:10 EDT 127.0.0.1:42312 -> ACCEPT 5adagwfl888k \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n"})}),"\n",(0,c.jsxs)(n.p,{children:["Exit the ",(0,c.jsx)(n.code,{children:"access"})," client to remove the local access to the shared TCP port. Exit the ",(0,c.jsx)(n.code,{children:"share"})," client to disable further accesses to the shared resource."]}),"\n",(0,c.jsxs)(n.p,{children:["For UDP network resources just use the ",(0,c.jsx)(n.code,{children:"zrok share private --backend-mode udpTunnel"})," instead of ",(0,c.jsx)(n.code,{children:"tcpTunnel"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>i});var r=s(6540);const c={},t=r.createContext(c);function o(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ef8afbfd.5396f7a7.js b/assets/js/ef8afbfd.5396f7a7.js new file mode 100644 index 00000000..ac6e5632 --- /dev/null +++ b/assets/js/ef8afbfd.5396f7a7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9905],{9530:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"guides/self-hosting/linux/nginx","title":"NGINX Reverse Proxy for zrok","description":"Walkthrough Video","source":"@site/../docs/guides/self-hosting/linux/nginx.mdx","sourceDirName":"guides/self-hosting/linux","slug":"/guides/self-hosting/linux/nginx","permalink":"/docs/next/guides/self-hosting/linux/nginx","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/linux/nginx.mdx","tags":[],"version":"current","sidebarPosition":50,"frontMatter":{"sidebar_position":50,"sidebar_label":"NGINX TLS"},"sidebar":"tutorialSidebar","previous":{"title":"Linux","permalink":"/docs/next/guides/self-hosting/linux/"},"next":{"title":"Interstitial Pages","permalink":"/docs/next/guides/self-hosting/interstitial-page"}}');var o=r(4848),i=r(8453);const s={sidebar_position:50,sidebar_label:"NGINX TLS"},l="NGINX Reverse Proxy for zrok",a={},c=[{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"Before You Begin",id:"before-you-begin",level:2},{value:"Choose a Reverse Proxy Address",id:"choose-a-reverse-proxy-address",level:2},{value:"Obtain a Wildcard Server Certificate",id:"obtain-a-wildcard-server-certificate",level:2},{value:"Install NGINX",id:"install-nginx",level:2},{value:"Configure NGINX",id:"configure-nginx",level:2},{value:"Restart NGINX",id:"restart-nginx",level:2},{value:"Check the Firewall",id:"check-the-firewall",level:2},{value:"Update the zrok Frontend",id:"update-the-zrok-frontend",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"nginx-reverse-proxy-for-zrok",children:"NGINX Reverse Proxy for zrok"})}),"\n",(0,o.jsx)(n.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,o.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/870A5dke_u4?start=1080",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,o.jsx)(n.h2,{id:"before-you-begin",children:"Before You Begin"}),"\n",(0,o.jsxs)(n.p,{children:["I'll assume you have a running ",(0,o.jsx)(n.code,{children:"zrok"})," controller and frontend and wish to front both with NGINX providing server TLS. Go back to ",(0,o.jsx)(n.a,{href:"/docs/next/guides/self-hosting/linux/",children:"Self-Hosting Guide"})," if you still need to spin those up."]}),"\n",(0,o.jsx)(n.h2,{id:"choose-a-reverse-proxy-address",children:"Choose a Reverse Proxy Address"}),"\n",(0,o.jsxs)(n.p,{children:["I'll use ",(0,o.jsx)(n.code,{children:"https://api.zrok.quigley.com:443"})," in this example, and assume you already set up wildcard DNS like ",(0,o.jsx)(n.code,{children:"*.zrok.quigley.com"}),". This lets us elect ",(0,o.jsx)(n.code,{children:"api.zrok.quigley.com"})," as the controller DNS name, and forward any other incoming requests to the zrok public frontend."]}),"\n",(0,o.jsx)(n.h2,{id:"obtain-a-wildcard-server-certificate",children:"Obtain a Wildcard Server Certificate"}),"\n",(0,o.jsx)(n.p,{children:"You must complete a DNS challenge to obtain a wildcard certificate from Let's Encrypt. I'll assume you know how to create the necessary TXT record in the DNS zone you're using with zrok."}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Install certbot: ",(0,o.jsx)(n.a,{href:"https://eff-certbot.readthedocs.io/en/stable/install.html",children:"https://eff-certbot.readthedocs.io/en/stable/install.html"})]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Run certbot with the manual plugin: ",(0,o.jsx)(n.a,{href:"https://certbot.eff.org/docs/using.html#manual",children:"https://certbot.eff.org/docs/using.html#manual"})]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"# install cert for *.zrok.quigley.com in /etc/letsencrypt\nsudo certbot certonly --manual\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"install-nginx",children:(0,o.jsx)(n.a,{href:"https://www.nginx.com/resources/wiki/start/topics/tutorials/install/",children:"Install NGINX"})}),"\n",(0,o.jsx)(n.h2,{id:"configure-nginx",children:"Configure NGINX"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"server {\n listen 443 ssl;\n server_name api.zrok.quigley.com;\n ssl_certificate /etc/letsencrypt/live/zrok.quigley.com/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/zrok.quigley.com/privkey.pem;\n ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\n ssl_ciphers HIGH:!aNULL:!MD5;\n\n location / {\n proxy_pass http://127.0.0.1:18080;\n error_log /var/log/nginx/zrok-controller.log;\n }\n\n}\n\nmap $http_upgrade $connection_upgrade {\n default keep-alive;\n 'websocket' upgrade;\n '' close;\n}\n\nserver {\n listen 443 ssl;\n server_name *.zrok.quigley.com;\n ssl_certificate /etc/letsencrypt/live/zrok.quigley.com/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/zrok.quigley.com/privkey.pem;\n ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\n ssl_ciphers HIGH:!aNULL:!MD5;\n\n location / {\n proxy_pass http://127.0.0.1:8080;\n proxy_set_header Host $host;\n error_log /var/log/nginx/zrok-frontend.log;\n proxy_busy_buffers_size 512k;\n proxy_buffers 4 512k;\n proxy_buffer_size 256k;\n\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}\n"})}),"\n",(0,o.jsx)(n.h2,{id:"restart-nginx",children:"Restart NGINX"}),"\n",(0,o.jsx)(n.p,{children:"Load the new configuration by restarting NGINX. Check the logs to make sure it's happy."}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsx)(n.p,{children:"Started A high performance web server and a reverse proxy server."}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"check-the-firewall",children:"Check the Firewall"}),"\n",(0,o.jsx)(n.p,{children:"If you followed the non-TLS quickstart then you may have opened 8080,108080/tcp in your firewall. You can go ahead and replace those exceptions with 443/tcp because only NGINX needs to be reachable for zrok to function."}),"\n",(0,o.jsx)(n.h2,{id:"update-the-zrok-frontend",children:"Update the zrok Frontend"}),"\n",(0,o.jsxs)(n.p,{children:['List available frontends to obtain the token identifier of the frontend named "public". You may need to set ',(0,o.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," or ",(0,o.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," before running ",(0,o.jsx)(n.code,{children:"zrok admin"}),"."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"$ zrok admin list frontends\n\n TOKEN ZID PUBLIC NAME URL TEMPLATE CREATED AT UPDATED AT \n 2NiDTRYUww18 7DsLh9DXG public http://{token}.zrok.quigley.com:8080 2023-01-19 05:29:20.793 +0000 UTC 2023-01-19 06:17:25 +0000 UTC \n"})}),"\n",(0,o.jsx)(n.p,{children:"Update the URL template to use NGINX."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"$ zrok admin update frontend 2NiDTRYUww18 --url-template https://{token}.zrok.quigley.com:443\n[ 0.028] INFO main.(*adminUpdateFrontendCommand).run: updated global frontend '2NiDTRYUww18'\n"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>l});var t=r(6540);const o={},i=t.createContext(o);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ef8afbfd.dbcbe2ba.js b/assets/js/ef8afbfd.dbcbe2ba.js deleted file mode 100644 index 5ac69727..00000000 --- a/assets/js/ef8afbfd.dbcbe2ba.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9905],{9530:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"guides/self-hosting/linux/nginx","title":"NGINX Reverse Proxy for zrok","description":"Walkthrough Video","source":"@site/../docs/guides/self-hosting/linux/nginx.mdx","sourceDirName":"guides/self-hosting/linux","slug":"/guides/self-hosting/linux/nginx","permalink":"/docs/guides/self-hosting/linux/nginx","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/guides/self-hosting/linux/nginx.mdx","tags":[],"version":"current","sidebarPosition":50,"frontMatter":{"sidebar_position":50,"sidebar_label":"NGINX TLS"},"sidebar":"tutorialSidebar","previous":{"title":"Linux","permalink":"/docs/guides/self-hosting/linux/"},"next":{"title":"Interstitial Pages","permalink":"/docs/guides/self-hosting/interstitial-page"}}');var o=r(4848),i=r(8453);const s={sidebar_position:50,sidebar_label:"NGINX TLS"},l="NGINX Reverse Proxy for zrok",a={},c=[{value:"Walkthrough Video",id:"walkthrough-video",level:2},{value:"Before You Begin",id:"before-you-begin",level:2},{value:"Choose a Reverse Proxy Address",id:"choose-a-reverse-proxy-address",level:2},{value:"Obtain a Wildcard Server Certificate",id:"obtain-a-wildcard-server-certificate",level:2},{value:"Install NGINX",id:"install-nginx",level:2},{value:"Configure NGINX",id:"configure-nginx",level:2},{value:"Restart NGINX",id:"restart-nginx",level:2},{value:"Check the Firewall",id:"check-the-firewall",level:2},{value:"Update the zrok Frontend",id:"update-the-zrok-frontend",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"nginx-reverse-proxy-for-zrok",children:"NGINX Reverse Proxy for zrok"})}),"\n",(0,o.jsx)(n.h2,{id:"walkthrough-video",children:"Walkthrough Video"}),"\n",(0,o.jsx)("iframe",{width:"100%",height:"315",src:"https://www.youtube.com/embed/870A5dke_u4?start=1080",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}),"\n",(0,o.jsx)(n.h2,{id:"before-you-begin",children:"Before You Begin"}),"\n",(0,o.jsxs)(n.p,{children:["I'll assume you have a running ",(0,o.jsx)(n.code,{children:"zrok"})," controller and frontend and wish to front both with NGINX providing server TLS. Go back to ",(0,o.jsx)(n.a,{href:"/docs/guides/self-hosting/linux/",children:"Self-Hosting Guide"})," if you still need to spin those up."]}),"\n",(0,o.jsx)(n.h2,{id:"choose-a-reverse-proxy-address",children:"Choose a Reverse Proxy Address"}),"\n",(0,o.jsxs)(n.p,{children:["I'll use ",(0,o.jsx)(n.code,{children:"https://api.zrok.quigley.com:443"})," in this example, and assume you already set up wildcard DNS like ",(0,o.jsx)(n.code,{children:"*.zrok.quigley.com"}),". This lets us elect ",(0,o.jsx)(n.code,{children:"api.zrok.quigley.com"})," as the controller DNS name, and forward any other incoming requests to the zrok public frontend."]}),"\n",(0,o.jsx)(n.h2,{id:"obtain-a-wildcard-server-certificate",children:"Obtain a Wildcard Server Certificate"}),"\n",(0,o.jsx)(n.p,{children:"You must complete a DNS challenge to obtain a wildcard certificate from Let's Encrypt. I'll assume you know how to create the necessary TXT record in the DNS zone you're using with zrok."}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Install certbot: ",(0,o.jsx)(n.a,{href:"https://eff-certbot.readthedocs.io/en/stable/install.html",children:"https://eff-certbot.readthedocs.io/en/stable/install.html"})]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Run certbot with the manual plugin: ",(0,o.jsx)(n.a,{href:"https://certbot.eff.org/docs/using.html#manual",children:"https://certbot.eff.org/docs/using.html#manual"})]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"# install cert for *.zrok.quigley.com in /etc/letsencrypt\nsudo certbot certonly --manual\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"install-nginx",children:(0,o.jsx)(n.a,{href:"https://www.nginx.com/resources/wiki/start/topics/tutorials/install/",children:"Install NGINX"})}),"\n",(0,o.jsx)(n.h2,{id:"configure-nginx",children:"Configure NGINX"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"server {\n listen 443 ssl;\n server_name api.zrok.quigley.com;\n ssl_certificate /etc/letsencrypt/live/zrok.quigley.com/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/zrok.quigley.com/privkey.pem;\n ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\n ssl_ciphers HIGH:!aNULL:!MD5;\n\n location / {\n proxy_pass http://127.0.0.1:18080;\n error_log /var/log/nginx/zrok-controller.log;\n }\n\n}\n\nmap $http_upgrade $connection_upgrade {\n default keep-alive;\n 'websocket' upgrade;\n '' close;\n}\n\nserver {\n listen 443 ssl;\n server_name *.zrok.quigley.com;\n ssl_certificate /etc/letsencrypt/live/zrok.quigley.com/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/zrok.quigley.com/privkey.pem;\n ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\n ssl_ciphers HIGH:!aNULL:!MD5;\n\n location / {\n proxy_pass http://127.0.0.1:8080;\n proxy_set_header Host $host;\n error_log /var/log/nginx/zrok-frontend.log;\n proxy_busy_buffers_size 512k;\n proxy_buffers 4 512k;\n proxy_buffer_size 256k;\n\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}\n"})}),"\n",(0,o.jsx)(n.h2,{id:"restart-nginx",children:"Restart NGINX"}),"\n",(0,o.jsx)(n.p,{children:"Load the new configuration by restarting NGINX. Check the logs to make sure it's happy."}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsx)(n.p,{children:"Started A high performance web server and a reverse proxy server."}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"check-the-firewall",children:"Check the Firewall"}),"\n",(0,o.jsx)(n.p,{children:"If you followed the non-TLS quickstart then you may have opened 8080,108080/tcp in your firewall. You can go ahead and replace those exceptions with 443/tcp because only NGINX needs to be reachable for zrok to function."}),"\n",(0,o.jsx)(n.h2,{id:"update-the-zrok-frontend",children:"Update the zrok Frontend"}),"\n",(0,o.jsxs)(n.p,{children:['List available frontends to obtain the token identifier of the frontend named "public". You may need to set ',(0,o.jsx)(n.code,{children:"ZROK_ADMIN_TOKEN"})," or ",(0,o.jsx)(n.code,{children:"ZROK_API_ENDPOINT"})," before running ",(0,o.jsx)(n.code,{children:"zrok admin"}),"."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"$ zrok admin list frontends\n\n TOKEN ZID PUBLIC NAME URL TEMPLATE CREATED AT UPDATED AT \n 2NiDTRYUww18 7DsLh9DXG public http://{token}.zrok.quigley.com:8080 2023-01-19 05:29:20.793 +0000 UTC 2023-01-19 06:17:25 +0000 UTC \n"})}),"\n",(0,o.jsx)(n.p,{children:"Update the URL template to use NGINX."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"$ zrok admin update frontend 2NiDTRYUww18 --url-template https://{token}.zrok.quigley.com:443\n[ 0.028] INFO main.(*adminUpdateFrontendCommand).run: updated global frontend '2NiDTRYUww18'\n"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>l});var t=r(6540);const o={},i=t.createContext(o);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f7716de7.03326789.js b/assets/js/f7716de7.03326789.js new file mode 100644 index 00000000..5cca2685 --- /dev/null +++ b/assets/js/f7716de7.03326789.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3072],{716:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"OAuth","slug":"/category/oauth","permalink":"/docs/next/category/oauth","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"Configuring Limits","permalink":"/docs/next/guides/self-hosting/metrics-and-limits/configuring-limits"},"next":{"title":"OAuth Public Frontend Configuration","permalink":"/docs/next/guides/self-hosting/oauth/configuring-oauth"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/f888b719.96c00620.js b/assets/js/f888b719.96c00620.js deleted file mode 100644 index 8c075b2a..00000000 --- a/assets/js/f888b719.96c00620.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4470],{2410:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>l,default:()=>x,frontMatter:()=>d,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"getting-started","title":"Getting Started","description":"Your Secure Internet Sharing Perimeter","source":"@site/../docs/getting-started.mdx","sourceDirName":".","slug":"/getting-started","permalink":"/docs/getting-started","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/getting-started.mdx","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"title":"Getting Started","sidebar_label":"Getting Started","sidebar_position":10},"sidebar":"tutorialSidebar","next":{"title":"Concepts","permalink":"/docs/concepts/"}}');var i=s(4848),o=s(8453),t=s(8151),a=s(595),c=s(1342);const d={title:"Getting Started",sidebar_label:"Getting Started",sidebar_position:10},l=void 0,h={},u=[{value:"Your Secure Internet Sharing Perimeter",id:"your-secure-internet-sharing-perimeter",level:2},{value:"Your First Share",id:"your-first-share",level:3},{value:"Share Backend Modes",id:"share-backend-modes",level:2},{value:"Open Source",id:"open-source",level:2},{value:"Ziti native",id:"ziti-native",level:3},{value:"What's it for?",id:"whats-it-for",level:2},{value:"Installing the zrok Command",id:"installing-the-zrok-command",level:2},{value:"Enabling Your zrok Environment",id:"enabling-your-zrok-environment",level:2},{value:"Sharing",id:"sharing",level:2},{value:"Ephemeral by Default",id:"ephemeral-by-default",level:3},{value:"Public Shares and Frontends",id:"public-shares-and-frontends",level:3},{value:"Private Shares",id:"private-shares",level:3},{value:"Proxy Backend Mode",id:"proxy-backend-mode",level:3},{value:"Web Backend Mode",id:"web-backend-mode",level:3},{value:"Reserved Shares",id:"reserved-shares",level:3},{value:"Concepts Review",id:"concepts-review",level:2},{value:"Instance and Account",id:"instance-and-account",level:3},{value:"Environment",id:"environment",level:3},{value:"Shares",id:"shares",level:3},{value:"Reserved Shares",id:"reserved-shares-1",level:3},{value:"Self-Hosting an Instance",id:"self-hosting-an-instance",level:2},{value:"Resources",id:"resources",level:2}];function m(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components},{Card:r,CardBody:d,CardFooter:l,CardHeader:h,Column:u,Columns:m}=n;return r||p("Card",!0),d||p("CardBody",!0),l||p("CardFooter",!0),h||p("CardHeader",!0),u||p("Column",!0),m||p("Columns",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"your-secure-internet-sharing-perimeter",children:"Your Secure Internet Sharing Perimeter"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," (",(0,i.jsx)(n.em,{children:"/zi\u02d0\u0279\u0252k/ ZEE-rock"}),") is a secure, open-source, self-hostable sharing platform that simplifies shielding and sharing network services or files.\nThere's a hardened zrok-as-a-service offering available at ",(0,i.jsx)(n.a,{href:"https://myzrok.io",children:"myzrok.io"})," with a generous free tier."]}),"\n",(0,i.jsx)(n.h3,{id:"your-first-share",children:"Your First Share"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Get an account token"}),"\n"]}),"\n",(0,i.jsxs)(m,{className:"text--center getting-started-cards",style:{marginLeft:1},children:[(0,i.jsx)(u,{style:{paddingBottom:20},children:(0,i.jsxs)(r,{shadow:"tl",children:[(0,i.jsx)(h,{children:(0,i.jsx)("h3",{children:"Hosted zrok"})}),(0,i.jsx)(d,{children:(0,i.jsx)(n.p,{children:"Use NetFoundry's public zrok instance."})}),(0,i.jsx)(l,{children:(0,i.jsx)("a",{href:"https://myzrok.io/",children:(0,i.jsx)("button",{className:"button button--secondary button--block",children:"Get an Account"})})})]})}),(0,i.jsx)(u,{style:{paddingBottom:20},children:(0,i.jsxs)(r,{shadow:"tl",children:[(0,i.jsx)(h,{children:(0,i.jsx)("h3",{children:"Self-Hosted zrok"})}),(0,i.jsx)(d,{children:(0,i.jsx)(n.p,{children:"Run a zrok instance on Linux, Docker, or Kubernetes."})}),(0,i.jsx)(l,{children:(0,i.jsx)("a",{href:"/docs/category/self-hosting/",children:(0,i.jsx)("button",{className:"button button--secondary button--block",children:"Guides"})})})]})})]}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"#installing-the-zrok-command",children:"Download the zrok binary"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Enable zrok for your ",(0,i.jsx)(n.a,{href:"#enabling-your-zrok-environment",children:"user environment"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"zrok enable \n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Share ",(0,i.jsx)(n.code,{children:"http://localhost:8080"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"zrok share public 8080\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Visit the public URL displayed in your terminal"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zrok share public",src:s(6831).A+"",width:"1115",height:"628"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"share-backend-modes",children:"Share Backend Modes"}),"\n",(0,i.jsx)(n.p,{children:"zrok shares can be public or private, with different options for backend modes, including:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-public",children:"Public shares"})," for ",(0,i.jsx)(n.a,{href:"/docs/concepts/http",children:"web services"})," or ",(0,i.jsx)(n.a,{href:"/docs/concepts/files",children:"files"})]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-private",children:"Private shares for web services or files"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/tunnels",children:"TCP Tunnels"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/tunnels",children:"UDP Tunnels"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/guides/drives",children:"File Drives"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/guides/vpn/",children:"VPN"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"open-source",children:"Open Source"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," is licensed under Apache 2.0."]}),"\n",(0,i.jsxs)(n.p,{children:["Check ",(0,i.jsx)(n.a,{href:"https://github.com/orgs/openziti/projects/16",children:"the roadmap"})," if you're thinking about the future. We would love to hear your ideas for ",(0,i.jsx)(n.code,{children:"zrok"}),"!"]}),"\n",(0,i.jsxs)(n.p,{children:["The best ways to engage are ",(0,i.jsx)(n.a,{href:"https://openziti.discourse.group/",children:"Discourse"})," for questions and ",(0,i.jsx)(n.a,{href:"https://github.com/openziti/zrok/issues",children:"GitHub Issues"})," for documenting problems."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"/docs/concepts/opensource",children:"Read more about zrok open source"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"ziti-native",children:"Ziti native"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," is a ",(0,i.jsx)(n.em,{children:"Ziti Native Application"}),", built on the ",(0,i.jsx)(n.a,{href:"https://openziti.io",children:"OpenZiti"})," platform, and supported by the OpenZiti community and NetFoundry team."]}),"\n",(0,i.jsx)(n.h2,{id:"whats-it-for",children:"What's it for?"}),"\n",(0,i.jsxs)(n.p,{children:["Use ",(0,i.jsx)(n.code,{children:"zrok"})," to share a running service, like a web server or a network socket, or to share a directory of static files."]}),"\n",(0,i.jsxs)(n.p,{children:["If ",(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-public",children:"sharing publicly"}),", you can reserve a subdomain, enable authentication options, or both. Public shares proxy HTTPS to your service or files."]}),"\n",(0,i.jsxs)(n.p,{children:["If ",(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-private",children:"sharing privately"}),", only users with the share token can access your share. In addition to what you can share publicly, private shares can include TCP and UDP services."]}),"\n",(0,i.jsx)(n.h2,{id:"installing-the-zrok-command",children:"Installing the zrok Command"}),"\n",(0,i.jsx)(t.F,{children:(0,i.jsxs)("div",{className:c.A.downloadContainer,children:[(0,i.jsx)(a.A,{osName:"Windows",osLogo:"/img/logo-windows.svg",infoText:"Binary executable",guideLink:"/docs/guides/install/windows"}),(0,i.jsx)(a.A,{osName:"macOS",osLogo:"/img/logo-apple.svg",infoText:"Binary executable",guideLink:"/docs/guides/install/macos"}),(0,i.jsx)(a.A,{osName:"Linux",osLogo:"/img/logo-linux.svg",infoText:"DEB, RPM packages",guideLink:"/docs/guides/install/linux"})]})}),"\n",(0,i.jsx)(n.h2,{id:"enabling-your-zrok-environment",children:"Enabling Your zrok Environment"}),"\n",(0,i.jsxs)(n.p,{children:["After you have ",(0,i.jsx)(n.a,{href:"#your-first-share",children:"an account"}),", you can enable your ",(0,i.jsx)(n.code,{children:"zrok"})," environment."]}),"\n",(0,i.jsxs)(n.p,{children:["A zrok environment usually refers to an enabled device where shares and accesses can be created, .e.g., ",(0,i.jsx)(n.code,{children:"~/.zrok"})," on a Unix machine. It can be a specific user's environment or a system-wide agent's environment owned by the administrator."]}),"\n",(0,i.jsxs)(n.p,{children:["When your ",(0,i.jsx)(n.code,{children:"zrok"})," account was created, the service generated a ",(0,i.jsx)(n.em,{children:"secret token"})," that identifies and authenticates in a single step. Protect your secret token as if it were a password, or an important account number; it's a ",(0,i.jsx)(n.em,{children:"secret"}),", protect it."]}),"\n",(0,i.jsxs)(n.p,{children:["When we left off you had downloaded, extracted, and configured your ",(0,i.jsx)(n.code,{children:"zrok"})," environment. In order to use that environment with your account, you'll need to ",(0,i.jsx)(n.code,{children:"enable"})," it. Enabling an environment generates a secure identity and the necessary underlying security policies with the OpenZiti network hosting the ",(0,i.jsx)(n.code,{children:"zrok"})," service."]}),"\n",(0,i.jsxs)(n.p,{children:["From the web console, click on your email address in the upper right corner of the header. That drop down menu contains an ",(0,i.jsx)(n.code,{children:"Enable Your Environment"})," link. Click that link and a modal dialog will be shown like this:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Enable Modal Dialog",src:s(2963).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["This dialog box shows you the ",(0,i.jsx)(n.code,{children:"zrok enable"})," command that you can use to enable any shell to work with your ",(0,i.jsx)(n.code,{children:"zrok"})," account with a single command."]}),"\n",(0,i.jsx)(n.p,{children:"Let's copy that command and paste it into your shell:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example"',children:"$ zrok enable klFEoIi0QAg7 \n\u28fb contacting the zrok service...\n"})}),"\n",(0,i.jsx)(n.p,{children:"After a few seconds, the message will change and indicate that the enable operation succeeded:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example"',children:"$ zrok enable klFEoIi0QAg7 \n\u28fb the zrok environment was successfully enabled...\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Now, if we run a ",(0,i.jsx)(n.code,{children:"zrok status"})," command, you will see the details of your environment:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",children:"zrok status\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"Config:\n\n CONFIG VALUE SOURCE\n apiEndpoint https://api.staging.zrok.io env\n\nEnvironment:\n\n PROPERTY VALUE\n Secret Token <>\n Ziti Identity <>\n"})}),"\n",(0,i.jsx)(n.p,{children:"Excellent... our environment is now fully enabled."}),"\n",(0,i.jsxs)(n.p,{children:["If we return to the ",(0,i.jsx)(n.em,{children:"web console"}),", we'll now see the new environment reflected in the explorer view:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"New Environment in Web UI",src:s(5745).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["In my case, the environment is named ",(0,i.jsx)(n.code,{children:"michael@ziti-lx"}),", which is the username of my shell and the hostname of the system the shell is running on."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["Should you want to use a non-default name for your environment, you can pass the ",(0,i.jsx)(n.code,{children:"-d"})," option to the ",(0,i.jsx)(n.code,{children:"zrok enable"})," command. See ",(0,i.jsx)(n.code,{children:"zrok enable --help"})," for details."]})}),"\n",(0,i.jsxs)(n.p,{children:["If you click on the environment node in the explorer in the ",(0,i.jsx)(n.em,{children:"web console"}),", the details panel shown at the bottom of the page will change:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Empty Environment",src:s(8474).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["The explorer supports clicking, dragging, mouse wheel zooming, and selecting the nodes in the graph for more information (and available actions) for the selected node. If you ever get lost in the explorer, click the ",(0,i.jsx)(n.img,{alt:"Zoom to Fit",src:s(3605).A+"",width:"30",height:"25"})," ",(0,i.jsx)(n.em,{children:"zoom to fit"})," icon in the lower right corner of the explorer."]}),"\n",(0,i.jsxs)(n.p,{children:["If we click on the ",(0,i.jsx)(n.code,{children:"Detail"})," tab for our environment, we'll see something like:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Environment Detail",src:s(6219).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["With your ",(0,i.jsx)(n.code,{children:"zrok"})," account you can ",(0,i.jsx)(n.code,{children:"zrok enable"})," multiple environments. This will allow you to run ",(0,i.jsx)(n.code,{children:"zrok share"})," in one environment, and ",(0,i.jsx)(n.code,{children:"zrok access"})," in other environments."]})}),"\n",(0,i.jsx)(n.p,{children:"Your environment is fully ready to go. Now we can move on to the fun stuff..."}),"\n",(0,i.jsx)(n.h2,{id:"sharing",children:"Sharing"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," is designed to make sharing resources as effortless as possible, while providing a high degree of security and control."]}),"\n",(0,i.jsx)(n.h3,{id:"ephemeral-by-default",children:"Ephemeral by Default"}),"\n",(0,i.jsxs)(n.p,{children:["Shared resources are ",(0,i.jsx)(n.em,{children:"ephemeral"})," by default; as soon as you terminate the ",(0,i.jsx)(n.code,{children:"zrok share"})," command, the entire share is removed and is no longer available to any users. Identifiers for shared resources are randomly allocated when the share is created."]}),"\n",(0,i.jsx)(n.h3,{id:"public-shares-and-frontends",children:"Public Shares and Frontends"}),"\n",(0,i.jsxs)(n.p,{children:["Resources that are shared ",(0,i.jsx)(n.em,{children:"publicly"})," are exposed to any users on the internet who have access to the ",(0,i.jsx)(n.code,{children:"zrok"}),' instance\'s "frontend".']}),"\n",(0,i.jsx)(n.p,{children:"A frontend is an HTTPS listener exposed to the internet, that lets any user with your ephemeral share token access your publicly shared resources."}),"\n",(0,i.jsxs)(n.p,{children:["For example, I might create a public share using the ",(0,i.jsx)(n.code,{children:"zrok share public"})," command, which results in my ",(0,i.jsx)(n.code,{children:"zrok"})," instance exposing a URL like ",(0,i.jsx)(n.code,{children:"https://2ptgbr8tlfvk.share.zrok.io"})," to access my resources."]}),"\n",(0,i.jsxs)(n.p,{children:['In this case, my share was given the "share token" of ',(0,i.jsx)(n.code,{children:"2ptgbr8tlfvk"}),". That URL can be given to any user, allowing them to immediately access the shared resources directly from my local environment, all without exposing any access to my private, secure environment. The physical network location of my environment is not exposed to anonymous consumers of my resources."]}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsxs)(n.p,{children:["Here is the ",(0,i.jsx)(n.code,{children:"--help"})," output from ",(0,i.jsx)(n.code,{children:"zrok share public"}),":"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-text",children:"zrok share public\n"})}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:'Error: accepts 1 arg(s), received 0\nUsage:\n zrok share public [flags]\n\nFlags:\n --backend-mode string The backend mode {proxy, web, caddy, drive} (default "proxy")\n --basic-auth stringArray Basic authentication users (,...)\n --frontends stringArray Selected frontends to use for the share (default [public])\n --headless Disable TUI and run headless\n -h, --help help for public\n --insecure Enable insecure TLS certificate validation for \n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n\n[ERROR]: an error occurred (accepts 1 arg(s), received 0)\n'})}),(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:""})," defines the path to the local resource that you intend to share. The form of ",(0,i.jsx)(n.code,{children:""})," depends on the ",(0,i.jsx)(n.code,{children:"--backend-mode"})," that you're using."]}),(0,i.jsxs)(n.p,{children:["In the case of ",(0,i.jsx)(n.code,{children:"--backend-mode proxy"}),", ",(0,i.jsx)(n.code,{children:""})," should be a URL to an HTTP endpoint."]}),(0,i.jsxs)(n.p,{children:["In the case of ",(0,i.jsx)(n.code,{children:"--backend-mode web"}),", ",(0,i.jsx)(n.code,{children:""}),' is the path to a file on disk that serves as the "root" of the file tree to be shared.']})]}),"\n",(0,i.jsx)(n.p,{children:"If we return to the web console, we see our share in the explorer:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Web Console Share",src:s(3978).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["If we click on our new share in the explorer, we can see the share details:\n",(0,i.jsx)(n.img,{alt:"Share Details",src:s(2300).A+"",width:"1791",height:"1369"})]}),"\n",(0,i.jsxs)(n.p,{children:["If we click on the ",(0,i.jsx)(n.em,{children:"frontend endpoint"})," a new browser tab opens and we see the content of our share:\n",(0,i.jsx)(n.img,{alt:"Share Frontend",src:s(9635).A+"",width:"1669",height:"1033"})]}),"\n",(0,i.jsx)(n.p,{children:"If we click on the environment in the explorer, we're shown all of the shares for that environment (including our new share), along with a spark line that shows the activity:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Environment Spark Line",src:s(22).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["And as soon as I terminate the ",(0,i.jsx)(n.code,{children:"zrok share"})," client, the resources are removed from the ",(0,i.jsx)(n.code,{children:"zrok"})," environment."]}),"\n",(0,i.jsx)(n.p,{children:"If we try to reload the frontend endpoint in our web browser, we'll see:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Not Found",src:s(3788).A+"",width:"1556",height:"1229"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-public",children:"More about public shares"})}),"\n",(0,i.jsx)(n.h3,{id:"private-shares",children:"Private Shares"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," also provides a powerful ",(0,i.jsx)(n.em,{children:"private"})," sharing model. If I execute the following command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example"',children:"$ zrok share private http://localhost:8080\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"zrok"})," service will respond with the following:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"access your share with: zrok access private wvszln4dyz9q\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Rather than allowing access to your service through a public frontend, a ",(0,i.jsx)(n.em,{children:"private"})," share is only exposed to the underlying OpenZiti network, and can only be accessed using the ",(0,i.jsx)(n.code,{children:"zrok access"})," command."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"zrok access private wvszln4dyz9q"})," command can be run by any ",(0,i.jsx)(n.code,{children:"zrok"})," user, allowing them to create and bind a local HTTP listener, that allows for private access to your shared resources."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-private",children:"More about private shares"})}),"\n",(0,i.jsx)(n.h3,{id:"proxy-backend-mode",children:"Proxy Backend Mode"}),"\n",(0,i.jsxs)(n.p,{children:["Without specifying a ",(0,i.jsx)(n.em,{children:"backend mode"}),", the ",(0,i.jsx)(n.code,{children:"zrok share"})," command will assume that you're trying to share a ",(0,i.jsx)(n.code,{children:"proxy"})," resource. A ",(0,i.jsx)(n.code,{children:"proxy"})," resource is usually some private HTTP/HTTPS endpoint (like a development server, or a private application) running in your local environment. Usually such an endpoint would have no inbound connectivity except for however it is reachable from your local environment. It might be running on ",(0,i.jsx)(n.code,{children:"localhost"}),", or only listening on a private LAN segment behind a firewall."]}),"\n",(0,i.jsxs)(n.p,{children:["For these services a ",(0,i.jsx)(n.code,{children:"proxy"})," share will allow those endpoints to be reached, either ",(0,i.jsx)(n.em,{children:"publicly"})," or ",(0,i.jsx)(n.em,{children:"privately"})," through the ",(0,i.jsx)(n.code,{children:"zrok"})," service."]}),"\n",(0,i.jsx)(n.h3,{id:"web-backend-mode",children:"Web Backend Mode"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"zrok share"})," command accepts a ",(0,i.jsx)(n.code,{children:"--backend-mode"})," option. Besides ",(0,i.jsx)(n.code,{children:"proxy"}),", the current ",(0,i.jsx)(n.code,{children:"v0.3"})," release (as of this writing) also supports a ",(0,i.jsx)(n.code,{children:"web"})," mode. The ",(0,i.jsx)(n.code,{children:"web"})," mode allows you to specify a local folder on your filesystem, and instantly turns your ",(0,i.jsx)(n.code,{children:"zrok"})," client into a web server, exposing your web content either ",(0,i.jsx)(n.em,{children:"publicly"})," or ",(0,i.jsx)(n.em,{children:"privately"})," without having to a configure a web server."]}),"\n",(0,i.jsx)(n.h3,{id:"reserved-shares",children:"Reserved Shares"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," shares are ",(0,i.jsx)(n.em,{children:"ephemeral"}),' unless you specifically create a "reserved" share.']}),"\n",(0,i.jsxs)(n.p,{children:["A reserved share can be re-used multiple times; it will survive termination of the ",(0,i.jsx)(n.code,{children:"zrok share"})," command, allowing for longer-lasting semi-permanent access to shared resources."]}),"\n",(0,i.jsx)(n.p,{children:"The first step is to create the reserved share:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",metastring:'title="Example"',children:"$ zrok reserve public --backend-mode web v0.3_getting_started\n[ 0.275] INFO main.(*reserveCommand).run: your reserved share token is 'mltwsinym1s2'\n[ 0.275] INFO main.(*reserveCommand).run: reserved frontend endpoint: https://mltwsinym1s2.share.zrok.io\n"})}),"\n",(0,i.jsxs)(n.p,{children:["I'm asking the ",(0,i.jsx)(n.code,{children:"zrok"})," service to reserve a share with a ",(0,i.jsx)(n.code,{children:"web"})," backend mode, pointing at my local ",(0,i.jsx)(n.code,{children:"docs"})," folder."]}),"\n",(0,i.jsxs)(n.p,{children:["You'll want to remember the share token (",(0,i.jsx)(n.code,{children:"mltwsinym1s2"})," in this case), and the frontend endpoint URL. If this were a ",(0,i.jsx)(n.em,{children:"private"})," reserved share, there would not be a frontend URL."]}),"\n",(0,i.jsx)(n.p,{children:"If we do nothing else, and then point a web browser at the frontend endpoint, we get:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Not Found",src:s(327).A+"",width:"1556",height:"1229"})}),"\n",(0,i.jsxs)(n.p,{children:["This is the ",(0,i.jsx)(n.code,{children:"404"})," error message returned by the ",(0,i.jsx)(n.code,{children:"zrok"})," frontend. We're getting this because we haven't yet started up a ",(0,i.jsx)(n.code,{children:"zrok share"})," for the service. Let's do that:"]}),"\n",(0,i.jsx)(n.p,{children:"This command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",metastring:'title="Example"',children:"$ zrok share reserved mltwsinym1s2\n"})}),"\n",(0,i.jsx)(n.p,{children:"...results in a new share backend starting up and connecting to the existing reserved share:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zrok share reserved",src:s(2504).A+"",width:"951",height:"706"})}),"\n",(0,i.jsxs)(n.p,{children:["And now if we refresh the frontend endpoint URL in the web browser, we'll see an index of the ",(0,i.jsx)(n.code,{children:"docs"})," directory:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zrok docs share",src:s(9635).A+"",width:"1669",height:"1033"})}),"\n",(0,i.jsxs)(n.p,{children:["With the reserved share, we're free to stop and restart the ",(0,i.jsx)(n.code,{children:"zrok share reserved"})," command as many times as we want, without losing the token for our share."]}),"\n",(0,i.jsxs)(n.p,{children:["When we're done with the reserved share, we can ",(0,i.jsx)(n.em,{children:"release"})," it using this command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",metastring:'title="Example"',children:"$ zrok release mltwsinym1s2\n[ 0.230] INFO main.(*releaseCommand).run: reserved share 'mltwsinym1s2' released\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/sharing-reserved",children:"More about reserved shares"})}),"\n",(0,i.jsx)(n.h2,{id:"concepts-review",children:"Concepts Review"}),"\n",(0,i.jsxs)(n.p,{children:["In summary, ",(0,i.jsx)(n.code,{children:"zrok"})," lets you easily and securely share resources with both general internet users (through ",(0,i.jsx)(n.em,{children:"public"})," sharing) and also with other ",(0,i.jsx)(n.code,{children:"zrok"})," users (through ",(0,i.jsx)(n.em,{children:"private"})," sharing)."]}),"\n",(0,i.jsxs)(n.p,{children:["Here's a quick review of the ",(0,i.jsx)(n.code,{children:"zrok"})," mental model and the vocabulary."]}),"\n",(0,i.jsx)(n.h3,{id:"instance-and-account",children:"Instance and Account"}),"\n",(0,i.jsxs)(n.p,{children:["You create an ",(0,i.jsx)(n.em,{children:"account"})," with a ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"}),". Your account is identified by a username and a password, which you use to log into the ",(0,i.jsx)(n.em,{children:"web console"}),". Your account also has a ",(0,i.jsx)(n.em,{children:"secret token"}),", which you will use to authenticate from the ",(0,i.jsx)(n.code,{children:"zrok"})," command-line to interact with the ",(0,i.jsx)(n.em,{children:"instance"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You create a new ",(0,i.jsx)(n.em,{children:"account"})," with NetFoundry's ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"})," by subscribing in ",(0,i.jsx)(n.a,{href:"https://myzrok.io",children:"myzrok.io"})," or in a self-hosted ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"})," by running ",(0,i.jsxs)(n.a,{href:"/docs/guides/self-hosting/self-service-invite",children:["the ",(0,i.jsx)(n.code,{children:"zrok invite"})," command"]})," or the ",(0,i.jsx)(n.code,{children:"zrok admin create account"})," command."]}),"\n",(0,i.jsx)(n.h3,{id:"environment",children:"Environment"}),"\n",(0,i.jsxs)(n.p,{children:["Using your ",(0,i.jsx)(n.em,{children:"secret token"})," you use the ",(0,i.jsx)(n.code,{children:"zrok"})," command-line interface to create an ",(0,i.jsx)(n.em,{children:"environment"}),". An ",(0,i.jsx)(n.em,{children:"environment"})," corresponds to a single command-line user on a specific ",(0,i.jsx)(n.em,{children:"host system"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You create a new ",(0,i.jsx)(n.em,{children:"environment"})," by using the ",(0,i.jsx)(n.code,{children:"zrok enable"})," command."]}),"\n",(0,i.jsx)(n.h3,{id:"shares",children:"Shares"}),"\n",(0,i.jsxs)(n.p,{children:["Once you've enabled an ",(0,i.jsx)(n.em,{children:"environment"}),", you then create one or more ",(0,i.jsx)(n.em,{children:"shares"}),". Shares have either a ",(0,i.jsx)(n.em,{children:"public"})," or ",(0,i.jsx)(n.em,{children:"private"})," ",(0,i.jsx)(n.em,{children:"sharing mode"}),". ",(0,i.jsx)(n.em,{children:"Shares"})," share a specific type of resource using a ",(0,i.jsx)(n.em,{children:"backend mode"}),". As of this writing ",(0,i.jsx)(n.code,{children:"zrok"})," supports a ",(0,i.jsx)(n.code,{children:"proxy"})," ",(0,i.jsx)(n.em,{children:"backend mode"})," to share local HTTP resources as a ",(0,i.jsx)(n.em,{children:"reverse proxy"}),". ",(0,i.jsx)(n.code,{children:"zrok"})," also supports a ",(0,i.jsx)(n.code,{children:"web"})," ",(0,i.jsx)(n.em,{children:"backend mode"})," to share local file and HTML resources by enabling a basic HTTP server."]}),"\n",(0,i.jsxs)(n.p,{children:["Every ",(0,i.jsx)(n.em,{children:"share"})," is identified by a ",(0,i.jsx)(n.em,{children:"share token"}),". ",(0,i.jsx)(n.em,{children:"Public shares"})," can be accessed through either a ",(0,i.jsx)(n.em,{children:"frontend"})," instance offered through the ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"}),", or through the ",(0,i.jsx)(n.code,{children:"zrok access"})," command. ",(0,i.jsx)(n.em,{children:"Private shares"})," can only be accessed through the ",(0,i.jsx)(n.code,{children:"zrok access"})," command."]}),"\n",(0,i.jsxs)(n.p,{children:["You use the ",(0,i.jsx)(n.code,{children:"zrok share"})," command to create and enable ",(0,i.jsx)(n.em,{children:"ephemeral shares"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"reserved-shares-1",children:"Reserved Shares"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," supports creating ",(0,i.jsx)(n.em,{children:"shares"})," that have a consistent ",(0,i.jsx)(n.em,{children:"share token"})," that survives restarts of the ",(0,i.jsx)(n.code,{children:"zrok share"})," command. These are considered ",(0,i.jsx)(n.em,{children:"non-ephemeral"}),", and is callled a ",(0,i.jsx)(n.em,{children:"reserved share"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You use the ",(0,i.jsx)(n.code,{children:"zrok reserve"})," command to create ",(0,i.jsx)(n.em,{children:"reserved shares"}),". Reserved shares last until you use the ",(0,i.jsx)(n.code,{children:"zrok release"})," command to delete them."]}),"\n",(0,i.jsx)(n.h2,{id:"self-hosting-an-instance",children:"Self-Hosting an Instance"}),"\n",(0,i.jsxs)(n.p,{children:["Interested in self-hosting your own ",(0,i.jsx)(n.code,{children:"zrok"})," instance? See the ",(0,i.jsx)(n.a,{href:"/docs/category/self-hosting/",children:"self-hosting guides"}),"!"]}),"\n",(0,i.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Learn about ",(0,i.jsx)(n.a,{href:"https://openziti.io/",children:"OpenZiti"})]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(m,{...e})}):m(e)}function p(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},8151:(e,n,s)=>{s.d(n,{F:()=>a,d:()=>t});var r=s(6540),i=s(4848);const o=(0,r.createContext)([]),t=()=>(0,r.useContext)(o),a=e=>{let{children:n}=e;const[s,t]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),t(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,i.jsx)(o.Provider,{value:s,children:n})}},595:(e,n,s)=>{s.d(n,{A:()=>c});s(6540);var r=s(8151),i=s(1342),o=s(5293),t=s(4848);const a=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},c=e=>{let{osName:n,osLogo:s,infoText:c,guideLink:d}=e;const{colorMode:l}=(0,o.G)(),h=(0,r.d)();console.log("Assets in DownloadCard:",h);const u=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=h.filter((e=>e.name.includes(u)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,t.jsxs)("div",{className:i.A.downloadCard,children:[(0,t.jsx)("div",{className:i.A.imgContainer,children:(0,t.jsx)("img",{src:s,alt:`${n} logo`})}),(0,t.jsx)("h3",{children:n}),m.length>0&&(0,t.jsx)("ul",{children:m.map(((e,n)=>(0,t.jsx)("li",{className:i.A.downloadButtons,children:(0,t.jsx)("a",{href:e.url,className:i.A.downloadLinks,children:a(e.arch)})},n)))}),d&&(0,t.jsxs)("div",{className:i.A.cardFooter,children:[(0,t.jsx)("p",{children:c}),(0,t.jsx)("a",{href:d,children:"GUIDE"}),(0,t.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},2963:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_enable_modal-45da63a6907e930daaa4c798272ce5fa.png"},3788:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_not_found-fa3415937c341eb10e1eb98c9b063583.png"},327:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_reserved_not_found-2519707e5cc3e635b7a6feb381c1d040.png"},6831:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_share_public-322dc971477d3a0b97b42478ea023dd7.png"},2504:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_share_reserved-6bce67775ce2c41abb0ef13ee1fad972.png"},22:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_environment_spark-925c0709ed7a42f0a708ab0523cdeb5f.png"},3978:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_explorer_share-11236f68819da60014d5444e7429c189.png"},2300:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_share_detail-efeaa472d5e5c225a160f6d5647086b3.png"},9635:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_share_frontend-d7c0d6495493c00b94ae237339f2dc2d.png"},6219:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_ui_empty_environment_detail-153c921ade86f924079947b0f734e3ff.png"},8474:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_ui_empty_shares-048c08c18477bcabb9fa8c1b58537012.png"},5745:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_ui_new_environment-414d8e8fc25b09f257cb40ba47d6acbb.png"},3605:(e,n,s)=>{s.d(n,{A:()=>r});const r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAZCAIAAACpVwlNAAAEr2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgdGlmZjpJbWFnZUxlbmd0aD0iMjUiCiAgIHRpZmY6SW1hZ2VXaWR0aD0iMzAiCiAgIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiCiAgIHRpZmY6WFJlc29sdXRpb249Ijk2LzEiCiAgIHRpZmY6WVJlc29sdXRpb249Ijk2LzEiCiAgIGV4aWY6UGl4ZWxYRGltZW5zaW9uPSIzMCIKICAgZXhpZjpQaXhlbFlEaW1lbnNpb249IjI1IgogICBleGlmOkNvbG9yU3BhY2U9IjEiCiAgIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiCiAgIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjMtMDEtMTlUMTA6NTY6NTYtMDU6MDAiCiAgIHhtcDpNZXRhZGF0YURhdGU9IjIwMjMtMDEtMTlUMTA6NTY6NTYtMDU6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJwcm9kdWNlZCIKICAgICAgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWZmaW5pdHkgUGhvdG8gMi4wLjMiCiAgICAgIHN0RXZ0OndoZW49IjIwMjMtMDEtMTlUMTA6NTY6NTYtMDU6MDAiLz4KICAgIDwvcmRmOlNlcT4KICAgPC94bXBNTTpIaXN0b3J5PgogIDwvcmRmOkRlc2NyaXB0aW9uPgogPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KPD94cGFja2V0IGVuZD0iciI/Pq+HLHgAAAGBaUNDUHNSR0IgSUVDNjE5NjYtMi4xAAAokXWRy0tCQRSHP7UwemBQixYtJKyVRg8Q27RQyoJqYQZZbfTmI/BxuVcJaRu0FQqiNr0W9RfUNmgdBEURRNtaF7UpuZ2rghF5hjnzzW/OOcycAWs4rWT0piHIZPNaKOh3LkaWnPYXLHThwIclqujq7PxkmIb2eS/RYrces1bjuH+tbTWuK2BpER5XVC0vPCU8s55XTd4R7lZS0VXhM2G3JhcUvjP1WJVfTU5W+dtkLRwKgLVT2Jn8xbFfrKS0jLC8HFcmXVBq9zFf0h7PLszL2iezF50QQfw4mWaCAF6GGRPvxcMIg7KjQf5QJX+OnOQq4lWKaKyRJEUet6gFqR6XNSF6XEaaotn/v33VE6Mj1ertfmh+Noz3frBvQ7lkGF9HhlE+BtsTXGbr+blD8H2IXqprrgNwbML5VV2L7cLFFvQ8qlEtWpFsMq2JBLydQkcEum6gdbnas9o5Jw8Q3pCvuoa9fRiQeMfKD2DYZ+PDGzxnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABZklEQVRIie2VvW7CMBDHr1UfwE5fII7lvahIWUEiQ7qxMLEwsVQMSB0YKsTExsDGxFs0QyqlYyMVld3k4wWw/QgMlqp+JXFQGZB649n3k+9/f9sX9w+PcJq4PBH3H/0zrkrWfK99jVF5/V6qIIzqod1m485rC6nK0S5GAPArvRDNHFtINZ0vviQp4Un2OTObjIs6q6G122yMhgPfaxvuN0VbGDHHBgDm2FbVAGqgLYyEVPFmCwDB84uQilHyB2i32ej3uoySvZDT+YInGaPE77QqlSkznz5vv9cFAEbJdL4QUlkYjYYDnYnf3o9HC6mewog5ttZBq7xcrf1OK95sy61ZgQaAIIx2lGgdRsPBcrXmSbYXstLyRmPkSWZh5HdaAODe3uipVlaZmk9IxdMcAHiam3DBRJCPCMJol+bfbuMxaJ7mjJLZZFxeb2Gku6mDTrJXjExeviILFqJF8WtpGOf5y5wn+gBcXI4F9z6rgwAAAABJRU5ErkJggg=="},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>a});var r=s(6540);const i={},o=r.createContext(i);function t(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f888b719.db7ced79.js b/assets/js/f888b719.db7ced79.js new file mode 100644 index 00000000..2847344f --- /dev/null +++ b/assets/js/f888b719.db7ced79.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4470],{2410:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>l,default:()=>x,frontMatter:()=>d,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"getting-started","title":"Getting Started","description":"Your Secure Internet Sharing Perimeter","source":"@site/../docs/getting-started.mdx","sourceDirName":".","slug":"/getting-started","permalink":"/docs/next/getting-started","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/../docs/getting-started.mdx","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"title":"Getting Started","sidebar_label":"Getting Started","sidebar_position":10},"sidebar":"tutorialSidebar","next":{"title":"Concepts","permalink":"/docs/next/concepts/"}}');var i=s(4848),o=s(8453),t=s(8151),a=s(595),c=s(1342);const d={title:"Getting Started",sidebar_label:"Getting Started",sidebar_position:10},l=void 0,h={},u=[{value:"Your Secure Internet Sharing Perimeter",id:"your-secure-internet-sharing-perimeter",level:2},{value:"Your First Share",id:"your-first-share",level:3},{value:"Share Backend Modes",id:"share-backend-modes",level:2},{value:"Open Source",id:"open-source",level:2},{value:"Ziti native",id:"ziti-native",level:3},{value:"What's it for?",id:"whats-it-for",level:2},{value:"Installing the zrok Command",id:"installing-the-zrok-command",level:2},{value:"Enabling Your zrok Environment",id:"enabling-your-zrok-environment",level:2},{value:"Sharing",id:"sharing",level:2},{value:"Ephemeral by Default",id:"ephemeral-by-default",level:3},{value:"Public Shares and Frontends",id:"public-shares-and-frontends",level:3},{value:"Private Shares",id:"private-shares",level:3},{value:"Proxy Backend Mode",id:"proxy-backend-mode",level:3},{value:"Web Backend Mode",id:"web-backend-mode",level:3},{value:"Reserved Shares",id:"reserved-shares",level:3},{value:"Concepts Review",id:"concepts-review",level:2},{value:"Instance and Account",id:"instance-and-account",level:3},{value:"Environment",id:"environment",level:3},{value:"Shares",id:"shares",level:3},{value:"Reserved Shares",id:"reserved-shares-1",level:3},{value:"Self-Hosting an Instance",id:"self-hosting-an-instance",level:2},{value:"Resources",id:"resources",level:2}];function m(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components},{Card:r,CardBody:d,CardFooter:l,CardHeader:h,Column:u,Columns:m}=n;return r||p("Card",!0),d||p("CardBody",!0),l||p("CardFooter",!0),h||p("CardHeader",!0),u||p("Column",!0),m||p("Columns",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"your-secure-internet-sharing-perimeter",children:"Your Secure Internet Sharing Perimeter"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," (",(0,i.jsx)(n.em,{children:"/zi\u02d0\u0279\u0252k/ ZEE-rock"}),") is a secure, open-source, self-hostable sharing platform that simplifies shielding and sharing network services or files.\nThere's a hardened zrok-as-a-service offering available at ",(0,i.jsx)(n.a,{href:"https://myzrok.io",children:"myzrok.io"})," with a generous free tier."]}),"\n",(0,i.jsx)(n.h3,{id:"your-first-share",children:"Your First Share"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Get an account token"}),"\n"]}),"\n",(0,i.jsxs)(m,{className:"text--center getting-started-cards",style:{marginLeft:1},children:[(0,i.jsx)(u,{style:{paddingBottom:20},children:(0,i.jsxs)(r,{shadow:"tl",children:[(0,i.jsx)(h,{children:(0,i.jsx)("h3",{children:"Hosted zrok"})}),(0,i.jsx)(d,{children:(0,i.jsx)(n.p,{children:"Use NetFoundry's public zrok instance."})}),(0,i.jsx)(l,{children:(0,i.jsx)("a",{href:"https://myzrok.io/",children:(0,i.jsx)("button",{className:"button button--secondary button--block",children:"Get an Account"})})})]})}),(0,i.jsx)(u,{style:{paddingBottom:20},children:(0,i.jsxs)(r,{shadow:"tl",children:[(0,i.jsx)(h,{children:(0,i.jsx)("h3",{children:"Self-Hosted zrok"})}),(0,i.jsx)(d,{children:(0,i.jsx)(n.p,{children:"Run a zrok instance on Linux, Docker, or Kubernetes."})}),(0,i.jsx)(l,{children:(0,i.jsx)("a",{href:"/docs/category/self-hosting/",children:(0,i.jsx)("button",{className:"button button--secondary button--block",children:"Guides"})})})]})})]}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"#installing-the-zrok-command",children:"Download the zrok binary"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Enable zrok for your ",(0,i.jsx)(n.a,{href:"#enabling-your-zrok-environment",children:"user environment"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"zrok enable \n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Share ",(0,i.jsx)(n.code,{children:"http://localhost:8080"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"zrok share public 8080\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Visit the public URL displayed in your terminal"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zrok share public",src:s(6831).A+"",width:"1115",height:"628"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"share-backend-modes",children:"Share Backend Modes"}),"\n",(0,i.jsx)(n.p,{children:"zrok shares can be public or private, with different options for backend modes, including:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/next/concepts/sharing-public",children:"Public shares"})," for ",(0,i.jsx)(n.a,{href:"/docs/next/concepts/http",children:"web services"})," or ",(0,i.jsx)(n.a,{href:"/docs/next/concepts/files",children:"files"})]}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/next/concepts/sharing-private",children:"Private shares for web services or files"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/next/concepts/tunnels",children:"TCP Tunnels"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/next/concepts/tunnels",children:"UDP Tunnels"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/next/guides/drives",children:"File Drives"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/next/guides/vpn/",children:"VPN"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"open-source",children:"Open Source"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," is licensed under Apache 2.0."]}),"\n",(0,i.jsxs)(n.p,{children:["Check ",(0,i.jsx)(n.a,{href:"https://github.com/orgs/openziti/projects/16",children:"the roadmap"})," if you're thinking about the future. We would love to hear your ideas for ",(0,i.jsx)(n.code,{children:"zrok"}),"!"]}),"\n",(0,i.jsxs)(n.p,{children:["The best ways to engage are ",(0,i.jsx)(n.a,{href:"https://openziti.discourse.group/",children:"Discourse"})," for questions and ",(0,i.jsx)(n.a,{href:"https://github.com/openziti/zrok/issues",children:"GitHub Issues"})," for documenting problems."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"/docs/next/concepts/opensource",children:"Read more about zrok open source"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"ziti-native",children:"Ziti native"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," is a ",(0,i.jsx)(n.em,{children:"Ziti Native Application"}),", built on the ",(0,i.jsx)(n.a,{href:"https://openziti.io",children:"OpenZiti"})," platform, and supported by the OpenZiti community and NetFoundry team."]}),"\n",(0,i.jsx)(n.h2,{id:"whats-it-for",children:"What's it for?"}),"\n",(0,i.jsxs)(n.p,{children:["Use ",(0,i.jsx)(n.code,{children:"zrok"})," to share a running service, like a web server or a network socket, or to share a directory of static files."]}),"\n",(0,i.jsxs)(n.p,{children:["If ",(0,i.jsx)(n.a,{href:"/docs/next/concepts/sharing-public",children:"sharing publicly"}),", you can reserve a subdomain, enable authentication options, or both. Public shares proxy HTTPS to your service or files."]}),"\n",(0,i.jsxs)(n.p,{children:["If ",(0,i.jsx)(n.a,{href:"/docs/next/concepts/sharing-private",children:"sharing privately"}),", only users with the share token can access your share. In addition to what you can share publicly, private shares can include TCP and UDP services."]}),"\n",(0,i.jsx)(n.h2,{id:"installing-the-zrok-command",children:"Installing the zrok Command"}),"\n",(0,i.jsx)(t.F,{children:(0,i.jsxs)("div",{className:c.A.downloadContainer,children:[(0,i.jsx)(a.A,{osName:"Windows",osLogo:"/img/logo-windows.svg",infoText:"Binary executable",guideLink:"/docs/guides/install/windows"}),(0,i.jsx)(a.A,{osName:"macOS",osLogo:"/img/logo-apple.svg",infoText:"Binary executable",guideLink:"/docs/guides/install/macos"}),(0,i.jsx)(a.A,{osName:"Linux",osLogo:"/img/logo-linux.svg",infoText:"DEB, RPM packages",guideLink:"/docs/guides/install/linux"})]})}),"\n",(0,i.jsx)(n.h2,{id:"enabling-your-zrok-environment",children:"Enabling Your zrok Environment"}),"\n",(0,i.jsxs)(n.p,{children:["After you have ",(0,i.jsx)(n.a,{href:"#your-first-share",children:"an account"}),", you can enable your ",(0,i.jsx)(n.code,{children:"zrok"})," environment."]}),"\n",(0,i.jsxs)(n.p,{children:["A zrok environment usually refers to an enabled device where shares and accesses can be created, .e.g., ",(0,i.jsx)(n.code,{children:"~/.zrok"})," on a Unix machine. It can be a specific user's environment or a system-wide agent's environment owned by the administrator."]}),"\n",(0,i.jsxs)(n.p,{children:["When your ",(0,i.jsx)(n.code,{children:"zrok"})," account was created, the service generated a ",(0,i.jsx)(n.em,{children:"secret token"})," that identifies and authenticates in a single step. Protect your secret token as if it were a password, or an important account number; it's a ",(0,i.jsx)(n.em,{children:"secret"}),", protect it."]}),"\n",(0,i.jsxs)(n.p,{children:["When we left off you had downloaded, extracted, and configured your ",(0,i.jsx)(n.code,{children:"zrok"})," environment. In order to use that environment with your account, you'll need to ",(0,i.jsx)(n.code,{children:"enable"})," it. Enabling an environment generates a secure identity and the necessary underlying security policies with the OpenZiti network hosting the ",(0,i.jsx)(n.code,{children:"zrok"})," service."]}),"\n",(0,i.jsxs)(n.p,{children:["From the web console, click on your email address in the upper right corner of the header. That drop down menu contains an ",(0,i.jsx)(n.code,{children:"Enable Your Environment"})," link. Click that link and a modal dialog will be shown like this:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Enable Modal Dialog",src:s(2963).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["This dialog box shows you the ",(0,i.jsx)(n.code,{children:"zrok enable"})," command that you can use to enable any shell to work with your ",(0,i.jsx)(n.code,{children:"zrok"})," account with a single command."]}),"\n",(0,i.jsx)(n.p,{children:"Let's copy that command and paste it into your shell:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example"',children:"$ zrok enable klFEoIi0QAg7 \n\u28fb contacting the zrok service...\n"})}),"\n",(0,i.jsx)(n.p,{children:"After a few seconds, the message will change and indicate that the enable operation succeeded:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example"',children:"$ zrok enable klFEoIi0QAg7 \n\u28fb the zrok environment was successfully enabled...\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Now, if we run a ",(0,i.jsx)(n.code,{children:"zrok status"})," command, you will see the details of your environment:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",children:"zrok status\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"Config:\n\n CONFIG VALUE SOURCE\n apiEndpoint https://api.staging.zrok.io env\n\nEnvironment:\n\n PROPERTY VALUE\n Secret Token <>\n Ziti Identity <>\n"})}),"\n",(0,i.jsx)(n.p,{children:"Excellent... our environment is now fully enabled."}),"\n",(0,i.jsxs)(n.p,{children:["If we return to the ",(0,i.jsx)(n.em,{children:"web console"}),", we'll now see the new environment reflected in the explorer view:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"New Environment in Web UI",src:s(5745).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["In my case, the environment is named ",(0,i.jsx)(n.code,{children:"michael@ziti-lx"}),", which is the username of my shell and the hostname of the system the shell is running on."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["Should you want to use a non-default name for your environment, you can pass the ",(0,i.jsx)(n.code,{children:"-d"})," option to the ",(0,i.jsx)(n.code,{children:"zrok enable"})," command. See ",(0,i.jsx)(n.code,{children:"zrok enable --help"})," for details."]})}),"\n",(0,i.jsxs)(n.p,{children:["If you click on the environment node in the explorer in the ",(0,i.jsx)(n.em,{children:"web console"}),", the details panel shown at the bottom of the page will change:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Empty Environment",src:s(8474).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["The explorer supports clicking, dragging, mouse wheel zooming, and selecting the nodes in the graph for more information (and available actions) for the selected node. If you ever get lost in the explorer, click the ",(0,i.jsx)(n.img,{alt:"Zoom to Fit",src:s(3605).A+"",width:"30",height:"25"})," ",(0,i.jsx)(n.em,{children:"zoom to fit"})," icon in the lower right corner of the explorer."]}),"\n",(0,i.jsxs)(n.p,{children:["If we click on the ",(0,i.jsx)(n.code,{children:"Detail"})," tab for our environment, we'll see something like:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Environment Detail",src:s(6219).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["With your ",(0,i.jsx)(n.code,{children:"zrok"})," account you can ",(0,i.jsx)(n.code,{children:"zrok enable"})," multiple environments. This will allow you to run ",(0,i.jsx)(n.code,{children:"zrok share"})," in one environment, and ",(0,i.jsx)(n.code,{children:"zrok access"})," in other environments."]})}),"\n",(0,i.jsx)(n.p,{children:"Your environment is fully ready to go. Now we can move on to the fun stuff..."}),"\n",(0,i.jsx)(n.h2,{id:"sharing",children:"Sharing"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," is designed to make sharing resources as effortless as possible, while providing a high degree of security and control."]}),"\n",(0,i.jsx)(n.h3,{id:"ephemeral-by-default",children:"Ephemeral by Default"}),"\n",(0,i.jsxs)(n.p,{children:["Shared resources are ",(0,i.jsx)(n.em,{children:"ephemeral"})," by default; as soon as you terminate the ",(0,i.jsx)(n.code,{children:"zrok share"})," command, the entire share is removed and is no longer available to any users. Identifiers for shared resources are randomly allocated when the share is created."]}),"\n",(0,i.jsx)(n.h3,{id:"public-shares-and-frontends",children:"Public Shares and Frontends"}),"\n",(0,i.jsxs)(n.p,{children:["Resources that are shared ",(0,i.jsx)(n.em,{children:"publicly"})," are exposed to any users on the internet who have access to the ",(0,i.jsx)(n.code,{children:"zrok"}),' instance\'s "frontend".']}),"\n",(0,i.jsx)(n.p,{children:"A frontend is an HTTPS listener exposed to the internet, that lets any user with your ephemeral share token access your publicly shared resources."}),"\n",(0,i.jsxs)(n.p,{children:["For example, I might create a public share using the ",(0,i.jsx)(n.code,{children:"zrok share public"})," command, which results in my ",(0,i.jsx)(n.code,{children:"zrok"})," instance exposing a URL like ",(0,i.jsx)(n.code,{children:"https://2ptgbr8tlfvk.share.zrok.io"})," to access my resources."]}),"\n",(0,i.jsxs)(n.p,{children:['In this case, my share was given the "share token" of ',(0,i.jsx)(n.code,{children:"2ptgbr8tlfvk"}),". That URL can be given to any user, allowing them to immediately access the shared resources directly from my local environment, all without exposing any access to my private, secure environment. The physical network location of my environment is not exposed to anonymous consumers of my resources."]}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsxs)(n.p,{children:["Here is the ",(0,i.jsx)(n.code,{children:"--help"})," output from ",(0,i.jsx)(n.code,{children:"zrok share public"}),":"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-text",children:"zrok share public\n"})}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:'Error: accepts 1 arg(s), received 0\nUsage:\n zrok share public [flags]\n\nFlags:\n --backend-mode string The backend mode {proxy, web, caddy, drive} (default "proxy")\n --basic-auth stringArray Basic authentication users (,...)\n --frontends stringArray Selected frontends to use for the share (default [public])\n --headless Disable TUI and run headless\n -h, --help help for public\n --insecure Enable insecure TLS certificate validation for \n\nGlobal Flags:\n -p, --panic Panic instead of showing pretty errors\n -v, --verbose Enable verbose logging\n\n[ERROR]: an error occurred (accepts 1 arg(s), received 0)\n'})}),(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:""})," defines the path to the local resource that you intend to share. The form of ",(0,i.jsx)(n.code,{children:""})," depends on the ",(0,i.jsx)(n.code,{children:"--backend-mode"})," that you're using."]}),(0,i.jsxs)(n.p,{children:["In the case of ",(0,i.jsx)(n.code,{children:"--backend-mode proxy"}),", ",(0,i.jsx)(n.code,{children:""})," should be a URL to an HTTP endpoint."]}),(0,i.jsxs)(n.p,{children:["In the case of ",(0,i.jsx)(n.code,{children:"--backend-mode web"}),", ",(0,i.jsx)(n.code,{children:""}),' is the path to a file on disk that serves as the "root" of the file tree to be shared.']})]}),"\n",(0,i.jsx)(n.p,{children:"If we return to the web console, we see our share in the explorer:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Web Console Share",src:s(3978).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["If we click on our new share in the explorer, we can see the share details:\n",(0,i.jsx)(n.img,{alt:"Share Details",src:s(2300).A+"",width:"1791",height:"1369"})]}),"\n",(0,i.jsxs)(n.p,{children:["If we click on the ",(0,i.jsx)(n.em,{children:"frontend endpoint"})," a new browser tab opens and we see the content of our share:\n",(0,i.jsx)(n.img,{alt:"Share Frontend",src:s(9635).A+"",width:"1669",height:"1033"})]}),"\n",(0,i.jsx)(n.p,{children:"If we click on the environment in the explorer, we're shown all of the shares for that environment (including our new share), along with a spark line that shows the activity:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Environment Spark Line",src:s(22).A+"",width:"1791",height:"1369"})}),"\n",(0,i.jsxs)(n.p,{children:["And as soon as I terminate the ",(0,i.jsx)(n.code,{children:"zrok share"})," client, the resources are removed from the ",(0,i.jsx)(n.code,{children:"zrok"})," environment."]}),"\n",(0,i.jsx)(n.p,{children:"If we try to reload the frontend endpoint in our web browser, we'll see:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Not Found",src:s(3788).A+"",width:"1556",height:"1229"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/next/concepts/sharing-public",children:"More about public shares"})}),"\n",(0,i.jsx)(n.h3,{id:"private-shares",children:"Private Shares"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," also provides a powerful ",(0,i.jsx)(n.em,{children:"private"})," sharing model. If I execute the following command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Example"',children:"$ zrok share private http://localhost:8080\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"zrok"})," service will respond with the following:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-buttonless",metastring:'title="Output"',children:"access your share with: zrok access private wvszln4dyz9q\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Rather than allowing access to your service through a public frontend, a ",(0,i.jsx)(n.em,{children:"private"})," share is only exposed to the underlying OpenZiti network, and can only be accessed using the ",(0,i.jsx)(n.code,{children:"zrok access"})," command."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"zrok access private wvszln4dyz9q"})," command can be run by any ",(0,i.jsx)(n.code,{children:"zrok"})," user, allowing them to create and bind a local HTTP listener, that allows for private access to your shared resources."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/next/concepts/sharing-private",children:"More about private shares"})}),"\n",(0,i.jsx)(n.h3,{id:"proxy-backend-mode",children:"Proxy Backend Mode"}),"\n",(0,i.jsxs)(n.p,{children:["Without specifying a ",(0,i.jsx)(n.em,{children:"backend mode"}),", the ",(0,i.jsx)(n.code,{children:"zrok share"})," command will assume that you're trying to share a ",(0,i.jsx)(n.code,{children:"proxy"})," resource. A ",(0,i.jsx)(n.code,{children:"proxy"})," resource is usually some private HTTP/HTTPS endpoint (like a development server, or a private application) running in your local environment. Usually such an endpoint would have no inbound connectivity except for however it is reachable from your local environment. It might be running on ",(0,i.jsx)(n.code,{children:"localhost"}),", or only listening on a private LAN segment behind a firewall."]}),"\n",(0,i.jsxs)(n.p,{children:["For these services a ",(0,i.jsx)(n.code,{children:"proxy"})," share will allow those endpoints to be reached, either ",(0,i.jsx)(n.em,{children:"publicly"})," or ",(0,i.jsx)(n.em,{children:"privately"})," through the ",(0,i.jsx)(n.code,{children:"zrok"})," service."]}),"\n",(0,i.jsx)(n.h3,{id:"web-backend-mode",children:"Web Backend Mode"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"zrok share"})," command accepts a ",(0,i.jsx)(n.code,{children:"--backend-mode"})," option. Besides ",(0,i.jsx)(n.code,{children:"proxy"}),", the current ",(0,i.jsx)(n.code,{children:"v0.3"})," release (as of this writing) also supports a ",(0,i.jsx)(n.code,{children:"web"})," mode. The ",(0,i.jsx)(n.code,{children:"web"})," mode allows you to specify a local folder on your filesystem, and instantly turns your ",(0,i.jsx)(n.code,{children:"zrok"})," client into a web server, exposing your web content either ",(0,i.jsx)(n.em,{children:"publicly"})," or ",(0,i.jsx)(n.em,{children:"privately"})," without having to a configure a web server."]}),"\n",(0,i.jsx)(n.h3,{id:"reserved-shares",children:"Reserved Shares"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," shares are ",(0,i.jsx)(n.em,{children:"ephemeral"}),' unless you specifically create a "reserved" share.']}),"\n",(0,i.jsxs)(n.p,{children:["A reserved share can be re-used multiple times; it will survive termination of the ",(0,i.jsx)(n.code,{children:"zrok share"})," command, allowing for longer-lasting semi-permanent access to shared resources."]}),"\n",(0,i.jsx)(n.p,{children:"The first step is to create the reserved share:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",metastring:'title="Example"',children:"$ zrok reserve public --backend-mode web v0.3_getting_started\n[ 0.275] INFO main.(*reserveCommand).run: your reserved share token is 'mltwsinym1s2'\n[ 0.275] INFO main.(*reserveCommand).run: reserved frontend endpoint: https://mltwsinym1s2.share.zrok.io\n"})}),"\n",(0,i.jsxs)(n.p,{children:["I'm asking the ",(0,i.jsx)(n.code,{children:"zrok"})," service to reserve a share with a ",(0,i.jsx)(n.code,{children:"web"})," backend mode, pointing at my local ",(0,i.jsx)(n.code,{children:"docs"})," folder."]}),"\n",(0,i.jsxs)(n.p,{children:["You'll want to remember the share token (",(0,i.jsx)(n.code,{children:"mltwsinym1s2"})," in this case), and the frontend endpoint URL. If this were a ",(0,i.jsx)(n.em,{children:"private"})," reserved share, there would not be a frontend URL."]}),"\n",(0,i.jsx)(n.p,{children:"If we do nothing else, and then point a web browser at the frontend endpoint, we get:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Not Found",src:s(327).A+"",width:"1556",height:"1229"})}),"\n",(0,i.jsxs)(n.p,{children:["This is the ",(0,i.jsx)(n.code,{children:"404"})," error message returned by the ",(0,i.jsx)(n.code,{children:"zrok"})," frontend. We're getting this because we haven't yet started up a ",(0,i.jsx)(n.code,{children:"zrok share"})," for the service. Let's do that:"]}),"\n",(0,i.jsx)(n.p,{children:"This command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",metastring:'title="Example"',children:"$ zrok share reserved mltwsinym1s2\n"})}),"\n",(0,i.jsx)(n.p,{children:"...results in a new share backend starting up and connecting to the existing reserved share:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zrok share reserved",src:s(2504).A+"",width:"951",height:"706"})}),"\n",(0,i.jsxs)(n.p,{children:["And now if we refresh the frontend endpoint URL in the web browser, we'll see an index of the ",(0,i.jsx)(n.code,{children:"docs"})," directory:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"zrok docs share",src:s(9635).A+"",width:"1669",height:"1033"})}),"\n",(0,i.jsxs)(n.p,{children:["With the reserved share, we're free to stop and restart the ",(0,i.jsx)(n.code,{children:"zrok share reserved"})," command as many times as we want, without losing the token for our share."]}),"\n",(0,i.jsxs)(n.p,{children:["When we're done with the reserved share, we can ",(0,i.jsx)(n.em,{children:"release"})," it using this command:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-txt",metastring:'title="Example"',children:"$ zrok release mltwsinym1s2\n[ 0.230] INFO main.(*releaseCommand).run: reserved share 'mltwsinym1s2' released\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/next/concepts/sharing-reserved",children:"More about reserved shares"})}),"\n",(0,i.jsx)(n.h2,{id:"concepts-review",children:"Concepts Review"}),"\n",(0,i.jsxs)(n.p,{children:["In summary, ",(0,i.jsx)(n.code,{children:"zrok"})," lets you easily and securely share resources with both general internet users (through ",(0,i.jsx)(n.em,{children:"public"})," sharing) and also with other ",(0,i.jsx)(n.code,{children:"zrok"})," users (through ",(0,i.jsx)(n.em,{children:"private"})," sharing)."]}),"\n",(0,i.jsxs)(n.p,{children:["Here's a quick review of the ",(0,i.jsx)(n.code,{children:"zrok"})," mental model and the vocabulary."]}),"\n",(0,i.jsx)(n.h3,{id:"instance-and-account",children:"Instance and Account"}),"\n",(0,i.jsxs)(n.p,{children:["You create an ",(0,i.jsx)(n.em,{children:"account"})," with a ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"}),". Your account is identified by a username and a password, which you use to log into the ",(0,i.jsx)(n.em,{children:"web console"}),". Your account also has a ",(0,i.jsx)(n.em,{children:"secret token"}),", which you will use to authenticate from the ",(0,i.jsx)(n.code,{children:"zrok"})," command-line to interact with the ",(0,i.jsx)(n.em,{children:"instance"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You create a new ",(0,i.jsx)(n.em,{children:"account"})," with NetFoundry's ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"})," by subscribing in ",(0,i.jsx)(n.a,{href:"https://myzrok.io",children:"myzrok.io"})," or in a self-hosted ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"})," by running ",(0,i.jsxs)(n.a,{href:"/docs/next/guides/self-hosting/self-service-invite",children:["the ",(0,i.jsx)(n.code,{children:"zrok invite"})," command"]})," or the ",(0,i.jsx)(n.code,{children:"zrok admin create account"})," command."]}),"\n",(0,i.jsx)(n.h3,{id:"environment",children:"Environment"}),"\n",(0,i.jsxs)(n.p,{children:["Using your ",(0,i.jsx)(n.em,{children:"secret token"})," you use the ",(0,i.jsx)(n.code,{children:"zrok"})," command-line interface to create an ",(0,i.jsx)(n.em,{children:"environment"}),". An ",(0,i.jsx)(n.em,{children:"environment"})," corresponds to a single command-line user on a specific ",(0,i.jsx)(n.em,{children:"host system"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You create a new ",(0,i.jsx)(n.em,{children:"environment"})," by using the ",(0,i.jsx)(n.code,{children:"zrok enable"})," command."]}),"\n",(0,i.jsx)(n.h3,{id:"shares",children:"Shares"}),"\n",(0,i.jsxs)(n.p,{children:["Once you've enabled an ",(0,i.jsx)(n.em,{children:"environment"}),", you then create one or more ",(0,i.jsx)(n.em,{children:"shares"}),". Shares have either a ",(0,i.jsx)(n.em,{children:"public"})," or ",(0,i.jsx)(n.em,{children:"private"})," ",(0,i.jsx)(n.em,{children:"sharing mode"}),". ",(0,i.jsx)(n.em,{children:"Shares"})," share a specific type of resource using a ",(0,i.jsx)(n.em,{children:"backend mode"}),". As of this writing ",(0,i.jsx)(n.code,{children:"zrok"})," supports a ",(0,i.jsx)(n.code,{children:"proxy"})," ",(0,i.jsx)(n.em,{children:"backend mode"})," to share local HTTP resources as a ",(0,i.jsx)(n.em,{children:"reverse proxy"}),". ",(0,i.jsx)(n.code,{children:"zrok"})," also supports a ",(0,i.jsx)(n.code,{children:"web"})," ",(0,i.jsx)(n.em,{children:"backend mode"})," to share local file and HTML resources by enabling a basic HTTP server."]}),"\n",(0,i.jsxs)(n.p,{children:["Every ",(0,i.jsx)(n.em,{children:"share"})," is identified by a ",(0,i.jsx)(n.em,{children:"share token"}),". ",(0,i.jsx)(n.em,{children:"Public shares"})," can be accessed through either a ",(0,i.jsx)(n.em,{children:"frontend"})," instance offered through the ",(0,i.jsx)(n.code,{children:"zrok"})," ",(0,i.jsx)(n.em,{children:"instance"}),", or through the ",(0,i.jsx)(n.code,{children:"zrok access"})," command. ",(0,i.jsx)(n.em,{children:"Private shares"})," can only be accessed through the ",(0,i.jsx)(n.code,{children:"zrok access"})," command."]}),"\n",(0,i.jsxs)(n.p,{children:["You use the ",(0,i.jsx)(n.code,{children:"zrok share"})," command to create and enable ",(0,i.jsx)(n.em,{children:"ephemeral shares"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"reserved-shares-1",children:"Reserved Shares"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"zrok"})," supports creating ",(0,i.jsx)(n.em,{children:"shares"})," that have a consistent ",(0,i.jsx)(n.em,{children:"share token"})," that survives restarts of the ",(0,i.jsx)(n.code,{children:"zrok share"})," command. These are considered ",(0,i.jsx)(n.em,{children:"non-ephemeral"}),", and is callled a ",(0,i.jsx)(n.em,{children:"reserved share"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You use the ",(0,i.jsx)(n.code,{children:"zrok reserve"})," command to create ",(0,i.jsx)(n.em,{children:"reserved shares"}),". Reserved shares last until you use the ",(0,i.jsx)(n.code,{children:"zrok release"})," command to delete them."]}),"\n",(0,i.jsx)(n.h2,{id:"self-hosting-an-instance",children:"Self-Hosting an Instance"}),"\n",(0,i.jsxs)(n.p,{children:["Interested in self-hosting your own ",(0,i.jsx)(n.code,{children:"zrok"})," instance? See the ",(0,i.jsx)(n.a,{href:"/docs/category/self-hosting/",children:"self-hosting guides"}),"!"]}),"\n",(0,i.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Learn about ",(0,i.jsx)(n.a,{href:"https://openziti.io/",children:"OpenZiti"})]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(m,{...e})}):m(e)}function p(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},8151:(e,n,s)=>{s.d(n,{F:()=>a,d:()=>t});var r=s(6540),i=s(4848);const o=(0,r.createContext)([]),t=()=>(0,r.useContext)(o),a=e=>{let{children:n}=e;const[s,t]=(0,r.useState)([]);return(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("https://api.github.com/repos/openziti/zrok/releases/latest");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=(await e.json()).assets.map((e=>({name:e.name,url:e.browser_download_url,arch:e.name.replace(".tar.gz","").split("_")[3]})));console.log("Fetched assets:",n),t(n)}catch(e){console.error("Error fetching the release assets:",e)}})()}),[]),(0,i.jsx)(o.Provider,{value:s,children:n})}},595:(e,n,s)=>{s.d(n,{A:()=>c});s(6540);var r=s(8151),i=s(1342),o=s(5293),t=s(4848);const a=e=>{switch(e){case"amd64":return"x86_64";case"arm64":return"ARM64";case"armv7":return"ARM";default:return e.toUpperCase()}},c=e=>{let{osName:n,osLogo:s,infoText:c,guideLink:d}=e;const{colorMode:l}=(0,o.G)(),h=(0,r.d)();console.log("Assets in DownloadCard:",h);const u=(e=>{switch(e){case"Windows":return"windows";case"macOS":return"darwin";case"Linux":return"linux";default:return""}})(n),m=h.filter((e=>e.name.includes(u)));return console.log("Filtered assets for",n,"in DownloadCard:",m),(0,t.jsxs)("div",{className:i.A.downloadCard,children:[(0,t.jsx)("div",{className:i.A.imgContainer,children:(0,t.jsx)("img",{src:s,alt:`${n} logo`})}),(0,t.jsx)("h3",{children:n}),m.length>0&&(0,t.jsx)("ul",{children:m.map(((e,n)=>(0,t.jsx)("li",{className:i.A.downloadButtons,children:(0,t.jsx)("a",{href:e.url,className:i.A.downloadLinks,children:a(e.arch)})},n)))}),d&&(0,t.jsxs)("div",{className:i.A.cardFooter,children:[(0,t.jsx)("p",{children:c}),(0,t.jsx)("a",{href:d,children:"GUIDE"}),(0,t.jsx)("p",{})]})]})}},1342:(e,n,s)=>{s.d(n,{A:()=>r});const r={downloadContainer:"downloadContainer_nNgj",downloadCard:"downloadCard_D_EY",cardFooter:"cardFooter_Rhom",downloadButtons:"downloadButtons_NPAP",downloadLinks:"downloadLinks_thSu",imgContainer:"imgContainer_r0QA"}},2963:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_enable_modal-45da63a6907e930daaa4c798272ce5fa.png"},3788:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_not_found-fa3415937c341eb10e1eb98c9b063583.png"},327:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_reserved_not_found-2519707e5cc3e635b7a6feb381c1d040.png"},6831:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_share_public-322dc971477d3a0b97b42478ea023dd7.png"},2504:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_share_reserved-6bce67775ce2c41abb0ef13ee1fad972.png"},22:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_environment_spark-925c0709ed7a42f0a708ab0523cdeb5f.png"},3978:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_explorer_share-11236f68819da60014d5444e7429c189.png"},2300:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_share_detail-efeaa472d5e5c225a160f6d5647086b3.png"},9635:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_console_share_frontend-d7c0d6495493c00b94ae237339f2dc2d.png"},6219:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_ui_empty_environment_detail-153c921ade86f924079947b0f734e3ff.png"},8474:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_ui_empty_shares-048c08c18477bcabb9fa8c1b58537012.png"},5745:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/zrok_web_ui_new_environment-414d8e8fc25b09f257cb40ba47d6acbb.png"},3605:(e,n,s)=>{s.d(n,{A:()=>r});const r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAZCAIAAACpVwlNAAAEr2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgdGlmZjpJbWFnZUxlbmd0aD0iMjUiCiAgIHRpZmY6SW1hZ2VXaWR0aD0iMzAiCiAgIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiCiAgIHRpZmY6WFJlc29sdXRpb249Ijk2LzEiCiAgIHRpZmY6WVJlc29sdXRpb249Ijk2LzEiCiAgIGV4aWY6UGl4ZWxYRGltZW5zaW9uPSIzMCIKICAgZXhpZjpQaXhlbFlEaW1lbnNpb249IjI1IgogICBleGlmOkNvbG9yU3BhY2U9IjEiCiAgIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiCiAgIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjMtMDEtMTlUMTA6NTY6NTYtMDU6MDAiCiAgIHhtcDpNZXRhZGF0YURhdGU9IjIwMjMtMDEtMTlUMTA6NTY6NTYtMDU6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJwcm9kdWNlZCIKICAgICAgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWZmaW5pdHkgUGhvdG8gMi4wLjMiCiAgICAgIHN0RXZ0OndoZW49IjIwMjMtMDEtMTlUMTA6NTY6NTYtMDU6MDAiLz4KICAgIDwvcmRmOlNlcT4KICAgPC94bXBNTTpIaXN0b3J5PgogIDwvcmRmOkRlc2NyaXB0aW9uPgogPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KPD94cGFja2V0IGVuZD0iciI/Pq+HLHgAAAGBaUNDUHNSR0IgSUVDNjE5NjYtMi4xAAAokXWRy0tCQRSHP7UwemBQixYtJKyVRg8Q27RQyoJqYQZZbfTmI/BxuVcJaRu0FQqiNr0W9RfUNmgdBEURRNtaF7UpuZ2rghF5hjnzzW/OOcycAWs4rWT0piHIZPNaKOh3LkaWnPYXLHThwIclqujq7PxkmIb2eS/RYrces1bjuH+tbTWuK2BpER5XVC0vPCU8s55XTd4R7lZS0VXhM2G3JhcUvjP1WJVfTU5W+dtkLRwKgLVT2Jn8xbFfrKS0jLC8HFcmXVBq9zFf0h7PLszL2iezF50QQfw4mWaCAF6GGRPvxcMIg7KjQf5QJX+OnOQq4lWKaKyRJEUet6gFqR6XNSF6XEaaotn/v33VE6Mj1ertfmh+Noz3frBvQ7lkGF9HhlE+BtsTXGbr+blD8H2IXqprrgNwbML5VV2L7cLFFvQ8qlEtWpFsMq2JBLydQkcEum6gdbnas9o5Jw8Q3pCvuoa9fRiQeMfKD2DYZ+PDGzxnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABZklEQVRIie2VvW7CMBDHr1UfwE5fII7lvahIWUEiQ7qxMLEwsVQMSB0YKsTExsDGxFs0QyqlYyMVld3k4wWw/QgMlqp+JXFQGZB649n3k+9/f9sX9w+PcJq4PBH3H/0zrkrWfK99jVF5/V6qIIzqod1m485rC6nK0S5GAPArvRDNHFtINZ0vviQp4Un2OTObjIs6q6G122yMhgPfaxvuN0VbGDHHBgDm2FbVAGqgLYyEVPFmCwDB84uQilHyB2i32ej3uoySvZDT+YInGaPE77QqlSkznz5vv9cFAEbJdL4QUlkYjYYDnYnf3o9HC6mewog5ttZBq7xcrf1OK95sy61ZgQaAIIx2lGgdRsPBcrXmSbYXstLyRmPkSWZh5HdaAODe3uipVlaZmk9IxdMcAHiam3DBRJCPCMJol+bfbuMxaJ7mjJLZZFxeb2Gku6mDTrJXjExeviILFqJF8WtpGOf5y5wn+gBcXI4F9z6rgwAAAABJRU5ErkJggg=="},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>a});var r=s(6540);const i={},o=r.createContext(i);function t(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f8f494be.e4778da8.js b/assets/js/f8f494be.e4778da8.js new file mode 100644 index 00000000..973a2c80 --- /dev/null +++ b/assets/js/f8f494be.e4778da8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5695],{633:(e,r,s)=>{s.d(r,{Ay:()=>o,RM:()=>t});var n=s(4848),i=s(8453);const t=[];function a(e){const r={a:"a",code:"code",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:["Set up ",(0,n.jsx)(r.code,{children:"zrok"}),"'s Linux package repository by following ",(0,n.jsx)(r.a,{href:"/docs/next/guides/install/linux#install-zrok-from-the-repository",children:"the Linux install guide"}),", or run this one-liner to complete the repo setup and install packages."]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"curl -sSLf https://get.openziti.io/install.bash \\\n| sudo bash -s zrok-share\n"})}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:["If you set up the repository by following the guide, then also install the ",(0,n.jsx)(r.code,{children:"zrok-share"})," package. This package provides the systemd service."]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",metastring:'title="Ubuntu, Debian"',children:"sudo apt install zrok-share\n"})}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",metastring:'title="Fedora, Rocky"',children:"sudo dnf install zrok-share\n"})}),"\n"]}),"\n"]})}function o(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(a,{...e})}):a(e)}},9438:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"guides/linux-user-share/index","title":"Linux User Share","description":"Overview","source":"@site/versioned_docs/version-0.4/guides/linux-user-share/index.mdx","sourceDirName":"guides/linux-user-share","slug":"/guides/linux-user-share/","permalink":"/docs/guides/linux-user-share/","draft":false,"unlisted":false,"editUrl":"https://github.com/openziti/zrok/blob/main/docs/versioned_docs/version-0.4/guides/linux-user-share/index.mdx","tags":[],"version":"0.4","frontMatter":{"title":"Linux User Share"},"sidebar":"tutorialSidebar","previous":{"title":"Private Share","permalink":"/docs/guides/docker-share/docker_private_share_guide"},"next":{"title":"Self Hosting","permalink":"/docs/category/self-hosting"}}');var i=s(4848),t=s(8453),a=s(633);const o={title:"Linux User Share"},l=void 0,c={},h=[{value:"Overview",id:"overview",level:2},{value:"Install the Linux Package",id:"install-the-linux-package",level:2},...a.RM,{value:"Create a User Share Configuration File",id:"create-a-user-share-configuration-file",level:2},{value:"Edit the User Share Configuration File",id:"edit-the-user-share-configuration-file",level:2},{value:"Start the User Share Service",id:"start-the-user-share-service",level:2},{value:"Check the User Share Journal",id:"check-the-user-share-journal",level:2},{value:"Add Another User Share",id:"add-another-user-share",level:2}];function d(e){const r={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(r.p,{children:["You can run any number of zrok share services as ",(0,i.jsx)(r.code,{children:"systemd --user"})," units with your Linux user's zrok environment in ",(0,i.jsx)(r.code,{children:"~/.zrok"}),". This is like ",(0,i.jsx)(r.a,{href:"/docs/guides/frontdoor",children:"zrok frontdoor"})," except that frontdoor is a system service managed by root separately from your user's login. Linux user shares, Linux system services, and Docker shares all use the same configuration environment variables."]}),"\n",(0,i.jsx)(r.h2,{id:"install-the-linux-package",children:"Install the Linux Package"}),"\n",(0,i.jsxs)(r.p,{children:["The package provides the ",(0,i.jsx)(r.code,{children:"zrok"})," executable and service unit template."]}),"\n",(0,i.jsx)(a.Ay,{}),"\n",(0,i.jsx)(r.h2,{id:"create-a-user-share-configuration-file",children:"Create a User Share Configuration File"}),"\n",(0,i.jsxs)(r.p,{children:["Substitute a name for your instance in place of ",(0,i.jsx)(r.code,{children:"my-instance"})," in the following example. To avoid character escaping problems, use only letters, numbers, hyphens, and underscores in the instance name, not spaces or other special characters."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:'ZROK_INSTANCE="my-instance"\ncp /opt/openziti/etc/zrok/zrok-share.env ~/.zrok/zrok-share@${ZROK_INSTANCE}.env\n'})}),"\n",(0,i.jsx)(r.h2,{id:"edit-the-user-share-configuration-file",children:"Edit the User Share Configuration File"}),"\n",(0,i.jsxs)(r.p,{children:["Edit the configuration file in ",(0,i.jsx)(r.code,{children:"~/.zrok/zrok-share@${ZROK_INSTANCE}.env"})," as you would for ",(0,i.jsx)(r.a,{href:"/docs/guides/frontdoor",children:"zrok frontdoor"}),', except ignore the first section "ZROK ENVIRONMENT" because user shares re-use ',(0,i.jsx)(r.code,{children:"~/.zrok"})," and do not need a separate zrok environment."]}),"\n",(0,i.jsx)(r.h2,{id:"start-the-user-share-service",children:"Start the User Share Service"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"systemctl --user enable --now zrok-share@${ZROK_INSTANCE}.service\n"})}),"\n",(0,i.jsx)(r.h2,{id:"check-the-user-share-journal",children:"Check the User Share Journal"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"journalctl --user -lfu zrok-share@${ZROK_INSTANCE}.service\n"})}),"\n",(0,i.jsx)(r.h2,{id:"add-another-user-share",children:"Add Another User Share"}),"\n",(0,i.jsxs)(r.p,{children:["To create another user share, choose another instance name, copy the ",(0,i.jsx)(r.code,{children:"zrok-share.env"})," file, edit the configuration file, and start the service."]})]})}function u(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,r,s)=>{s.d(r,{R:()=>a,x:()=>o});var n=s(6540);const i={},t=n.createContext(i);function a(e){const r=n.useContext(t);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(t.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.06622fc5.js b/assets/js/main.06622fc5.js deleted file mode 100644 index b820796d..00000000 --- a/assets/js/main.06622fc5.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.06622fc5.js.LICENSE.txt */ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8792],{3219:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>C,E8:()=>Zn,a1:()=>Yn});var r=n(6540);n(961);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||S(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function x(e){var t="function"==typeof Map?new Map:void 0;return x=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(m())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&b(o,n.prototype),o}(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),b(n,e)},x(e)}function E(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function _(){return r.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},r.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var O=["translations"],j="Ctrl",C=r.forwardRef((function(e,t){var n=e.translations,o=void 0===n?{}:n,a=y(e,O),i=o.buttonText,l=void 0===i?"Search":i,s=o.buttonAriaLabel,c=void 0===s?"Search":s,u=w((0,r.useState)(null),2),f=u[0],p=u[1];return(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("\u2318"):p(j))}),[]),r.createElement("button",d({type:"button",className:"DocSearch DocSearch-Button","aria-label":c},a,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(_,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},l)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==f&&r.createElement(r.Fragment,null,r.createElement(A,{reactsToKey:f===j?j:"Meta"},f===j?r.createElement(E,null):f),r.createElement(A,{reactsToKey:"k"},"K"))))}));function A(e){var t=e.reactsToKey,n=e.children,o=w((0,r.useState)(!1),2),a=o[0],i=o[1];return(0,r.useEffect)((function(){if(t)return window.addEventListener("keydown",e),window.addEventListener("keyup",n),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",n)};function e(e){e.key===t&&i(!0)}function n(e){e.key!==t&&"Meta"!==e.key||i(!1)}}),[t]),r.createElement("kbd",{className:a?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},n)}function T(e,t){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10);function a(t,n,r){if(o&&void 0!==r){var a=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[t].concat($(n),[{headers:i}]))}else e.apply(void 0,[t].concat($(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("clickedObjectIDsAfterSearch",Q(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("clickedObjectIDs",Q(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("convertedObjectIDsAfterSearch",Q(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("convertedObjectIDs",Q(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce((function(e,t){var n=t.items,r=V(t,U);return[].concat($(e),$(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function Z(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function J(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&le({onItemsChange:o,items:n,insights:c,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive,o=!1;function u(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:re(re({},l?{clickAnalytics:!0}:{}),e?{userToken:ue(e)}:{}),insights:c}})}s("addAlgoliaAgent","insights-plugin"),u(),s("onUserTokenChange",(function(e){o||u(e)})),s("getUserToken",null,(function(e,t){o||u(t)})),s("onAuthenticatedUserTokenChange",(function(e){e?(o=!0,u(e)):(o=!1,s("getUserToken",null,(function(e,t){return u(t)})))})),s("getAuthenticatedUserToken",null,(function(e,t){t&&(o=!0,u(t))})),n((function(e){var t=e.item,n=e.state,r=e.event,o=e.source;J(t)&&a({state:n,event:r,insights:c,item:t,insightsEvents:[re({eventName:"Item Selected"},F({item:t,items:o.getItems().filter(J)}))]})})),r((function(e){var t=e.item,n=e.source,r=e.state,o=e.event;J(t)&&i({state:r,event:o,insights:c,item:t,insightsEvents:[re({eventName:"Item Active"},F({item:t,items:n.getItems().filter(J)}))]})}))},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function ce(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(ee(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],ee(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function ue(e){return"number"==typeof e?e.toString():e}function de(e,t){var n=t;return{then:function(t,r){return de(e.then(pe(t,n,e),pe(r,n,e)),n)},catch:function(t){return de(e.catch(pe(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),de(e.finally(pe(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function fe(e){return de(e,{isCanceled:!1,onCancelList:[]})}function pe(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function me(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var o=(null===t?-1:t)+e;return o<=-1||o>=n?null===r?null:0:o}function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(I++),plugins:o,initialState:Re({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return Pe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:L,onResolve:L};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=ge(ge({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return P(e)})).then((function(e){return e.map((function(e){return Re(Re({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:Re({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Qe);nt&&o.environment.clearTimeout(nt);var c=s.setCollections,u=s.setIsOpen,d=s.setQuery,f=s.setActiveItemId,p=s.setStatus,m=s.setContext;if(d(a),f(o.defaultActiveItemId),!a&&!1===o.openOnFocus){var h,g=l.getState().collections.map((function(e){return Ze(Ze({},e),{},{items:[]})}));p("idle"),c(g),u(null!==(h=r.isOpen)&&void 0!==h?h:o.shouldPanelOpen({state:l.getState()}));var y=fe(rt(g).then((function(){return Promise.resolve()})));return l.pendingRequests.add(y)}p("loading"),nt=o.environment.setTimeout((function(){p("stalled")}),o.stallThreshold);var v=fe(rt(o.getSources(Ze({query:a,refresh:i,state:l.getState()},s)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(Ze({query:a,refresh:i,state:l.getState()},s))).then((function(t){return function(e,t,n){if(o=e,Boolean(null==o?void 0:o.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(He(Object.keys(n.context).map((function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return qe(qe({},e),{},{requests:e.queries.map((function(n){return{query:"algolia"===e.requesterId?qe(qe({},n),{},{params:qe(qe({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}}))})}var o;return{items:e,sourceId:t}}(t,e.sourceId,l.getState())}))}))).then(We).then((function(t){var n,r=t.some((function(e){return function(e){return!Array.isArray(e)&&Boolean(null==e?void 0:e._automaticInsights)}(e.items)}));return r&&m({algoliaInsightsPlugin:Ze(Ze({},(null===(n=l.getState().context)||void 0===n?void 0:n.algoliaInsightsPlugin)||{}),{},{__automaticInsights:r})}),function(e,t,n){return t.map((function(t){var r,o=e.filter((function(e){return e.sourceId===t.sourceId})),a=o.map((function(e){return e.items})),i=o[0].transformResponse,l=i?i({results:r=a,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):a;return t.onResolve({source:t,results:a,items:l,state:n.getState()}),l.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:l}}))}(t,e,l)})).then((function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce((function(e,t){return Fe(Fe({},e),{},ze({},t.source.sourceId,Fe(Fe({},t.source),{},{getItems:function(){return P(t.items)}})))}),{}),o=t.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return P(t.reshape({sourcesBySourceId:o,sources:Object.values(o),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:o,state:l.getState()})}))})))).then((function(e){var n;p("idle"),c(e);var d=o.shouldPanelOpen({state:l.getState()});u(null!==(n=r.isOpen)&&void 0!==n?n:o.openOnFocus&&!a&&d||d);var f=be(l.getState());if(null!==l.getState().activeItemId&&f){var m=f.item,h=f.itemInputValue,g=f.itemUrl,y=f.source;y.onActive(Ze({event:t,item:m,itemInputValue:h,itemUrl:g,refresh:i,source:y,state:l.getState()},s))}})).finally((function(){p("idle"),nt&&o.environment.clearTimeout(nt)}));return l.pendingRequests.add(v)}function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}var it=["event","props","refresh","store"];function lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function kt(e){var t=e.props,n=e.refresh,r=e.store,o=wt(e,dt);return{getEnvironmentProps:function(e){var n=e.inputElement,o=e.formElement,a=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[o,a].some((function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return vt({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},wt(e,ft))},getRootProps:function(e){return vt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return we(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":we(t.id,"label")},e)},getFormProps:function(e){return e.inputElement,vt({action:"",noValidate:!0,role:"search",onSubmit:function(a){var i;a.preventDefault(),t.onSubmit(vt({event:a,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(a){var i;a.preventDefault(),t.onReset(vt({event:a,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},wt(e,pt))},getLabelProps:function(e){return vt({htmlFor:we(t.id,"input"),id:we(t.id,"label")},e)},getInputProps:function(e){var a;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&ot(vt({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var l=e||{};l.inputElement;var s=l.maxLength,c=void 0===s?512:s,u=wt(l,mt),d=be(r.getState()),f=function(e){return Boolean(e&&e.match(ke))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),p=t.enterKeyHint||(null!=d&&d.itemUrl&&!f?"go":"search");return vt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?we(t.id,"item-".concat(r.getState().activeItemId),null==d?void 0:d.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return we(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":we(t.id,"label"),value:r.getState().completion||r.getState().query,id:we(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:"search",onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&Se(e).isComposing?o.setQuery(a):ot(vt({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},o))},onCompositionEnd:function(e){ot(vt({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},o))},onKeyDown:function(e){Se(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,o=e.store,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,it);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=be(o.getState()),t=n.environment.document.getElementById(we(n.id,"item-".concat(o.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},l=function(){var e=be(o.getState());if(null!==o.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,l=e.itemUrl,s=e.source;s.onActive(st({event:t,item:n,itemInputValue:i,itemUrl:l,refresh:r,source:s,state:o.getState()},a))}};t.preventDefault(),!1===o.getState().isOpen&&(n.openOnFocus||Boolean(o.getState().query))?ot(st({event:t,props:n,query:o.getState().query,refresh:r,store:o},a)).then((function(){o.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),l(),setTimeout(i,0)})):(o.dispatch(t.key,{}),l(),i())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||o.pendingRequests.cancelAll());t.preventDefault();var s=be(o.getState()),c=s.item,u=s.itemInputValue,d=s.itemUrl,f=s.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(f.onSelect(st({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:o.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:c,state:o.getState()}));else if(t.shiftKey)void 0!==d&&(f.onSelect(st({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:o.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:c,state:o.getState()}));else if(t.altKey);else{if(void 0!==d)return f.onSelect(st({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:o.getState()},a)),void n.navigator.navigate({itemUrl:d,item:c,state:o.getState()});ot(st({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:o},a)).then((function(){f.onSelect(st({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:o.getState()},a))}))}}}(vt({event:e,props:t,refresh:n,store:r},o))},onFocus:i,onBlur:L,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},u)},getPanelProps:function(e){return vt({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,o=wt(n,ht);return vt({role:"listbox","aria-labelledby":we(t.id,"label"),id:we(t.id,"list",r)},o)},getItemProps:function(e){var a=e.item,i=e.source,l=wt(e,gt);return vt({id:we(t.id,"item-".concat(a.__autocomplete_id),i),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=be(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,l=t.itemInputValue,s=t.itemUrl,c=t.source;c.onActive(vt({event:e,item:i,itemInputValue:l,itemUrl:s,refresh:n,source:c,state:r.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var l=i.getItemInputValue({item:a,state:r.getState()}),s=i.getItemUrl({item:a,state:r.getState()});(s?Promise.resolve():ot(vt({event:e,nextState:{isOpen:!1},props:t,query:l,refresh:n,store:r},o))).then((function(){i.onSelect(vt({event:e,item:a,itemInputValue:l,itemUrl:s,refresh:n,source:i,state:r.getState()},o))}))}},l)}}}function St(e){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},St(e)}function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t0&&r.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},r.createElement("p",{className:"DocSearch-Help"},s,":"),r.createElement("ul",null,p.slice(0,3).reduce((function(e,t){return[].concat(k(e),[r.createElement("li",{key:t},r.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){o.setQuery(t.toLowerCase()+" "),o.refresh(),o.inputRef.current.focus()}},t))])}),[]))),o.getMissingResultsUrl&&r.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),r.createElement("a",{href:o.getMissingResultsUrl({query:o.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var nn=["hit","attribute","tagName"];function rn(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function on(e){var t=e.hit,n=e.attribute,o=e.tagName,a=void 0===o?"span":o,i=y(e,nn);return(0,r.createElement)(a,g(g({},i),{},{dangerouslySetInnerHTML:{__html:rn(t,"_snippetResult.".concat(n,".value"))||rn(t,n)}}))}function an(e){return e.collection&&0!==e.collection.items.length?r.createElement("section",{className:"DocSearch-Hits"},r.createElement("div",{className:"DocSearch-Hit-source"},e.title),r.createElement("ul",e.getListProps(),e.collection.items.map((function(t,n){return r.createElement(ln,d({key:[e.title,t.objectID].join(":"),item:t,index:n},e))})))):null}function ln(e){var t=e.item,n=e.index,o=e.renderIcon,a=e.renderAction,i=e.getItemProps,l=e.onItemClick,s=e.collection,c=e.hitComponent,u=w(r.useState(!1),2),f=u[0],p=u[1],m=w(r.useState(!1),2),h=m[0],g=m[1],y=r.useRef(null),v=c;return r.createElement("li",d({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",f&&"DocSearch-Hit--deleting",h&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){y.current&&y.current()}},i({item:t,source:s.source,onClick:function(e){l(t,e)}})),r.createElement(v,{hit:t},r.createElement("div",{className:"DocSearch-Hit-Container"},o({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(on,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&r.createElement(on,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(on,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),r.createElement(on,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(on,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),r.createElement(on,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),a({item:t,runDeleteTransition:function(e){p(!0),y.current=e},runFavoriteTransition:function(e){g(!0),y.current=e}}))))}function sn(e,t,n){return e.reduce((function(e,r){var o=t(r);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(n||5)&&e[o].push(r),e}),{})}function cn(e){return e}function un(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function dn(){}var fn=/(|<\/mark>)/g,pn=RegExp(fn.source);function mn(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0;return o?o.value&&pn.test(o.value)?o.value.replace(fn,""):o.value:e.hierarchy.lvl0}function hn(e){return r.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map((function(t){if(0===t.items.length)return null;var n=mn(t.items[0]);return r.createElement(an,d({},e,{key:t.source.sourceId,title:n,collection:t,renderIcon:function(e){var n,o=e.item,a=e.index;return r.createElement(r.Fragment,null,o.__docsearch_parent&&r.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},o.__docsearch_parent!==(null===(n=t.items[a+1])||void 0===n?void 0:n.__docsearch_parent)?r.createElement("path",{d:"M8 6v21M20 27H8.3"}):r.createElement("path",{d:"M8 6v42M20 27H8.3"}))),r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Wt,{type:o.type})))},renderAction:function(){return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement(Vt,null))}}))})),e.resultsFooterComponent&&r.createElement("section",{className:"DocSearch-HitsFooter"},r.createElement(e.resultsFooterComponent,{state:e.state})))}var gn=["translations"];function yn(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,gn),a=n.recentSearchesTitle,i=void 0===a?"Recent":a,l=n.noRecentSearchesText,s=void 0===l?"No recent searches":l,c=n.saveRecentSearchButtonTitle,u=void 0===c?"Save this search":c,f=n.removeRecentSearchButtonTitle,p=void 0===f?"Remove this search from history":f,m=n.favoriteSearchesTitle,h=void 0===m?"Favorite":m,g=n.removeFavoriteSearchButtonTitle,v=void 0===g?"Remove this search from favorites":g;return"idle"===o.state.status&&!1===o.hasCollections?o.disableUserPersonalization?null:r.createElement("div",{className:"DocSearch-StartScreen"},r.createElement("p",{className:"DocSearch-Help"},s)):!1===o.hasCollections?null:r.createElement("div",{className:"DocSearch-Dropdown-Container"},r.createElement(an,d({},o,{title:i,collection:o.state.collections[0],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement($t,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,a=e.runDeleteTransition;return r.createElement(r.Fragment,null,r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){o.favoriteSearches.add(t),o.recentSearches.remove(t),o.refresh()}))}},r.createElement(Yt,null))),r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:p,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),a((function(){o.recentSearches.remove(t),o.refresh()}))}},r.createElement(Ht,null))))}})),r.createElement(an,d({},o,{title:h,collection:o.state.collections[1],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Yt,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:v,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){o.favoriteSearches.remove(t),o.refresh()}))}},r.createElement(Ht,null)))}})))}var vn=["translations"],bn=r.memo((function(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,vn);if("error"===o.state.status)return r.createElement(Xt,{translations:null==n?void 0:n.errorScreen});var a=o.state.collections.some((function(e){return e.items.length>0}));return o.state.query?!1===a?r.createElement(tn,d({},o,{translations:null==n?void 0:n.noResultsScreen})):r.createElement(hn,o):r.createElement(yn,d({},o,{hasCollections:a,translations:null==n?void 0:n.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status})),wn=["translations"];function kn(e){var t=e.translations,n=void 0===t?{}:t,o=y(e,wn),a=n.resetButtonTitle,i=void 0===a?"Clear the query":a,l=n.resetButtonAriaLabel,s=void 0===l?"Clear the query":l,c=n.cancelButtonText,u=void 0===c?"Cancel":c,f=n.cancelButtonAriaLabel,p=void 0===f?"Cancel":f,m=n.searchInputLabel,h=void 0===m?"Search":m,g=o.getFormProps({inputElement:o.inputRef.current}).onReset;return r.useEffect((function(){o.autoFocus&&o.inputRef.current&&o.inputRef.current.focus()}),[o.autoFocus,o.inputRef]),r.useEffect((function(){o.isFromSelection&&o.inputRef.current&&o.inputRef.current.select()}),[o.isFromSelection,o.inputRef]),r.createElement(r.Fragment,null,r.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:g},r.createElement("label",d({className:"DocSearch-MagnifierLabel"},o.getLabelProps()),r.createElement(_,null),r.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},h)),r.createElement("div",{className:"DocSearch-LoadingIndicator"},r.createElement(qt,null)),r.createElement("input",d({className:"DocSearch-Input",ref:o.inputRef},o.getInputProps({inputElement:o.inputRef.current,autoFocus:o.autoFocus,maxLength:64}))),r.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":s,hidden:!o.state.query},r.createElement(Ht,null))),r.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":p,onClick:o.onClose},u))}var Sn=["_highlightResult","_snippetResult"];function xn(e){var t=e.key,n=e.limit,r=void 0===n?5:n,o=function(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}(t),a=o.getItem().slice(0,r);return{add:function(e){var t=e;t._highlightResult,t._snippetResult;var n=y(t,Sn),i=a.findIndex((function(e){return e.objectID===n.objectID}));i>-1&&a.splice(i,1),a.unshift(n),a=a.slice(0,r),o.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),o.setItem(a)},getAll:function(){return a}}}function En(e){var t,n="algolia-client-js-".concat(e.key);function r(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(r().getItem(n)||"{}")}function a(e){r().setItem(n,JSON.stringify(e))}return{get:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var n,r,i;return n=e.timeToLive?1e3*e.timeToLive:null,r=o(),a(i=Object.fromEntries(Object.entries(r).filter((function(e){return void 0!==w(e,2)[1].timestamp})))),n&&a(Object.fromEntries(Object.entries(i).filter((function(e){var t=w(e,2)[1],r=(new Date).getTime();return!(t.timestamp+n2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return w(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,o).catch((function(){return _n({caches:t}).get(e,r,o)}))},set:function(e,r){return n.set(e,r).catch((function(){return _n({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return _n({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return _n({caches:t}).clear()}))}}}function On(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var i=r();return i.then((function(e){return o.miss(e)})).then((function(){return i}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function jn(e){var t=e.algoliaAgents,n=e.client,r=e.version,o=function(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}(r).add({segment:n,version:r});return t.forEach((function(e){return o.add(e)})),o}var Cn=12e4;function An(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",n=Date.now();return g(g({},e),{},{status:t,lastUpdate:n,isUp:function(){return"up"===t||Date.now()-n>Cn},isTimedOut:function(){return"timed out"===t&&Date.now()-n<=Cn}})}var Tn=function(){function e(t,n){var r;return s(this,e),u(r=l(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return p(e,x(Error)),c(e)}(),Pn=function(){function e(t,n,r){var o;return s(this,e),u(o=l(this,e,[t,r]),"stackTrace",void 0),o.stackTrace=n,o}return p(e,Tn),c(e)}(),In=function(){function e(t){return s(this,e),l(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError"])}return p(e,Pn),c(e)}(),Rn=function(){function e(t,n,r){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ApiError";return s(this,e),u(o=l(this,e,[t,r,a]),"status",void 0),o.status=n,o}return p(e,Pn),c(e)}(),Nn=function(){function e(t,n){var r;return s(this,e),u(r=l(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return p(e,Tn),c(e)}(),Dn=function(){function e(t,n,r,o){var a;return s(this,e),u(a=l(this,e,[t,n,o,"DetailedApiError"]),"error",void 0),a.error=r,a}return p(e,Rn),c(e)}();function Ln(e,t,n){var r,o=(r=n,Object.keys(r).filter((function(e){return void 0!==r[e]})).sort().map((function(e){return"".concat(e,"=").concat(encodeURIComponent("[object Array]"===Object.prototype.toString.call(r[e])?r[e].join(","):r[e]).replace(/\+/g,"%20"))})).join("&")),a="".concat(e.protocol,"://").concat(e.url).concat(e.port?":".concat(e.port):"","/").concat("/"===t.charAt(0)?t.substring(1):t);return o.length&&(a+="?".concat(o)),a}function Mn(e,t){if("GET"!==e.method&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:g(g({},e.data),t.data);return JSON.stringify(n)}}function Fn(e,t,n){var r=g(g(g({Accept:"application/json"},e),t),n),o={};return Object.keys(r).forEach((function(e){var t=r[e];o[e.toLowerCase()]=t})),o}function zn(e){try{return JSON.parse(e.content)}catch(t){throw new Nn(t.message,e)}}function Bn(e,t){var n=e.content,r=e.status;try{var o=JSON.parse(n);return"error"in o?new Dn(o.message,r,o.error,t):new Rn(o.message,r,t)}catch(e){}return new Rn(n,r,t)}function Un(e){return e.map((function(e){return qn(e)}))}function qn(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return g(g({},e),{},{request:g(g({},e.request),{},{headers:g(g({},e.request.headers),t)})})}var $n=["appId","apiKey","authMode","algoliaAgents"],Hn=["params"],Vn="5.12.0";function Gn(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){for(var t=e,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),o=e[n];t[n]=e[r],t[r]=o}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var Wn="3.7.0";function Kn(e,t,n){return r.useMemo((function(){var r=function(e,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,n=e.apiKey,r=e.authMode,o=e.algoliaAgents,a=y(e,$n),l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"WithinHeaders",r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:function(){return"WithinHeaders"===n?r:{}},queryParameters:function(){return"WithinQueryParameters"===n?r:{}}}}(t,n,r),s=function(e){var t=e.hosts,n=e.hostsCache,r=e.baseHeaders,o=e.logger,a=e.baseQueryParameters,l=e.algoliaAgent,s=e.timeouts,c=e.requester,u=e.requestsCache,d=e.responsesCache;function f(e){return p.apply(this,arguments)}function p(){return(p=i(v().mark((function e(t){var r,o,a,i,l;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return n.get(e,(function(){return Promise.resolve(An(e))}))})));case 2:return r=e.sent,o=r.filter((function(e){return e.isUp()})),a=r.filter((function(e){return e.isTimedOut()})),i=[].concat(k(o),k(a)),l=i.length>0?i:t,e.abrupt("return",{hosts:l,getTimeout:function(e,t){return(0===a.length&&0===e?1:a.length+3+e)*t}});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){return h.apply(this,arguments)}function h(){return h=i(v().mark((function e(u,d){var p,m,h,y,b,w,S,x,E,_,O,j,C,A=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p=!(A.length>2&&void 0!==A[2])||A[2],m=[],h=Mn(u,d),y=Fn(r,u.headers,d.headers),b="GET"===u.method?g(g({},u.data),d.data):{},w=g(g(g({},a),u.queryParameters),b),l.value&&(w["x-algolia-agent"]=l.value),d&&d.queryParameters)for(S=0,x=Object.keys(d.queryParameters);S1&&void 0!==arguments[1]?arguments[1]:{},n=e.useReadTransporter||"GET"===e.method;if(!n)return m(e,t,n);var o=function(){return m(e,t)};if(!0!==(t.cacheable||e.cacheable))return o();var i={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return d.get(i,(function(){return u.get(i,(function(){return u.set(i,o()).then((function(e){return Promise.all([u.delete(i),e])}),(function(e){return Promise.all([u.delete(i),Promise.reject(e)])})).then((function(e){var t=w(e,2);return t[0],t[1]}))}))}),{miss:function(e){return d.set(i,e)}})},requestsCache:u,responsesCache:d}}(g(g({hosts:Gn(t)},a),{},{algoliaAgent:jn({algoliaAgents:o,client:"Lite",version:Vn}),baseHeaders:g(g({"content-type":"text/plain"},l.headers()),a.baseHeaders),baseQueryParameters:g(g({},l.queryParameters()),a.baseQueryParameters)}));return{transporter:s,appId:t,clearCache:function(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then((function(){}))},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent:function(e,t){s.algoliaAgent.add({segment:e,version:t})},setClientApiKey:function(e){var t=e.apiKey;r&&"WithinHeaders"!==r?s.baseQueryParameters["x-algolia-api-key"]=t:s.baseHeaders["x-algolia-api-key"]=t},searchForHits:function(e,t){return this.search(e,t)},searchForFacets:function(e,t){return this.search(e,t)},customPost:function(e,t){var n=e.path,r=e.parameters,o=e.body;if(!n)throw new Error("Parameter `path` is required when calling `customPost`.");var a={method:"POST",path:"/{path}".replace("{path}",n),queryParameters:r||{},headers:{},data:o||{}};return s.request(a,t)},getRecommendations:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return s.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var n={requests:e.map((function(e){var t=e.params,n=y(e,Hn);return"facet"===n.type?g(g(g({},n),t),{},{type:"facet"}):g(g(g({},n),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=n}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return s.request(r,t)}}}(g({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return Promise.resolve()}},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,o=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),e)},a=o(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=o(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:On(),requestsCache:On({serializable:!1}),hostsCache:_n({caches:[En({key:"".concat(Vn,"-").concat(e)}),On()]})},void 0))}(e,t);return r.addAlgoliaAgent("docsearch",Wn),!1===/docsearch.js \(.*\)/.test(r.transporter.algoliaAgent.value)&&r.addAlgoliaAgent("docsearch-react",Wn),n(r)}),[e,t,n])}var Qn=["footer","searchBox"];function Yn(e){var t=e.appId,n=e.apiKey,o=e.indexName,a=e.placeholder,i=void 0===a?"Search docs":a,l=e.searchParameters,s=e.maxResultsPerGroup,c=e.onClose,u=void 0===c?dn:c,f=e.transformItems,p=void 0===f?cn:f,m=e.hitComponent,h=void 0===m?Ut:m,v=e.resultsFooterComponent,b=void 0===v?function(){return null}:v,k=e.navigator,S=e.initialScrollY,x=void 0===S?0:S,E=e.transformSearchClient,_=void 0===E?cn:E,O=e.disableUserPersonalization,j=void 0!==O&&O,C=e.initialQuery,A=void 0===C?"":C,T=e.translations,P=void 0===T?{}:T,I=e.getMissingResultsUrl,R=e.insights,N=void 0!==R&&R,D=P.footer,L=P.searchBox,M=y(P,Qn),F=w(r.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),z=F[0],B=F[1],U=r.useRef(null),q=r.useRef(null),$=r.useRef(null),H=r.useRef(null),V=r.useRef(null),G=r.useRef(10),W=r.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,K=r.useRef(A||W).current,Q=Kn(t,n,_),Y=r.useRef(xn({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(o),limit:10})).current,Z=r.useRef(xn({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(o),limit:0===Y.getAll().length?7:4})).current,J=r.useCallback((function(e){if(!j){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===Y.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&Z.add(t)}}),[Y,Z,j]),X=r.useCallback((function(e){if(z.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};z.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[z.context.algoliaInsightsPlugin]),ee=r.useMemo((function(){return Mt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:K,context:{searchSuggestions:[]}},insights:N,navigator:k,onStateChange:function(e){B(e.state)},getSources:function(e){var r=e.query,a=e.state,i=e.setContext,c=e.setStatus;if(!r)return j?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),un(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return Z.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),un(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return Y.getAll()}}];var d=Boolean(N);return Q.search({requests:[g({query:r,indexName:o,attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(G.current),"hierarchy.lvl2:".concat(G.current),"hierarchy.lvl3:".concat(G.current),"hierarchy.lvl4:".concat(G.current),"hierarchy.lvl5:".concat(G.current),"hierarchy.lvl6:".concat(G.current),"content:".concat(G.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:d},l)]}).catch((function(e){throw"RetryError"===e.name&&c("error"),e})).then((function(e){var r=e.results[0],l=r.hits,c=r.nbHits,f=sn(l,(function(e){return mn(e)}),s);a.context.searchSuggestions.length0&&(re(),V.current&&V.current.focus())}),[K,re]),r.useEffect((function(){function e(){if(q.current){var e=.01*window.innerHeight;q.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),r.createElement("div",d({ref:U},ne({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===z.status&&"DocSearch-Container--Stalled","error"===z.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&u()}}),r.createElement("div",{className:"DocSearch-Modal",ref:q},r.createElement("header",{className:"DocSearch-SearchBar",ref:$},r.createElement(kn,d({},ee,{state:z,autoFocus:0===K.length,inputRef:V,isFromSelection:Boolean(K)&&K===W,translations:L,onClose:u}))),r.createElement("div",{className:"DocSearch-Dropdown",ref:H},r.createElement(bn,d({},ee,{indexName:o,state:z,hitComponent:h,resultsFooterComponent:b,disableUserPersonalization:j,recentSearches:Z,favoriteSearches:Y,inputRef:V,translations:M,getMissingResultsUrl:I,onItemClick:function(e,t){X(e),J(e),un(t)||u()}}))),r.createElement("footer",{className:"DocSearch-Footer"},r.createElement(Bt,{translations:D}))))}function Zn(e){var t=e.isOpen,n=e.onOpen,o=e.onClose,a=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){var r;if("Escape"===e.code&&t||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)return e.preventDefault(),void(t?o():document.body.classList.contains("DocSearch--active")||n());i&&i.current===document.activeElement&&a&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&a(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,o,a,i])}},8328:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),o=n.n(r),a=n(4054);const i={"01cb08ea":[()=>n.e(3747).then(n.bind(n,2264)),"@site/../docs/myzrok/custom-domains/index.mdx",2264],"07d0b302":[()=>n.e(7499).then(n.bind(n,6793)),"@site/../docs/concepts/http.md",6793],"0c66edb9":[()=>n.e(7216).then(n.bind(n,4291)),"@site/../docs/guides/permission-modes.md",4291],"11b43341":[()=>n.e(2256).then(n.t.bind(n,7674,19)),"@generated/docusaurus-plugin-content-docs/default/p/docs-7fc.json",7674],"14eb3368":[()=>Promise.all([n.e(1869),n.e(6969)]).then(n.bind(n,4136)),"@theme/DocCategoryGeneratedIndexPage",4136],17896441:[()=>Promise.all([n.e(1869),n.e(5394),n.e(8585),n.e(8401)]).then(n.bind(n,5587)),"@theme/DocItem",5587],"1a4e3797":[()=>Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,673)),"@theme/SearchPage",673],"1ba5bc99":[()=>Promise.all([n.e(1869),n.e(2759)]).then(n.bind(n,3865)),"@site/../docs/guides/install/macos.mdx",3865],20595907:[()=>n.e(8582).then(n.bind(n,7445)),"@site/../docs/guides/self-hosting/kubernetes.mdx",7445],"21880a4d":[()=>n.e(749).then(n.bind(n,7392)),"@site/../docs/guides/vpn/vpn.md",7392],"288b1075":[()=>n.e(3588).then(n.bind(n,3998)),"@site/../docs/guides/self-hosting/metrics-and-limits/configuring-metrics.md",3998],"2c440c24":[()=>n.e(3979).then(n.t.bind(n,1209,19)),"@generated/docusaurus-plugin-content-docs/default/p/docs-category-self-hosting-4be.json",1209],"2da89d45":[()=>Promise.all([n.e(1869),n.e(6332)]).then(n.bind(n,2452)),"@site/../docs/guides/docker-share/index.mdx",2452],"2e812224":[()=>n.e(8471).then(n.bind(n,8611)),"@site/../docs/guides/docker-share/docker_public_share_guide.md",8611],"339d500a":[()=>n.e(7752).then(n.bind(n,82)),"@site/../docs/concepts/tunnels.md",82],"36b94792":[()=>n.e(3921).then(n.bind(n,3160)),"@site/../docs/guides/drives.mdx",3160],"47881d5c":[()=>Promise.all([n.e(1869),n.e(5394),n.e(382),n.e(4927)]).then(n.bind(n,1574)),"@site/../docs/guides/install/linux.mdx",1574],"4cb7be2f":[()=>n.e(3574).then(n.t.bind(n,9264,19)),"@generated/docusaurus-plugin-content-docs/default/p/docs-category-metrics-and-limits-6f7.json",9264],"4f1777fd":[()=>n.e(277).then(n.bind(n,7513)),"@site/../docs/guides/self-hosting/self-service-invite.mdx",7513],"50ef9c44":[()=>n.e(429).then(n.bind(n,7928)),"@site/../docs/concepts/hosting.md",7928],"54fa7005":[()=>n.e(8675).then(n.bind(n,1806)),"@site/../docs/concepts/sharing-public.mdx",1806],"5cd0a723":[()=>n.e(4074).then(n.bind(n,2388)),"@site/../docs/guides/self-hosting/instance-configuration.mdx",2388],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"600b2345":[()=>n.e(9355).then(n.bind(n,3989)),"@site/../docs/guides/self-hosting/metrics-and-limits/configuring-limits.md",3989],"6272ba0e":[()=>n.e(7242).then(n.bind(n,2816)),"@site/../docs/concepts/sharing-reserved.md",2816],"6e881e32":[()=>n.e(3373).then(n.bind(n,9864)),"@site/../docs/guides/self-hosting/oauth/configuring-oauth.md",9864],"7452427d":[()=>n.e(9476).then(n.bind(n,4674)),"@site/../docs/guides/self-hosting/personalized-frontend.md",4674],"75b20590":[()=>n.e(9025).then(n.bind(n,6992)),"@site/../docs/concepts/opensource.md",6992],"7f5ec875":[()=>n.e(1939).then(n.bind(n,7433)),"@site/../docs/guides/self-hosting/organizations.md",7433],"8a10c423":[()=>n.e(3929).then(n.bind(n,7715)),"@site/../docs/guides/linux-user-share/index.mdx",7715],"9939c4f4":[()=>n.e(598).then(n.bind(n,4551)),"@site/../docs/guides/self-hosting/interstitial-page.md",4551],"9af26a4e":[()=>n.e(9631).then(n.t.bind(n,773,19)),"@generated/docusaurus-plugin-content-docs/default/p/docs-category-guides-95a.json",773],a7456010:[()=>n.e(1235).then(n.t.bind(n,8552,19)),"@generated/docusaurus-plugin-content-pages/default/__plugin.json",8552],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,4532)),"@theme/DocVersionRoot",4532],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,1377)),"@theme/DocRoot",1377],aad6478e:[()=>n.e(1769).then(n.bind(n,4889)),"@site/../docs/concepts/sharing-private.mdx",4889],aba21aa0:[()=>n.e(5742).then(n.t.bind(n,7093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",7093],b6569025:[()=>Promise.all([n.e(1869),n.e(714)]).then(n.bind(n,9579)),"@site/../docs/guides/install/index.mdx",9579],bbbe662c:[()=>n.e(1057).then(n.bind(n,942)),"@site/../docs/guides/docker-share/docker_private_share_guide.md",942],bc747cac:[()=>n.e(4909).then(n.bind(n,487)),"@site/../docs/concepts/index.md",487],c015c796:[()=>n.e(887).then(n.bind(n,2711)),"@site/../docs/concepts/files.md",2711],c141421f:[()=>n.e(957).then(n.t.bind(n,936,19)),"@generated/docusaurus-theme-search-algolia/default/__plugin.json",936],c304be44:[()=>Promise.all([n.e(1869),n.e(3786)]).then(n.bind(n,6143)),"@site/../docs/guides/install/windows.mdx",6143],c4f5d8e4:[()=>n.e(2634).then(n.bind(n,192)),"@site/src/pages/index.js",192],cda0d2e5:[()=>Promise.all([n.e(1869),n.e(5394),n.e(382),n.e(962),n.e(2757)]).then(n.bind(n,7557)),"@site/../docs/guides/frontdoor.mdx",7557],d768dc0f:[()=>n.e(4247).then(n.bind(n,1916)),"@site/../docs/guides/self-hosting/linux/index.mdx",1916],e1dfe4fe:[()=>n.e(3423).then(n.bind(n,8347)),"@site/../docs/guides/self-hosting/docker.mdx",8347],e2c4d679:[()=>n.e(9253).then(n.t.bind(n,9166,19)),"@generated/docusaurus-plugin-content-docs/default/p/docs-category-oauth-81c.json",9166],ef8afbfd:[()=>n.e(9905).then(n.bind(n,9530)),"@site/../docs/guides/self-hosting/linux/nginx.mdx",9530],f7af5a99:[()=>n.e(7599).then(n.t.bind(n,2144,19)),"@generated/docusaurus-plugin-content-docs/default/p/docs-category-myzrok-735.json",2144],f888b719:[()=>Promise.all([n.e(1869),n.e(4470)]).then(n.bind(n,2410)),"@site/../docs/getting-started.mdx",2410]};var l=n(4848);function s(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(6921),u=n(3102);function d(e,t){if("*"===e)return o()({loading:s,loader:()=>n.e(2237).then(n.bind(n,2237)),modules:["@theme/NotFound"],webpack:()=>[2237],render(e,t){const n=e.default;return(0,l.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,{...t})})}});const r=a[`${e}-${t}`],d={},f=[],p=[],m=(0,c.A)(r);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))})),o().Map({loading:s,loader:d,modules:f,webpack:()=>p,render(t,n){const o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let i=o;const l=n.split(".");l.slice(0,-1).forEach((e=>{i=i[e]})),i[l[l.length-1]]=a}));const a=o.__comp;delete o.__comp;const i=o.__context;delete o.__context;const s=o.__props;return delete o.__props,(0,l.jsx)(u.W,{value:i,children:(0,l.jsx)(a,{...o,...s,...n})})}})}const f=[{path:"/search/",component:d("/search/","21e"),exact:!0},{path:"/docs/",component:d("/docs/","0ca"),routes:[{path:"/docs/",component:d("/docs/","804"),routes:[{path:"/docs/",component:d("/docs/","b90"),routes:[{path:"/docs/category/guides/",component:d("/docs/category/guides/","c07"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/category/metrics-and-limits/",component:d("/docs/category/metrics-and-limits/","9f2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/category/myzrok/",component:d("/docs/category/myzrok/","784"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/category/oauth/",component:d("/docs/category/oauth/","b50"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/category/self-hosting/",component:d("/docs/category/self-hosting/","cad"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/concepts/",component:d("/docs/concepts/","76a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/concepts/files/",component:d("/docs/concepts/files/","331"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/concepts/hosting/",component:d("/docs/concepts/hosting/","fea"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/concepts/http/",component:d("/docs/concepts/http/","d68"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/concepts/opensource/",component:d("/docs/concepts/opensource/","94c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/concepts/sharing-private/",component:d("/docs/concepts/sharing-private/","7b0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/concepts/sharing-public/",component:d("/docs/concepts/sharing-public/","c3b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/concepts/sharing-reserved/",component:d("/docs/concepts/sharing-reserved/","5d7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/concepts/tunnels/",component:d("/docs/concepts/tunnels/","f73"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/getting-started/",component:d("/docs/getting-started/","fdf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/docker-share/",component:d("/docs/guides/docker-share/","7d3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/docker-share/docker_private_share_guide/",component:d("/docs/guides/docker-share/docker_private_share_guide/","927"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/docker-share/docker_public_share_guide/",component:d("/docs/guides/docker-share/docker_public_share_guide/","ccf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/drives/",component:d("/docs/guides/drives/","8a1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/frontdoor/",component:d("/docs/guides/frontdoor/","e30"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/install/",component:d("/docs/guides/install/","aa4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/install/linux/",component:d("/docs/guides/install/linux/","0c6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/install/macos/",component:d("/docs/guides/install/macos/","532"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/install/windows/",component:d("/docs/guides/install/windows/","ad4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/linux-user-share/",component:d("/docs/guides/linux-user-share/","a93"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/permission-modes/",component:d("/docs/guides/permission-modes/","d45"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/docker/",component:d("/docs/guides/self-hosting/docker/","5a7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/instance-configuration/",component:d("/docs/guides/self-hosting/instance-configuration/","297"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/interstitial-page/",component:d("/docs/guides/self-hosting/interstitial-page/","90e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/kubernetes/",component:d("/docs/guides/self-hosting/kubernetes/","37d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/linux/",component:d("/docs/guides/self-hosting/linux/","d78"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/linux/nginx/",component:d("/docs/guides/self-hosting/linux/nginx/","b26"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/metrics-and-limits/configuring-limits/",component:d("/docs/guides/self-hosting/metrics-and-limits/configuring-limits/","8b7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics/",component:d("/docs/guides/self-hosting/metrics-and-limits/configuring-metrics/","0a8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/oauth/configuring-oauth/",component:d("/docs/guides/self-hosting/oauth/configuring-oauth/","b5f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/organizations/",component:d("/docs/guides/self-hosting/organizations/","369"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/personalized-frontend/",component:d("/docs/guides/self-hosting/personalized-frontend/","567"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/self-hosting/self-service-invite/",component:d("/docs/guides/self-hosting/self-service-invite/","532"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/guides/vpn/",component:d("/docs/guides/vpn/","13f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/myzrok/custom-domains/",component:d("/docs/myzrok/custom-domains/","c1c"),exact:!0,sidebar:"tutorialSidebar"}]}]}]},{path:"/",component:d("/","2e1"),exact:!0},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>i});var r=n(6540),o=n(4848);const a=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,o.jsx)(a.Provider,{value:n,children:t})}},8536:(e,t,n)=>{"use strict";var r=n(6540),o=n(5338),a=n(545),i=n(4625),l=n(4784),s=n(8193);const c=[n(119),n(6134),n(6294),n(1043)];var u=n(8328),d=n(6347),f=n(2831),p=n(4848);function m(e){let{children:t}=e;return(0,p.jsx)(p.Fragment,{children:t})}var h=n(5260),g=n(4586),y=n(6025),v=n(6342),b=n(9024),w=n(2131),k=n(4090),S=n(2967),x=n(440),E=n(1463);function _(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,g.A)(),r=(0,w.o)(),o=n[e].htmlLang,a=e=>e.replace("-","_");return(0,p.jsxs)(h.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,p.jsx)("meta",{property:"og:locale",content:a(o)}),Object.values(n).filter((e=>o!==e.htmlLang)).map((e=>(0,p.jsx)("meta",{property:"og:locale:alternate",content:a(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function O(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,g.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,g.A)(),{pathname:r}=(0,d.zy)();return e+(0,x.Ks)((0,y.Ay)(r),{trailingSlash:n,baseUrl:t})}(),o=t?`${n}${t}`:r;return(0,p.jsxs)(h.A,{children:[(0,p.jsx)("meta",{property:"og:url",content:o}),(0,p.jsx)("link",{rel:"canonical",href:o})]})}function j(){const{i18n:{currentLocale:e}}=(0,g.A)(),{metadata:t,image:n}=(0,v.p)();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(h.A,{children:[(0,p.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,p.jsx)("body",{className:k.w})]}),n&&(0,p.jsx)(b.be,{image:n}),(0,p.jsx)(O,{}),(0,p.jsx)(_,{}),(0,p.jsx)(E.A,{tag:S.C,locale:e}),(0,p.jsx)(h.A,{children:t.map(((e,t)=>(0,p.jsx)("meta",{...e},t)))})]})}const C=new Map;var A=n(6125),T=n(6988),P=n(205);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>o.forEach((e=>e?.()))}const R=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,P.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,o=t.hash===n.hash,a=t.search===n.search;if(r&&o&&!a)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),I("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function N(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,f.u)(u.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class D extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=s.A.canUseDOM?I("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=I("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),N(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,p.jsx)(R,{previousLocation:this.previousLocation,location:t,children:(0,p.jsx)(d.qh,{location:t,render:()=>e})})}}const L=D,M="__docusaurus-base-url-issue-banner-suggestion-container";function F(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '__docusaurus-base-url-issue-banner-container';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{let{route:t}=e;return!0===t.exact})))return C.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return C.set(e.pathname,t),{...e,pathname:t}}((0,d.zy)());return(0,p.jsx)(L,{location:e,children:V})}function W(){return(0,p.jsx)(q.A,{children:(0,p.jsx)(T.l,{children:(0,p.jsxs)(A.x,{children:[(0,p.jsxs)(m,{children:[(0,p.jsx)(U,{}),(0,p.jsx)(j,{}),(0,p.jsx)(B,{}),(0,p.jsx)(G,{})]}),(0,p.jsx)(H,{})]})})})}var K=n(4054);const Q=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;o?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Y=n(6921);const Z=new Set,J=new Set,X=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ee={prefetch:e=>{if(!(e=>!X()&&!J.has(e)&&!Z.has(e))(e))return!1;Z.add(e);const t=(0,f.u)(u.A,e).flatMap((e=>{return t=e.route.path,Object.entries(K).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Y.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Q(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!X()&&!J.has(e))(e)&&(J.add(e),N(e))},te=Object.freeze(ee);function ne(e){let{children:t}=e;return"hash"===l.default.future.experimental_router?(0,p.jsx)(i.I9,{children:t}):(0,p.jsx)(i.Kd,{children:t})}const re=Boolean(!0);if(s.A.canUseDOM){window.docusaurus=te;const e=document.getElementById("__docusaurus"),t=(0,p.jsx)(a.vd,{children:(0,p.jsx)(ne,{children:(0,p.jsx)(W,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},i=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(re)window.docusaurusRoot=o.hydrateRoot(e,t,{onRecoverableError:n});else{const r=o.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};N(window.location.pathname).then((()=>{(0,r.startTransition)(i)}))}},6988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>f});var r=n(6540),o=n(4784);const a=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"getting-started","docs":[{"id":"concepts/files","path":"/docs/concepts/files","sidebar":"tutorialSidebar"},{"id":"concepts/hosting","path":"/docs/concepts/hosting","sidebar":"tutorialSidebar"},{"id":"concepts/http","path":"/docs/concepts/http","sidebar":"tutorialSidebar"},{"id":"concepts/index","path":"/docs/concepts/","sidebar":"tutorialSidebar"},{"id":"concepts/opensource","path":"/docs/concepts/opensource","sidebar":"tutorialSidebar"},{"id":"concepts/sharing-private","path":"/docs/concepts/sharing-private","sidebar":"tutorialSidebar"},{"id":"concepts/sharing-public","path":"/docs/concepts/sharing-public","sidebar":"tutorialSidebar"},{"id":"concepts/sharing-reserved","path":"/docs/concepts/sharing-reserved","sidebar":"tutorialSidebar"},{"id":"concepts/tunnels","path":"/docs/concepts/tunnels","sidebar":"tutorialSidebar"},{"id":"getting-started","path":"/docs/getting-started","sidebar":"tutorialSidebar"},{"id":"guides/docker-share/docker_private_share_guide","path":"/docs/guides/docker-share/docker_private_share_guide","sidebar":"tutorialSidebar"},{"id":"guides/docker-share/docker_public_share_guide","path":"/docs/guides/docker-share/docker_public_share_guide","sidebar":"tutorialSidebar"},{"id":"guides/docker-share/index","path":"/docs/guides/docker-share/","sidebar":"tutorialSidebar"},{"id":"guides/drives","path":"/docs/guides/drives","sidebar":"tutorialSidebar"},{"id":"guides/frontdoor","path":"/docs/guides/frontdoor","sidebar":"tutorialSidebar"},{"id":"guides/install/index","path":"/docs/guides/install/","sidebar":"tutorialSidebar"},{"id":"guides/install/linux","path":"/docs/guides/install/linux","sidebar":"tutorialSidebar"},{"id":"guides/install/macos","path":"/docs/guides/install/macos","sidebar":"tutorialSidebar"},{"id":"guides/install/windows","path":"/docs/guides/install/windows","sidebar":"tutorialSidebar"},{"id":"guides/linux-user-share/index","path":"/docs/guides/linux-user-share/","sidebar":"tutorialSidebar"},{"id":"guides/permission-modes","path":"/docs/guides/permission-modes","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/docker","path":"/docs/guides/self-hosting/docker","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/instance-configuration","path":"/docs/guides/self-hosting/instance-configuration","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/interstitial-page","path":"/docs/guides/self-hosting/interstitial-page","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/kubernetes","path":"/docs/guides/self-hosting/kubernetes","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/linux/index","path":"/docs/guides/self-hosting/linux/","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/linux/nginx","path":"/docs/guides/self-hosting/linux/nginx","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/metrics-and-limits/configuring-limits","path":"/docs/guides/self-hosting/metrics-and-limits/configuring-limits","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/metrics-and-limits/configuring-metrics","path":"/docs/guides/self-hosting/metrics-and-limits/configuring-metrics","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/oauth/configuring-oauth","path":"/docs/guides/self-hosting/oauth/configuring-oauth","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/organizations","path":"/docs/guides/self-hosting/organizations","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/personalized-frontend","path":"/docs/guides/self-hosting/personalized-frontend","sidebar":"tutorialSidebar"},{"id":"guides/self-hosting/self-service-invite","path":"/docs/guides/self-hosting/self-service-invite","sidebar":"tutorialSidebar"},{"id":"guides/vpn/vpn","path":"/docs/guides/vpn/","sidebar":"tutorialSidebar"},{"id":"myzrok/custom-domains/index","path":"/docs/myzrok/custom-domains/","sidebar":"tutorialSidebar"},{"id":"/category/guides","path":"/docs/category/guides","sidebar":"tutorialSidebar"},{"id":"/category/self-hosting","path":"/docs/category/self-hosting","sidebar":"tutorialSidebar"},{"id":"/category/metrics-and-limits","path":"/docs/category/metrics-and-limits","sidebar":"tutorialSidebar"},{"id":"/category/oauth","path":"/docs/category/oauth","sidebar":"tutorialSidebar"},{"id":"/category/myzrok","path":"/docs/category/myzrok","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/docs/getting-started","label":"Getting Started"}}}}],"breadcrumbs":true}},"docusaurus-plugin-google-tag-manager":{"default":{"containerId":"GTM-MDFLZPK8","id":"default"}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.6.0","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.6.0"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.6.0"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.6.0"},"docusaurus-plugin-google-tag-manager":{"type":"package","name":"@docusaurus/plugin-google-tag-manager","version":"3.6.0"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.6.0"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.6.0"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.6.0"},"docusaurus-plugin-client-redirects":{"type":"package","name":"@docusaurus/plugin-client-redirects","version":"3.6.0"},"custom-webpack-plugin":{"type":"local"}}}');var c=n(4848);const u={siteConfig:o.default,siteMetadata:s,globalData:a,i18n:i,codeTranslations:l},d=r.createContext(u);function f(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},7489:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(6540),o=n(8193),a=n(5260),i=n(440),l=n(1957),s=n(3102),c=n(4848);function u(e){let{error:t,tryAgain:n}=e;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(d,{error:t})]})}function d(e){let{error:t}=e;const n=(0,i.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function f(e){let{children:t}=e;return(0,c.jsx)(s.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function p(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)(f,{children:(0,c.jsxs)(h,{fallback:()=>(0,c.jsx)(u,{error:t,tryAgain:n}),children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(l.A,{children:(0,c.jsx)(u,{error:t,tryAgain:n})})]})})}const m=e=>(0,c.jsx)(p,{...e});class h extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??m)(e)}return e??null}}},8193:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(545),o=n(4848);function a(e){return(0,o.jsx)(r.mg,{...e})}},8774:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(6540),o=n(4625),a=n(440),i=n(4586),l=n(6654),s=n(8193),c=n(3427),u=n(6025),d=n(4848);function f(e,t){let{isNavLink:n,to:f,href:p,activeClassName:m,isActive:h,"data-noBrokenLinkCheck":g,autoAddBaseUrl:y=!0,...v}=e;const{siteConfig:b}=(0,i.A)(),{trailingSlash:w,baseUrl:k}=b,S=b.future.experimental_router,{withBaseUrl:x}=(0,u.hH)(),E=(0,c.A)(),_=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>_.current));const O=f||p;const j=(0,l.A)(O),C=O?.replace("pathname://","");let A=void 0!==C?(T=C,y&&(e=>e.startsWith("/"))(T)?x(T):T):void 0;var T;"hash"===S&&A?.startsWith("./")&&(A=A?.slice(1)),A&&j&&(A=(0,a.Ks)(A,{trailingSlash:w,baseUrl:k}));const P=(0,r.useRef)(!1),I=n?o.k2:o.N_,R=s.A.canUseIntersectionObserver,N=(0,r.useRef)(),D=()=>{P.current||null==A||(window.docusaurus.preload(A),P.current=!0)};(0,r.useEffect)((()=>(!R&&j&&s.A.canUseDOM&&null!=A&&window.docusaurus.prefetch(A),()=>{R&&N.current&&N.current.disconnect()})),[N,A,R,j]);const L=A?.startsWith("#")??!1,M=!v.target||"_self"===v.target,F=!A||!j||!M||L&&"hash"!==S;g||!L&&F||E.collectLink(A),v.id&&E.collectAnchor(v.id);const z={};return F?(0,d.jsx)("a",{ref:_,href:A,...O&&!j&&{target:"_blank",rel:"noopener noreferrer"},...v,...z}):(0,d.jsx)(I,{...v,onMouseEnter:D,onTouchStart:D,innerRef:e=>{_.current=e,R&&e&&j&&(N.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(N.current.unobserve(e),N.current.disconnect(),null!=A&&window.docusaurus.prefetch(A))}))})),N.current.observe(e))},to:A,...n&&{isActive:h,activeClassName:m},...z})}const p=r.forwardRef(f)},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,T:()=>s});var r=n(6540),o=n(4848);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(2654);function l(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function s(e,t){let{message:n,id:r}=e;return a(l({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const i=l({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(i,r)})}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},6654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},6025:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,hH:()=>i});var r=n(6540),o=n(4586),a=n(6654);function i(){const{siteConfig:e}=(0,o.A)(),{baseUrl:t,url:n}=e,i=e.future.experimental_router,l=(0,r.useCallback)(((e,r)=>function(e){let{siteUrl:t,baseUrl:n,url:r,options:{forcePrependBaseUrl:o=!1,absolute:i=!1}={},router:l}=e;if(!r||r.startsWith("#")||(0,a.z)(r))return r;if("hash"===l)return r.startsWith("/")?`.${r}`:`./${r}`;if(o)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;const s=r.startsWith(n)?r:n+r.replace(/^\//,"");return i?t+s:s}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})),[n,t,i]);return{withBaseUrl:l}}function l(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},3427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);n(4848);const o=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),a=()=>(0,r.useContext)(o);function i(){return a()}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(6988);function a(){return(0,r.useContext)(o.o)}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(6125);function a(){return(0,r.useContext)(o.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const o=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect},6921:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function o(e){const t={};return function e(n,o){Object.entries(n).forEach((n=>{let[a,i]=n;const l=o?`${o}.${a}`:a;r(i)?e(i,l):t[l]=i}))}(e),t}},3102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>a});var r=n(6540),o=n(4848);const a=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(a),l=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,o.jsx)(a.Provider,{value:l,children:t})}},3886:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>g,XK:()=>b,g1:()=>v});var r=n(6540),o=n(4070),a=n(7065),i=n(6342),l=n(679),s=n(9532),c=n(4848);const u=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,l.Wf)(u(e),{persistence:t}).set(n)},read:(e,t)=>(0,l.Wf)(u(e),{persistence:t}).get(),clear:(e,t)=>{(0,l.Wf)(u(e),{persistence:t}).del()}},f=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const p=r.createContext(null);function m(){const e=(0,o.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,l]=(0,r.useState)((()=>f(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function o(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,o(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=m();return(0,c.jsx)(p.Provider,{value:n,children:t})}function g(e){let{children:t}=e;return(0,c.jsx)(h,{children:t})}function y(){const e=(0,r.useContext)(p);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=a.W);const t=(0,o.ht)(e),[n,i]=y(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function b(){const e=(0,o.Gy)(),[t]=y();function n(n){const r=e[n],{preferredVersionName:o}=t[n];return r.versions.find((e=>e.name===o))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},2565:(e,t,n)=>{"use strict";n.d(t,{k:()=>a,v:()=>i});var r=n(4070),o=n(3886);function a(e,t){return`docs-${e}-${t}`}function i(){const e=(0,r.Gy)(),t=(0,r.gk)(),n=(0,o.XK)();return[...Object.keys(e).map((function(r){const o=t?.activePlugin.pluginId===r?t.activeVersion:void 0,i=n[r],l=e[r].versions.find((e=>e.isLast));return a(r,(o??i??l).name)}))]}},609:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,t:()=>c});var r=n(6540),o=n(9532),a=n(4848);const i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){let{children:t,name:n,items:o}=e;const i=(0,r.useMemo)((()=>n&&o?{name:n,items:o}:null),[n,o]);return(0,a.jsx)(l.Provider,{value:i,children:t})}function c(){const e=(0,r.useContext)(l);if(e===i)throw new o.dV("DocsSidebarProvider");return e}},6972:(e,t,n)=>{"use strict";n.d(t,{$S:()=>m,B5:()=>_,Nr:()=>p,OF:()=>k,QB:()=>E,Vd:()=>S,Y:()=>b,cC:()=>f,d1:()=>O,fW:()=>x,w8:()=>y});var r=n(6540),o=n(6347),a=n(2831),i=n(4070),l=n(9169),s=n(1682),c=n(3886),u=n(3025),d=n(609);function f(e){const t=(0,u.r)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function p(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=p(t);if(e)return e}}(e):void 0:e.href}function m(){const{pathname:e}=(0,o.zy)(),t=(0,d.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const h=(e,t)=>void 0!==e&&(0,l.ys)(e,t),g=(e,t)=>e.some((e=>y(e,t)));function y(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||g(e.items,t))}function v(e,t){switch(e.type){case"category":return y(e,t)||e.items.some((e=>v(e,t)));case"link":return!e.unlisted||y(e,t);default:return!0}}function b(e,t){return(0,r.useMemo)((()=>e.filter((e=>v(e,t)))),[e,t])}function w(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const o=[];return function e(t){for(const a of t)if("category"===a.type&&((0,l.ys)(a.href,n)||e(a.items))||"link"===a.type&&(0,l.ys)(a.href,n)){return r&&"category"!==a.type||o.unshift(a),!0}return!1}(t),o}function k(){const e=(0,d.t)(),{pathname:t}=(0,o.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?w({sidebarItems:e.items,pathname:t}):null}function S(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,c.g1)(e),o=(0,i.r7)(e);return(0,r.useMemo)((()=>(0,s.sb)([t,n,o].filter(Boolean))),[t,n,o])}function x(e,t){const n=S(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function E(e,t){const n=S(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,s.sb)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function _(e){let{route:t}=e;const n=(0,o.zy)(),r=(0,u.r)(),i=t.routes,l=i.find((e=>(0,o.B6)(n.pathname,e)));if(!l)return null;const s=l.sidebar,c=s?r.docsSidebars[s]:void 0;return{docElement:(0,a.v)(i),sidebarName:s,sidebarItems:c}}function O(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!p(e)))}},3025:(e,t,n)=>{"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(6540),o=n(9532),a=n(4848);const i=r.createContext(null);function l(e){let{children:t,version:n}=e;return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(null===e)throw new o.dV("DocsVersionProvider");return e}},4070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>y,vT:()=>p,gk:()=>m,Gy:()=>d,HW:()=>v,ht:()=>f,r7:()=>g,jh:()=>h});var r=n(6347),o=n(4586),a=n(7065);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,o.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const l=e=>e.versions.find((e=>e.isLast));function s(e,t){return[...e.versions].sort(((e,t)=>e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0)).find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}function c(e,t){const n=s(e,t),o=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}}const u={},d=()=>i("docusaurus-plugin-content-docs")??u,f=e=>{try{return function(e,t,n){void 0===t&&(t=a.W),void 0===n&&(n={});const r=i(e),o=r?.[t];if(!o&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return o}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":` (pluginId=${e}`),{cause:t})}};function p(e){void 0===e&&(e={});const t=d(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const o=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return a}(t,n,e)}function m(e){void 0===e&&(e={});const t=p(e),{pathname:n}=(0,r.zy)();if(!t)return;return{activePlugin:t,activeVersion:s(t.pluginData,n)}}function h(e){return f(e).versions}function g(e){const t=f(e);return l(t)}function y(e){const t=f(e),{pathname:n}=(0,r.zy)();return c(t,n)}function v(e){const t=f(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=l(e);return{latestDocSuggestion:c(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(5947),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{o().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},6134:(e,t,n)=>{"use strict";var r=n(4876),o=n(4784);!function(e){const{themeConfig:{prism:t}}=o.default,{additionalLanguages:r}=t,a=globalThis.Prism;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(9700),n(8692)(`./prism-${e}`)})),delete globalThis.Prism,void 0!==a&&(globalThis.Prism=e)}(r.My)},1107:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(6540);var r=n(8215),o=n(1312),a=n(6342),i=n(8774),l=n(3427);const s={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=n(4848);function u(e){let{as:t,id:n,...u}=e;const d=(0,l.A)(),{navbar:{hideOnScroll:f}}=(0,a.p)();if("h1"===t||!n)return(0,c.jsx)(t,{...u,id:void 0});d.collectAnchor(n);const p=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:n});return(0,c.jsxs)(t,{...u,className:(0,r.A)("anchor",f?s.anchorWithHideOnScrollNavbar:s.anchorWithStickyNavbar,u.className),id:n,children:[u.children,(0,c.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":p,title:p,children:"\u200b"})]})}},3186:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=n(4848);function a(e){let{width:t=13.5,height:n=13.5}=e;return(0,o.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},1957:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ot});var r=n(6540),o=n(8215),a=n(7489),i=n(9024),l=n(6347),s=n(1312),c=n(5062),u=n(4848);const d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){const e=(0,r.useRef)(null),{action:t}=(0,l.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&f(t)}),[]);return(0,c.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}const m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){const t=e.children??m,{containerRef:n,onClick:r}=p();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var g=n(7559),y=n(4090);const v={skipToContent:"skipToContent_fXgn"};function b(){return(0,u.jsx)(h,{className:v.skipToContent})}var w=n(6342),k=n(5041);function S(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:o=1.2,className:a,...i}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,u.jsx)("g",{stroke:r,strokeWidth:o,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const x={closeButton:"closeButton_CVFx"};function E(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.A)("clean-btn close",x.closeButton,e.className),children:(0,u.jsx)(S,{width:14,height:14,strokeWidth:3.1})})}const _={content:"content_knG7"};function O(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,o.A)(_.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const j={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function C(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,k.M)();if(!t)return null;const{backgroundColor:r,textColor:o,isCloseable:a}=e;return(0,u.jsxs)("div",{className:j.announcementBar,style:{backgroundColor:r,color:o},role:"banner",children:[a&&(0,u.jsx)("div",{className:j.announcementBarPlaceholder}),(0,u.jsx)(O,{className:j.announcementBarContent}),a&&(0,u.jsx)(E,{onClick:n,className:j.announcementBarClose})]})}var A=n(2069),T=n(3104);var P=n(9532),I=n(5600);const R=r.createContext(null);function N(e){let{children:t}=e;const n=function(){const e=(0,A.M)(),t=(0,I.YL)(),[n,o]=(0,r.useState)(!1),a=null!==t.component,i=(0,P.ZC)(a);return(0,r.useEffect)((()=>{a&&!i&&o(!0)}),[a,i]),(0,r.useEffect)((()=>{a?e.shown||o(!0):o(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[n,o]),[n])}();return(0,u.jsx)(R.Provider,{value:n,children:t})}function D(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function L(){const e=(0,r.useContext)(R);if(!e)throw new P.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,o=(0,r.useCallback)((()=>n(!1)),[n]),a=(0,I.YL)();return(0,r.useMemo)((()=>({shown:t,hide:o,content:D(a)})),[o,a,t])}function M(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:a}=L();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var F=n(5293),z=n(2303);function B(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function U(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const q={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function $(e){let{className:t,buttonClassName:n,value:r,onChange:a}=e;const i=(0,z.A)(),l=(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,o.A)(q.toggle,t),children:(0,u.jsxs)("button",{className:(0,o.A)("clean-btn",q.toggleButton,!i&&q.toggleButtonDisabled,n),type:"button",onClick:()=>a("dark"===r?"light":"dark"),disabled:!i,title:l,"aria-label":l,"aria-live":"polite","aria-pressed":"dark"===r?"true":"false",children:[(0,u.jsx)(B,{className:(0,o.A)(q.toggleIcon,q.lightToggleIcon)}),(0,u.jsx)(U,{className:(0,o.A)(q.toggleIcon,q.darkToggleIcon)})]})})}const H=r.memo($),V={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:o,setColorMode:a}=(0,F.G)();return r?null:(0,u.jsx)(H,{className:t,buttonClassName:"dark"===n?V.darkNavbarColorModeToggle:void 0,value:o,onChange:a})}var W=n(3465);function K(){return(0,u.jsx)(W.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Q(){const e=(0,A.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(S,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(K,{}),(0,u.jsx)(G,{className:"margin-right--md"}),(0,u.jsx)(Q,{})]})}var Z=n(8774),J=n(6025),X=n(6654),ee=n(1252),te=n(3186);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:o,label:a,html:i,isDropdownLink:l,prependBaseUrlToHref:s,...c}=e;const d=(0,J.Ay)(r),f=(0,J.Ay)(t),p=(0,J.Ay)(o,{forcePrependBaseUrl:!0}),m=a&&o&&!(0,X.A)(o),h=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[a,m&&(0,u.jsx)(te.A,{...l&&{width:12,height:12}})]})};return o?(0,u.jsx)(Z.A,{href:s?p:o,...c,...h}):(0,u.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?(0,ee.G)(n,t.pathname):t.pathname.startsWith(f)},...c,...h})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const a=(0,u.jsx)(ne,{className:(0,o.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:a}):a}function oe(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ne,{className:(0,o.A)("menu__link",t),...r})})}function ae(e){let{mobile:t=!1,position:n,...r}=e;const o=t?oe:re;return(0,u.jsx)(o,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(1422),le=n(9169),se=n(4586);const ce="dropdownNavbarItemMobile_S0Fm";function ue(e,t){return e.some((e=>function(e,t){return!!(0,le.ys)(e.to,t)||!!(0,ee.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:a,onClick:i,...l}=e;const s=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[s]),(0,u.jsxs)("div",{ref:s,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(ne,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:l.to?void 0:"#",className:(0,o.A)("navbar__link",a),...l,onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:l.children??l.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Fe,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function fe(e){let{items:t,className:n,position:a,onClick:i,...s}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,se.A)(),{pathname:t}=(0,l.zy)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:f,toggleCollapsed:p,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[c,d,m]),(0,u.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":f}),children:[(0,u.jsx)(ne,{role:"button",className:(0,o.A)(ce,"menu__link menu__link--sublist menu__link--sublist-caret",n),...s,onClick:e=>{e.preventDefault(),p()},children:s.children??s.label}),(0,u.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:f,children:t.map(((e,t)=>(0,r.createElement)(Fe,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function pe(e){let{mobile:t=!1,...n}=e;const r=t?fe:de;return(0,u.jsx)(r,{...n})}var me=n(2131);function he(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const ge="iconLanguage_nlXk";var ye=n(961),ve=n(3219),be=n(5260),we=n(4255),ke=n(1062),Se=n(2967),xe=n(2565);function Ee(){return[`language:${(0,se.A)().i18n.currentLocale}`,function(){const e=(0,xe.v)();return[Se.C,...e]}().map((e=>`docusaurus_tag:${e}`))]}const _e={button:{buttonText:(0,s.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,s.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,s.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,s.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,s.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,s.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,s.T)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,s.T)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,s.T)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,s.T)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,s.T)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,s.T)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,s.T)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,s.T)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,s.T)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,s.T)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,s.T)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,s.T)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,s.T)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,s.T)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,s.T)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,s.T)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,s.T)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,s.T)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,s.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,s.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,s.T)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};let Oe=null;function je(e){let{hit:t,children:n}=e;return(0,u.jsx)(Z.A,{to:t.url,children:n})}function Ce(e){let{state:t,onClose:n}=e;const r=(0,we.w)();return(0,u.jsx)(Z.A,{to:r(t.query),onClick:n,children:(0,u.jsx)(s.A,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits},children:"See all {count} results"})})}function Ae(e){let{contextualSearch:t,externalUrlRegex:o,...a}=e;const{siteMetadata:i}=(0,se.A)(),s=(0,ke.C)(),c=Ee(),d=a.searchParameters?.facetFilters??[],f=t?function(e,t){const n=e=>"string"==typeof e?[e]:e;return[...n(e),...n(t)]}(c,d):d,p={...a.searchParameters,facetFilters:f},m=(0,l.W6)(),h=(0,r.useRef)(null),g=(0,r.useRef)(null),[y,v]=(0,r.useState)(!1),[b,w]=(0,r.useState)(void 0),k=(0,r.useCallback)((()=>Oe?Promise.resolve():Promise.all([n.e(8158).then(n.bind(n,8158)),Promise.all([n.e(1869),n.e(8913)]).then(n.bind(n,8913)),Promise.all([n.e(1869),n.e(416)]).then(n.bind(n,416))]).then((e=>{let[{DocSearchModal:t}]=e;Oe=t}))),[]),S=(0,r.useCallback)((()=>{if(!h.current){const e=document.createElement("div");h.current=e,document.body.insertBefore(e,document.body.firstChild)}}),[]),x=(0,r.useCallback)((()=>{S(),k().then((()=>v(!0)))}),[k,S]),E=(0,r.useCallback)((()=>{v(!1),g.current?.focus()}),[]),_=(0,r.useCallback)((e=>{"f"===e.key&&(e.metaKey||e.ctrlKey)||(e.preventDefault(),w(e.key),x())}),[x]),O=(0,r.useRef)({navigate(e){let{itemUrl:t}=e;(0,ee.G)(o,t)?window.location.href=t:m.push(t)}}).current,j=(0,r.useRef)((e=>a.transformItems?a.transformItems(e):e.map((e=>({...e,url:s(e.url)}))))).current,C=(0,r.useMemo)((()=>e=>(0,u.jsx)(Ce,{...e,onClose:E})),[E]),A=(0,r.useCallback)((e=>(e.addAlgoliaAgent("docusaurus",i.docusaurusVersion),e)),[i.docusaurusVersion]);return(0,ve.E8)({isOpen:y,onOpen:x,onClose:E,onInput:_,searchButtonRef:g}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(be.A,{children:(0,u.jsx)("link",{rel:"preconnect",href:`https://${a.appId}-dsn.algolia.net`,crossOrigin:"anonymous"})}),(0,u.jsx)(ve.Bc,{onTouchStart:k,onFocus:k,onMouseOver:k,onClick:x,ref:g,translations:_e.button}),y&&Oe&&h.current&&(0,ye.createPortal)((0,u.jsx)(Oe,{onClose:E,initialScrollY:window.scrollY,initialQuery:b,navigator:O,transformItems:j,hitComponent:je,transformSearchClient:A,...a.searchPagePath&&{resultsFooterComponent:C},...a,searchParameters:p,placeholder:_e.placeholder,translations:_e.modal}),h.current)]})}function Te(){const{siteConfig:e}=(0,se.A)();return(0,u.jsx)(Ae,{...e.themeConfig.algolia})}const Pe={navbarSearchContainer:"navbarSearchContainer_Bca1"};function Ie(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,o.A)(n,Pe.navbarSearchContainer),children:t})}var Re=n(4070),Ne=n(6972);var De=n(3886);function Le(e,t){return t.alternateDocVersions[e.name]??function(e){return e.docs.find((t=>t.id===e.mainDocId))}(e)}const Me={default:ae,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:o="",...a}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,se.A)(),f=(0,me.o)(),{search:p,hash:m}=(0,l.zy)(),h=[...n,...c.map((e=>{const n=`${`pathname://${f.createUrl({locale:e,fullyQualified:!1})}`}${p}${m}${o}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],g=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,u.jsx)(pe,{...a,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(he,{className:ge}),g]}),items:h})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(Ie,{className:n,children:(0,u.jsx)(Te,{})})},dropdown:pe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:a=!1}=e;const i=a?"li":"div";return(0,u.jsx)(i,{className:(0,o.A)({navbar__item:!r&&!a,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,Re.zK)(r),i=(0,Ne.QB)(t,r),l=a?.path===i?.path;return null===i||i.unlisted&&!l?null:(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>l||!!a?.sidebar&&a.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,Re.zK)(r),i=(0,Ne.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>a?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...o}=e;const a=(0,Ne.Vd)(r)[0],i=t??a.label,l=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(a).path;return(0,u.jsx)(ae,{...o,label:i,to:l})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:o,dropdownItemsAfter:a,...i}=e;const{search:c,hash:d}=(0,l.zy)(),f=(0,Re.zK)(n),p=(0,Re.jh)(n),{savePreferredVersionName:m}=(0,De.g1)(n),h=[...o,...p.map((function(e){const t=Le(e,f);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===f.activeVersion,onClick:()=>m(e.name)}})),...a],g=(0,Ne.Vd)(n)[0],y=t&&h.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,v=t&&h.length>1?void 0:Le(g,f).path;return h.length<=1?(0,u.jsx)(ae,{...i,mobile:t,label:y,to:v,isActive:r?()=>!1:void 0}):(0,u.jsx)(pe,{...i,mobile:t,label:y,to:v,items:h,isActive:r?()=>!1:void 0})}};function Fe(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=Me[r];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(o,{...n})}function ze(){const e=(0,A.M)(),t=(0,w.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Fe,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Be(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Ue(){const e=0===(0,w.p)().navbar.items.length,t=L();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(Be,{onClick:()=>t.hide()}),t.content]})}function qe(){const e=(0,A.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(M,{header:(0,u.jsx)(Y,{}),primaryMenu:(0,u.jsx)(ze,{}),secondaryMenu:(0,u.jsx)(Ue,{})}):null}const $e={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function He(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,o.A)("navbar-sidebar__backdrop",e.className)})}function Ve(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:a}}=(0,w.p)(),i=(0,A.M)(),{navbarRef:l,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,T.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=l?n(!1):i+c{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:l,"aria-label":(0,s.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.A)("navbar","navbar--fixed-top",n&&[$e.navbarHideable,!d&&$e.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(He,{onClick:i.toggle}),(0,u.jsx)(qe,{})]})}var Ge=n(440);const We={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function Ke(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(s.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function Qe(e){let{error:t}=e;const n=(0,Ge.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{className:We.errorBoundaryError,children:n})}class Ye extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const Ze="right";function Je(e){let{width:t=30,height:n=30,className:r,...o}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...o,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Xe(){const{toggle:e,shown:t}=(0,A.M)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,s.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(Je,{})})}const et={colorModeToggle:"colorModeToggle_DEke"};function tt(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(Ye,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(Fe,{...e})},t)))})}function nt(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function rt(){const e=(0,A.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??Ze)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return(0,u.jsx)(nt,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(Xe,{}),(0,u.jsx)(K,{}),(0,u.jsx)(tt,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(tt,{items:r}),(0,u.jsx)(G,{className:et.colorModeToggle}),!o&&(0,u.jsx)(Ie,{children:(0,u.jsx)(Te,{})})]})})}function ot(){return(0,u.jsx)(Ve,{children:(0,u.jsx)(rt,{})})}function at(e){let{item:t}=e;const{to:n,href:r,label:o,prependBaseUrlToHref:a,...i}=t,l=(0,J.Ay)(n),s=(0,J.Ay)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(Z.A,{className:"footer__link-item",...r?{href:a?s:r}:{to:l},...i,children:[o,r&&!(0,X.A)(r)&&(0,u.jsx)(te.A,{})]})}function it(e){let{item:t}=e;return t.html?(0,u.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(at,{item:t})},t.href??t.to)}function lt(e){let{column:t}=e;return(0,u.jsxs)("div",{className:"col footer__col",children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,u.jsx)(it,{item:e},t)))})]})}function st(e){let{columns:t}=e;return(0,u.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,u.jsx)(lt,{column:e},t)))})}function ct(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function ut(e){let{item:t}=e;return t.html?(0,u.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(at,{item:t})}function dt(e){let{links:t}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(ut,{item:e}),t.length!==n+1&&(0,u.jsx)(ct,{})]},n)))})})}function ft(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(st,{columns:t}):(0,u.jsx)(dt,{links:t})}var pt=n(1122);const mt="footerLogoLink_BH7S";function ht(e){let{logo:t}=e;const{withBaseUrl:n}=(0,J.hH)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,u.jsx)(pt.A,{className:(0,o.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function gt(e){let{logo:t}=e;return t.href?(0,u.jsx)(Z.A,{href:t.href,className:mt,target:t.target,children:(0,u.jsx)(ht,{logo:t})}):(0,u.jsx)(ht,{logo:t})}function yt(e){let{copyright:t}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function vt(e){let{style:t,links:n,logo:r,copyright:a}=e;return(0,u.jsx)("footer",{className:(0,o.A)("footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||a)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function bt(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:o}=e;return(0,u.jsx)(vt,{style:o,links:n&&n.length>0&&(0,u.jsx)(ft,{links:n}),logo:r&&(0,u.jsx)(gt,{logo:r}),copyright:t&&(0,u.jsx)(yt,{copyright:t})})}const wt=r.memo(bt),kt=(0,P.fM)([F.a,k.o,T.Tv,De.VQ,i.Jx,function(e){let{children:t}=e;return(0,u.jsx)(I.y_,{children:(0,u.jsx)(A.e,{children:(0,u.jsx)(N,{children:t})})})}]);function St(e){let{children:t}=e;return(0,u.jsx)(kt,{children:t})}var xt=n(1107);function Et(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(xt.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(Ke,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(Qe,{error:t})})]})})})}const _t={mainWrapper:"mainWrapper_z2l0"};function Ot(e){const{children:t,noFooter:n,wrapperClassName:r,title:l,description:s}=e;return(0,y.J)(),(0,u.jsxs)(St,{children:[(0,u.jsx)(i.be,{title:l,description:s}),(0,u.jsx)(b,{}),(0,u.jsx)(C,{}),(0,u.jsx)(ot,{}),(0,u.jsx)("div",{id:d,className:(0,o.A)(g.G.wrapper.main,_t.mainWrapper,r),children:(0,u.jsx)(a.A,{fallback:e=>(0,u.jsx)(Et,{...e}),children:t})}),!n&&(0,u.jsx)(wt,{})]})}},3465:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(6540);var r=n(8774),o=n(6025),a=n(4586),i=n(6342),l=n(1122),s=n(4848);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.Ay)(t.src),dark:(0,o.Ay)(t.srcDark||t.src)},i=(0,s.jsx)(l.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,s.jsx)("div",{className:r,children:i}):i}function u(e){const{siteConfig:{title:t}}=(0,a.A)(),{navbar:{title:n,logo:l}}=(0,i.p)(),{imageClassName:u,titleClassName:d,...f}=e,p=(0,o.Ay)(l?.href||"/"),m=n?"":t,h=l?.alt??m;return(0,s.jsxs)(r.A,{to:p,...f,...l?.target&&{target:l.target},children:[l&&(0,s.jsx)(c,{logo:l,alt:h,imageClassName:u}),null!=n&&(0,s.jsx)("b",{className:d,children:n})]})}},1463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(5260),o=n(4848);function a(e){let{locale:t,version:n,tag:a}=e;const i=t;return(0,o.jsxs)(r.A,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),i&&(0,o.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},1122:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(6540),o=n(5066),a=n(2303),i=n(5293);const l={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var s=n(4848);function c(e){let{className:t,children:n}=e;const c=(0,a.A)(),{colorMode:u}=(0,i.G)();return(0,s.jsx)(s.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const a=n({theme:e,className:(0,o.A)(t,l.themedComponent,l[`themedComponent--${e}`])});return(0,s.jsx)(r.Fragment,{children:a},e)}))})}function u(e){const{sources:t,className:n,alt:r,...o}=e;return(0,s.jsx)(c,{className:n,children:e=>{let{theme:n,className:a}=e;return(0,s.jsx)("img",{src:t[n],alt:r,className:a,...o})}})}},1422:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(6540),o=n(8193),a=n(205),i=n(3109),l=n(4848);const s="ease-in-out";function c(e){let{initialState:t}=e;const[n,o]=(0,r.useState)(t??!1),a=(0,r.useCallback)((()=>{o((e=>!e))}),[]);return{collapsed:n,setCollapsed:o,toggleCollapsed:a}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function f(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function p(e){let{collapsibleRef:t,collapsed:n,animation:o}=e;const a=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=o?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${o?.easing??s}`,height:`${t}px`}}function l(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return f(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(l(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{l()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,o])}function m(e){if(!o.A.canUseDOM)return e?u:d}function h(e){let{as:t="div",collapsed:n,children:o,animation:a,onCollapseTransitionEnd:i,className:s,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return p({collapsibleRef:u,collapsed:n,animation:a}),(0,l.jsx)(t,{ref:u,style:c?void 0:m(n),onTransitionEnd:e=>{"height"===e.propertyName&&(f(u.current,n),i?.(n))},className:s,children:o})}function g(e){let{collapsed:t,...n}=e;const[o,i]=(0,r.useState)(!t),[s,c]=(0,r.useState)(t);return(0,a.A)((()=>{t||i(!0)}),[t]),(0,a.A)((()=>{o&&c(t)}),[o,t]),o?(0,l.jsx)(h,{...n,collapsed:s}):null}function y(e){let{lazy:t,...n}=e;const r=t?g:h;return(0,l.jsx)(r,{...n})}},5041:(e,t,n)=>{"use strict";n.d(t,{M:()=>h,o:()=>m});var r=n(6540),o=n(2303),a=n(679),i=n(9532),l=n(6342),s=n(4848);const c=(0,a.Wf)("docusaurus.announcement.dismiss"),u=(0,a.Wf)("docusaurus.announcement.id"),d=()=>"true"===c.get(),f=e=>c.set(String(e)),p=r.createContext(null);function m(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.p)(),t=(0,o.A)(),[n,a]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{a(d())}),[]);const i=(0,r.useCallback)((()=>{f(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&f(!1),!r&&d()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function h(){const e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>g});var r=n(6540),o=n(8193),a=n(9532),i=n(679),l=n(6342),s=n(4848);const c=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),f={light:"light",dark:"dark"},p=e=>e===f.dark?f.dark:f.light,m=e=>o.A.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e),h=e=>{d.set(p(e))};function g(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.p)(),[o,a]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:o=!0}=r;t?(a(t),o&&h(t)):(a(n?window.matchMedia("(prefers-color-scheme: dark)").matches?f.dark:f.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&i(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const s=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||s.current?s.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:i,get isDarkTheme(){return o===f.dark},setLightTheme(){i(f.light)},setDarkTheme(){i(f.dark)}})),[o,i])}();return(0,s.jsx)(c.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(c);if(null==e)throw new a.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},2069:(e,t,n)=>{"use strict";n.d(t,{M:()=>p,e:()=>f});var r=n(6540),o=n(5600),a=n(4581),i=n(7485),l=n(6342),s=n(9532),c=n(4848);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,o.YL)(),{items:t}=(0,l.p)().navbar;return 0===t.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,[s,c]=(0,r.useState)(!1);(0,i.$Z)((()=>{if(s)return c(!1),!1}));const u=(0,r.useCallback)((()=>{c((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&c(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:s})),[e,n,u,s])}function f(e){let{children:t}=e;const n=d();return(0,c.jsx)(u.Provider,{value:n,children:t})}function p(){const e=r.useContext(u);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},5600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>c,YL:()=>s,y_:()=>l});var r=n(6540),o=n(9532),a=n(4848);const i=r.createContext(null);function l(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(!e)throw new o.dV("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const a=(0,r.useContext)(i);if(!a)throw new o.dV("NavbarSecondaryMenuContentProvider");const[,l]=a,s=(0,o.Be)(n);return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},4090:(e,t,n)=>{"use strict";n.d(t,{w:()=>o,J:()=>a});var r=n(6540);const o="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},4255:(e,t,n)=>{"use strict";n.d(t,{b:()=>l,w:()=>s});var r=n(6540),o=n(4586),a=n(7485);const i="q";function l(){return(0,a.l)(i)}function s(){const{siteConfig:{baseUrl:e,themeConfig:t}}=(0,o.A)(),{algolia:{searchPagePath:n}}=t;return(0,r.useCallback)((t=>`${e}${n}?${i}=${encodeURIComponent(t)}`),[e,n])}},4581:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(6540),o=n(8193);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,l]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){l(function(e){if(!o.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a.desktop:a.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},7559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},3109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},481:(e,t,n)=>{"use strict";n.d(t,{s:()=>o});var r=n(4586);function o(e){const{siteConfig:t}=(0,r.A)(),{title:n,titleDelimiter:o}=t;return e?.trim().length?`${e.trim()} ${o} ${n}`:n}},7485:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>s,l:()=>c});var r=n(6540),o=n(6347),a=n(9532);function i(e){!function(e){const t=(0,o.W6)(),n=(0,a._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function l(e){const t=(0,o.W6)();return(0,r.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}function s(e){return l((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}function c(e){const t=s(e)??"",n=function(e){const t=(0,o.W6)();return(0,r.useCallback)(((n,r)=>{const o=new URLSearchParams(t.location.search);n?o.set(e,n):o.delete(e),(r?.push?t.push:t.replace)({search:o.toString()})}),[e,t])}(e);return[t,n]}},1682:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function o(e){return Array.from(new Set(e))}n.d(t,{XI:()=>r,sb:()=>o})},9024:(e,t,n)=>{"use strict";n.d(t,{e3:()=>p,be:()=>d,Jx:()=>m});var r=n(6540),o=n(5066),a=n(5260),i=n(3102);function l(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(6025),c=n(481),u=n(4848);function d(e){let{title:t,description:n,keywords:r,image:o,children:i}=e;const l=(0,c.s)(t),{withBaseUrl:d}=(0,s.hH)(),f=o?d(o,{absolute:!0}):void 0;return(0,u.jsxs)(a.A,{children:[t&&(0,u.jsx)("title",{children:l}),t&&(0,u.jsx)("meta",{property:"og:title",content:l}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),f&&(0,u.jsx)("meta",{property:"og:image",content:f}),f&&(0,u.jsx)("meta",{name:"twitter:image",content:f}),i]})}const f=r.createContext(void 0);function p(e){let{className:t,children:n}=e;const i=r.useContext(f),l=(0,o.A)(i,t);return(0,u.jsxs)(f.Provider,{value:l,children:[(0,u.jsx)(a.A,{children:(0,u.jsx)("html",{className:l})}),n]})}function m(e){let{children:t}=e;const n=l(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const a=`plugin-id-${n.plugin.id}`;return(0,u.jsx)(p,{className:(0,o.A)(r,a),children:t})}},9532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>c,ZC:()=>l,_q:()=>i,dV:()=>s,fM:()=>u});var r=n(6540),o=n(205),a=n(4848);function i(e){const t=(0,r.useRef)(e);return(0,o.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function l(e){const t=(0,r.useRef)();return(0,o.A)((()=>{t.current=e})),t.current}class s extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,a.jsx)(a.Fragment,{children:e.reduceRight(((e,t)=>(0,a.jsx)(t,{children:e})),n)})}}},1252:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{G:()=>r})},9169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),o=n(8328),a=n(4586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function l(){const{baseUrl:e}=(0,a.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function o(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(o).flatMap((e=>e.routes??[])))}(n)}({routes:o.A,baseUrl:e})),[e])}},3104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>p,Tv:()=>u,a_:()=>m,gk:()=>h});var r=n(6540),o=n(8193),a=n(2303),i=n(205),l=n(9532),s=n(4848);const c=r.createContext(void 0);function u(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,s.jsx)(c.Provider,{value:n,children:t})}function d(){const e=(0,r.useContext)(c);if(null==e)throw new l.dV("ScrollControllerProvider");return e}const f=()=>o.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function p(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=d(),o=(0,r.useRef)(f()),a=(0,l._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=f();a(e,o.current),o.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function m(){const e=d(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),o=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,i.A)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:o}}function h(){const e=(0,r.useRef)(null),t=(0,a.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(n&&o>e||!n&&ot&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},2967:(e,t,n)=>{"use strict";n.d(t,{C:()=>r});const r="default"},679:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>u,Dv:()=>d});var r=n(6540);const o=JSON.parse('{"N":"localStorage","M":""}'),a=o.N;function i(e){let{key:t,oldValue:n,newValue:r,storage:o}=e;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}function l(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,s||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),s=!0),null}var t}let s=!1;const c={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){const n=`${e}${o.M}`;if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(n);const r=l(t?.persistence);return null===r?c:{get:()=>{try{return r.getItem(n)}catch(e){return console.error(`Docusaurus storage error, can't get key=${n}`,e),null}},set:e=>{try{const t=r.getItem(n);r.setItem(n,e),i({key:n,oldValue:t,newValue:e,storage:r})}catch(t){console.error(`Docusaurus storage error, can't set ${n}=${e}`,t)}},del:()=>{try{const e=r.getItem(n);r.removeItem(n),i({key:n,oldValue:e,newValue:null,storage:r})}catch(e){console.error(`Docusaurus storage error, can't delete key=${n}`,e)}},listen:e=>{try{const t=t=>{t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}catch(t){return console.error(`Docusaurus storage error, can't listen for changes of key=${n}`,t),()=>{}}}}}function d(e,t){const n=(0,r.useRef)((()=>null===e?c:u(e,t))).current(),o=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,r.useSyncExternalStore)(o,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},2131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(4586),o=n(6347),a=n(440);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:l}}=(0,r.A)(),{pathname:s}=(0,o.zy)(),c=(0,a.Ks)(s,{trailingSlash:n,baseUrl:e}),u=l===i?e:e.replace(`/${l}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${u}`:`${u}${e}/`}(n)}${d}`}}}},5062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),o=n(6347),a=n(9532);function i(e){const t=(0,o.zy)(),n=(0,a.ZC)(t),i=(0,a._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(4586);function o(){return(0,r.A)().siteConfig.themeConfig}},8126:(e,t,n)=>{"use strict";n.d(t,{c:()=>o});var r=n(4586);function o(){const{siteConfig:{themeConfig:e}}=(0,r.A)();return e}},1062:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var r=n(6540),o=n(1252),a=n(6025),i=n(8126);function l(){const{withBaseUrl:e}=(0,a.hH)(),{algolia:{externalUrlRegex:t,replaceSearchResultPathname:n}}=(0,i.c)();return(0,r.useCallback)((r=>{const a=new URL(r);if((0,o.G)(t,a.href))return r;const i=`${a.pathname+a.hash}`;return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(i,n))}),[e,t,n])}},2983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=o,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),l="/"===i||i===r?i:(s=i,c=n,c?o(s):a(s));var s,c;return e.replace(i,l)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=a;const r=n(2566);function o(e){return e.endsWith("/")?e:`${e}/`}function a(e){return(0,r.removeSuffix)(e,"/")}},253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t,...e(t.cause)];return[t]}},440:(e,t,n)=>{"use strict";t.rA=t.Ks=void 0;const r=n(1635);var o=n(2983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(o).default}});var a=n(2566);var i=n(253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},2566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:`${t}${e}`},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:`${e}${t}`},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},9231:(e,t,n)=>{"use strict";n.d(t,{zR:()=>x,TM:()=>A,yJ:()=>h,sC:()=>P,AO:()=>m,Fu:()=>g});var r=n(8168);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r=0;f--){var p=i[f];"."===p?a(i,f):".."===p?(a(i,f),d++):d&&(a(i,f),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),o=l(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var c=n(1561);function u(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function h(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=h(e,t,f(),w.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(4363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),g=0;g{"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},119:(e,t,n)=>{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(c,i(e,u,d)),1===e?(s(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){s(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),l=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&p(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=f(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},5302:(e,t,n)=>{var r=n(4634);e.exports=p,e.exports.parse=a,e.exports.compile=function(e,t){return l(a(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,i=0,l="",u=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],f=n[1],p=n.index;if(l+=e.slice(i,p),i=p+d.length,f)l+=f[1];else{var m=e[i],h=n[2],g=n[3],y=n[4],v=n[5],b=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=h&&null!=m&&m!==h,S="+"===b||"*"===b,x="?"===b||"*"===b,E=n[2]||u,_=y||v;r.push({name:g||a++,prefix:h||"",delimiter:E,optional:x,repeat:S,partial:k,asterisk:!!w,pattern:_?c(_):w?".*":"[^"+s(E)+"]+?"})}}return i{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},8722:(e,t,n)=>{const r=n(6969),o=n(8380),a=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...a,...Object.keys(Prism.languages)];o(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(3157).resolve(t)],delete Prism.languages[e],n(3157)(t),a.add(e)}))}i.silent=!1,e.exports=i},9700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=a.length);s++){var c=l[s];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],f="string"==typeof c?c:c.content,p=t(r,u),m=f.indexOf(p);if(m>-1){++o;var h=f.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(m+p.length),v=[];h&&v.push.apply(v,i([h])),v.push(g),y&&v.push.apply(v,i([y])),"string"==typeof c?l.splice.apply(l,[s,1].concat(v)):c.content=v}}else c.content&&i(c.content)}return l}(n.tokens)}}}})}(Prism)},8692:(e,t,n)=>{var r={"./":8722};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=8692},3157:(e,t,n)=>{var r={"./":8722};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=3157},8380:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var l={},s=e[r];if(s){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in o(t,a),l[t]=!0,n[t])l[i]=!0}t(s.require,c),t(s.optional,c),t(s.modify,c)}n[r]=l,a.pop()}}return function(e){var t=n[e];return t||(o(e,r),t=n[e]),t}}function o(e){for(var t in e)return!0;return!1}return function(a,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var o in r)if("meta"!=o){var a=r[o];t[o]="string"==typeof a?{title:a}:a}}return t}(a),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var o in n={},e){var a=e[o];t(a&&a.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+o+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+o+" because it is a component.");n[t]=o}))}return n[r]||r}}(s);i=i.map(c),l=(l||[]).map(c);var u=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var f,p=r(s),m=u;o(m);){for(var h in f={},m){var g=s[h];t(g&&g.modify,(function(e){e in d&&(f[e]=!0)}))}for(var y in d)if(!(y in u))for(var v in p(y))if(v in u){f[y]=!0;break}for(var b in m=f)u[b]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,o){var a=o?o.series:void 0,i=o?o.parallel:e,l={},s={};function c(e){if(e in l)return l[e];s[e]=!0;var o,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)o=r(e);else{var f=i(u.map((function(e){var t=c(e);return delete s[e],t})));a?o=a(f,(function(){return r(e)})):r(e)}return l[e]=o}for(var u in n)c(u);var d=[];for(var f in s)d.push(l[f]);return i(d)}(p,u,t,n)}};return w}}();e.exports=t},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),o=n(9982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n