How to Mine Cryptocurrency with CGMiner on Ubuntu

How to Mine Cryptocurrency with CGMiner on Ubuntu

What Do I Need?

  • A Dedicated or VPS Linux Server
  • Ubuntu
  • Any USB ASIC

What is CGMiner?

CGMiner is an open-source ASIC/fpga Bitcoin miner developed for a massive range of platforms, including Windows, Linux, and OS/X. It comprises sophisticated algorithms that are developed with C programming language to utilize the maximum hardware performance to yield a profitable amount of Bitcoin with relative ease; dependent on machine performance, of course. CGMiner doesn’t currently support GPU as it’s no longer able to compensate for the power and the time consumed to mine Bitcoins, thus ASIC has to be used.

  1. Install CGMiner
      1. Update your operating system:
    sudo apt-get upgrade && apt-get update
    sudo apt-get install autoconf gcc make git 
    libcurl4-openssl-dev libncurses5-dev libtool 
    libjansson-dev libudev-dev libusb-1.0-0-dev

    cd /usr/src/
    sudo git clone https://github.com/ckolivas/cgminer.git

    cd cgminer
    ./autogen.sh

  1. Create a New Wallet
    1. There are literally, not figuratively, literally masses of different types of wallets available for storing Bitcoins. For this how-to guide, we’re going lightweight, so we’re going to be installing ‘Electrum’.
    2. Use the following commands to install both QT and Electrum on your server:
      sudo apt-get install python3-pyqt5 libsecp256k1-0 python3-cryptography

      sudo wget

      https://download.electrum.org/4.0.9/Electrum-4.0.9.tar.gz

      sudo apt-get install python3-setuptools python3-pip

      sudo python3 -m pip install --user Electrum-4.0.9.tar.gz

    1. After ‘Electrum’ is installed you can run it from your ‘Applications’.
      • Click ‘Next’.

      • Take a copy or a photograph of your wallet generation seed. Keep it secret, keep it safe; you’re going to need this.

      • Click ‘Next’ and you’ll be asked to retype your newly created seed into the text box. After having done so, click ‘Next’ again.

      • Create a password for yourself and click ‘Next’.

      • Click ‘Next’.
      • Creation will finish and the application will close. Reopen the application and you’ll see your new wallet.

  1. Join a Mining Pool
    1. Nowadays, it’s not profitable to mine Bitcoin alone on a single machine due to the costs involved; hence the pool concept was invented for making it efficient and fast. A pool is a collection of miners who work together to mine coins, and then share the production when the block is found. The fee is paid to the miners who find the blocks. Usually, the payout is available immediately, but it largely depends on the service provider.
    2. Visit http://mmpool.org/register
    3. Create a username and paste your public bitcoin address into the bitcoin textbox.
    4. Return to ‘Terminal’ on your server:
      cd /usr/src/cgminer

    1. Connect or plug in your USB ‘ASICMiner Block Erupter’ key into the server. The one pictured below was ordered from Amazon and costs between $120 and $200.
    1. Use the following command to get started mining:
      sudo ./cgminer -o stratum+tcp://mmpool.org:3333 -u YOURUSERNAME -p PASSWORD

    1. And now, you’re mining Bitcoin. The speed is largely determined by the hash rate per second which is usually indicated with Mh/s, meaning ‘mega hash per second’.
    1. To check the progress of your new, and most probably not particularly profitable, mining operation, visit http://mmpool.org/members to confirm the presence of your wallet address.

Next Steps

Look out for the next in-coming how-to guide about how to mine using your GPU, which, given how many of us have gaming personal computers, could prove to be a super useful way of utilizing your systems when you’re not using them for anything else.

Conclusion

Personally, I recommend looking into alternatives for your money making enterprises. Unless you’re looking at this for research and development, there’s little-to-no profit to be made from single node mining operations anymore.

  • Check the recommendations for the best VPS and get a suitable one.

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top