> ## Documentation Index
> Fetch the complete documentation index at: https://xoxno.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install, update, and uninstall the mxnode binary. POSIX shell installer with sha256 verification.

Install, update, and uninstall the mxnode binary. POSIX shell installer with sha256 verification.

## Shortest command

```bash theme={"system"}
curl -fsSL https://raw.githubusercontent.com/XOXNO/mx-node/main/install.sh | sh
mxnode --version
```

Detects OS + CPU, downloads the matching release tarball, sha256-verifies against `SHA256SUMS`, and copies the binary into `/usr/local/bin`.

## Options

Pass options after `sh -s --`:

```bash theme={"system"}
curl -fsSL https://raw.githubusercontent.com/XOXNO/mx-node/main/install.sh \
  | sh -s -- --version v0.1.0 --dir "$HOME/.local/bin"
```

| Option            | Default          | Effect                                                           |
| ----------------- | ---------------- | ---------------------------------------------------------------- |
| `--version <TAG>` | `latest`         | Pin a specific release.                                          |
| `--dir <PATH>`    | `/usr/local/bin` | Install location. Use `$HOME/.local/bin` for a rootless install. |
| `--help`          | —                | Print usage.                                                     |

## Supported targets

| OS    | CPU     | Tarball                                          |
| ----- | ------- | ------------------------------------------------ |
| Linux | x86\_64 | `mxnode-<TAG>-x86_64-unknown-linux-musl.tar.gz`  |
| Linux | aarch64 | `mxnode-<TAG>-aarch64-unknown-linux-musl.tar.gz` |
| macOS | x86\_64 | `mxnode-<TAG>-x86_64-apple-darwin.tar.gz`        |
| macOS | arm64   | `mxnode-<TAG>-aarch64-apple-darwin.tar.gz`       |

Linux builds are statically linked against musl — no glibc version requirement.

## Required tools

| Tool                    | Why                                                            |
| ----------------------- | -------------------------------------------------------------- |
| `curl`                  | Download the tarball + `SHA256SUMS`                            |
| `tar`                   | Extract the binary                                             |
| `sha256sum` or `shasum` | Verify the download. The installer refuses to run without one. |
| `sudo`                  | Only when the install dir isn't operator-writable              |

## Rootless install

```bash theme={"system"}
curl -fsSL https://raw.githubusercontent.com/XOXNO/mx-node/main/install.sh \
  | sh -s -- --dir "$HOME/.local/bin"
```

If `$HOME/.local/bin` isn't on your `PATH`:

```bash theme={"system"}
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
```

## Update

Re-run the installer. The new binary overwrites the old in place. Existing nodes (`elrond-node-{i}.service`) are untouched — the upgrade is to the **CLI**, not to the node binaries.

```bash theme={"system"}
curl -fsSL https://raw.githubusercontent.com/XOXNO/mx-node/main/install.sh | sh
```

## Uninstall

mxnode places exactly one file: the binary at the install dir.

```bash theme={"system"}
sudo rm /usr/local/bin/mxnode
```

To also wipe the host's mxnode-managed nodes + state + config + binstore, run [`cleanup`](/mxnode/cleanup) **before** removing the binary.

## Under the hood

1. Detect OS (Linux/Darwin) and CPU (x86\_64/aarch64).
2. Resolve the release tag — explicit `--version` or `latest` from the GitHub API.
3. Download `mxnode-<TAG>-<TARGET>.tar.gz` and `SHA256SUMS`.
4. Compute the local sha256 and compare. Refuse on mismatch.
5. Extract to a tempdir, then `install -m 0755` the binary into `--dir` (with `sudo` if needed).
6. Print the version.

The installer **does not** modify your shell rc, write any config, or contact anything outside `github.com`.
