Nimble - Host Setup and Starting Mining
Join the $PLAY airdrop 🔥 campaign and prepare for PlayFi’s upcoming node sale.
Set Up Nimble Miner
This mining guide assumes the following:
- You have already created and approved the wallets.
- You’re logged into the rented machine via SSH or web terminal (unless you use your GPU).
I’ve prepared different versions of the mining setup script, which are listed in the relevant tabs below.
- Standard: based on the official docs with minor customization to prettify TMUX output.
- Alternative: a slightly revised version of the standard that solves the library version error if you get it.
- Multi-GPU: the same as the alternative one; adjusted for the multi GPU/wallet setups.
Copy and paste the code for each code block by clicking the button in the upper right corner and paste it into your terminal.
Paste the code into your terminal, replace your_address with one of your sub-wallets, and hit Enter.
export NIMBLE_WALLET_ADDRESS=your_address
Paste the code in your terminal, and hit Enter. This will install the required libraries and start the mining process in the background session.
If you get ERROR: Could not find a version that satisfies the requirement numpy==1.26.4 when running the command, try the Alternative Version.
cat <<EOF > $HOME/nodepedia.sh
#!/bin/bash
echo "Installing required libraries..."
apt update && apt install -y --no-install-recommends python3-pip python3-venv tmux nano git jq
echo ""
echo "-- SETTING UP THE NIMBLE MINER --"
echo "NIMBLE_WALLET_ADDRESS: $NIMBLE_WALLET_ADDRESS"
echo ""
echo "If something does not look right, press Ctrl+C to abort."
sleep 5
echo "NodePedia: This file is for quick identification of your miner but is otherwise redundant." > "memo-nimble-wallet-$NIMBLE_WALLET_ADDRESS"
mkdir -p $HOME/nimble && cd $HOME/nimble
echo "Downloading the Nimble client and installing the dependencies."
git clone https://github.com/nimble-technology/nimble-miner-public.git
cd nimble-miner-public
make install
# Customize TMUX
echo -e 'set -g status-bg cyan\nset -g window-status-style bg=yellow\nset -g window-status-current-style bg=red,fg=white' > $HOME/.tmux.conf
tmux source-file $HOME/.tmux.conf
echo "Starting the Nimble Miner session."
tmux new-session -d -s "nimble" "make run addr=${NIMBLE_WALLET_ADDRESS}" || echo 'ERROR: the TMUX session has not started.'
echo "Waiting a few seconds to let tmux sessions start (or fail)..."
sleep 5
echo "Current TMUX sessions:"
tmux ls
echo 'Use "tmux a -t nimble" to attach the session, Ctrl+B, and then D to detach.'
EOF
chmod +x $HOME/nodepedia.sh && $HOME/nodepedia.sh
If you get this error, try the below version, which tweaks the requirements.txt file.
Paste the code into your terminal, replace your_address with one of your sub-wallets, and hit Enter.
export NIMBLE_WALLET_ADDRESS=your_address
Paste the code in your terminal, and hit Enter. This will install the required libraries and start the mining process in the background session.
cat <<EOF > $HOME/nodepedia.sh
#!/bin/bash
echo "Installing required libraries..."
apt update && apt install -y --no-install-recommends python3-pip python3-venv tmux nano git jq
echo ""
echo "-- SETTING UP THE NIMBLE MINER --"
echo "NIMBLE_WALLET_ADDRESS: $NIMBLE_WALLET_ADDRESS"
echo ""
echo "If something does not look right, press Ctrl+C to abort."
sleep 5
echo "NodePedia: This file is for quick identification of your miner but is otherwise redundant." > "memo-nimble-wallet-$NIMBLE_WALLET_ADDRESS"
mkdir -p $HOME/nimble && cd $HOME/nimble
echo "Downloading the Nimble client and installing the dependencies."
git clone https://github.com/nimble-technology/nimble-miner-public.git
cd nimble-miner-public
sed -i 's/numpy==1.26.[0-9]\+/numpy==1.24/g' requirements.txt
echo 'fsspec==2023.10.0' >> requirements.txt
make install
# Customize TMUX
echo -e 'set -g status-bg cyan\nset -g window-status-style bg=yellow\nset -g window-status-current-style bg=red,fg=white' > $HOME/.tmux.conf
tmux source-file $HOME/.tmux.conf
echo "Starting the Nimble Miner session."
tmux new-session -d -s "nimble" "make run addr=${NIMBLE_WALLET_ADDRESS}" || echo 'ERROR: the TMUX session has not started.'
echo "Waiting a few seconds to let tmux sessions start (or fail)..."
sleep 5
echo "Current TMUX sessions:"
tmux ls
echo 'Use "tmux a -t nimble" to attach the session, Ctrl+B, and then D to detach.'
EOF
chmod +x $HOME/nodepedia.sh && $HOME/nodepedia.sh
Paste the code into your terminal, replace your_address_1, your_address_2, etc., with your sub-wallets, and hit Enter. You can add an arbitrary number of wallet addresses separated by a space, but these should not exceed the number of GPUs on the host.
export NIMBLE_WALLETS="your_address_1 your_address_2"
Paste the code in your terminal, and hit Enter. This will install the required libraries and start mining for each wallet address in a separate background session.
cat <<EOF > $HOME/nodepedia.sh
#!/bin/bash
echo "Installing required libraries..."
apt update && apt install -y --no-install-recommends python3-pip python3-venv tmux nano git jq
echo ""
echo "-- SETTING UP THE NIMBLE MINERS --"
ADDR_LIST="${NIMBLE_WALLETS}"
INDEX=0
for NIMBLE_WALLET_ADDRESS in \$ADDR_LIST; do
echo "(\$INDEX) - \$NIMBLE_WALLET_ADDRESS"
let INDEX=\$INDEX+1
done
echo "NOTE: This machine must have \$INDEX GPUs to match the number of wallets you're adding."
echo ""
echo "If something does not look right, press Ctrl+C to abort."
sleep 10
mkdir -p $HOME/nimble && cd $HOME/nimble
echo "Downloading the Nimble client and installing the dependencies."
git clone https://github.com/nimble-technology/nimble-miner-public.git
cd nimble-miner-public
sed -i 's/numpy==1.26.[0-9]\+/numpy==1.24/g' requirements.txt
echo 'fsspec==2023.10.0' >> requirements.txt
make install
# Customize TMUX
echo -e 'set -g status-bg cyan\nset -g window-status-style bg=yellow\nset -g window-status-current-style bg=red,fg=white' > $HOME/.tmux.conf
tmux source-file $HOME/.tmux.conf
echo "Starting the Nimble Miner sessions."
INDEX=0
for NIMBLE_WALLET_ADDRESS in \$ADDR_LIST; do
echo "Starting the TMUX session for (\$INDEX) \$NIMBLE_WALLET_ADDRESS"
tmux new-session -d -s nimble\$INDEX "CUDA_VISIBLE_DEVICES=\$INDEX make run addr=\$NIMBLE_WALLET_ADDRESS" || echo 'ERROR: the TMUX session has not started.'
let INDEX=\$INDEX+1
done
echo "Waiting a few seconds to let tmux sessions start (or fail)..."
sleep 5
echo "Current TMUX sessions:"
tmux ls
INDEX=0
for NIMBLE_WALLET_ADDRESS in \$ADDR_LIST; do
echo "Use 'tmux a -t nimble\${INDEX}' to attach the session for \$NIMBLE_WALLET_ADDRESS."
let INDEX=\$INDEX+1
done
echo "To detach: Ctrl+B then D."
EOF
chmod +x $HOME/nodepedia.sh && $HOME/nodepedia.sh
Once all libraries are installed, you should see the task running in a tmux session. Use tmux attach
or tmux a -t nimble
commands to view the mining process, and the keyboard shortcuts ‘Ctrl+B’ then ‘D’ to detach from the session.
For multi-GPU setups, use the tmux ls
command to see the current sessions and then tmux a -t session_name, e.g., tmux a -t nimble1
, for each session separately.
Refer to the Tips & Tricks page for different ways of printing the tmux session and logs.
Hop into Nimble’s Discord, and let us know if something goes wrong. Feel free to tag @DS, although I may need more time to respond.