BusinessFinding a JobFrugal LivingIndustriesInsurancePersonal FinanceReal EstateScams & FraudSelf-EmploymentStarting a Business

How to Mine Bitcoins With a GPU Using CGMiner

Updated on March 3, 2017
skear profile image

Sam works as a Network Analyst for an algorithmic trading firm. He obtained his Bachelors Degree in Information Technology from UMKC.

With their recent jump in value Bitcoins are becoming more popular than ever. This sudden increase in popularity has created a gold rush causing everyone to gain interest in this new digital currency.

While many people find it easier to simply buy Bitcoins others have discovered Bitcoin mining is a fun and challenging hobby.

Mining for Bitcoins can be both fun, and profitable and it's actually easier to get started then you might think. In this hub I'll explain how to start mining for Bitcoins using your GPU and a program called CGMiner.

The AMD Radeon HD7990 is a great card to use for mining Bitcoins.
The AMD Radeon HD7990 is a great card to use for mining Bitcoins.

Have you heard of Bitcoins before?

See results
Triple GPU Bitcoin mining rig.
Triple GPU Bitcoin mining rig.

Hardware Requirements

AMD Radeon video cards are the best GPUs for mining Bitcoins. Unfortunately Nvidia cards do not perform very well at all when it comes to mining when compared to AMD cards.

If you already have an AMD Radeon 5800 or newer video card installed then you are in good shape to start mining for coins.

I wouldn't recommend going out and purchasing a new video card just to mine Bitcoins with but if you need to replace an older card anyway you might consider purchasing a Radeon card instead of Nvidia Hardware..

With newer ASIC based Bitcoin miners hitting the market in the near future GPU based mining may soon be obsolete so be cautious of investing heavily in GPU hardware just for mining.

Why MIne Using a GPU?

GPUs are much better than CPUs when it comes to mining for Bitcoins due to the nature of their design. Graphics rendering requires tons of mathematical computations which GPUs are specifically designed to do.

Since Bitcoin mining also requires math computations (hashing) GPUs work very well for this purpose.

While CPUs can also be used to generate hashes they are not nearly as effective as a GPU.

Here is a popular analogy:

A CPU is like a small group of very smart people who can quickly perform any task they are asked to do.

A GPU is like a large group of dumb people who on their own are not very fast or intelligent, but they can be taught to do repetitive tasks, and as a group they can be more productive due to the sheer number of them.

Create an Online Bitcoin Wallet

Before you start mining for Bitcoins you will need to create an online wallet that will be used to receive and store Bitcoins.

There are several places to create online wallets but I recommend using Blockchain. Blockchain allows you to create a free, and secure wallet that provides many useful features.

Blockchain.info is a great place to create a free online Bitcoin wallet.
Blockchain.info is a great place to create a free online Bitcoin wallet.

To create a wallet click on the link labeled 'Create my free wallet'. To set up the new account enter an alias (think of this as the username for the account), a secure password, and the capcha answer.

Blockchain will generate a password recovery mnemonic, be sure to store this somewhere safe in case you ever need to recover access to your wallet.

It's important to use a very secure password for the wallet. If anyone were to gain access to your wallet they could quickly steal all of the coins inside.

Creating an online wallet is very simple to do at Blockchain.info.
Creating an online wallet is very simple to do at Blockchain.info.

Find Your Bitcoin Wallet Address

After creating the account log into the wallet using the identifier and password. The address of the wallet can be found on the main wallet home tab.

The address consists of 27-34 alphanumeric characters. This address is what you will provide to people so they can send you payments using Bitcoins.

Once you have a wallet you can give out your address so people can send you Bitcoins!
Once you have a wallet you can give out your address so people can send you Bitcoins!

Join a Bitcoin Mining Pool

While it is possible to mine for Bitcoins on your own it is not something I would recommend doing. Solo mining requires an incredible amount of processing power which most people don't have access to.

Pooled mining allows miners to group up to solve blocks and earn Bitcoins together. Each miner that joins the pool earns shares for the work they contribute.

Each time the pool finds a block (currently worth 25 BTC) the Bitcoins earned are divided among the users in the pool based on how many shares they earned in the particular round.

There are many different mining pools you can join, each pool has their on pros and cons. As you learn more about Bitcoins you will be able to make a more educated decision of which pool is best for you.

I recommend joining the Eclipse Mining Consortium because it has some great features and is easy to use.

Eclipse Mining Consortium is one of the many great Bitcoin mining pools available to join.
Eclipse Mining Consortium is one of the many great Bitcoin mining pools available to join.

Creating an Account at EclipseMC

The process for joining most Bitcoin mining pools is very similar but in this guide I'll show you how to start mining with EclipseMC.

The first step in joining the pool is to register for a new account.

To start mining with EclipseMC you will need to register for a new account.
To start mining with EclipseMC you will need to register for a new account.

Add Your Bitcoin Wallet Address to Your Pool Account

After registering with EclipseMC log into your account and enter your Bitcoin wallet address into the account settings section. As you earn Bitcoins for the work you contribute to the mining pool EclipseMC will automatically send payments to your wallet.

Eclipse allows you to adjust the auto payment threshold to an amount you decide. The minimum payout is currently .02 BTC. If you prefer to receive less frequent , but larger payments you can increase the amount.

I prefer to keep my auto payment set to .1 BTC but it is mostly a matter of personal preference. Be careful not to set the amount to high in case something were to happen to the pool in which case you could potentially lose your unpaid earnings.

Enter your Bitcoin wallet address in your EclipseMC account to receive payments.
Enter your Bitcoin wallet address in your EclipseMC account to receive payments.

Creating a Worker

Next you need to setup a worker, click on the 'My Workers' tab at the top of your account. You will need one worker account for each copy of CGMiner you intend to run.

Set a name, and a password to use for the worker. The notify field is the number of minutes a worker has to be offline for before a notification is sent to you.

If you have measured the power draw and know your cost per kilowatt of electricity you can also enter it for the worker and Eclipse will generate some useful statistics regarding profitability of the miner.

If a worker requires more money to operate due to power costs than it earns then you may want to disable the worker.

Download and Configure CGMiner

At this point you should have a Bitcoin wallet which is now associated with the Eclipse mining pool. Which means you are finally ready to start actually mining for Bitcoins!

There are several different Bitcoin mining clients available but I will be showing you how to use CGMiner.

CGMiner is a GPU/FPGA bitcoin mining program written in C. It is compatible with both Windows and Linux operating systems.

Among the great features of CGMiner are support for overclocking, hardware monitoring, fan speed control and also remote interface capabilities.

To get started with CGMiner download the latest version of the application.

Currently the latest version is 2.11.4 so Windows users should download cgminer-2.11.4-windows.zip.

Extract the Contents of the Zipfile

After downloading the compressed zip file open the archive. Inside the archive you'll find a folder called cgminer-2.4.11-windows. Move this folder to C:\ and rename it to cgminer.

You should end up a with a folder called c:\cgminer , the contents should like like the image below.

Extract the folder inside the zipfile to your C: drive and rename it to cgminer.
Extract the folder inside the zipfile to your C: drive and rename it to cgminer.

Create a Batch File to Launch CGMiner

Since CGMiner is a command line utility the best way to launch the application with the appropriate settings is to create a batch file.

The simplest way to create a batch file is by using Notepad in Windows. Open notepad and paste in the command below, change the username and password to match the one you created in the EclipseMC account settings..

start /D "c:\cgminer\" cgminer.exe -o http://us2.eclipsemc.com:8337 -u accountname_worker -p password -d 0 --auto-fan --gpu-memclock 300

If you have two video cards in your computer add '-d 1' to the command.

start /D "c:\cgminer\" cgminer.exe -o http://us2.eclipsemc.com:8337 -u accountname_worker -p password -d 0 -d 1--auto-fan --gpu-memclock 300

Enter the worker name , password, and GPU settings in the file.
Enter the worker name , password, and GPU settings in the file.

Save the Batch File

After you've modified the command line to suit your needs save the file using a .bat extension, this will allow the file to be executable.

Make sure you set the 'save as type' to 'all files' otherwise you could end up with a .txt file instead of a batch file.

You can save the batch file at any location you want, I placed mine on the desktop so it can be easily accessed.

Save the file with an extension of .bat to make it executable.
Save the file with an extension of .bat to make it executable.

Launching CGMiner

Once the batch file is in place you are ready to start mining for Bitcoins using CGMiner. Double click on the batch file to start the miner.

If you're batch file works CGMiner launch, connect to the mining pool, and start mining for Bitcoins.

Each of the GPUs detected by CGMiner will be lised in the second section below the summary. The current hash rate for each card will be displayed in Mh/s (Mega hashes per second).

As you can see below my pair of ATI Radeon 5800 cards are generating a total of about 700MH/s.

CGMiner in operation mining for Bitcoins.
CGMiner in operation mining for Bitcoins.

CGMiner Video Tutorial

Troubleshooting CGMiner

If you're unable to get CGMiner working here are some common things you should check first.

  • Install the latest version of the video card drivers
  • Try launching cgminer from the command prompt instead of the batch file to check for error messages.
  • Double check the worker name and password entered in the batch file. EclipseMC workers will usually be similar to accountname_workername but don't forget to include the portion before the underscore.

Checking the Worker Stats in the Mining Pool

Once CGMiner starts mining for Bitcoins you can check the status of the worker in the mining pool web interface. Most pools take somewhere between 5-15 minutes before they will start showing statistics for the worker online.

If CGMiner was able to successfully connect to the pool you will see the current speed and an estimate of the workers profitability per day.

If you do not see any stats after the miner has been running for a while check the username and password you used in the batch file.

Worker stats can be viewed online through the mining pool web page.
Worker stats can be viewed online through the mining pool web page.

Learning More about Bitcoins

Mining for your own Bitcoins is a great way to learn more about digital currency. You might find that you enjoy mining enough to become a hardcore enthusiast and purchase high end mining hardware such as the ASIC miners designed by Butterfly Labs.

if you decide that mining Bitcoins isn't for you it's still easy to be involved with Bitcoins in other ways. You can trade Bitcoins on many of the popular exchanges such as Mt. Gox.

© 2013 Sam Kear

What are your thoughts on Bitcoins?

    0 of 8192 characters used
    Post Comment

    • Michael Poon profile image

      Michael 4 years ago from Australia

      very interesting, i'm still wondering if doing this is worth it...i have a very good GPU, but i've heard it can take up to months just to find 1 coin

    • skear profile image
      Author

      Sam Kear 4 years ago from Kansas City

      @Michael - Once more of the ASIC miners start coming on line GPU mining will probably become much more difficult. Many people are actually planning to start mining Litecoins at that time.

      You are correct in that it can take quite a while to generate one Bitcoin depending on how powerful your system is. Luckily by joining a pool you can earn fractions of a Bitcoin. Each coin is divisible by 8 decimal places.

      At today's current price .1 BTC is still worth about $12.

      You can run a quick calculation to determine if mining is profitable for you using one of the many online tools. You'll need to know the power draw of your miner, hash rate, and how much you pay per kilowatt for electricity.

      http://www.bitcoinx.com/profit/

    • tsadjatko profile image

      TSAD 3 years ago from maybe (the guy or girl) next door

      You see this? http://www.wallstreetdaily.com/wallstreet-research...

      Isn't it true the more bitcoins that are mined (added to the total out there) the longer it takes to create one and then more expensive machine you'll need to mine them in a reasonable time. Isn't it very late to come to this party all ready (seems like a ponzi scheme).

    • moviesreviews profile image

      Billy Taylor 2 years ago from NY

      Great article - Very educational

    • profile image

      muhammad umar 9 months ago

      sir my batch file open and instantly close

    • skear profile image
      Author

      Sam Kear 9 months ago from Kansas City

      @muhammad

      Try running the batch file from a command prompt in order to see what error message you are receiving.

    • profile image

      Dan 9 months ago

      CGMiner throws up errors with the other switches except username/password.

      I think the biggest flaw is the /? switch isn't supported :(

    • profile image

      tarun.soni2308@gmail.com 3 months ago

      Perfect blog info about bitcoin.

    Click to Rate This Article