diff --git a/docs/archival/run-archival-node-with-nearup.md b/docs/archival/run-archival-node-with-nearup.md deleted file mode 100644 index f736430..0000000 --- a/docs/archival/run-archival-node-with-nearup.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -id: run-archival-node-with-nearup -title: Run an Archival Node (with nearup) -sidebar_label: Run a Node (with nearup) -sidebar_position: 3 -description: How to run an Archival Node with nearup ---- - -## This page is DEPRECATED Please Use [Run a Split Storage Archival](/archival/split-storage-archival) - -*We encourage you to set up your node with Neard instead of Nearup as Nearup is not used on Mainnet. Please head to [Run a Node](/archival/run-archival-node-without-nearup) for instructions on how to setup an archival node with Neard.* - -
-Heads up- - -## Prerequisites {#prerequisites} - -- [Git](https://git-scm.com/) -- [Nearup](https://github.com/near-guildnet/nearup): Make sure [`nearup`](https://github.com/near-guildnet/nearup) is installed. You can install `nearup` by following the instructions at https://github.com/near-guildnet/nearup. - ---- - -### Steps to Run an Archival Node using `nearup` {#steps-to-run-an-archival-node-using-nearup} - -First, retrieve a copy of the latest archival snapshot from S3: -```bash -$ aws s3 --no-sign-request cp s3://near-protocol-public/backups/testnet/archive/latest . -$ LATEST=$(cat latest) -$ aws s3 --no-sign-request cp --no-sign-request --recursive s3://near-protocol-public/backups/testnet/archive/$LATEST ~/.near/data -``` - - -### Configuration Update {#configuration-update} - -Running an archival node is the same as a [validator node](/validator/running-a-node) as both types of node use the same `nearcore` release. The main difference for running an archival node is a modification to the `config.json` by changing `archive` to `true`. - -The `config.json` should contain the following fields. Currently, NEAR testnet and mainnet have only 1 (indexed [0]) shard and that shard is tracked. In the future, there will be the possibility to track different or multiple shards. - -``` -{ - ... - "archive": true, - "tracked_shards": [0], - ... -} -``` - -Please make sure that the node is stopped while changing the `config.json`. - -Once the config has been changed, you can restart the node and the node will start syncing new archival data. In the case where you want the full archival history, you can delete the data dir and start the node from scratch syncing full history or use one of the latest backups containing the data directory snapshot which can be copied under the near home dir (default: ~/.near/data). - - - -Then run: -```bash - $ nearup run testnet -``` -Wait until initialization finishes, use the following command to follow logs: -```bash - $ nearup logs --follow -``` -Then run: -```bash - $ nearup stop -``` -Finally, run the following command and the node should start syncing headers at ~97%: -```bash - $ nearup run testnet -``` - ->Got a question? - -
- -Running an archival node is very similar to running a [validator node](/validator/running-a-node) as both types of node use the same `nearcore` release. The main difference for running an archival node is a modification to the `config.json` by changing `archive` to `true`. See below for more details. - -
Heads updiff --git a/docs/rpc/run-rpc-node-with-nearup.md b/docs/rpc/run-rpc-node-with-nearup.md deleted file mode 100644 index 03781b9..0000000 --- a/docs/rpc/run-rpc-node-with-nearup.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -id: run-rpc-node-with-nearup -title: Run an RPC Node (with nearup) -sidebar_label: Run a Node (with nearup) -sidebar_position: 3 -description: How to run an RPC Node with nearup ---- - -*We encourage you to set up your node with Neard instead of Nearup as Nearup is not used on Mainnet. Please head to [Run a Node](/rpc/run-rpc-node-without-nearup) for instructions on how to setup a RPC node with Neard.* - -
-Running an archival node is very similar to running a [validator node](/validator/running-a-node) as both types of node use the same `nearcore` release. The main difference for running an archival node is a modification to the `config.json` by changing `archive` to `true`. See below for more details. +Running an archival node is very similar to running a [validator node](/validator/compile-and-run-a-node) as both types of node use the same `nearcore` release. The main difference for running an archival node is a modification to the `config.json` by changing `archive` to `true`. See below for more details.
-Heads up- - -## Prerequisites - -- [Git](https://git-scm.com/) -- [Nearup](https://github.com/near-guildnet/nearup): Make sure [`nearup`](https://github.com/near-guildnet/nearup) is installed. You can install `nearup` by following the instructions at https://github.com/near-guildnet/nearup. - ---- - -### Steps to Run an RPC Node using `nearup` - -Running a RPC node is very similar to running a [validator node](/validator/running-a-node) as both types of node use the same `nearcore` release. The main difference for running a validator node is requiring `validator_key.json` to be used by the validator node to support its work of validating blocks and chunks on the network. - - -First, clone the `nearcore` repo: - -```text -git clone https://github.com/near/nearcore.git -cd nearcore -``` -Checkout the version you wish to build: - -```bash -git checkout
- -The README for `nearup` (linked above) may be **all you need to get a node up and running** in `testnet` and `localnet`. `nearup` is exclusively used to launch NEAR `testnet` and `localnet` nodes. `nearup` is not used to launch `mainnet` nodes. - -
Heads updiff --git a/docs/validator/running-a-node-macos-linux.md b/docs/validator/running-a-node-macos-linux.md index eb16902..729fc68 100644 --- a/docs/validator/running-a-node-macos-linux.md +++ b/docs/validator/running-a-node-macos-linux.md @@ -2,116 +2,23 @@ id: running-a-node title: Run a Node on Linux and MacOS sidebar_label: Run a Node (Linux and MacOS) -sidebar_position: 3 -description: How to run a NEAR node using nearup on Linux and MacOS, with or without using Docker +sidebar_position: 5 +description: How to run a NEAR node on Linux and MacOS, with or without using Docker --- -*If this is the first time for you to setup a validator node, head to our [Validator Bootcamp π](/validator/validator-bootcamp). We encourage you to set up your node with Neard instead of Nearup as Nearup is not used on Mainnet. Please head to [Run a node](/validator/compile-and-run-a-node) for instructions on how to setup a RPC node with Neard.* +*If this is the first time for you to setup a validator node, head to our [Validator Bootcamp π](/validator/validator-bootcamp). Please head to [Run a node](/validator/compile-and-run-a-node) for instructions on how to setup a validator node with neard.* -This doc is written for developers, sysadmins, DevOps, or curious people who want to know how to run a NEAR node using `nearup` on Linux and MacOS, with or without using Docker. - - -## `nearup` Installation {#nearup-installation} -You can install `nearup` by following the instructions at https://github.com/near-guildnet/nearup. - -
-Running a RPC node is very similar to running a [validator node](/validator/running-a-node) as both types of node use the same `nearcore` release. The main difference for running a validator node is requiring `validator_key.json` to be used by the validator node to support its work of validating blocks and chunks on the network. +Running a RPC node is very similar to running a [validator node](/validator/compile-and-run-a-node) as both types of node use the same `nearcore` release. The main difference for running a validator node is requiring `validator_key.json` to be used by the validator node to support its work of validating blocks and chunks on the network.
-Heads up- -The steps in the rest of this document will require `nearup` +This doc is written for developers, sysadmins, DevOps, or curious people who want to know how to run a NEAR node on Linux and MacOS. ## Running a Node using Docker {#running-a-node-using-docker} -### Install Docker {#install-docker} - -By default we use Docker to run the client. - -Follow these instructions to install Docker on your machine: - -* [MacOS](https://docs.docker.com/docker-for-mac/install/) -* [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/) - -### Running `nearup` with Docker {#running-nearup-with-docker} - -
- -The README for `nearup` (linked above) may be **all you need to get a node up and running** in `testnet` and `localnet`. `nearup` is exclusively used to launch NEAR `testnet` and `localnet` nodes. `nearup` is not used to launch `mainnet` nodes. See [Deploy Node on Mainnet](deploy-on-mainnet.md) for running a node on `mainnet`. - -
-Note: `nearup` and `neard` are running inside the container. You have to mount the ~/.near folder to ensure you don't lose your data which should live on the host. -- -Once `nearup` and Docker are installed (by following instructions in previous section), run: - -```sh -docker run -v $HOME/.near:/root/.near -p 3030:3030 --name nearup nearup/nearprotocol run testnet -``` - - -_(If you prefer to use `localnet` then just replace `testnet` with `localnet` in the command above)_ - - -You might be asked for a validator ID; if you do not want to validate, simply press enter. For validation, please follow the [Validator Bootcamp](/validator/validator-bootcamp). - -```text -Enter your account ID (leave empty if not going to be a validator): -``` - - -#### Running in detached mode {#running-in-detached-mode} - -To run `nearup` in docker's detached (non-blocking) mode, you can add `-d` to the `docker run` command, - -``` -docker run -v $HOME/.near:/root/.near -p 3030:3030 -d --name nearup nearup/nearprotocol run testnet -``` - -#### Execute `nearup` commands in container {#execute-nearup-commands-in-container} - -To execute other `nearup` commands like `logs`, `stop`, `run`, you can use `docker exec`, - -``` -docker exec nearup nearup logs -docker exec nearup nearup stop -docker exec nearup nearup run {testnet/localnet} -``` - -(The container is running in a busy wait loop, so the container won't die.) - -#### `nearup` logs {#nearup-logs} - -To get the `neard` logs run: - -``` -docker exec nearup nearup logs -``` - -or, - -``` -docker exec nearup nearup logs --follow -``` - -To get the `nearup` logs run: - -``` -docker logs -f nearup -``` - - - - -| Legend | | -| :------- | :--------------------------------------------------------- | -| `# 7153` | BlockHeight | -| `V/1` | `V` (validator) or `β` (regular node) / Total Validators | -| `0/0/40` | connected peers / up to date peers / max peers | - +For running a node using Docker, please refer to the [Docker setup guide](docker-setup.md). ## Compiling and Running a Node without Docker {#compiling-and-running-a-node-without-docker} -Alternatively, you can build and run a node without Docker by compiling `neard` locally and pointing `nearup` to the compiled binaries. Steps in this section provide details of how to do this. +You can build and run a node without Docker by compiling `neard` locally. Steps in this section provide details of how to do this. As a prerequisite, [Rust](https://www.rust-lang.org/) needs to be installed on your machine. @@ -161,21 +68,18 @@ If your machine is behind a firewall or NAT, make sure port 24567 is open and forwarded to the machine where the node is going to be running. -Finally, execute: +Finally, initialize the working directory and start the node: ```bash -nearup run testnet --binary-path path/to/nearcore/target/release +./target/release/neard --home ~/.near init --chain-id testnet --download-genesis --download-config rpc +./target/release/neard --home ~/.near run ``` If you want to run `localnet` instead of `testnet`, then replace -`testnet` with `localnet` in the command above. (If youβre running -`localnet` you donβt need to open port 24567). - -You might be asked for a validator ID; if you do not want to validate, simply press enter. For validation, please follow the [Validator Bootcamp](/validator/validator-bootcamp). +`testnet` with `localnet` in the command above. (If you're running +`localnet` you don't need to open port 24567). -```text -Enter your account ID (leave empty if not going to be a validator): -``` +For validation, please follow the [Validator Bootcamp](/validator/validator-bootcamp). ## Running a Node on the Cloud {#running-a-node-on-the-cloud} @@ -197,30 +101,6 @@ ssh`](https://docs.microsoft.com/en-gb/cli/azure/ssh?view=azure-cli-latest). Once connected to the instance, follow [the steps listed above](#compiling-and-running-a-node-without-docker). -## Success Message {#success-message} - -Once you have followed the steps for running a node with Docker or of Compiling without Docker, you should see messages similar to as shown below: - - -```text -Using local binary at path/to/nearcore/target/release -Our genesis version is up to date -Starting NEAR client... -Node is running! -To check logs call: `nearup logs` or `nearup logs --follow` -``` - -or - -```text -Using local binary at path/to/nearcore/target/release -Our genesis version is up to date -Stake for user 'stakingpool.youraccount.testnet' with 'ed25519:6ftve9gm5dKL7xnFNbKDNxZXkiYL2cheTQtcEmmLLaW' -Starting NEAR client... -Node is running! -To check logs call: `nearup logs` or `nearup logs --follow` -``` - ## Starting a node from backup {#starting-a-node-from-backup} Using data backups allows you to sync your node quickly by using public tar backup files. There are two types of backups for available for both `testnet` and `mainnet`: - regular @@ -230,7 +110,7 @@ Using data backups allows you to sync your node quickly by using public tar back Download the latest snapshots from [Node Data Snapshots](/intro/node-data-snapshots). -Starting node using `neard` backup data +Starting node using `neard` backup data: ```bash ./neard init --chain-id
@@ -17,17 +17,6 @@ This documentation may require additional edits. Please keep this in mind while-## `nearup` Installation {#nearup-installation} -You can install `nearup` by following the instructions at https://github.com/near-guildnet/nearup. - -
-Heads up- - 1. If Windows Subsystem for Linux is not enabled, open PowerShell as administrator and run: ```sh Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux @@ -89,31 +78,25 @@ The README for `nearup` (linked above) may be **all you need to get a node up an ```sh curl -s https://rpc.testnet.near.org/status | jq .version ``` - Youβll get something like this: "1.13.0-rc.2". "1.13.0" is a branch which we need to clone to build our node for `testnet`. + You'll get something like this: "1.13.0-rc.2". "1.13.0" is a branch which we need to clone to build our node for `testnet`. ```sh git clone --branch 1.13.0 https://github.com/near/nearcore.git ``` -12. This created a nearcore directory, change into that one and build a noce: +12. This created a nearcore directory, change into that one and build a node: ```sh cd nearcore make neard ``` -13. Install nearup - ```sh - pip3 install --user nearup - export PATH="$HOME/.local/bin:$PATH" - ``` -14. Final: And now run the `testnet`: +13. Initialize the working directory and run the node: ```sh - nearup run testnet --binary-path ~/nearcore/target/release/neard - ``` - To be sure node is running you can check logs - ```sh - nearup logs --follow + ./target/release/neard --home ~/.near init --chain-id testnet --download-genesis --download-config rpc + ./target/release/neard --home ~/.near run ``` -You might be asked for a validator ID; if you do not want to validate, simply press enter. For validation, please follow the [Validator Bootcamp](/validator/validator-bootcamp). + For detailed instructions on initializing and running the node (including mainnet), see [Run a Validator Node](/validator/compile-and-run-a-node). + +To run this node as a validator, you must configure your validator keys in the `--home` directory (for example by placing `validator_key.json` there) and follow the steps in the [Validator Bootcamp](/validator/validator-bootcamp). >Got a question? diff --git a/docs/validator/validator-bootcamp.md b/docs/validator/validator-bootcamp.md index afeebe6..dfa3d45 100644 --- a/docs/validator/validator-bootcamp.md +++ b/docs/validator/validator-bootcamp.md @@ -299,24 +299,6 @@ The node is now running you can see log outputs in your console. Your node shoul ---- -#### Using NearUp - -You can set up a node using neard on Mainnet and Testnet. On Guildnet, you have the option to use NearUp to set the node. However, NearUp is not recommended or supported for Mainnet. We recommend that you use neard consistently on Guildnet, Testnet, and Mainnet. - -However, if you choose to use NearUp, NearUp will download the necessary binaries and files to get up and running. You just need to provide the network to run and the staking pool id. - -* Install NearUp: - -``` -pip3 install --user nearup -``` -* Install latest NearUp Version: - -``` -pip3 install --user --upgrade nearup -``` - - #### Create a wallet - MainNet: https://wallet.near.org/ - TestNet: https://wallet.testnet.near.org/ @@ -377,14 +359,6 @@ You can also run this command to set the Near guildnet Environment persistent: echo 'export NEAR_ENV=guildnet' >> ~/.bashrc ``` -* Running command is: - -``` -nearup run $NEAR_ENV --account-id
- -The README for `nearup` (linked above) may be **all you need to get a node up and running** in `testnet` and `localnet`. `nearup` is exclusively used to launch NEAR `testnet` and `localnet` nodes. `nearup` is not used to launch `mainnet` nodes. See [Deploy Node on Mainnet](deploy-on-mainnet.md) for running a node on `mainnet`. - -