Presearch node [ubuntu 20.04.1 lts]

Do repost and rate:

Okay, so you want to set up a PRESEARCH Node on a Linux distribution like Ubuntu? Well, then you are in the right place. First of all a quick checklist:

  • Did you receive an email like this?
  • Do you have a Linux installation like Ubuntu 20.04.1 LTS already installed?
  • Do you have some Linux terminal experience?
  • Do you have at least 1,000 PRE tokens?

If you checked off all three boxes then let us continue. If you didn't then read anyway because eventually, Presearch Nodes will be accessible to everyone not just beta testers.

Installation

For this section, I am assuming you already have a valid Linux distribution installed. In my case, I am using Ubuntu 20.04.1 LTS.

Step 1

Let's begin by doing the following inside a terminal window:

sudo apt install docker.io

You will get a Y/N prompt that will ask you for permission to install docker.io and its requirements.

Step 2

Now we need to use docker to grab the Presearch Node image. The command is as follows: 

sudo docker pull presearch/node

Step 3

So now that we have the image installed via docker we need to register our node. Head on over to https://nodes.presearch.org/dashboard and make note of your nodes registration code.

Step 4

Replace the  YOUR_CODE_HERE with your nodes code from step 3 and run the command below.

sudo docker run -it --rm -v presearch-node-storage:/app/node --name presearch-node -e REGISTRATION_CODE=YOUR_CODE_HERE presearch/node

Step 5

If you are successful and make it this far then you should see the image below.

Step 7

To learn more about how to operate, maintain, and update your node read the documentation. The documentation can be found using the following link.

https://nodes.presearch.org/instructions

Service File

If your computer gets shut down or rebooted somehow someway then the node will need to be manually started each time. A Service file can do this for you automatically.

Step 1

Start by creating a file under /etc/systemd/system/presearch-node.service or by doing the following command.

sudo vi /etc/systemd/system/presearch-node.service

Step 2

Use the example file below and replace YOUR_CODE_HERE with your node's registration code.

Description=Presearch Node[Service]User=rootGroup=rootType=simpleRestart=alwaysRestartSec=5sExecStart=docker run --rm -v presearch-node-storage:/app/node --name presearch-node -e REGISTRATION_CODE=YOUR_CODE_HERE presearch/node[Install]WantedBy=multi-user.target

Step 3

Save your file and run the next few commands. The commands will enable and start your new service file

sudo systemctl enable presearch-node.servicesudo systemctl start presearch-node.service

Verify Service File Functionality

To make sure that your service file was created and initiated properly run the following commands.

sudo journalctl -u presearch-node.service | tail -n 100

Now check the output and make sure it is something like the image below.

If your output matches the image then congrats everything worked! Now the final ultimate test is to reboot your machine and repeat the Verify Service File Functionality section. Lastly, login into https://nodes.presearch.org/dashboard and your node should show up.

Conclusion

Congrats now you know how to set up a Presearch Node. Please be warned that your mileage may vary and these steps may or may not work for you. Feel free to write your own post and use this one as a reference. For more information see the provided links. As always pardon any typos or grammar mistakes because even though I use Grammarly it's not always perfect. Peace Out!

Regulation and Society adoption

Events&meetings

Ждем новостей

Нет новых страниц

Следующая новость