Running a Symbol node with Docker Desktop on Windows 10

This article was written by @Hexagon_tr and was originally published here

Thanks Hexagon for sending this in – we appreciate it! 🙂

Welcome

In this tutorial, I explain one of the ways to run a Symbol node on Windows. I am currently running my own node at home and have been harvesting for a long time. Everything works fine.

To check: http://symbolnode.hexagontr.keenetic.link:3000/node/info

Of course, running nodes at home has some requirements:

  • You must keep it online 24/7
  • You must have a stable internet connection that can open ports.
  • You should take precautions against power cuts by connecting a UPS.

If you’re ready then let’s get started!

Download Dockerfile and commands text

1. Hardware requirements

The minimum hardware I recommend:

  • A 4 Core processor
  • 8 GB RAM
  • 240GB SSD

I use and recommend Windows 10 as the operating system. Of course, you can experiment with different hardware and windows process. Please share the results with me..

We will be using Docker Desktop and WSL. Virtualization must be enabled.

2. Internet connection configuration

When running the node, 2 ports must be opened, these are the 3000 and 7900 TCP ports.

Some ISPs connect many of their customers to the internet over a single IP due to the decrease in IPv4 address. Although this does not cause any speed reduction, it prevents you from opening ports.

Here we will use the “tracert” command. We will make sure that your WAN IP address is reserved only for you.

  1. Go to whatismyip.com and copy your ip address
  2. Open the powershell command line
  3. paste following command to command line 
  4. tracert <your ip address>

If the result is more than a single line, it means that your ISP is connecting you to the internet via CGNAT. Discuss this with your ISP and specify that you need to open a port. Your ISP will provide you with alternatives.

3. Symbol wallet installation (optional)

If you already have a Symbol wallet address you are using, you can skip this step.

DO NOT SHARE YOUR MNEMONIC AND PROFILE INFORMATION WITH ANYONE.

4. Windows firewall settings

Open the powershell command line to privilege the required ports in the firewall and paste and run the following code:

  • netsh advfirewall firewall add rule name="symbolnodeREQports" dir=in action=allow protocol=TCP localport=3000,7900

5. Port forwarding settings on the router

This process is different for each router. You can find how to port forwarding using router brand model information on Google. Direct the TCP 3000 and 7900 ports to the computer where the node is running.

6. Port access control

Go to https://www.yougetsignal.com/tools/open-ports/ and check if your ports are accessible as shown in the video.

7. Installing WSL

You can complete the WSL installation required for Docker Desktop operation by using the codes below.Open Powershell command line and paste following command, run them one by one…

  1. dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  2. dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  3. Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
  4. After running commands succesfully, Restart your computer
  5. After booting your pc , Install the WSL update package
  6. Open the Powershell command line and run the code below to switch to the WSL2 version.
  7. wsl --set-default-version 2

8. Installing Docker Desktop

  1. Install Docker Desktop using the video.
  2. After the installation is complete, you can run it from the icon on the desktop.

9. Update the Docker file

  1. Copy the required files to the Dockerfile desktop
  2. Open it with Notepad and update your name and e-mail information as in the video, save it.

10. Creating CentOS image

I wrote the necessary code to install the required tools into the Docker file.

Now start the powershell command line from the popup menu by holding down the shift key in an empty area on the desktop

Paste the command below into the command line that opens and run it.

  • docker build --rm --no-cache -t centosreqtoolsok .

11. Running the CentOS container

Run the following command by pasting it on the powershell command line.

docker run --privileged --name symbolnode -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 3000:3000 centosreqtoolsok

12. Access the container interface

Paste the following command in the command line

docker exec -it symbolnode /bin/bash

13. Changing the passwords of the container users

You can change the passwords of the users in the container by running the commands below. You find out how to do this in the video

echo "12345@node" | passwd --stdin root

echo "12345@node" | passwd --stdin symbolnode

14. Run the Docker Service in the container

Run the commands below in order:

su - symbolnode

sudo systemctl start docker

sudo systemctl enable docker

15. Check Docker, Docker-Compose and Nodejs

Make sure the required software is running by running the commands below:

docker run hello-world

docker-compose version

node --version

16. Installing Symbol-Bootstrap

Run the following code on the Konyetner command line:

sudo npm install -g symbol-bootstrap

17. Preparing custom.yml content

Create a text file and paste following commands into it (changing details where indicated):

nodes: - friendlyName: 'Harvest Here !' ##<-- Can be anything host: '93.79.119.200' ##<-- Your wan ip adderess beneficiaryAddress: NBNAFZEXXX6XH7T4436MGXXOA2QCCC64ZZWVKNA ##<-- Your wallet address minFeeMultiplier: 25 nodeUseRemoteAccount: false maxUnlockedAccounts: 50 enableAutoHarvesting : false

Save and close the file

18. Create custom.yml file in CentOS container

Open custom.yml preset text file and copy all contents. Access the node command line and open the vim editor by running the following commands:

vim custom.yml

Press “i” for insert mode 

Right click on the command line 

type “:wq” press enter

19. Creating  presets

Create mainnet preset by using following commands:

symbol-bootstrap config -p mainnet -a dual -c custom.yml

Once the installation is complete, make sure it is properly installed by running the command below:

symbol-bootstrap --help

20. Backup node wallet addresses

Paste following command node command line in order:

symbol-bootstrap decrypt --source target/addresses.yml --destination plain-addresses.yml

vim plain-addresses.yml

Copy all contents and exit vim by typing “:q”

And create new TXT file on your desktop. Paste the contents there and save it. 

Go back to the command line and delete the plain text addresses file :

rm plain-addresses.yml

21. Run compose command 

We are ready to compose the node system files. Open the node command line and run the following command:

symbol-bootstrap compose

22. Run the Symbol node!

symbol-bootstrap run

23. Check node health

symbol-bootstrap healthCheck

Download Dockerfile and Commands text

Tags:
Avatar photo
NineLives
admin@symbolblog.com

I'm a Symbol and NEM enthusiast and run this blog to try to grow awareness of the platform in the English-speaking world. If you have any Symbol news you would like me to report on or you have an article that you would like to publish then please let me know!

No Comments

Sorry, the comment form is closed at this time.