Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 33 additions & 26 deletions docs/local-setup/running-testnet-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,67 +13,74 @@ sidebar_label: Running a Node on Windows
Then restart your computer.
2. Go to your Microsoft Store and look for Ubuntu; this is the Ubuntu Terminal instance. Install and launch it.
3. Now you might be asked for username and password, do not use admin as username.
4. Your Ubuntu Instance does not have OpenSSL, which you will need to run the node. To download OpenSSL, please run the following commands in the Ubuntu Terminal:
4. Your Ubuntu Instance need initial before next steps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence sounds incomplete; could you please clarify @boo50

Copy link
Contributor

@ama31337 ama31337 Sep 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenSSL will install in next steps :
5. You need to install OpenSSL, which you will need to run the node. To download OpenSSL, please run the following commands in the Ubuntu Terminal:
sh cd /tmp wget https://www.openssl.org/source/openssl-1.1.1.tar.gz tar xvf openssl-1.1.1.tar.gz
6. After it finished downloading OpenSSL, run the following commands to install:
sh cd openssl-1.1.1 sudo ./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)' sudo make sudo make install
And to install it, win version of Ubuntu need initial setup, which I recommend to do in step4, before install OpenSSL.
Because otherwise it will fail and ask to install missed packages.

```bash
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential pkg-config libssl-dev
```
5. You need to install OpenSSL, which you will need to run the node. To download OpenSSL, please run the following commands in the Ubuntu Terminal:
```bash
cd /tmp
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz
tar xvf openssl-1.1.1.tar.gz
```
5. After it finished downloading OpenSSL, run the following commands to install:
6. After it finished downloading OpenSSL, run the following commands to install:
```bash
cd openssl-1.1.1
sudo ./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'
sudo make
sudo make install
```
The files will be under the following directory: /usr/local/ssl.
6. Once this is finished, you have to ensure that Ubuntu is going to use the right version of OpenSSL. Now update the path for man pages and binaries. Run the following command:
7. Once this is finished, you have to ensure that Ubuntu is going to use the right version of OpenSSL. Now update the path for man pages and binaries. Run the following command:
```bash
cd ../..
sudo nano /etc/manpath.config
```
7. A text file will open, add the following line:
8. A text file will open, add the following line:
```bash
MANPATH_MAP /usr/local/ssl/man
MANPATH_MAP /usr/local/ssl/bin /usr/local/ssl/man
```
8. Once this is done press ctrl + o . It will ask you to save the file, just press enter. Now press ctrl + x to exit.
Once this is done press ctrl + o . It will ask you to save the file, just press enter. Now press ctrl + x to exit.
9. To make sure that OpenSSL is installed run:
```bash
openssl version -v
```
This should show you the installed version. More info on this can be found here. (https://manpages.ubuntu.com/manpages/bionic/man1/version.1ssl.html)
10. Now you have to run the following commands:
10. Now you have to run the following commands to install all nessesary software and dependencies:
```bash
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install pkg-config libssl-dev
sudo apt-get install -y git binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev cmake gcc g++ python protobuf-compiler python3 python3-pip pkg-config libssl-dev
```
Great! All set to get the node up and running!
11. Create a new directory:
Install Rustup
```bash
mkdir nearprotocol (you can name this however you like)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup default nightly
```
12. Change into the directory:
Great! All set to get the node up and running!
11. Clone the github nearcore
```bash
cd nearprotocol
git clone https://github.com/nearprotocol/nearcore.git
```
13. Install a few more dependencies:
12. This created a nearcore directory, change into that one and build a noce:
```bash
sudo apt update
sudo apt install -y git binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev cmake gcc g++ python docker.io protobuf-compiler
cd nearcore
make release
```
14. Clone the github nearcore
13. Install nearup
```bash
git clone https://github.com/nearprotocol/nearcore.git
pip3 install --user nearup
export PATH="$HOME/.local/bin:$PATH"
```
15. This created a nearcore directory, change into that one:
14. Final: And now run the testnet:
```bash
cd nearcore
```
Final: And now run the testnet:
nearup run testnet --binary-path ~/nearcore/target/release/
```
sudo ./scripts/start_testnet.py --nodocker
To be sure node is ruuning you can check logs
```bash
nearup logs --follow
```


You might be asked for a validator ID; if you do not want to validate, simply press enter. For validation, please refer to the [validation section](validator/staking.md).
You might be asked for a validator ID; if you do not want to validate, simply press enter. For validation, please refer to the [validation section](validator/staking.md).