├── .gitignore ├── LICENSE ├── README.md ├── docs ├── README.md ├── _config.yml ├── digitalocean.md ├── faq.md ├── manual │ └── ubuntu.md └── ubuntu.md ├── enn ├── check_nanonode.sh ├── docker-compose.yml └── setup.sh └── install.sh /.gitignore: -------------------------------------------------------------------------------- 1 | init -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Nano Tools 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Easy Nano Node 2 | 3 | # ❗ Archived: Follow the [official docs](https://docs.nano.org/running-a-node/docker-management/) for instructions! 4 | 5 | https://nanotools.github.io/easy-nano-node/ 6 | 7 | Nano nodes made simple! 8 | 9 | ## Installation 10 | 11 | ``` 12 | bash <(curl -s https://raw.githubusercontent.com/nanotools/easy-nano-node/master/install.sh) 13 | ``` 14 | 15 | ## Support 16 | 17 | If you find this tool useful show your support by changing your representative or donate to: 18 | 19 | xrb_1ninja7rh37ehfp9utkor5ixmxyg8kme8fnzc4zty145ibch8kf5jwpnzr3r 20 | 21 | Thanks a lot! 22 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Setup a Nano Node 2 | 3 | # ❗ Archived: Follow the [official docs](https://docs.nano.org/running-a-node/docker-management/) for instructions! 4 | 5 | ## With Easy-Nano-Node 6 | 7 | Please choose your system below. 8 | 9 | If you're a total beginner DigitalOcean is a good start. 10 | 11 | ### [DigitalOcean](digitalocean.md) 12 | 13 | ### [Ubuntu 16.04](ubuntu.md) 14 | 15 | ## Manually 16 | 17 | ### [Ubuntu 16.04](manual/ubuntu.md) 18 | 19 | # Support 20 | 21 | If you have any problems have look at our [FAQ](faq.md) first. 22 | You can [open an issue here](https://github.com/NanoTools/easy-nano-node/issues) or write us at the [Nano Discord](https://chat.nano.org/), we're always helpful! 23 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman 2 | title: Easy Nano Node 3 | description: Spin up a representative node in minutes! 4 | google_analytics: UA-115902726-2 -------------------------------------------------------------------------------- /docs/digitalocean.md: -------------------------------------------------------------------------------- 1 | # Setup a Nano Node on DigitalOcean 2 | 3 | 1. Sign up on DigitalOcean [with this link to get 10$ credit for free](https://m.do.co/c/f47f91d0d534) 4 | 5 | 2. Create a new Droplet 6 | 7 | ![Create Droplet](https://i.imgur.com/KhwfYJQ.png) 8 | - Select the Docker One-click App 9 | 10 | ![Docker App](https://i.imgur.com/ruTU1lU.png) 11 | - We suggest at least the 2 GB droplet because you'll need the 2 TB transfer. 12 | If you want more performance choose a bigger one 13 | 14 | ![Droplet](https://i.imgur.com/pLaZ7Xj.png) 15 | - Choose a datacenter region that's near to you 16 | - Additional Options: IPv6 17 | - Click create and wait till it's ready! 18 | 19 | 3. You'll get an email with the initial password for the root user and the Droplet IP 20 | 21 | 4. Connect to your Droplet via SSH 22 | - **Windows:** With [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) ([Tutorial](https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/putty/)) 23 | - **macOS / Linux:** SSH in Terminal ([Tutorial](https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/openssh/)) 24 | 25 | 5. You'll be prompted to change your password, choose a strong one 26 | 27 | 6. Enter the following command to start the setup: 28 | ``` 29 | bash <(curl -s https://raw.githubusercontent.com/nanotools/easy-nano-node/master/install.sh) 30 | ``` 31 | 7. Done! Please have a look at the [FAQ](faq.md). 32 | 33 | ## Support 34 | 35 | If you find this tool useful show your support by changing your representative or donate to: 36 | 37 | xrb_1ninja7rh37ehfp9utkor5ixmxyg8kme8fnzc4zty145ibch8kf5jwpnzr3r 38 | 39 | Thanks a lot! -------------------------------------------------------------------------------- /docs/faq.md: -------------------------------------------------------------------------------- 1 | # Frequently asked questions 2 | 3 | ## Q&A 4 | 5 | ### Updating 6 | Updates are done automatically! 7 | 8 | But you can always enter the install command again: 9 | 10 | ``` 11 | bash <(curl -s https://raw.githubusercontent.com/nanotools/easy-nano-node/master/install.sh) 12 | ``` 13 | 14 | Et voilà! Have a look at the Node Monitor, you should run the newest Nano Node version. 15 | 16 | ### Node Monitor Overview 17 | You have no idea what all those numbers and fields in the node monitor mean? Have a look [at the official Wiki](https://github.com/NanoTools/nanoNodeMonitor/wiki/Monitor-Overview). 18 | 19 | ### Node Monitor Config 20 | If you want to modify the Node Monitor config edit it here: `~/nanoNodeMonitor/config.php` 21 | 22 | ### Node isn't synced 23 | Let it node sync the full ledger, this can take some hours. You can always compare to the current block count [here](https://www.nanode.co/blocks). 24 | 25 | ### Account not opened 26 | The account has no transactions in the ledger. Send some Nano to the address to open it. 27 | 28 | ### Nano isn't received 29 | The Nano node has a configurable receive minimum which is at default 1 Nano. You can set it in the config.json (`~/RaiBlocks/config.json`). [More information at the wiki](https://github.com/nanocurrency/raiblocks/wiki/config.json). 30 | 31 | ### How do I send Nano from the node account? 32 | The easiest way is entering the account seed into a web wallet like [NanoVault](https://nanovault.io/). You can also use the [RPC interface](https://github.com/nanocurrency/raiblocks/wiki/RPC-protocol#send). 33 | 34 | ### Node Monitor Overview 35 | If you don't know what all those numbers in the node monitor mean [take at look at the wiki](https://github.com/NanoTools/nanoNodeMonitor/wiki/Monitor-Overview). 36 | 37 | ### Node is stuck / unresponsive 38 | Restart the Node container with `sudo docker restart enn_nanonode_1`. 39 | 40 | ### Questions not answered? 41 | You can [open an issue here](https://github.com/NanoTools/easy-nano-node/issues) or write us at the [Nano Discord](https://chat.nano.org/), we're always helpful! 42 | 43 | ## Further reading 44 | 45 | - [Official Wiki](https://github.com/nanocurrency/raiblocks/wiki) -------------------------------------------------------------------------------- /docs/manual/ubuntu.md: -------------------------------------------------------------------------------- 1 | # Setup a Nano Node on Ubuntu 16.04 2 | 3 | 1. Add GPG keys 4 | ``` 5 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 6 | ``` 7 | 8 | 2. Add Docker repo 9 | ``` 10 | sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 11 | ``` 12 | 13 | 3. Update your APT package manager 14 | ``` 15 | sudo apt-get update 16 | ``` 17 | 18 | 4. Install Docker 19 | ``` 20 | sudo apt-get install -y docker-ce 21 | ``` 22 | 23 | 5. Create a directory called _nano_ and go inside it: `mkdir nano && cd nano` 24 | 25 | 6. Create a new file called _docker-compose.yml_ with the following contents: 26 | 27 | ``` 28 | version: '3' 29 | services: 30 | monitor: 31 | image: "nanotools/nanonodemonitor" 32 | restart: "unless-stopped" 33 | ports: 34 | - "80:80" 35 | volumes: 36 | - "~:/opt" 37 | node: 38 | image: "nanocurrency/nano" 39 | restart: "unless-stopped" 40 | ports: 41 | - "7075:7075/udp" 42 | - "7075:7075" 43 | - "::1:7076:7076" 44 | volumes: 45 | - "~:/root" 46 | ``` 47 | 48 | 7. Nice! Now execute `sudo docker-compose up -d` to start everything. 49 | 50 | 8. Create a new wallet by executing: 51 | ``` 52 | sudo docker exec nano_node_1 /usr/bin/rai_node --wallet_create 53 | ``` 54 | You should get a wallet ID which you need in the next step. 55 | 56 | 9. Change the WALLETID and create a a new account by executing: 57 | ``` 58 | sudo docker exec nano_node_1 /usr/bin/rai_node --account_create --wallet= 59 | ``` 60 | You get a new Nano address starting with xrb_1234... back. 61 | 62 | 10. Get you wallet seed with: 63 | ``` 64 | sudo docker exec nano_node_1 /usr/bin/rai_node --wallet_decrypt_unsafe --wallet= 65 | ``` 66 | 67 | 11. Inside your home directory you will find a new directory called _nanoNodeMonitor_, edit the _config.php_: `cd ~/nanoNodeMonitor` 68 | 69 | 12. You will have to change the node IP to `nano_node_1` and the address to the address from step 5. Edit the other things as well if you want to. 70 | 71 | 13. Done! Please have a look at the [FAQ](../faq.md). 72 | 73 | ## Fast Sync 74 | 75 | If you sync from scratch it can take up to 3 days for the node to sync the ledger completely. You can download the current ledger by hand and replace it. 76 | 77 | 1. **Make sure that you have your seed stored safely!** It will be overwritten with this process. 78 | 79 | 2. SSH to your server, stop the node (`sudo docker stop nano_node_1`) and go to the `~/RaiBlocks` directory 80 | 81 | 3. Backup your old ledger file with: 82 | ``` 83 | mv data.ldb data.ldb.bak 84 | mv data.ldb-lock data.ldb-lock.bak 85 | ``` 86 | 87 | 4. Download the file with wget: 88 | ``` 89 | wget "https://mynano.ninja/api/ledger/download" -O ledger.7z 90 | ``` 91 | 92 | 5. Install 7zip 93 | ``` 94 | sudo apt-get install p7zip-full 95 | ``` 96 | 97 | 6. Unzip it with: 98 | ``` 99 | 7z x ledger.7z 100 | ``` 101 | 102 | 7. Start your node again with `sudo docker start nano_node_1` 103 | 104 | 8. Restore your seed with: 105 | ``` 106 | sudo docker exec nano_node_1 /usr/bin/rai_node --wallet_create 107 | ``` 108 | Replace the wallet ID you got in the next command: 109 | ``` 110 | sudo docker exec nano_node_1 /usr/bin/rai_node --wallet_change_seed --wallet= --key= 111 | ``` 112 | And create your account address: 113 | ``` 114 | sudo docker exec nano_node_1 /usr/bin/rai_node --account_create --wallet= 115 | ``` 116 | You should see your previous address again. 117 | 118 | 9. Done! 119 | 120 | 121 | ## Support 122 | 123 | If you find this tool useful show your support by changing your representative or donate to: 124 | 125 | xrb_1ninja7rh37ehfp9utkor5ixmxyg8kme8fnzc4zty145ibch8kf5jwpnzr3r 126 | 127 | Thanks a lot! 128 | -------------------------------------------------------------------------------- /docs/ubuntu.md: -------------------------------------------------------------------------------- 1 | # Setup a Nano Node on Ubuntu 16.04 2 | 3 | 1. Add GPG keys 4 | ``` 5 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 6 | ``` 7 | 8 | 2. Add Docker repo 9 | ``` 10 | sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 11 | ``` 12 | 13 | 3. Update your APT package manager 14 | ``` 15 | sudo apt-get update 16 | ``` 17 | 18 | 4. Install Docker 19 | ``` 20 | sudo apt-get install -y docker-ce 21 | ``` 22 | 23 | 5. Enter the following command to start the setup: 24 | ``` 25 | bash <(curl -s https://raw.githubusercontent.com/nanotools/easy-nano-node/master/install.sh) 26 | ``` 27 | 28 | 6. Done! Please have a look at the [FAQ](faq.md). 29 | 30 | ## Support 31 | 32 | If you find this tool useful show your support by changing your representative or donate to: 33 | 34 | xrb_1ninja7rh37ehfp9utkor5ixmxyg8kme8fnzc4zty145ibch8kf5jwpnzr3r 35 | 36 | Thanks a lot! -------------------------------------------------------------------------------- /enn/check_nanonode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | curl --connect-timeout 3 --max-time 5 -g -s -d '{ "action": "version" }' [::1]:7076 > /dev/null; 3 | if [ $? -ne 0 ]; then 4 | echo "$(date) - Restarting Nano Node..." 5 | docker restart nanonode 6 | fi; 7 | -------------------------------------------------------------------------------- /enn/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | monitor: 4 | image: "nanotools/nanonodemonitor" 5 | restart: "unless-stopped" 6 | ports: 7 | - "80:80" 8 | volumes: 9 | - "~:/opt" 10 | nanonode: 11 | image: "nanocurrency/nano" 12 | restart: "unless-stopped" 13 | ports: 14 | - "7075:7075/udp" 15 | - "7075:7075" 16 | - "::1:7076:7076" 17 | volumes: 18 | - "~:/root" 19 | watchtower: 20 | image: "v2tec/watchtower" 21 | restart: "unless-stopped" 22 | volumes: 23 | - "/var/run/docker.sock:/var/run/docker.sock" 24 | command: "enn_monitor_1 enn_nanonode_1" 25 | -------------------------------------------------------------------------------- /enn/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # goto script dir 4 | cd "$(dirname "$0")" 5 | 6 | echo "== Checking Prerequisites" 7 | # check if docker and docker-compose are installed 8 | test -f "$(which docker )" || { echo "Docker is not installed"; exit 1; } 9 | test -f "$(which docker-compose )" || { echo "Docker Compose is not installed"; exit 1; } 10 | 11 | # check if the port 80 is already in use 12 | # we need it for the node monitor 13 | if lsof -Pi :80 -sTCP:LISTEN -t >/dev/null ; then 14 | echo "The Port 80 is already in use." 15 | exit 1 16 | fi 17 | 18 | echo "== Updating Docker images" 19 | sudo docker pull nanocurrency/nano 20 | sudo docker pull nanotools/nanonodemonitor 21 | 22 | echo "== Starting Docker containers" 23 | sudo docker-compose up -d 24 | 25 | echo "== Take a deep breath..." 26 | # we need this as the node is crashing if we go on too fast 27 | sleep 5s 28 | 29 | # this is the old config 30 | if [ -f /opt/nanoNodeMonitor/modules/config.php ]; then 31 | 32 | echo "== Old monitor config found, replacing..." 33 | cp /opt/nanoNodeMonitor/modules/config.php ~/nanoNodeMonitor/config.php 34 | 35 | echo "== Removing old monitor" 36 | rm -r /opt/nanoNodeMonitor 37 | 38 | # this also means we already inited 39 | touch /opt/easy-nano-node/init 40 | 41 | fi 42 | 43 | # check if init already done 44 | if [ -f /opt/easy-nano-node/init ]; then 45 | 46 | echo "== Initialization already done, skipping ..." 47 | 48 | else 49 | 50 | echo "== Creating wallet" 51 | wallet=$(docker exec enn_nanonode_1 /usr/bin/rai_node --wallet_create) 52 | 53 | echo "== Creating account" 54 | account=$(docker exec enn_nanonode_1 /usr/bin/rai_node --account_create --wallet=$wallet | cut -d ' ' -f2) 55 | 56 | echo "== Modifying the monitor config" 57 | 58 | # uncomment account 59 | sed -i -e 's#// $nanoNodeAccount#$nanoNodeAccount#g' ~/nanoNodeMonitor/config.php 60 | 61 | # replace account 62 | sed -i -e "s/xrb_1f56swb9qtpy3yoxiscq9799nerek153w43yjc9atoaeg3e91cc9zfr89ehj/$account/g" ~/nanoNodeMonitor/config.php 63 | 64 | # uncomment ip 65 | sed -i -e 's#// $nanoNodeRPCIP#$nanoNodeRPCIP#g' ~/nanoNodeMonitor/config.php 66 | 67 | # replace ip 68 | sed -i -e 's#\[::1\]#enn_nanonode_1#g' ~/nanoNodeMonitor/config.php 69 | 70 | echo "== Disabling RPC logging" 71 | sed -i -e 's#"log_rpc": "true"#"log_rpc": "false"#g' ~/RaiBlocks/config.json 72 | 73 | echo "== Opening Nano Node Port" 74 | sudo ufw allow 7075 75 | 76 | echo "== Denying RPC Port" 77 | sudo ufw deny 7076 78 | 79 | echo "== Restarting Nano node container" 80 | sudo docker restart enn_nanonode_1 81 | 82 | echo "== Just some final magic..." 83 | # restart because we changed the config.json 84 | # and the node might be unresponsive at first 85 | sleep 5s 86 | 87 | echo "" 88 | 89 | echo -e "=== \e[31mYOUR WALLET SEED\e[39m ===" 90 | echo "Please write down your wallet seed to a piece of paper and store it safely!" 91 | docker exec enn_nanonode_1 /usr/bin/rai_node --wallet_decrypt_unsafe --wallet=$wallet | grep "Seed: " 92 | echo -e "=== \e[31mYOUR WALLET SEED\e[39m ===" 93 | 94 | # we're done, save for later 95 | touch /opt/easy-nano-node/init 96 | 97 | fi 98 | 99 | # get that nasty IP 100 | serverip=$(ip route get 8.8.8.8 | awk '{ print $NF; exit }') 101 | 102 | echo "" 103 | echo "All done! *yay*" 104 | echo "View your Nano Node Monitor at http://$serverip" 105 | echo "" 106 | echo "Have a look at the FAQ: https://nanotools.github.io/easy-nano-node/faq.html" 107 | echo "" 108 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # we need git to clone the repo 4 | test -f "$(which git )" || { echo "Git is not installed"; exit 1; } 5 | 6 | echo "== Cloning installation" 7 | # if the directory already exists pull the repo 8 | # otherwise clone it 9 | git -C /opt/easy-nano-node pull || git clone https://github.com/nanotools/easy-nano-node.git /opt/easy-nano-node 10 | 11 | echo "== Starting installation" 12 | # and fire! 13 | sudo bash /opt/easy-nano-node/enn/setup.sh --------------------------------------------------------------------------------