**Note that since the difficulty is very high, unless you have a very significant aggregate hash rate (over several Ghash/sec or more) you are probably going to be better off mining for a pool; unless of course you don't mind possibly waiting many months/years to generate a block and get 25 bitcoins.***
This post is aimed mostly at people who are already familiar with Bitcoin (Wikipedia page), and would like to get started using their GPU(s) to mine for bitcoins in a Windows environment.
Just some quick terminology: miner = program which is external to bitcoin-qt.exe that uses your graphics card to perform calculations; your GPU is much more efficient at the type of calculations bitcoin does than your CPU
First of all, you are going to need a graphics card that supports CUDA and/or OpenCL; most graphics cards from the past 2-3 years will support this.
*UPDATE*: If you are unsure, please download GPU Caps Viewer (I recommend the portable version) to determine if you have a compatible video device and a working version of OpenCL installed. If you are using an AMD/ATI card you likely need to install the ATI APP SDK (make sure you obtain the correct version for 32/64-bit Windows).
Please make sure you are using the most recent drivers for your particular graphics card.
Important: Make sure that windows explorer is configured to show file extensions and show hidden folders - In windows explorer go to tools(alt+t)→folder options→view tab→tick the show hidden files/folders button, and also make sure the box for hide file extensions is unchecked. This is very important or you may end up trying to create bitcoin.conf.txt without even realizing the .txt extension is still present!
Last Updated June-2013 (This info should still *mostly* be correct, please leave a comment if anything is significantly wrong/missing)
Too Long; Didn't Read / Easy and somewhat automated version:
1. Go to
www.bitcoin.org, download and install the most recent version of bitcoin (the default file path should be fine).
2. A GUI-based tool exists here which will help to speed this up and will automate a lot of the setup steps. Go to the linked forum thread, download and extract the archive somewhere, and then run guiminer.exe.
3. From the GUIMiner interface, click solo utilities → set bitcoin client path. Point the dialog box to bitcoin-qt.exe; likely located at C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe or C:\Program Files\Bitcoin\bitcoin-qt.exe. Next click solo utilities → create solo password. Pick anything arbitrary for username and password but remember it, as you will need to use this later. Then finally you want to click solo utilities → launch bitcoin client as server.
This will launch bitcoin ready to be mined with, you must first wait for all the blocks to be downloaded before you can start to mine, and this may take several hours; you can view the current block count here.
4. Once all the blocks are downloaded, select solo from the server drop down box, then enter the username and password that you used before, then click start mining. Congratulations, you are now mining for bitcoins
(Recommended) 5. Since the difficulty is high now, you will only likely see an immediate return if you mine as part of a pool. The GUI Miner will greatly expedite pool setup and you can find some more information about pools here.
Additional notes: The GUI Miner also does not display the actual console window of poclbm or whatever miner you may be using; this may be desirable for some people.
Long, manual set up version using batch scripts and the command prompt:
Please note that the long version of this guide will show you how to do everything manually and via the command line. This is somewhat advanced and only recommended if you are comfortable manually creating/editing text files and using the command prompt.
1. To start, head over to
http://www.bitcoin.org/ and download the latest windows client. Install it to wherever you want, but it may be of benefit to keep the directory path somewhat simple, because batch scripts and launching from the command line will follow. For argument's sake, I will just assume you are using the default install path on the 64-bit version of windows, so your install directory may be:
C:\Program Files (x86)\Bitcoin
At the time of writing, the latest version of bitcoin is 0.3.23, and your overall path to bitcoin-qt.exe should be:
C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe
To start, open up a command prompt (windows key + r → type cmd → hit enter), and then navigate to the directory where bitcoin-qt.exe is located. If you've been following along with my examples, you will want to type this into the command prompt window:
cd C:\Program Files (x86)\Bitcoin
2. Put the command prompt aside for just a second, because before launching bitcoin, you will need to create a text file called bitcoin.conf (the location of this file will vary depending on which version of Windows you are using)
If you are using Windows 7 or Vista, navigate to:
C:\Users\[username]\AppData\Roaming\Bitcoin
If you are using Windows XP, navigate to:
C:\Documents and Settings\[username]\Application Data\Bitcoin
(You will probably need to create the "Bitcoin" directory, as bitcoin-qt.exe will auto-create it on first run, but you haven't yet run it… This is also where showing hidden folders comes into play, because on Windows 7 the AppData directory is hidden; Application Data may be hidden on XP as well)
Inside the appropriate folder, just right click and select new→text document, then rename this file to bitcoin.conf
Once you have created this file, open it up with your favorite text editor and add the following 2 lines (don't forget to save it when finished):
rpcuser=youruser
rpcpassword=yourpw
Where youruser and yourpw should be any arbitrary username and password; this is supplied to the miner later on via command line so that the miners can communicate with bitcoin-qt.exe (these are the values that bitcoin expects, if the miner specifies different values at launch you will likely get RPC errors).
3. Next, you want to start bitcoin-qt.exe with the '-server' argument specified. This tells bitcoin that there will be external programs running and allows bitcoin to communicate with them. To do so, bring your command prompt back into focus and type:
bitcoin-qt.exe -server
(alternatively you can just launch bitcoind.exe from the \daemon directory, which is the GUI-less client, but I prefer to use the GUI client. Using bitcoind.exe is equivalent to launching bitcoin-qt.exe with the arguments -server -daemon specified)
Now you will see bitcoin start up for the first time. Your client must first download the block chain before you will be able to start generating coins, and this is done automatically on first startup. You will see the number of blocks begin to increase over time, and at the time of writing there are 130,805 blocks (you can view the current block count here). This can take many hours, so be patient and let it do its thing. This process can be sped up if you forward port 8333 TCP on your router, but this is not required.
4. Next, head on over to this thread and download the latest poclbm_py2exe binary from the first post. There are other miners available which work in windows, but m0mchil's is the one that I use and this guide will instruct how to set up this particular miner. (poclbm stands for (I believe…) PyOpenCL Bitcoin Miner)
If you have been following along so far, I would suggest that you create a new directory inside C:\Program Files (x86)\Bitcoin to reflect the latest version of the windows binary. At the time of writing the most recent version is poclbm_py2exe_20110709, so you should create a new directory
C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709
and then extract the contents of the archive to this new folder. The executable which will be used is poclbm.exe, but this must be launched via command line and given several launch parameters. This can be tedious to do on windows, so we will expedite this with a batch script. (and your final path to poclbm.exe should be C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709\poclbm.exe)
5. You can place the batch script anywhere you like; I put mine on my desktop for easy access. Right click again and create a new text file, then rename it to whatever_you_want.bat, all that matters here is the .bat extension. Right click on this file and hit edit (double clicking on it will launch it). In this batch file you want to put the following contents (this is assuming you're following the convention of this guide so far - if you are using your own directory structure, then use whatever location you have chosen instead):
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe youruser:yourpw@localhost:8332 --device=0
(Similarly, for using a pool you can do something like this: start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe
http://poolworker.1:pool_pw1@api2.bitcoin.cz:8332 --device=0 )
***(Important Note: Some people have been having issues with the batch script failing to launch initially. It seems that it may be important to specify your device number along with the rest of the launch parameters on each line of the batch script. This can be done by simply specifying --device=X, where X is the number of your desired video device; most likely 0. If you have multiple devices, then the 2nd device is likely "1", and so on; if you are using onboard video I am not sure how this would work…)***
"start" just tells the batch script to start a new process in its own window, the /D parameter specifies the directory that the program is located in (this allows the batch script to be launched from anywhere on your computer), and then poclbm.exe is just the target program, followed by the arguments it needs to run properly. Make sure to use the same user and password that you specified earlier in your bitcoin.conf file. Quotes are needed whenever paths have a space in them.
Now all that's left to do is save this file and wait until bitcoin finishes downloading all the blocks; you cannot generate until you have acquired all blocks.
(You may end up waiting a long time for this to finish, so if you want to take some time to go read more about bitcoins and how the system works, now is a good time )
Once all blocks have been acquired, make sure bitcoin is running with the -server switch, then simply double click on your batch file. A new window should pop up and after a few seconds. If all is going well, your hashrate will be displayed. When you want to exit just "x" out of the window or press ctrl-c.
You can make a batch script to launch bitcoin-qt.exe with the -server argument as well, its contents should look something like this:
start /D"C:\Program Files (x86)\Bitcoin" bitcoin-qt.exe -server
If you have more than one graphics card, you can use them both at the same time by doing something similar to this within your batch file:
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe youruser:yourpw@localhost:8332 --device=0
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe youruser:yourpw@localhost:8332 --device=1
for however many devices you use. This will open up a new window for each graphics card and show each card's hashrate.
Another switch you may want to play around with is the -w switch, which indicates the worksize for your card to use; for example:
start /D"C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709" poclbm.exe youruser:yourpw@localhost:8332 --device=0 -w 256
By default, m0mchil's miner will use the maximum work size supported by your card, most likely 256 or 512. You can play around with different sizes to see which gives you the highest hashrate; the size must be a power of 2. You will know if you have exceeded your card's maximum size if the miner errors or crashes when you try to start it; going too small will greatly lower your hashrate. You can also play around with the -v argument as well.
If you notice your desktop is being sluggish you can mitigate this by adding:
-f 60
to the end of each line of your batch script.
Assuming you have gotten this far and everything works, you can add the totals of each individual hashrate from your GPU(s), and put the grand total into this calculator to get an idea of how much you can earn daily (if you use a pool). If you are mining solo assume that the expected average time to generate a block is easily 4-8 weeks several decades…or much longer (but this will get you 25BTC).
Now all you have to do is wait…
Note that it will likely take many weeks to generate coins, and you are likely to notice an increase in your power bill while you run your bitcoin miners (Please Note: if you are not using high-end hardware, it is likely that you will spend more on power than you can recoup via bitcoin generation and sales for solo mining). Additionally, you may want to look into doing something like this with [RivaTuner NO LONGER UPDATED, SEE BELOW] or a similar app to mitigate the temperature increase on your graphics device(s). (I think that rivatuner also works with newer amd/ati cards)
(MSI Afterburner is also recommended)
UPDATE: If you are using slow-ish hardware, take a look at the pooled mining option here. (Additional info on how to use m0mchil's miner with slush's pool)
Troubleshooting: It seems that some people are having issues where the batch script just pops up for a second and then closes without anything happening. This usually indicates that whatever you are trying to launch is failing and quickly prints out an error message on the console window opened by the batch script, but since it fails immediately it closes too quickly for you to read it. In order to determine what the problem is, you will need to navigate to the location of poclbm.exe within a new command prompt; just use cd as is described somewhat in step 1. Once you are in the directory where poclbm.exe is located, you should now try to launch poclbm.exe with the arguments exactly as they are contained in the batch script. So assuming you have been following the conventions of this guide so far, and your batch script fails to start the miner successfully, you would type the following once you are in the directory C:\Program Files (x86)\Bitcoin\poclbm_py2exe_20110709:
poclbm.exe youruser:yourpw@localhost:8332 --device=0
This is just how you would normally launch the miner anyway, the batch script simply does this for you when you double click on it. By entering this manually from within an already-open command prompt, if the miner fails to launch, the error messages will be printed to the console and will remain there for you to read. This should give you the specific problem that is preventing your miner from launching, and allow you to provide a more specific error message than "it doesn't open".
Once you do finally generate some coins, you can head on over to
www.mtgox.com and create an account. You can now deposit some bitcoins into your account and get trading (there are other exchange sites but mtgox still the largest). More information can be obtained by talking with the folks in #bitcoin-otc on irc.freenode.net; people may be willing to purchase bitcoins directly from you for paypal or other methods of currency exchange. IMPORTANT NOTE: Paypal does NOT like bitcoin, you SHOULD NOT mention bitcoins at all in any correspondence with paypal, nor should you mention it at all when transferring money!!!
Hope this was of some help for you
1Ch5Cgoc5Yse5pVoP322QsrZfdo3xCwNbV