{"id":21082746,"url":"https://github.com/renproject/darknode-cli","last_synced_at":"2025-05-16T09:32:10.744Z","repository":{"id":32927371,"uuid":"137824635","full_name":"renproject/darknode-cli","owner":"renproject","description":"Tool for deploying and managing Darknodes ","archived":false,"fork":false,"pushed_at":"2023-09-19T16:08:56.000Z","size":85138,"stargazers_count":53,"open_issues_count":15,"forks_count":23,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-06-18T22:55:12.959Z","etag":null,"topics":["cli","darknode","darknode-cli","digital-ocean","golang","ren"],"latest_commit_sha":null,"homepage":"https://renproject.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renproject.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-19T01:24:34.000Z","updated_at":"2023-09-18T22:35:07.000Z","dependencies_parsed_at":"2022-07-31T10:37:59.109Z","dependency_job_id":null,"html_url":"https://github.com/renproject/darknode-cli","commit_stats":null,"previous_names":["republicprotocol/darknode-cli"],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Fdarknode-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Fdarknode-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Fdarknode-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Fdarknode-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renproject","download_url":"https://codeload.github.com/renproject/darknode-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225419562,"owners_count":17471434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","darknode","darknode-cli","digital-ocean","golang","ren"],"created_at":"2024-11-19T20:15:12.129Z","updated_at":"2024-11-19T20:15:12.958Z","avatar_url":"https://github.com/renproject.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Darknode CLI\n\nThe Darknode CLI is a command-line interface for managing Darknodes on Ren. It is installed on your local workspace, and will automatically create and update machines for you. Currently it supports **macOS**, **Linux** and **Window**(see [Windows Instructions](docs/windows-instructions.md)). \n\n![](./docs/darknode-cli-overview.jpg)\n\n## Getting Started on AWS\n\nTo jump straight into running your first Darknode on AWS, checkout our [Getting Started on AWS](./docs/getting-started-on-aws.md) tutorial.\n\n## Getting Started on Digital Ocean\n \nCheckout the instructions for [Creating a Personal Access Token](https://www.github.com/renproject/darknode-cli#digital-ocean) on Digital Ocean.\n\n\n## Installing the tool\n\nTo download and install the Darknode CLI, open a terminal and run:\n\n```sh\ncurl https://www.github.com/renproject/darknode-cli/releases/latest/download/install.sh -sSfL | sh\n```\n\nThis will download the required binaries and install them to the `$HOME/.darknode` directory. Open a new terminal to begin using the Darknode CLI.\n\n## Updating the tool\n\n**Before updating the Darknode CLI, please make sure you do not have the CLI running in any terminal.**\n\nTo update your Darknode CLI, open a terminal and run:\n\n```sh\ncurl https://www.github.com/renproject/darknode-cli/releases/latest/download/update.sh -sSfL | sh\n```\n\n\u003e Note: make sure you are using Terraform version 0.12! To upgrade Terraform, download the executable for your operating system from https://www.terraform.io/downloads.html and copy it to `$HOME/.darknode/bin/terraform`.\n\nThis will update your Darknode CLI to the latest version without affecting any of your deployed nodes.\n\n## Usage\n\n_Here there be dragons!_\n\nThese guidelines are for advanced users. If you just want to see what deploying a Testnet Darknode is like, checkout our [Getting Started on AWS](./docs/getting-started-on-aws.md) tutorial.\n\n### Deploy a Darknode\n\n#### AWS\n\nTo deploy a Darknode on AWS, open a terminal and run:\n\n```sh\ndarknode up --name my-first-darknode --aws --aws-access-key YOUR-AWS-ACCESS-KEY --aws-secret-key YOUR-AWS-SECRET-KEY\n``` \n\nThe Darknode CLI will automatically use the credentials available at `$HOME/.aws/credentials` if you do not explicitly set the `--access-key` and `--secret-key` arguments.\nBy default it will use the credentials of `default` profile,but you can specify which profile you want to use for deployment by:\n\n```sh\ndarknode up --name my-first-darknode --aws --aws-profile PROFILE-NAME\n```\n\nYou can also specify the region and instance type you want to use for the Darknode:\n\n```sh\ndarknode up --name my-first-darknode --aws --aws-access-key YOUR-AWS-ACCESS-KEY --aws-secret-key YOUR-AWS-SECRET-KEY --aws-region eu-west-1 --aws-instance t2.small\n``` \nThe default instance type is `t3.micro` and region will be random.\nYou can find all available regions and instance types at [AWS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html).\n\n#### Digital Ocean\n\nFollow the steps in the [tutorial](https://www.digitalocean.com/docs/api/create-personal-access-token/) to create a API token. \nTo deploy a Darknode on Digital Ocean, open a terminal and run:\n\n```sh\ndarknode up --name my-first-darknode --do --do-token YOUR-API-TOKEN\n``` \n\nYou can also specify the region and droplet size you want to use for the Darknode:\n\n```sh\ndarknode up --name my-first-darknode --do --do-token YOUR-API-TOKEN --do-region nyc1 --do-droplet s-2vcpu-2gb\n``` \n\nThe default droplet size is `s-1vcpu-1gb` and region will be random. \nBe aware some region and droplet size are not available to all users.\n\nYou can find all available regions and droplet size slug by using the digital ocean [API](https://developers.digitalocean.com/documentation/v2/#regions).\n\n### Showing register page\n\nThe darknode-cli will show a link for registering your darknode after finish deploying. Don't panic if you lose the url. \nSimply run \n\n```sh\ndarknode register YOUR-DARKNODE-NAME\n``` \n\nwhich prints the registering link in the terminal and tries to open the url using your default browser.\n\n### Destroy a Darknode\n\n_**WARNING: Before destroying a Darknode make sure you have de-registered it, and withdrawn all fees earned! You will not be able to destroy your darknode if it's not fully deregistered. The CLI will guide you to the page where you can deregister your node**_\n\nDestroying a Darknode will turn it off and tear down all resources allocated by the cloud provider. To destroy a Darknode, open a terminal and run:\n\n```sh\ndarknode destroy my-first-darknode\n``` \n\nTo avoid the command-line prompt confirming the destruction, use the `--force` argument: \n\n```sh\ndarknode destroy my-first-darknode --force\n```\n\nWe do not recommend using the `--force` argument unless you are developing custom tools that manage your Darknodes automatically.\n\n### Resize a Darknode \n\nTo resize the instance type your Darknode is using, open a terminal and run:\n```sh\ndarknode resize YOUR-DARKNODE-NAME NEW_INSTANCE_TYPE\n```\n\nIf you are using AWS, you will need to replace the `NEW_INSTANCE_TYPE` field with the AWS EC2 instance type you wish to use, e.g. `t3.micro` or `t2.medium`.\"\n```sh\ndarknode resize YOUR-DARKNODE-NAME t3.small\n```\nYou can find all available instance types at [AWS](https://aws.amazon.com/ec2/instance-types).\n\nIf you are using DigitalOcean, you will need to replace the `NEW_INSTANCE_TYPE` field with the DigitalOcean droplet slug you wish to use, e.g. `s-1vcpu-2gb` or `s-1vcpu-1gb`.\n```sh\ndarknode resize YOUR-DARKNODE-NAME s-1vcpu-2gb\n``` \n\nChanging droplet size will not change the storage volume of the instance, this allows user to resize down to a lower plan in the future. You can find all available droplet slugs at [Digital Ocean Standard plans](https://developers.digitalocean.com/documentation/changelog/api-v2/new-size-slugs-for-droplet-plan-changes/) and [DigitalOcean API Slugs](https://slugs.do-api.dev/)\n\n\u003e If you accidentally try to resize to a invalid instance, the darknode will be stopped. You need to run the command again with a valid instance type to restart the darknode. \n\n\n### List all Darknodes\n\nThe Darknode CLI supports deploying multiple Darknodes. To list all available Darknodes, open a terminal and run:\n\n```sh\ndarknode list\n```\n\n### Start/Stop/Restart Darknode\n\nTo turn off your darknode, open a terminal and run: \n\n```sh\ndarknode stop my-first-darknode\n\n``` \n\nNote this won't shut down the cloud instance so you will still be charged by your cloud provider. \nIf it is already off, `stop` will do nothing.\n\n\nTo turn on your darknode, open a terminal and run: \n\n```sh\ndarknode start my-first-darknode\n``` \n\nIf it is already on, `start` will do nothing.\n\nTo restart your darknode, open a terminal and run: \n\n```sh\ndarknode restart my-first-darknode\n``` \n\n### SSH into Darknode\n\nTo access your Darknode using SSH, open a terminal and run:\n\n```sh\ndarknode ssh my-first-darknode\n``` \n\n### Update a Darknode\n\nTo update your Darknode to the latest stable version, open a terminal and run:\n\n```sh\ndarknode update YOUR-DARKNODE-NAME\n``` \n\nTo update the configuration of your darknode, first edit the local version of config, by running:\n\n```sh\nnano $HOME/.darknode/darknodes/YOUR-DARKNODE-NAME/config.json\n``` \n\nand now run:\n\n```sh\ndarknode update my-first-darknode --config\n``` \n\n### Withdraw balance from the Darknode\n\nTo withdraw any ETH left in the darknode address, open a terminal and run:\n\n```sh\ndarknode withdraw YOUR-DARKNODE-NAME --address RECEIVER-ETHEREUM-ADDRESS\n``` \n\n\u003e Note: This will also withdraw any REN in the darknode address. Keep in mind this will only withdraw the ETH and REN the address holds directly, not the rewards it receives by matching orders.\n\n### Running commands(script) on your darknode\n\nIf you want to run a specific command on your darknode. open a terminal and run:\n                                                                            \n```sh\ndarknode exec YOUR-DARKNODE-NAME --script \"whoami\"\n``` \n\nor a script file\n\n```sh\ndarknode exec YOUR-DARKNODE-NAME --file test.sh\n``` \n\n### Github rate limiting\n\nYou can set the `GITHUB_TOKEN` environment variable to increase your github rate limit. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenproject%2Fdarknode-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenproject%2Fdarknode-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenproject%2Fdarknode-cli/lists"}