Reqirements for nucypher-opsLast updated: 2022-04-30

Welcome. The following steps must be completed prior to executing the nucypher-ops utility in order to ensure your node will be setup successfully.

Warning

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.

Use This Guide at Your Own Risk

YOU ARE RESPONSIBLE FOR YOUR OWN OPSEC. I AM IN NO WAY ASSUMING ANY RESPONSIBILITY OR LIABILITY FOR YOUR ACTIONS (OR INACTIONS), CHARGES INCURRED, OR LOSSES RESULTING FROM THE USE OF THIS GUIDE.

1.1 Windows users only - WSL

Install Ubuntu 20.04.4 LTS through the Windows Store:

ubuntu

After the installation completes, launch Ubuntu and execute the following:

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

Read prompts and respond appropiately. This will take a few minutes.

1.2  MacOS users only

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.

1.3 SSH key

Generate an SSH key pair. We will need the public key. If you do not know what an SSH key is, review these sources before continuing:

 OpenSSH

Visit the OpenSSH  website to learn about OpenSSH.

When you are ready to continue:

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

SSH Key

Copy the highlighted part

SSH Key

In your Digital Ocean dashboard:

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

SSH Key

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

SSH Key

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

SSH Key

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

API Token

Name your token and click the Generate Token button.

API Token

Copy the API Key into your Notepad file.

API Token

L2 Providers

The PRE application requires access to an Ethereum endpoint, as well as a Polygon endpoint. Running your own Geth (Ethereum) node is difficult, time consuming, and expensive. Not only will you need to secure your node against attacks, but the act of syncing your Geth node will take 4+ days and require several TB of SSD storage. Polygon is equally challenging.

One solution is to use a provider such as Infura , Quicknode , or Alchemy . Each has their own pros and cons. Review them carefully.

Infura and Alchemy offer a free tier for some endpoints. Quicknode has affordable plans and offers a 7-day trial. These providers offer very similar products, pick one or use two, it shouldn't make a difference.

2.1 Ethereum

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 straight forward for each provider.

Make sure you select Mainnet for each endpoint. You will receive what looks like a webaddress, Infura calls it an Endpoint, Quicknode refers to it as a Web3 endpoint.

It will look like this:
https://mainnet.infura.io/v3/abcdefghijklmnopqrstuvwxyz

Copy the endpoint URL into your Notepad file.

Warning

Do NOT share your provider addresses with anyone.

2.2 Polygon

Repeat for Polygon endpoint and take note of your provider address (endpoint) by copying it into your Notepad file.

DigitalOcean

DigitalOcean

You can choose between Digital Ocean and AWS. I will be using Digital Ocean.

3.1 Create Account

If you do not already have an account with DigitalOcean, sign up  for one.

Referral Link Disclosure

These DigitalOcean links contain my referral ID. You will receive a FREE $100 credit good for 60 days. If you spend $25 after your credit is exhausted, I will receive a small credit. You can read the full details here .

If you choose to use my link - thank you, I appreciate it!

Receive a $100 credit from DigitalOcean

referral link 

Checklist

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

4.1 Pre-Flight

 Python and pip are setup and working on your local machine

 You have your SSH key pair

 Endpoint URL for Ethereum

 Endpoint URL for Polygon

 You have a Digital Ocean account setup

Notepad

These items should be kept readily available.

Nucypher-Ops

Let's do this.

5.1 Installing nucypher-ops

Begin by typing exit and hitting ENTER to close your terminal. Then re-open your Ubuntu instance if you're on  Windows, or reopen your terminal if you're on a  Mac. Then execute the following:

pip install nucypher-ops

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

Nucypher-ops installed

5.2 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 necessary software for you.

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

Nucypher-ops

Provide your API Key and press ENTER.

Nucypher-ops

Provide your SSH Fingerprint and press ENTER.

Nucypher-ops

Then be patient.

Nucypher-ops

Nucypher-ops

5.3 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.

Ursula

Wait for it...

Ursula

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

5.4 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

Warning

Keep in mind staking is an active process, and that you are responsible for OPSEC, as well as backing up any relevant data.