Skip to content

Latest commit

 

History

History
251 lines (160 loc) · 9.06 KB

File metadata and controls

251 lines (160 loc) · 9.06 KB
description This document provides basic instructions for use of the nucypher-ops utility for setting up PRE nodes.

PRE Node Setup

{% hint style="info" %} This document will help you get a node running to which you can bond your stake. Please note that running a node is not a passive activity. {% endhint %}

Nucypher-ops is an ansible script that will setup and configure a PRE node for you. Currently, the script supports AWS and Digital Ocean. This document will guide you through the setup process using visuals from DigitalOcean.

Local Machine Considerations

{% tabs %} {% tab title="Windows" %} Install Ubuntu 20.04.4 LTS through the Windows Store:

WSL is the most convenient way to run nucypher-ops on a Windows based local machine

To begin, update your local machine and install dependencies

{% code overflow="wrap" %}

sudo apt update
sudo apt upgrade
sudo apt-get install libffi-dev python3-dev python3-pip python3-virtualenv build-essential libssl-dev

{% endcode %}

Read prompts and respond appropriately. This will take a few minutes. {% endtab %}

{% tab title="MacOS" %} Install Python and pip on your local machine, if you don't have it already:

Python Website

Visit the Python.org Website

PyPA Website

Visit the pypa.io Website and follow the steps provided to make sure that you have a working Python with pip installed. {% endtab %}

{% tab title="Linux" %} To begin, update your local machine and install dependencies

{% code overflow="wrap" %}

sudo apt update
sudo apt upgrade
sudo apt-get install libffi-dev python3-dev python3-pip python3-virtualenv build-essential libssl-dev

{% endcode %}

Read prompts and respond appropriately. This will take a few minutes. {% endtab %} {% endtabs %}

SSH Key

Generate an SSH key pair. We will need the public key.

Visit the OpenSSH website to learn about OpenSSH.

ssh-keygen -t rsa
 cat .ssh/id_rsa.pub

Generating a new SSH Key

Copy the highlighted part

New SSH Key

In your Digital Ocean dashboard:

Go to Settings > Security and click the Add SSH Key button.

Adding a new SSH Key

Paste the key into the box, give your key a name, and click the Add SSH Key button.

Adding a new SSH Key

Open a Text Document to make notes. Copy the SSH Fingerprint into this text file.

{% hint style="info" %} Do not share the fingerprint with anyone. Save and store in a secure place such as a password manager. {% endhint %}

SSH Fingerprint

While we're here, let's create an API key as well. Go to API > Tokens/Keys and click the Generate New Token button.

Generating an API Access Token

Name your token and click the Generate New Token button.

{% hint style="info" %} Unless you plan to periodically refresh this token yourself, you can set "Expiration" to NEVER {% endhint %}

Generating an API Access Token

Copy the API Key into your Text file or password manager.

Generating an API Access Token

L2 Providers

The PRE application requires access to an Ethereum endpoint, as well as a Polygon endpoint. One solution is to use a provider such as Infura, Quicknode, or Alchemy. Each has their own pros and cons. Review them carefully.

Once you have made your decision(s) and signed up for an account, login to your account and setup an endpoint for Ethereum. The setup steps are very straightforward for each provider.

Make sure you select Mainnet for each endpoint. You will receive what looks like a https web address, Infura calls it an Endpoint, Quicknode refers to it as a Web3 endpoint. Make sure that the endpoint you copy starts with https.

Copy each of the endpoints to your text document or into your password manager. We will use them shortly.

{% hint style="info" %} Do NOT share your provider addresses with anyone. {% endhint %}

Checklist

Let's review and make sure you have everything needed to be successful:

  • SSH key pair fingerprint
  • API Access token
  • Endpoint URL for Ethereum
  • Endpoint URL for Polygon

Sample text file

These items should be kept readily available.

Installing nucypher-ops

pip install nucypher-ops

This will download the utility, and install dependencies. This process will take several minutes.

nucypher-ops installation

Creating Your Node

Execute the following and be ready to answer questions from the utility:

nucypher-ops nodes create

This will connect to your Digital Ocean account, spin up a VPS, configure and secure it, and install all of the necessary software for you.

The utility will ask which provider you are using. Answer accordingly and press ENTER.

Selecting VPS provider in nucypher-ops

Provide your API Key and press ENTER.

Providing API Key in nucypher-ops

Provide your SSH Fingerprint and press ENTER.

Providing SSH fingerprint in nucypher-ops

Then be patient.

Creating VPS instance & PRE node

VPS instance & PRE node created

Deploying Ursula

In a few minutes, you'll be ready to bond your stake.

nucypher-ops ursula deploy

Provide your ETH endpoint when requested and press ENTER.

Provide your Polygon endpoint when requested and press ENTER.

Configuring and deploying Ursula

Wait for it...

PRE node ready to bond

The items at the bottom are your node's IP address and Operator address, to which you will need to bond your stake.

To bond your stake to your new PRE node, click below:

{% embed url="https://stake.nucypher.network/manage/bond" %} Bonding UI link {% endembed %}

{% hint style="info" %} Make sure you take note of your operator address. {% endhint %}

Nucypher-Ops Config File location

Nucypher-ops is a convenient tool for deploying a PRE node on the Threshold network. In case you need to make changes to the configuration of the utility on your local machine, these are the default directories where config files are stored locally:

{% tabs %} {% tab title="Linux" %}

~/.local/share/nucypher-ops

{% endtab %}

{% tab title="MacOS" %}

~/Library/Application Support/nucypher-ops

{% endtab %} {% endtabs %}

{% hint style="info" %} Caution: Do not make changes to these files without making a backup of them first. Do not make changes to these files unless you know and understand what you are doing. {% endhint %}

{% hint style="info" %} Caution: Breaking these files may lead to your node becoming permanently inaccessible. Use extreme caution. {% endhint %}

Post Install

To find out about other features try

nucypher-ops --help

if you need to update your node to a new version of NuCypher just execute

nucypher-ops ursula update

{% hint style="info" %} Keep in mind staking is an active process, and that you are responsible for operational security, as well as backing up any relevant data. Carefully review your firewall rules and make necessary adjustments. nucypher-ops configures a PRE node, it does not setup security measures. {% endhint %}