# Installation

Source: https://argoctl-docs.pages.dev/docs/installation

> Install the argoctl binary on your management server with the install script, or copy the release bundle over by hand.

> **Using an AI agent?** Give it the setup instructions at https://argoctl-docs.pages.dev/agent-instructions.md, or https://argoctl-docs.pages.dev/llms.txt, which lists every docs page as Markdown.

argoCTL ships as one release bundle per version: a statically linked `argoctl` binary for Linux x86_64 plus the files it uses at run time (such as the preflight test image), with checksums. Install it on the **management server** ("mgmt"), the Ubuntu 24.04 machine that can reach your servers' BMCs and the provisioning network. Check the [requirements](https://argoctl-docs.pages.dev/docs/requirements) first.

Releases are published at [github.com/Argo-Compute/argoctl/releases](https://github.com/Argo-Compute/argoctl/releases). Each release has two assets plus their `.sha256` files:

| Asset | Use |
|---|---|
| `argoctl-x86_64-linux.tar.gz` | The bundle under a fixed name, so `releases/latest/download/` always gets the newest release. |
| `argoctl-1.0.0-x86_64-linux.tar.gz` | The same bundle under its versioned name, for pinning a version. |

## Install script

```bash title="On mgmt"
curl -fsSL https://raw.githubusercontent.com/Argo-Compute/argoctl/main/install.sh | sh
```

The script:

1. checks the machine is Linux x86_64;
2. downloads `argoctl-x86_64-linux.tar.gz` and its `.sha256` from `https://github.com/Argo-Compute/argoctl/releases/latest/download/` (or the versioned assets from `releases/download/v<version>/` when you pin a version);
3. verifies the tarball with `sha256sum --check`, and stops if it doesn't match;
4. unpacks the bundle to `/opt/argoctl/releases/argoctl-<version>-x86_64-linux/` and checks every file against the bundle's `SHA256SUMS`;
5. installs the binary to `/usr/local/bin/argoctl` (using `sudo` when not run as root);
6. prints `argoctl version`.

It is safe to run again: installing the same version changes nothing, and installing a newer one adds its bundle next to the old one and replaces the binary.

### Pin a version

Set `ARGOCTL_VERSION` to install a specific release instead of the latest:

```bash
curl -fsSL https://raw.githubusercontent.com/Argo-Compute/argoctl/main/install.sh | ARGOCTL_VERSION=1.0.0 sh
```

| Variable | Default | |
|---|---|---|
| `ARGOCTL_VERSION` | latest | Release to install, e.g. `1.0.0` (tag `v1.0.0`). |
| `ARGOCTL_INSTALL_DIR` | `/usr/local/bin` | Where the `argoctl` binary goes. |
| `ARGOCTL_RELEASES_DIR` | `/opt/argoctl/releases` | Where bundles are unpacked. Keep the default: commands look for their run-time files here. |

### Read the script first

To review the script before running it:

```bash
curl -fsSLO https://raw.githubusercontent.com/Argo-Compute/argoctl/main/install.sh
less install.sh
sh install.sh
```

## Manual install

Use this when mgmt can't reach GitHub, or you'd rather copy files yourself. It installs the binary using only `scp` and `ssh`: download the bundle on a machine with internet access, copy it to mgmt through your VPN or bastion host, then check and install it there.

### Download the release

On a machine with internet access:

```bash
V=1.0.0
curl -fLO https://github.com/Argo-Compute/argoctl/releases/download/v$V/argoctl-$V-x86_64-linux.tar.gz
curl -fLO https://github.com/Argo-Compute/argoctl/releases/download/v$V/argoctl-$V-x86_64-linux.tar.gz.sha256
sha256sum --check argoctl-$V-x86_64-linux.tar.gz.sha256      # on macOS: shasum -a 256 --check
```

### Copy it to mgmt

```bash
scp argoctl-$V-x86_64-linux.tar.gz argoctl-$V-x86_64-linux.tar.gz.sha256 ubuntu@<mgmt>:/tmp/
```

Replace `<mgmt>` with the address you reach mgmt on, for example over your site VPN or through a bastion (`scp -J <bastion> ...`).

### Check and install

On mgmt (`ssh ubuntu@<mgmt>`):

```bash
V=1.0.0
cd /tmp
sha256sum --check argoctl-$V-x86_64-linux.tar.gz.sha256          # must say OK
sudo mkdir -p /opt/argoctl/releases
sudo tar -C /opt/argoctl/releases -xzf argoctl-$V-x86_64-linux.tar.gz
(cd /opt/argoctl/releases/argoctl-$V-x86_64-linux && sha256sum --check --quiet SHA256SUMS)
sudo install -m 0755 /opt/argoctl/releases/argoctl-$V-x86_64-linux/bin/argoctl /usr/local/bin/argoctl
argoctl version
```

```text
argoctl 1.0.0, commit 7c41e9a2d0b3, target x86_64-unknown-linux-musl
```

The whole bundle stays unpacked under `/opt/argoctl/releases/<bundle>/`: commands read their run-time files from there. Installing the binary on its own, without the bundle, is not enough for `argoctl preflight`.

**The rest of the site still needs its usual network access:**

The manual install covers the argoctl binary only. Later steps download container images, packages, Helm charts and model weights; see [outbound access](https://argoctl-docs.pages.dev/docs/requirements#outbound-access) for the full list.

## What's in the bundle

```text
argoctl-1.0.0-x86_64-linux/
  bin/argoctl                          static (musl) binary
  share/preflight/argo-preflight.iso   test image for argoctl preflight (~35 MB)
  share/preflight/argo-preflight.json  its manifest
  VERSION                              the binary's `argoctl version` output
  SHA256SUMS                           checksums of the files above
```

The bundle is reproducible: the same version always has the same bytes and the same checksum.

## Upgrade

Run the install script again (optionally with `ARGOCTL_VERSION`), or repeat the manual steps with the new version. Each version is unpacked to its own directory under `/opt/argoctl/releases/`; the binary in `/usr/local/bin` is replaced.

A cluster records the [version profile](https://argoctl-docs.pages.dev/docs/reference/versions) it was built with. Keep using the argoCTL release that created a cluster for `create cluster` and `verify cluster` on it.

## Uninstall

```bash
sudo rm /usr/local/bin/argoctl
sudo rm -rf /opt/argoctl/releases
```

This removes the CLI only. To remove Ironic from mgmt as well, run [`argoctl ironic uninstall`](https://argoctl-docs.pages.dev/docs/reference/cli/ironic-uninstall) first. State under `/var/lib/argoctl` and `/etc/argoctl`, and logs under `/var/log/argoctl`, are left in place; see [Files and ports](https://argoctl-docs.pages.dev/docs/reference/files-and-ports).
