# Install celestia-node

## Supported architectures

Celestia-node officially supports the following architectures:

- linux/amd64
- linux/arm64
- darwin/amd64 (macOS Intel)
- darwin/arm64 (macOS Apple Silicon)

Only these four architectures are officially tested and supported.

## Installing from source

This section goes over building and installing celestia-node. This
tutorial assumes you completed the steps in
[setting up your development environment](/operate/getting-started/environment-setup).

Install the celestia-node binary by running the following
commands:

### Remove any existing copy and clone

   ```bash
   cd $HOME
   rm -rf celestia-node
   git clone https://github.com/celestiaorg/celestia-node.git
   cd celestia-node/
   ```

### Check out the desired version

**Mainnet Beta**

```bash
git checkout tags/v0.34.4
```

**Mocha**

```bash
git checkout tags/v0.34.4-mocha
```

### Build the `celestia` binary

   a. Standard build

   ```bash
   make build
   ```

   b. Experimental build (optional)

   If you're a node operator comfortable with experimental features and seeking optimal performance with minimal RAM usage, this option is recommended for you.

   ```bash
   make build-jemalloc
   ```

   This build option enables CGO, and downloads and installs [jemalloc](https://jemalloc.net/). [Learn more about the build command](https://github.com/celestiaorg/celestia-node/releases/tag/v0.12.1#:~:text=%F0%9F%8F%97%EF%B8%8F-,New%20build%20option,-%3A%20Makefile%20now%20has).

### Install the binary

   ```bash
   make install
   ```

### Build and install the `cel-key` utility

   ```bash
   make cel-key
   make install-key
   ```

### Verify the installation

   ```bash
   celestia version
   ```

By default, the command prints text showing the semantic version of celestia-node,
commit hash, build date, system version, and Golang version.

In celestia-node v0.32.1 and later, use `--output json` to return this build
information as structured JSON for scripts and automation:

```bash
celestia version --output json
```

The shorthand `celestia version -o json` produces the same output. If the command
reports an unknown output flag, check `celestia version` and install the
recommended version for your network using this guide.

## Installing a pre-built binary

Installing a pre-built binary is the fastest way to get started with your Celestia data availability node. Releases after celestia-node v0.13.3 have these binaries available.

The installation script will download a binary file named `celestia`. Depending on your environment and chosen installation option, the `celestia` binary will be available at one of these locations:

- The Homebrew bin directory (usually `/opt/homebrew/bin/celestia` on Apple silicon or `/usr/local/bin/celestia` on Intel Macs) when Go is installed with Homebrew
- `$GOBIN/celestia`, or `$GOPATH/bin/celestia` when `GOBIN` is unset, for other Go installations
- `/usr/local/bin/celestia`
- `$HOME/celestia-node-temp/celestia`

Pre-built binaries are available for:

- Operating systems: Darwin (Apple), Linux
- Architectures: x86_64 (amd64), arm64

### Installation options

Pass the `-v` flag to install the recommended version for your network:

**Mainnet Beta**

```bash
bash -c "$(curl -sL https://docs.celestia.org/celestia-node.sh)" -- -v v0.34.4
```

**Mocha**

```bash
bash -c "$(curl -sL https://docs.celestia.org/celestia-node.sh)" -- -v v0.34.4-mocha
```

If you omit `-v`, the script installs the
[latest stable GitHub release](https://github.com/celestiaorg/celestia-node/releases/latest).
This does not select a version for your network and excludes releases marked as
pre-releases, including Mocha releases. Use the network-specific command above.

The script will:

1. Detect your system's operating system and architecture
2. Download the appropriate binary
3. Verify the checksum for security
4. Provide installation location options based on your environment:
   - If Go is installed:
     - Detected Go bin directory (the Homebrew bin directory when Go is installed with Homebrew, otherwise `$GOBIN` or `$GOPATH/bin`)
     - System bin directory (`/usr/local/bin`)
     - Keep in current directory
   - If Go is not installed:
     - System bin directory (`/usr/local/bin`)
     - Keep in current directory

Follow the instructions in the terminal output to choose your installation preferences. After installation, you can verify the setup by checking the version:

```bash
celestia version && celestia --help
```

View [the script](https://github.com/celestiaorg/docs/blob/main/public/celestia-node.sh) to learn more about what it is doing.

> **Note**: The script maintains a log file at `$HOME/celestia-node-temp/logfile.log` for troubleshooting purposes.

## Next steps

First, we recommend [reading the overview](/operate/getting-started/hardware-requirements)
of our node types, if you haven't yet.

Now that you've installed Celestia Node, it's time to
[pick your node type](/operate/getting-started/overview) and run your node!

If you're planning to run a light node,
we recommend the [quick-start guide](/operate/data-availability/light-node/quickstart/).

## Upgrading your binary

To upgrade your binary, install the recommended version for your network using
the instructions above.

When upgrading from a version earlier than celestia-node v0.31.3 to v0.31.3 or later, update the node configuration after replacing the binary and before starting the node:

```bash
celestia <node_type> config-update --p2p.network <network>
```

The [v0.31.3 release](https://github.com/celestiaorg/celestia-node/releases/tag/v0.31.3) adds support for Mainnet Beta v9 and introduces new config fields. The command merges those fields into the existing configuration while preserving custom values. Review your configuration after the update, then start the node. If you run into any issues, refer to the [troubleshooting section](/operate/maintenance/troubleshooting#resetting-your-config).