How to Mine Bitcoins With a GPU Using CGMiner
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.
Have you heard of Bitcoins before?
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.
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.
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.
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.
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.
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.
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.
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
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.
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 Video Tutorial
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.
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