Unix GPU miner setup
For Ubuntu 16.04

First set up your wallet.

  1. cd to your home directory. Do not run the wallet as root!
  2. Execute: sudo apt-get install gcc libssl-dev libgmp3-dev build-essential git
  3. Execute: git clone https://github.com/XDagger/xdag.git
  4. Change directory: cd ./xdag/client
  5. Run: make
  6. Run the wallet with ./xdag -d -m 1 ca1.xdag.org:443. Set up your wallet password, type random keys (at least 3 lines of random keys). Wait until host keys are generated.
  7. Execute ./xdag -i. Type terminate and press enter.
  8. cd to your home directory.
  9. Execute:
    cat << 'EOD' > ./xdag_wallet_console.sh
    #!/bin/bash
    
    pidof xdag > /dev/null
    
    if [ "$?" -ne 0 ]; then
    	echo "Wallet not running! Start it with ./xdag_wallet_run.sh"
    	exit 1
    fi
    
    echo Starting wallet console...
    (cd ./xdag/client && ./xdag -i)
    echo -n "Wallet PIDs: "
    pidof xdag
    EOD
    				
  10. Execute:
    cat << 'EOD' > ./xdag_wallet_run.sh
    #!/bin/bash
    
    PIDS="`pidof xdag`"
    
    if [ "$?" -eq 0 ]; then
    	echo "Wallet already running? PIDs: ${PIDS}"
    	echo "run ./xdag_wallet_console.sh and type 'terminate' to terminate the wallet."
    	exit 1
    fi
    
    echo Starting wallet...
    (cd ./xdag/client && ./xdag -d -m 1 ca1.xdag.org:443)
    echo -n "Wallet PIDs: "
    pidof xdag
    EOD
    				
    Replace 4 with number of mining threads, for dedicated mining machines, set this to number of CPU threads. You can control this later by typing mining N in the XDAG console, where N is the number of mining threads you want to run.
  11. Execute:
    cat << 'EOD' > ./xdag_wallet_update.sh
    #!/bin/bash
    
    PIDS="`pidof xdag`"
    
    if [ "$?" -eq 0 ]; then
    	echo "Wallet is running! Stop it before updating. PIDs: ${PIDS}"
    	echo "run ./xdag_wallet_console.sh and type 'terminate' to terminate the wallet."
    exit 1
    fi
    
    echo Updating git repository...
    (cd ./xdag && git pull && cd ./client && make)
    
    echo "Done! Start the wallet with ./xdag_wallet_run.sh"
    EOD
    				
  12. Execute: chmod +x xdag_*

Your wallet is now ready. Next the GPU miner will be set up.

  1. As root, install AMD APP SDK that matches your distribution. This is necessary for both AMD and NVIDIA cards.
  2. Install graphics card drivers for <a href="https://support.amd.com/en-us/download/linux" target="_blank">AMD</a> or <a href="http://www.nvidia.com/object/unix.html" target="_blank">NVIDIA</a> depending on which cards you have.
  3. cd to your home directory. Do not run the GPU miner as root!
  4. Execute: sudo apt-get install git gcc libssl-dev make ocl-icd-opencl-dev libboost-all-dev screen
  5. Execute: git clone https://github.com/jonano614/DaggerGpuMiner.git
  6. Execute: cd DaggerGpuMiner/GpuMiner
  7. Execute: make all
  8. cd to your home directory.
  9. Execute: ./xdag_wallet_run.sh. Type your wallet password, then execute ./xdag_wallet_console.sh. Type account. Copy your wallet address. Type terminate to close your wallet.
  10. Execute:
    cat << 'EOD' > ./xdag_miner_run.sh
    #!/bin/bash
    
    PIDS="`pidof xdag-gpu`"
    
    if [ "$?" -eq 0 ]; then
    	echo "Miner already running? PIDs: ${PIDS}"
    	echo "run 'screen -x' and press CTRL+C to terminate the miner."
    	exit 1
    fi
    
    if [ "$STY" == "" ]; then
    	echo "Please execute 'screen' first before executing this script."
    	exit 1
    fi
    
    echo Starting miner...
    (cd ./DaggerGpuMiner/GpuMiner && ./xdag-gpu -G -a wallet_address -p ca1.xdag.org:443 -t 0 -v 2 -opencl-platform platform_id -opencl-devices device_nums)
    echo -n "Miner PIDs: "
    pidof xdag-gpu
    EOD
    Replace wallet_address with the address you copied. Replace platform_id with your OpenCL platform ID, this is most usually 0 (also try 1 or 2 if necessary). If you have more than one GPU in the system, count up from zero to (number of devices - 1), so for example if you have 4 GPUs in your system, replace device_nums with 0 1 2 3. If you have only one GPU, replace device_nums with 0. To see advanced GPU miner parameters, execute ./xdag-gpu -h.
  11. Execute:
    cat << 'EOD' > ./xdag_miner_update.sh
    #!/bin/bash
    
    PIDS="`pidof xdag-gpu`"
    
    if [ "$?" -eq 0 ]; then
    	echo "Miner is running! Stop it before updating. PIDs: ${PIDS}"
    	echo "run 'screen -x' and press CTRL+C to terminate the miner."
    	exit 1
    fi
    
    echo Updating git repository...
    (cd ./DaggerGpuMiner && git pull && make all)
    
    echo "Done! Start the miner with 'screen ./xdag_miner_run.sh'."
    EOD
  12. Execute: chmod +x xdag_*
  13. Execute: screen ./xdag_miner_run.sh. Once the miner starts running, hold down CTRL and press keys a, then d. This will detach the screen program and return to your shell, with the miner stll running. You can now disconnect from the machine.

Done! Your GPU miner is now running. For usage, see the next usage section.

Note: if you are using NVIDIA GPUs, make sure you add -nvidia-fix at the end of the command line in step 10 to prevent high system gpu usage and increase your hashrate.

Note: you can assign worker names to each GPU miner instance. To specify a worker name, add -w name at the end of the command line in step 10, replacing name with your chosen worker name. Worker name can only contain english letters and numbers.

Usage
  1. To start the miner, execute screen ./xdag_miner_run.sh in your home folder and detach from screen by holding CTRL and pressing letters a, then d.
  2. To view your miner status at any time execute screen -x.
  3. To update your installation to the latest version, execute screen -x and stop the miner by pressing CTRL+C. Execute ./xdag_miner_update.sh. After this is done, execute screen ./xdag_miner_run.sh.
  4. To view your current balance at any time, execute ./xdag_wallet_run.sh in your home folder, type in your wallet password, press enter, execute ./xdag_wallet_console.sh, type balance and press enter. If you see not ready to show balance, wait a bit and type balance again, followed by enter key. When you are done, type terminate followed by enter to close your wallet. You can also use our website to check your balance at any time on the home page, or register your miner to automatically show it's balance, payouts, unpaid shares and more.
Copyright © 2018 |