Skip to content

Latest commit

 

History

History
76 lines (56 loc) · 2.43 KB

README.md

File metadata and controls

76 lines (56 loc) · 2.43 KB

presearch-install-script

(Unofficial) Presearch Node Install Script using docker-compose (currently only supports Ubuntu)


Run Command in Terminal

curl -sSL https://github.com/id10terror/presearch-install-script/raw/main/presearch-node-install-ubuntu.sh | sudo bash

If you receive a curl command not found error, you can install curl first by running this command:

sudo apt install curl -y

Node Registration Code

When prompted for Presearch Node Registration code, browse to https://nodes.presearch.org/dashboard, copy "Your node registration code", and paste code in terminal.


How To BACKUP Keys

If you originally used the one-liner from the official Presearch team docs, you can back up using these steps:

  1. On the original node's server, ensure your node is CURENTLY RUNNING and run this command:
docker cp presearch-node:/app/node/.keys presearch-node-keys

If you originally used this script to install and configure your nodes:

  1. Simply browse to the /opt/docker/presearch/app/node/.keys directory on your host filesystem and copy the files to a second location.

How To RESTORE Keys

  1. After backing up your keys from your old node, run the script on the new node you wish to restore the keys on.
  2. When prompted, leave the Registration key blank, and press Enter.
  3. Press CTRL+C to exit the streaming log.
  4. Run this command to stop the containers temporarily:
$(cd /opt/docker/presearch && docker-compose stop)
  1. Browse to the /opt/docker/presearch/app/node/.keys directory on your host filesystem, and replace the keys with the ones backed up earlier.
  2. Set permissions on keys
chmod 644 /opt/docker/presearch/app/node/.keys/*
  1. Run this command to recreate and start the containers:
$(cd /opt/docker/presearch && docker-compose up -d --force-recreate) &&  docker logs -f presearch-node
  1. If you did this correctly, you should see a line like this in the log info: Node is listening for searches...

If you see a Duplicate Node error in the log, make sure you have stopped the container in the old node, then wait 30 seconds or so for the error to clear on the new node.


Demo

Demo video


Disclaimer

This script is provided as-is with no support or guarantee. Feel free to review the code, modify, and use as needed.