Install zrok on Linux
Package repository
The RedHat (RPM) and Debian (DEB) packages are maintained by NetFoundry.
curl -sSf https://get.openziti.io/install.bash | sudo bash -s zrok2
To run zrok2 as an always-on service, see the Linux Agent Service guide or the Docker guide.
Ansible Playbook
- name: Set up zrok Package Repo
gather_facts: true
hosts: all
become: true
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 }}"
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
- 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'
- name: Install zrok2 package
gather_facts: false
hosts: all
become: true
tasks:
- name: Install zrok2
ansible.builtin.package:
name: zrok2
state: present
Linux binary
Linux
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 amd64 distribution. For Raspberry Pi use the arm64 distribution.
Manually install in ~/bin/zrok2
-
Unarchive the distribution in a temporary directory.
mkdir /tmp/zrok2 && tar -xf ./zrok*linux*.tar.gz -C /tmp/zrok2 -
Install the
zrok2executable.mkdir -p ~/bin && install /tmp/zrok2/zrok2 ~/bin/ -
Add
~/binto your shell's executable search path. Optionally add this to your ~/.zshenv to persist the change.PATH=~/bin:$PATH -
With the
zrok2executable in your path, you can then execute thezrok2command from your shell:zrok2 version
Script to install binary in /usr/local/bin/zrok2
This script auto-selects the correct architecture and may be helpful for Raspberry Pi users.
cd $(mktemp -d);
ZROK_VERSION=$(
curl -sSf https://api.github.com/repos/openziti/zrok/releases/latest \
| jq -r '.tag_name'
);
case $(uname -m) in
x86_64) GOXARCH=amd64
;;
aarch64|arm64) GOXARCH=arm64
;;
arm*) GOXARCH=armv7
;;
*) echo "ERROR: unknown arch '$(uname -m)'" >&2
exit 1
;;
esac;
curl -sSfL \
"https://github.com/openziti/zrok/releases/download/${ZROK_VERSION}/zrok2_${ZROK_VERSION#v}_linux_${GOXARCH}.tar.gz" \
| tar -xz -f -;
sudo install -o root -g root ./zrok2 /usr/local/bin/;
zrok2 version;
Homebrew formula
This formula is maintained by the Homebrew community.
brew install zrok2