diff --git a/404.html b/404.html index 289d0587..98bab290 100644 --- a/404.html +++ b/404.html @@ -9,7 +9,7 @@ - +
diff --git a/assets/js/d768dc0f.8e1de618.js b/assets/js/d768dc0f.374d3e8d.js similarity index 75% rename from assets/js/d768dc0f.8e1de618.js rename to assets/js/d768dc0f.374d3e8d.js index 54919be7..9fa99979 100644 --- a/assets/js/d768dc0f.8e1de618.js +++ b/assets/js/d768dc0f.374d3e8d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5882],{475:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=r(5893),t=r(1151);const i={sidebar_position:40,title:"Self-Hosting Guide for Linux",sidebar_label:"Linux"},s=void 0,l={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:!1,unlisted:!1,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"}},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,t.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(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",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:["This will get you up and running with a self-hosted instance of ",(0,o.jsx)(n.code,{children:"zrok"}),". I'll assume you have the following:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"a Linux server with a public IP"}),"\n",(0,o.jsxs)(n.li,{children:["a wildcard DNS record like ",(0,o.jsx)(n.code,{children:"*.zrok.quigley.com"})," that resolves to the server IP"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"openziti",children:"OpenZiti"}),"\n",(0,o.jsxs)(n.p,{children:['OpenZiti (a.k.a. "Ziti") provides secure network backhaul for ',(0,o.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,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Install the Ziti Controller package by following the ",(0,o.jsx)(n.a,{href:"https://openziti.io/docs/category/deployments",children:"Linux controller deployment guide"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Ensure your answer file (",(0,o.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,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Ensure your firewall allows the controller port from the answer file."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Start the controller service (",(0,o.jsx)(n.code,{children:"ziti-controller.service"}),") and check the status."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Log in to the Ziti Controller"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"ziti edge login localhost:1280 -u admin -pshare.example.com
, then your wildcard record is *.share.example.com
.The included Caddy container can automatically manage a wildcard certificate for your zrok instance. You can enable Caddy in this compose project by renaming caddy.compose.override.yml
as compose.override.yml
.
The included Caddy container can automatically manage a wildcard certificate for your zrok instance. You can enable Caddy in this compose project by renaming compose.caddy.yml
as compose.override.yml
.
example.com
or share.example.com
and create the zone on your DNS provider's platform.Create an .env
file in the working directory.
ZROK_DNS_ZONE=share.example.com
ZROK_USER_EMAIL=me@example.com
ZROK_USER_PWD=zrokuserpw
ZITI_PWD=zitiadminpw
ZROK_ADMIN_TOKEN=zroktoken
# Caddy TLS option: rename caddy.compose.override.yml to compose.override.yml and set these vars; allow 80,443 in firewall
# plugin name for your DNS provider
CADDY_DNS_PLUGIN=cloudflare
# API token from your DNS provider
CADDY_DNS_PLUGIN_TOKEN=abcd1234
# use the staging API until you're sure everything is working to avoid hitting the rate limit
CADDY_ACME_API=https://acme-staging-v02.api.letsencrypt.org/directory
# no TLS option: publish the insecure ports to the internet and allow them in the firewall
ZROK_INSECURE_INTERFACE=0.0.0.0
ZROK_CTRL_PORT=18080
ZROK_FRONTEND_PORT=8080
ZROK_OAUTH_PORT=8081
# ziti ports must be published to the internet and allowed by firewall
ZITI_CTRL_ADVERTISED_PORT=1280
ZITI_ROUTER_PORT=3022
# configure oauth for public shares
ZROK_OAUTH_HASH_KEY=oauthhashkeysecret
ZROK_OAUTH_GITHUB_CLIENT_ID=abcd1234
ZROK_OAUTH_GITHUB_CLIENT_SECRET=abcd1234
ZROK_OAUTH_GOOGLE_CLIENT_ID=abcd1234
ZROK_OAUTH_GOOGLE_CLIENT_SECRET=abcd1234
# zrok version, e.g., 1.0.0
ZROK_CLI_TAG=latest
# ziti version, e.g., 1.0.0
ZITI_CLI_TAG=latest
# Caddy TLS option: rename compose.caddy.yml to compose.override.yml and set these vars; allow 80,443 in firewall
# plugin name for your DNS provider
CADDY_DNS_PLUGIN=cloudflare
# API token from your DNS provider
CADDY_DNS_PLUGIN_TOKEN=abcd1234
# use the staging API until you're sure everything is working to avoid hitting the rate limit
CADDY_ACME_API=https://acme-staging-v02.api.letsencrypt.org/directory
# no TLS option: publish the insecure ports to the internet and allow them in the firewall
ZROK_INSECURE_INTERFACE=0.0.0.0
ZROK_CTRL_PORT=18080
ZROK_FRONTEND_PORT=8080
ZROK_OAUTH_PORT=8081
# ziti ports must be published to the internet and allowed by firewall
ZITI_CTRL_ADVERTISED_PORT=1280
ZITI_ROUTER_PORT=3022
# configure oauth for public shares
ZROK_OAUTH_HASH_KEY=oauthhashkeysecret
ZROK_OAUTH_GITHUB_CLIENT_ID=abcd1234
ZROK_OAUTH_GITHUB_CLIENT_SECRET=abcd1234
ZROK_OAUTH_GOOGLE_CLIENT_ID=abcd1234
ZROK_OAUTH_GOOGLE_CLIENT_SECRET=abcd1234
# zrok version, e.g., 1.0.0
ZROK_CLI_TAG=latest
# ziti version, e.g., 1.0.0
ZITI_CLI_TAG=latest
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 .env
file. You can create more user accounts the same way by substituting a different email and password.
docker compose exec zrok-controller bash -xc 'zrok admin create account /etc/zrok-controller/config.yml ${ZROK_USER_EMAIL} ${ZROK_USER_PWD}'
docker compose exec zrok-controller bash -xc 'zrok admin create account ${ZROK_USER_EMAIL} ${ZROK_USER_PWD}'
Create additional users by running the command again with a different email and password.
-docker compose exec zrok-controller zrok admin create account /etc/zrok-controller/config.yml <email> <password>
docker compose exec zrok-controller zrok admin create account <email> <password>
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.
Follow the getting started guide to install the zrok CLI on some device and enable a zrok environment.
diff --git a/docs/guides/self-hosting/instance-configuration/index.html b/docs/guides/self-hosting/instance-configuration/index.html index ff84ba4d..9dbe138b 100644 --- a/docs/guides/self-hosting/instance-configuration/index.html +++ b/docs/guides/self-hosting/instance-configuration/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/guides/self-hosting/interstitial-page/index.html b/docs/guides/self-hosting/interstitial-page/index.html index 6968af45..3989d216 100644 --- a/docs/guides/self-hosting/interstitial-page/index.html +++ b/docs/guides/self-hosting/interstitial-page/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/guides/self-hosting/linux/index.html b/docs/guides/self-hosting/linux/index.html index a30ff3df..b3339a53 100644 --- a/docs/guides/self-hosting/linux/index.html +++ b/docs/guides/self-hosting/linux/index.html @@ -9,7 +9,7 @@ - + @@ -104,7 +104,7 @@Create an http frontend configuration file in etc/http-frontend.yml
.
v: 3
host_match: zrok.quigley.com
address: 0.0.0.0:8080
This frontend config file has a host_match
pattern that represents the DNS zone you're using with this instance of zrok
. Incoming HTTP requests with a matching Host
header will be handled by this frontend. You may also specify the interface address where the frontend will listen for public access requests.
The frontend does not provide server TLS, but you may front the server with a reverse proxy. It is essential the reverse proxy forwards the Host
header supplied by the viewer. This example will expose the non-TLS listener for the frontend.
The frontend does not provide server TLS, but you may front the server with a reverse proxy. The reverse proxy must forward the Host
header supplied by the viewer. This example will expose the non-TLS listener for the frontend.
You can also specify an oauth
configuration in this file, full details of are found in OAuth Public Frontend Configuration.
In another terminal window, run:
@@ -112,7 +112,7 @@The zrok
frontend uses the public
identity created during the bootstrap process to securely access zrok backends. to provide public access for the 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.
With our ZROK_ADMIN_TOKEN
and ZROK_API_ENDPOINT
environment variables set, we can create our first user account.
zrok admin create account etc/ctrl.yml <email> <password>
zrok admin create account <email> <password>
The output is the account token you will use to enable each device's zrok environment.