---
title: Install zrok in Linux
sidebar_label: Linux
---

import { AssetsProvider } from '@site/src/components/assets-context';
import DownloadCard from '@site/src/components/download-card';
import styles from '@site/src/css/download-card.module.css';
import AnsibleRepoSetup from './_ansible_repo_setup.yaml'
import ConcatenateYamlSnippets from '@site/src/components/cat-yaml.jsx'
import Homebrew from './_homebrew.mdx';

## Install `zrok` from the Repository

This will configure the system to receive DEB or RPM package updates.

```text
curl -sSf https://get.openziti.io/install.bash | sudo bash -s zrok
```

:::info
Check out [zrok frontdoor](/guides/frontdoor.mdx?os=Linux) for running `zrok` as an always-on service.
:::

<Details>
<summary>Ansible Playbook</summary>

<ConcatenateYamlSnippets
  title="Set up package repository and install zrok">
{AnsibleRepoSetup}
{`
- name: Install zrok package
  gather_facts: false
  hosts: all 
  become: true
  tasks:
  - name: Install zrok
    ansible.builtin.package:
      name: zrok
      state: present
`}
</ConcatenateYamlSnippets>

</Details>

## Arch Linux

[An unofficial Arch User Repository (AUR) package](https://aur.archlinux.org/packages/zrok-bin) is maintained by the zrok community. As of April 2025, the AUR package includes the `zrok` CLI and [the `zrok-agent.service` systemd `--user` service](/guides/agent/linux-service.mdx).

## Homebrew

<Homebrew />

## Linux Binary

<AssetsProvider>
  <div className={styles.downloadContainer}>
    <DownloadCard
      osName="Linux"
      osLogo="/img/logo-linux.svg"
    />
  </div>
</AssetsProvider>

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.

<Details>
<summary>Manually install in `~/bin/zrok`</summary>

1. Unarchive the distribution in a temporary directory.

    ```text
    mkdir /tmp/zrok && tar -xf ./zrok*linux*.tar.gz -C /tmp/zrok
    ```

1. Install the `zrok` executable.

    ```text
    mkdir -p ~/bin && install /tmp/zrok/zrok ~/bin/
    ```

1. Add `~/bin` to your shell's executable search path. Optionally add this to your ~/.zshenv to persist the change.

    ```text
    PATH=~/bin:$PATH
    ```

1. With the `zrok` executable in your path, you can then execute the `zrok` command from your shell:

    ```text
    zrok version
    ```

    ```buttonless title="Output"
                   _    
     _____ __ ___ | | __
    |_  / '__/ _ \| |/ /
     / /| | | (_) |   < 
    /___|_|  \___/|_|\_\
    
    v1.0.0 [c889005]
    ```

</Details>

<Details>
<summary>Script to install binary in `/usr/local/bin/zrok`</summary>

This script auto-selects the correct architecture and may be helpful for Raspberry Pi users.

```text
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}/zrok_${ZROK_VERSION#v}_linux_${GOXARCH}.tar.gz" \
  | tar -xz -f -;

sudo install -o root -g root ./zrok /usr/local/bin/;

zrok version;
```

</Details>