curl -sL "https://raw.github.com/fwd/nano-docker/master/install.sh" | sh
git clone https://github.com/fwd/nano-docker.git
cd nano-docker && sudo ./setup.sh -f -t V27.1 -m -p 8080
- -f: Fast Sync (Default: True)
- -t: Node Version (Default: Latest)
- -m: Node Monitor (Default: False)
- -p: Node Monitor Port (Default: 80)
- -q: Console Output (Default: False)
- -s: Print Private Key (Default: False)
- -v: Alias of -t. Because life.
Software:
- Ubuntu/Debian ✅
- Other Linux ❌
- Mac ❌ (Run Ubuntu in VM)
- Window ❌ (Run Ubuntu in VM)
Minimum Hardware:
- 4 CPU
- 8GB RAM
- 320 GB SSD (Ledger: ~110GB 7Zip, Expandable attached storage recommended)
- 1TB BANDWIDTH
- ON 24/7
Optional Reading: How To Setup a Server on Digital Ocean
1. Install Docker
# Install Basic Tools
sudo apt-get -y install jq curl p7zip-full
# Add Docker PGP Key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# Add Remote Docker Repo
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Run Update (Fetch latest packages)
sudo apt-get update
# Finally, Install Docker and Dependencies.
sudo apt-get -y install jq docker-ce docker-ce-cli containerd.io
2. Install Docker Compose
# Download latest script.
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# Make it executable
sudo chmod +x /usr/local/bin/docker-compose
# Make it a global
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
# Move to HOME, and clone repo
cd ~ && git clone https://github.com/fwd/nano-docker.git
# For "Docker" reasons. We need to move in the cloned dir.
cd ~/nano-docker
# Leave -v blank for latest version
sudo ./setup.sh -s
- Unlock Wallet RPC.
- Set up Node on localhost port 7076. Use '[::1]:7076' for IPv6.
- Node Websocket set up on localhost port 7078. Use '[::1]:7078' for IPv6.
- Node not accessible from Internet. Bring your own "Proxy".
- See setup.sh for complete setup script.
Usage:
$ curl -g -d '{ "action": "version" }' '[::1]:7076'
$ curl -g -d '{ "action": "block_count" }' '[::1]:7076'
$ curl -g -d '{ "action": "telemetry" }' '[::1]:7076'
docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
nano-node - 172.XX.X.X
Give a ⭐️ if this project helped you!
Contributions, issues and feature requests are welcome at issues page.
- Email: support@nano.to
- Twitter: @nano2dev
- Discord: Nano.to Discord
MIT License
Copyright @nano2dev.