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

- -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. - -
- - -## 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? - - Ask it on StackOverflow! diff --git a/docs/archival/run-archival-node-without-nearup.md b/docs/archival/run-archival-node.md similarity index 96% rename from docs/archival/run-archival-node-without-nearup.md rename to docs/archival/run-archival-node.md index 889558e..fe1a379 100644 --- a/docs/archival/run-archival-node-without-nearup.md +++ b/docs/archival/run-archival-node.md @@ -1,9 +1,9 @@ --- -id: run-archival-node-without-nearup +id: run-archival-node title: Run an Archival Node sidebar_label: Run a Node πŸš€ sidebar_position: 2 -description: How to run an Archival Node without nearup +description: How to run an Archival Node --- ## This page is DEPRECATED in favor of split storage archival. Please Use [Run a Split Storage Archival](/archival/split-storage-archival) @@ -11,14 +11,14 @@ The following instructions are applicable across localnet, testnet, and mainnet. If you are looking to learn how to compile and run a NEAR Archival node natively for one of the following networks, this guide is for you. -- [`testnet`](/archival/run-archival-node-without-nearup#testnet) -- [`mainnet`](/archival/run-archival-node-without-nearup#mainnet) +- [`testnet`](/archival/run-archival-node#testnet) +- [`mainnet`](/archival/run-archival-node#mainnet)
Heads up

-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.
diff --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.* - -
-Heads up

- -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. - -
- - -## 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 -``` - -You can then run: - -```bash -make neard -``` - -This will compile the `neard` binary for the version you have checked out, it will be available under `target/release/neard`. - -Note that compilation will need over 1 GB of memory per virtual core -the machine has. If the build fails with processes being killed, you -might want to try reducing number of parallel jobs, for example: -`CARGO_BUILD_JOBS=8 make neard`. - -NB. Please ensure you build releases through `make` rather than `cargo -build --release`. The latter skips some optimizations (most notably -link-time optimisation) and thus produces a less efficient executable. - - -```bash -nearup run testnet --binary-path path/to/nearcore/target/release -``` - -You will then be prompted for an Account ID below. You should leave this empty as you are running an RPC node, not a validator node. - -```text -Enter your account ID (leave empty if not going to be a validator): -``` - -Wait until initialization finishes, use the following command to follow logs: -```bash - $ nearup logs --follow -``` -Then run: -```bash - $ nearup stop -``` - -### Retrieve a copy of the latest RPC snapshot: - -⚠️ **FREE SNAPSHOT SERVICE BY FASTNEAR WILL BE DEPRECATGED STARTING JUNE 1ST, 2025. We strongly recommend all node operators to use [Epoch Sync](../intro/epoch_sync.md) when possible.** - -The latest daily snapshots are made available to the public by FastNear, and can be used to set up a validator node or RPC. -For detailed instructions, please refer to [HERE](https://docs.fastnear.com/docs/snapshots). diff --git a/docs/rpc/run-rpc-node-without-nearup.md b/docs/rpc/run-rpc-node.md similarity index 96% rename from docs/rpc/run-rpc-node-without-nearup.md rename to docs/rpc/run-rpc-node.md index 0ee24b7..eb34f5f 100644 --- a/docs/rpc/run-rpc-node-without-nearup.md +++ b/docs/rpc/run-rpc-node.md @@ -1,23 +1,23 @@ --- -id: run-rpc-node-without-nearup +id: run-rpc-node title: Run an RPC Node sidebar_label: Run a Node πŸš€ sidebar_position: 2 -description: How to run an RPC Node without nearup +description: How to run an RPC Node --- The following instructions are applicable across localnet, testnet, and mainnet. If you are looking to learn how to compile and run a NEAR RPC node natively for one of the following networks, this guide is for you. -- [`testnet`](/rpc/run-rpc-node-without-nearup#testnet) -- [`mainnet`](/rpc/run-rpc-node-without-nearup#mainnet) +- [`testnet`](/rpc/run-rpc-node#testnet) +- [`mainnet`](/rpc/run-rpc-node#mainnet)
Heads up

-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.
diff --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. - -
-Heads up

- -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`. - -
- -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} - -
-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 -``` - -![text-alt](/images/docker-logs.png) - - -| 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 --download-genesis @@ -239,20 +119,7 @@ wget -c -O - | tar -xC ~/.near/data ./neard run ``` -Starting node using `nearup` backup data: - -```bash -nearup run && sleep 30 && nearup stop -dir=$HOME/.near//data -rm -r -- "$dir" # clean up old DB files to avoid corruption -mkdir -- "$dir" -wget -c -O - | tar -xC "$dir" -nearup run -``` - -In both examples, `` corresponds to `testnet` or `mainnet`. - -**Note:** Default location for `neard` data is `~/.near/data`. `nearup` stores data by default in `~/.near//data.` +Where `` corresponds to `testnet` or `mainnet`. >Got a question? diff --git a/docs/validator/running-a-node-windows.md b/docs/validator/running-a-node-windows.md index e60e0e1..5181f70 100644 --- a/docs/validator/running-a-node-windows.md +++ b/docs/validator/running-a-node-windows.md @@ -2,13 +2,13 @@ id: running-a-node-windows title: Run a Node on Windows sidebar_label: Run a Node (Windows) -sidebar_position: 4 -description: How to run a NEAR node using `nearup` on Windows +sidebar_position: 6 +description: How to run a NEAR node on Windows --- -*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](/rpc/run-rpc-node) for instructions on how to setup a RPC 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 Windows. +This doc is written for developers, sysadmins, DevOps, or curious people who want to know how to run a NEAR node on Windows.
@@ -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

- -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`. - -
- - 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 -``` -Where AccountId is xx.stake.guildnet, xx is your pool name for example bootcamp.stake.guildnet - - For Testnet * Download the latest genesis, config files: @@ -413,15 +387,6 @@ export NEAR_ENV=testnet ``` echo 'export NEAR_ENV=testnet' >> ~/.bashrc ``` -* Running command is: - -``` -nearup run $NEAR_ENV --account-id -``` -Where AccountId is xx.pool.f863973.m0, xx is your pool name for example bootcamp.pool.f863973.m0 - -On the first run, NEARUp will ask you to enter a staking pool id, provide the staking pool id set up previously in the form {pool id}.{staking pool factory} - > **Note: This is the Chicken and the Egg. > You have not created the staking pool, but need to provide the name.** @@ -940,12 +905,7 @@ near call resume_staking '{}' --accountId ## LESSON 5 - MONITORING ### Log Files -The log file is stored either in the ~/.nearup/logs directory or in systemd depending on your setup. - -NEARUp Command: -``` -nearup logs --follow -``` +The log file is stored in systemd depending on your setup. Systemd Command: ``` @@ -1379,7 +1339,7 @@ Used to sign and validate blocks. Common Issues: 1. The validator key used to initialize the staking contract is not the one listed in validator_key.json -2. The account Id submitted when NEARUp was initialized is not the same as the one in validator_key.json +2. The account Id used when the node was initialized is not the same as the one in validator_key.json @@ -1395,7 +1355,7 @@ Wait until 4 epochs until you have been kicked from the validator set. Delete th 3. Start the node ``` #### Starting the node when another instance is running -On occasion, a process will get disconnected from the shell or NEARUp. The common error seen when trying to start the node will be: +On occasion, a process will get disconnected from the shell. The common error seen when trying to start the node will be: ``` Err value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', ```