# Linux Binary

This guide covers installing and running Qtap as a Linux binary in cloud-connected mode, managed through the Qplane control plane.

## Preflight Check

Verify your environment's compatibility:

{% code overflow="wrap" %}

```bash
curl -sSL https://github.com/qpoint-io/preflight/releases/latest/download/preflight.sh | sudo bash
```

{% endcode %}

## Prerequisites

* Linux host with kernel 5.10+
* Root/sudo access
* x86\_64 or arm64 architecture
* Registration token from [app.qpoint.io](https://app.qpoint.io/) (Settings → Installation)

## Installation

### Quick Install

```bash
curl -s https://get.qpoint.io/install | sudo sh
```

### Manual Installation

1. Download the appropriate binary:

For x86\_64:

```bash
curl -L https://downloads.qpoint.io/qpoint/qtap-v0.17.1-linux-amd64.tgz -o qtap.tgz
```

For arm64:

```bash
curl -L https://downloads.qpoint.io/qpoint/qtap-v0.17.1-linux-arm64.tgz -o qtap.tgz
```

2. Extract and install:

```bash
tar -xzf qtap.tgz && \
    sudo mv qtap-* /usr/local/bin/qtap && \
    sudo chmod +x /usr/local/bin/qtap
```

## Running with Registration Token

Run Qtap in cloud-connected mode:

```bash
sudo qtap --registration-token=$TOKEN
```

Replace `$TOKEN` with your actual registration token from [app.qpoint.io](https://app.qpoint.io/).

## Running as a Service

### Service Configuration

1. Create environment file for secure token storage:

```bash
sudo mkdir -p /etc/qtap && \
    sudo touch /etc/qtap/environment && \
    sudo chmod 600 /etc/qtap/environment
```

2. Add your registration token and optional tag variables:

```bash
sudo tee /etc/qtap/environment << 'EOF'
REGISTRATION_TOKEN=your_registration_token_here
QTAP_ENVIRONMENT=Production
QTAP_SERVICE=API
EOF
```

{% hint style="info" %}
**Tags are optional** but useful for filtering in Qplane dashboards (e.g., filter by environment, region, or cluster). See [Organizations & Environments](/getting-started/qplane/configuration/organizations-and-environments.md#agent-tags) for when to use tags vs installations.
{% endhint %}

3. Create systemd service file:

```bash
sudo nano /etc/systemd/system/qtap.service
```

Add the following content:

```ini
[Unit]
Description=Qtap Traffic Analysis Service
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
User=root
EnvironmentFile=/etc/qtap/environment
ExecStart=/usr/local/bin/qtap --registration-token=${REGISTRATION_TOKEN} --tags="Environment:${QTAP_ENVIRONMENT},Service:${QTAP_SERVICE}"
Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target
```

### Managing the Service

1. Reload systemd:

```bash
sudo systemctl daemon-reload
```

2. Start the service:

```bash
sudo systemctl start qtap
```

3. Enable service to start on boot:

```bash
sudo systemctl enable qtap
```

4. Check service status:

```bash
sudo systemctl status qtap
```

5. View service logs:

```bash
sudo journalctl -u qtap -f
```

## Updating Binary

### Installation Script

The quickest way to update Qtap is via our installation script:

1. Stop the service:

   ```bash
   sudo systemctl stop qtap
   ```
2. Download and install the new version:

   ```bash
   curl -s https://get.qpoint.io/install | sudo sh
   ```
3. Restart the service:

   ```bash
   sudo systemctl start qtap
   ```
4. Verify the update:

   ```bash
   qtap --version
   sudo systemctl status qtap
   ```

### Manually

1. Stop the service:

   ```bash
   sudo systemctl stop qtap
   ```
2. Download and install the new version:

   ```bash
   # Download the new version
   curl -L https://downloads.qpoint.io/qpoint/qtap-vX.Y.Z-linux-amd64.tgz -o qtap-new.tgz

   # Extract and replace
   tar -xzf qtap-new.tgz
   sudo mv qtap-* /usr/local/bin/qtap
   sudo chmod +x /usr/local/bin/qtap
   ```
3. Restart the service:

   ```bash
   sudo systemctl start qtap
   ```
4. Verify the update:

   ```bash
   qtap --version
   sudo systemctl status qtap
   ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qpoint.io/getting-started/qplane/installation/linux-binary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
