pull down to refresh

Check out the precursors to this guide:

  1. https://expatriotic.me/ubuntu
  2. https://expatriotic.me/monero

A Practical Guide to Solo Monero Mining on Linux

The allure of cryptocurrency often lies in its promise of financial sovereignty. Yet, for many, the journey stops at buying coins on a centralized exchange (usually requiring https://kycnot.me), leaving the true power of decentralized networks untapped. Mining, the process of securing the network and minting new coins, is the ultimate act of participation.
While Bitcoin mining has largely moved to industrial-scale operations, Monero (XMR) remains steadfast in its commitment to egalitarian mining. Its RandomX algorithm is designed to be ASIC-resistant, meaning the CPU in your everyday computer can compete effectively.
This guide will walk you through setting up a Monero node, a command-line wallet, and the XMRig miner on a Linux system. We will focus on solo mining, a "lottery" style approach where you mine alone against the entire network. The odds are long, but the reward for finding a block—currently around 0.6 XMR—is entirely yours.

Prerequisites

  • A Linux computer: This guide assumes a Debian-based distribution like Ubuntu or Linux Mint.
  • Internet connection: A stable connection is required to sync with the Monero network.
  • Terminal proficiency: We will be working entirely within the command line.
  • Patience: Syncing the blockchain for the first time can take hours or even days, depending on your hardware and internet speed.

Step 1: Secure Your Environment

Before handling any financial software, ensure your system is up-to-date and secure.
sudo apt update && sudo apt upgrade -y
It's also a good practice to install a terminal multiplexer like tmux. This allows you to run long-running processes like the node and miner in the background without keeping a terminal window open.
sudo apt install tmux -y

Step 2: Install the Monero Daemon (monerod)

The daemon is the backbone of your operation. It connects to the peer-to-peer network, downloads the blockchain, and validates transactions. Running your own node is the only way to use Monero privately and securely without trusting a third party.
  1. Download the latest binaries: Visit the https://www.getmonero.org/downloads/ to find the latest Linux 64-bit CLI URL.
    cd ~
    # Replace the URL below with the latest version
    wget https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.3.1.tar.bz2
    
  2. Extract the archive:
    tar -xvf monero-linux-x64-v0.18.3.1.tar.bz2
    
  3. Move to a clean directory (optional but recommended):
    mv monero-x86_64-linux-gnu-v0.18.3.1 ~/monero
    cd ~/monero
    
  4. Start the daemon: We'll use tmux to keep it running.
    tmux new -s node
    ./monerod
    
The daemon will now begin synchronizing with the network. This process involves downloading the entire transaction history of Monero. You'll see messages like "Synced 100000/3000000". You must wait for it to be 100% synced before you can mine or use your wallet effectively.
To detach from the tmux session and leave it running, press Ctrl+B, release, then press D. To re-attach later to check progress, run tmux attach -t node.

Step 3: Create a Command-Line Wallet

While the daemon syncs, you can generate your wallet. The monero-wallet-cli tool is a powerful, no-nonsense interface for managing your funds.
  1. Open a new terminal window and navigate to your Monero directory:
    cd ~/monero
    
  2. Launch the wallet creation tool:
    ./monero-wallet-cli
    
  3. Follow the prompts:
    • Wallet name: Give it a name (e.g., primary_wallet).
    • Password: Choose a strong, unique password. You will need this every time you open the wallet.
    • Language: Select your preferred language for the mnemonic seed.
  4. Record your seed phrase: The tool will display a 25-word mnemonic seed. Write this down on paper and store it securely offline. This is the only way to recover your funds if your computer dies or you forget your password. Anyone with this seed has full control of your wallet.
  5. Get your address: Once the wallet is open, type address to display your public address (it starts with a 4). Copy this; you'll need it for the miner.
Type exit to close the wallet for now.

Step 4: Install and Configure XMRig

XMRig is the gold standard for Monero CPU mining. It's highly optimized and open-source.
  1. Download XMRig: Get the latest Linux static build from the https://github.com/xmrig/xmrig/releases.
    cd ~
    # Replace URL with latest version
    wget https://github.com/xmrig/xmrig/releases/download/v6.21.0/xmrig-6.21.0-linux-static-x64.tar.gz
    
  2. Extract the archive:
    tar -xvf xmrig-6.21.0-linux-static-x64.tar.gz
    cd xmrig-6.21.0
    
  3. Prepare the mining command: We will run XMRig in its own tmux session. The command tells it to connect to your local node and mine to your wallet address.
    Replace YOUR_WALLET_ADDRESS with the address you copied in Step 3.
    tmux new -s miner
    sudo ./xmrig --daemon -o 127.0.0.1:18081 -u YOUR_WALLET_ADDRESS --coin monero --daemon-poll-interval 1000
    
    • sudo: Required for XMRig to apply huge pages and MSR optimizations for maximum hashrate.
    • --daemon: Tells XMRig you are solo mining to a node, not a pool.
    • -o 127.0.0.1:18081: Connects to the node running on your local machine.
    • --daemon-poll-interval 1000: Checks for new blocks every second, crucial for solo mining.

Step 5: The Waiting Game

Once your node is fully synced and XMRig is running, you are officially a solo miner.
  • In the XMRig window, you'll see your CPU's hashrate (e.g., 3500 H/s).
  • Press h in the XMRig window to see a hashrate report.
  • You will not see "shares accepted" like you would in a pool. You are looking for a message indicating a block was found.
Understanding the Odds:
Solo mining is a game of patience and probability. Your chance of finding a block is your hash rate divided by the total network hash rate. With a typical CPU, you might find a block once every few months or even years. But when you do, the entire block reward is yours.
It is not a path to quick riches, but it is a path to understanding and supporting the infrastructure of sound, private money. Good luck.
100 sats \ 0 replies \ @Lux 10h
egalitarian mining
commies
reply
reply
0 sats \ 0 replies \ @OT 9h
I think it's the wrong place to post it.
If bitcoiners want to look into Monero they can venture out of the Bitcoin bubble and learn about it. They'll probably find that you won't ever need Monero too.
reply