Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Monero Node


Store Monero Node on an external drive.

  • First, do the same as in the LUKS guide for the drive.
  • Assuming that /dev/sdb is the drive

Tux

If you don't use sudo, just change it to sudo

Preparing the Drive

sudo fdisk /dev/sdb
n
# Enter
# Enter
# Enter
# Enter
w

Optional encryption

sudo cryptsetup luksFormat /dev/sdb1
sudo cryptsetup open /dev/sdb1 a
sudo mkfs.ext4 /dev/mapper/a
sudo cryptsetup close a
sync 

Downloading monerod

Install monerod in your distro of choice

# In Archlinux
sudo pacman -S monero
# In Debian 
sudo apt install monero
# With Homebrew
brew install monero

or

In other distros install wget and ->

wget https://downloads.getmonero.org/gui/linux64
# Or if you prefer only cli
wget https://downloads.getmonero.org/cli/linux64
tar -xvf linux64
# ...
sudo cp monerod /usr/local/bin/
sudo cp monero-wallet-cli /usr/local/bin/
# Or just
sudo mv monero* /usr/local/bin/

or

Recommended to create a user without sudo for only monero

Setting up Monero

sudo useradd --system --shell /usr/sbin/nologin --home-dir /var/lib/monero monero

sudo mkdir -p /mnt/monero-node/
sudo mount /dev/xxx /mnt/monero-node
sudo mkdir -p /mnt/monero-node/.bitmonero   # Your blockchain storage location
sudo mkdir -p /var/log/monero               # Log directory
sudo mkdir -p /etc/monero                   # Configuration directory
sudo mkdir -p /run/monero
sudo chown monero:monero /run/monero

# Set ownership for blockchain directory
sudo chown -R monero:monero /mnt/monero-node/.bitmonero
sudo chmod 750 /mnt/monero-node/.bitmonero

# Set ownership for log directory
sudo chown -R monero:monero /var/log/monero
sudo chmod 750 /var/log/monero

# Create the monerod configuration file
sudo vim /etc/monero/monerod.conf

sudo chown root:monero /etc/monero/monerod.conf
sudo chmod 640 /etc/monero/monerod.conf

Firewall

sudo firewall-cmd --permanent --add-port=18089/tcp --zone=drop
sudo firewall-cmd --reload

Run Monerod

There are 2 alternatives; Service or Terminal

Monerod Service

# Create the systemd service file
sudo vim /etc/systemd/system/monerod.service
sudo systemctl daemon-reload
sudo systemctl enable monerod
sudo systemctl start monerod
sudo systemctl status monerod

Monerod in Terminal

sudo -u monero /usr/local/bin/monerod --config-file=/etc/monero/monerod.conf

Homebrew (In Linux)

sudo -u monero /home/linuxbrew/.linuxbrew/bin/monerod --config-file=/etc/monero/monerod.conf

Cli Wallet

monero-wallet-cli --trusted-daemon --daemon-login username

Monero Ban List

Github repo

In monero