← Back
Nano.to Blog

Introducing Nano Docker - One-Click Nano Currency Node Installation

❯ Quick

curl -sL "https://raw.github.com/fwd/nano-docker/master/install.sh" | sh

❯ Custom

git clone https://github.com/fwd/nano-docker.git
cd nano-docker && sudo ./setup.sh -f -t V25.1 -m -p 8080

Flags

Requirements

Software:

Minimum Hardware:

Optional Reading: How To Setup a Server on Digital Ocean


Understand The Magic 🪄 (Optional)

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

3. Install This Repo

# 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

4. Configure Node

5. Talk to Node

Usage:
$ curl -g -d '{ "action": "version" }' '[::1]:7076'
$ curl -g -d '{ "action": "block_count" }' '[::1]:7076'
$ curl -g -d '{ "action": "telemetry" }' '[::1]:7076'

Node Docker IP

docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
nano-node - 172.XX.X.X

Further Reading

Nano.to Support

Bugs, Questions & Installation Support:

Donation Fund

Like the work that we do? Donate Nano to our monthly fund. It helps us make more cool stuff every month.

More Articles