Before installing and using the Darknode CLI, make sure that you have created an AWS account.
It is not recommended to use your default account for managing your Darknodes. Instead, we recommend creating a custom user.
Make sure you have created an account, and then go to the AWS Console. Enter IAM into the search bar. You should see something like this
Press enter, or click the IAM option in the search results. You should see something like this
Click Users. You should see something like this
Click Add user. You should see something like this
Name the user darknode and make sure to check Programmatic Access. Then, click Next: Permissions. You should see something like this
Click Create group. You should see something like this
Name the group darknode and make sure to check AmazonEC2FullAccess. Then, click Create group. You should see something like this
Click Next: Review. You should see something like this
Click Create user. You should see something like this
Download the CSV file containing your access key ID, and your secret access key. Make sure you keep these values secure, anyone with access to them will be able to control your Darknode.
To install the Darknode CLI, open a terminal and run:
curl https://www.github.com/renproject/darknode-cli/releases/latest/download/install.sh -sSfL | sh
Once this has finished, close the terminal and open a new one.
If this step fails, you might have to wait 24 hous before being able to use your AWS account.
Now, you can deploy a Darknode. Think of a catchy name, and run:
darknode up --name my-first-darknode --aws --aws-access-key YOUR-AWS-ACCESS-KEY --aws-secret-key YOUR-AWS-SECRET-KEY
Once this has finished, it will give you a link that you can use to register your Darknode and send it ETH.
Congratulations! You have deployed your first Darknode. You can deploy as many as you like, distinguishing between them by their names. If you forget what you called them, you can list all available Darknodes by running:
darknode list
It is important to keep your Darknode updated to the latest verison. This will ensure that you are compatible with the rest of the network, and that you have the latest security updates and bug fixes.
To update a Darknode, run:
darknode update --name my-first-darknode