Presearch Tutorials: Setup a Presearch Node

in blurt •  3 years ago  (edited)

I would like to introduce an interesting project, which is Presearch.
This short video shows what it is and how it works.

To make it short, it is a search Dapp. In google search, you don't get any benefit even though you provide your valuable data to Google. In Presearch, you get a reward token whenever you search.

And you can run nodes to get more rewards and sustain the ecosystem. It seems cool.

More info about Presearch, simply search 'Presearch' in google. And there are posts in Korean explaining what it is in details by @libera-tor:

Presearch Sign-Up

You can get 25 Pre (the Presearch token) when you use my referral link:
https://presearch.org/signup?rid=3643102

I did not know this referral option when signing up, so I could not get any reward.

How to Setup a Node

Running a node is very light, so you can run a node on Raspberry Pi or $3.5/Month VPS for example, Vultr.com.

1. Connect to a server

In my case, it is a dedicated server in cloud.

First thing to first, let's connect to a server using ssh like this:

$ ssh account@ip

replace account and ip with your server's account and ip.

2. Install prerequisites

What you need to run a node is Docker.
You can find more detail about Docker here:
https://docs.docker.com/engine/install/ubuntu/

In my case, my account is root so I don't need to put sudo before a command. If you are not a root user, then you need to put sudo.

// update the programs
# apt-get update

// install the prerequisites to install docker
# apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

Now set up a key and repo for docker.

# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# apt-get update

// install docker 
# apt-get install docker-ce docker-ce-cli containerd.io

3. Run a node

Now you can start a node. Here you have to put YOUR_REGISTRATION_CODE in below command. You can find your code in presearch site here:
https://nodes.presearch.org/dashboard

image.png

You can run with these several commands at once like this:

# docker run -d --name presearch-auto-updater --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 300 presearch-node ; docker pull presearch/node ; docker run -dt --name presearch-node --restart=unless-stopped -v presearch-node-storage:/app/node -e REGISTRATION_CODE=YOUR_REGISTRATION_CODE presearch/node

I will explain what the above commands are.

// Managing the  presearch-node container by using the containrrr/watchtower program
(Refer to https://containrrr.dev/watchtower/arguments/)
# docker run -d --name presearch-auto-updater --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 300 presearch-node

// download presearch/node docker image
# docker pull presearch/node

// run presearch/node container
# docker run -dt --name presearch-node --restart=unless-stopped -v presearch-node-storage:/app/node -e REGISTRATION_CODE=YOUR_REGISTRATION_CODE presearch/node

If the node started correctly, then you will see the following messages:

# docker logs -f presearch-node
2022-01-12T13:31:53.140Z info:
  .((((((((((((((((((((((((((((((.
  ((((((((((((((((((((((((((((((((
  ((((                        ((((
  ((((   (((((((((((*         ((((
  ((((   (((((((((((((        ((((
  ((((   ((((     (((((       ((((
  ((((   ((((     (((((       ((((
  ((((   (((((((((((((        ((((
  ((((   (((((((((((          ((((
  ((((   ((((                 ((((
  ((((   ((((   (((((((((((   ((((
  ((((   ((((   (((((((((((   ((((
  ((((                        ((((
  ((((((((((((((((((((((((((((((((
  '(((((((((((((((((((((((((((((('

2022-01-12T13:31:53.140Z info: presearch-node - v0.9.66
2022-01-12T13:31:54.081Z info: Saved public key!
2022-01-12T13:31:54.081Z info: Saved private key!
2022-01-12T13:31:54.861Z info: Node is listening for searches...

The node is working good.

Now let's visit the presearch's node dashboard. You will find the new content like this:
image.png

Restart a node

You don't need to restart the node if it is working well. This section explains the procedure if you have to restart a node.

When you want to restart a node, you have to stop the node first. It is very important for every blockchain based node.

// Stop presearch-node container
# docker stop presearch-node

// Remove presearch-node container
# docker rm presearch-node

// Stop presearch-auto-updater
# docker stop presearch-auto-updater

// Remove presearch-auto-updater
# docker rm presearch-auto-updater

Now you can run the command in Section 3. Run a Node.

Yoy need to stake 2,000 PRE at least to get reward.

Enjoy the Presearch!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!
Sort Order:  

Congratulations, your post has been curated by @dsc-r2cornell. You can use the tag #R2cornell. Also, find us on Discord

Manually curated by Blessed-girl

logo3 Discord.png

Felicitaciones, su publicación ha sido votada por @ dsc-r2cornell. Puedes usar el tag #R2cornell. También, nos puedes encontrar en Discord

  ·  3 years ago  ·  

Do we need any tokens for earning rewards, or just running Is enough ?

  ·  3 years ago  ·  

ah i forgot to mention this. you have to depoit at least 2000 pre token to get reward from running a node.

  ·  3 years ago  ·  

Thanks, you can mention this