Monday, 8 July 2019

How to mine Bitcoins

How to mine Bitcoins

Mining is the process of using a computer to perform complex calculations on blocks of data which maintain the Bitcoin network. Miners are rewarded for their efforts with a certain amount of Bitcoins.

Bitcoin (BTC) is fast becoming the province of people using specialized ASIC (application-specific integrated circuit) devices, although if you have one or more powerful graphics cards you may still be able to generate a small profit by assembling your own mining device. You'll learn more about this in the following steps.

The actual profit you make will depend on a number of factors. The first is your 'hash rate' – in other words, the actual processing power of your machine. Computers designed for mining, or 'rigs' as they're commonly known, require large amounts of electricity, which will increase running costs. The complexity of mining also rises over time.

The Bitcoin itself is a very volatile virtual currency and while it has recently made huge gains, it may also plummet in value. Bear this in mind if you plan to hold onto any BTC you mine rather than selling immediately. If you want a rough idea of how much you can make from mining, use one of the many online profitability calculators (for example, the one at 99 Bitcoins).

While you can technically try to mine Bitcoin on your own, it's very unlikely that your rig will singlehandedly solve the complex sums necessary to receive a reward. Instead, you'll need to join a mining pool. As the name suggests, this is a pool of multiple machines connected together, engaged in a collaborative mining effort. The Bitcoin rewards reaped are shared amongst everyone who contributed processing power to the effort.

However, note that the way in which profits are shared can vary from pool to pool. You can learn more about pooled mining on the Bitcoin Wiki.

 - If you just want to buy bitcoin instead, check out our guide here as well as a list of the best bitcoin exchanges.



1. Choose your miner
One easy – but not cheap – way to get started with Bitcoin mining is to buy an ASIC device such as the AntMiner S9. These devices have been specifically designed for mining Bitcoins which means they'll generally give you the greatest return on your investment.

However, as mentioned, these ASIC devices are expensive. The S9 for instance currently retails for around €2,100 (about £1,860, $2,490). You will usually need to buy a separate power supply unit which will set you back something like another €300 (£265, $360). These devices are usually designed specifically to mine Bitcoin and will not function well if you try to use them to mine other cryptocurrencies (if, say, Bitcoin should happen to fall drastically in value).

Alternatively you can build your own Bitcoin mining rig. While these aren't as efficient in terms of power and hash rate, they require less upfront expense and can mine other currencies besides BTC. In the simplest terms these are computers with multiple powerful graphics cards installed. These GPUs might be primarily designed to render complex graphics when playing games, but they also lend themselves well to coping with the complex calculations involved in Bitcoin mining.

To get started, you'll need to purchase a case for the machine. Most of these are a simple metal frame to allow heat to dissipate easily. You'll then need to choose a motherboard and graphics cards for mining, such as the AMD Radeon RX 580.

If you need some more advice, see our guides on choosing the best graphics cards and motherboards for mining. You'll need to assemble the machine and install the OS and mining software yourself, so you should only go down this route if you are tech-savvy and familiar with computers.

If neither of these options appeals, you can rent hash power from cloud mining companies. These firms have dedicated data centers devoted to mining Bitcoins. As they are centralized they can buy machines in bulk and use efficient methods to generate electricity.

Most companies will offer you a fixed amount of Gigahash Seconds (GH/s) of mining power for a fee. The advantage of this approach is that you don't need to buy any expensive hardware. The fees for cloud mining will vary, however, and another point to be wary of is scammers posing as cloud mining outfits. See the Bitcoin Wiki for a list of reputable cloud mining companies.

2. Set up your Bitcoin wallet
Once you've made the decision that mining is right for you, you'll also need to set up a Bitcoin wallet to store your profits. If you're mining as an investment and don't plan on spending any of your coins soon, consider using a website like Bitcoin Paper Wallet Generator to create a 'paper' wallet. Make a note of the 'public' address which you can use to receive payments.

You can check the balance of your Bitcoin wallet safely at any time by visiting Blockchain.info and entering your payment address into the search bar at the top-right. Don't let anyone see your private keys as anyone with access to your paper wallet can control your virtual cash.

If you plan to regularly cash out your BTC or make payments, consider using a software wallet instead. The lightweight Electrum wallet is available for all major desktop operating systems and Android. When you create your wallet, Electrum will generate a 'seed' of a dozen random words to use as a private key. This means you can restore your Bitcoin wallet if anything happens to your computer.

If you use a software wallet like Electrum, try to do it on a machine that isn't connected to the internet so your BTC can't be hacked. This is known as 'cold storage'. The Electrum website has instructions for setting up a 'watching' wallet for day-to-day use which can show your balance but cannot make payments itself. Or for full instructions on setting up secure offline storage, see our article on how to create a secure cold storage Bitcoin wallet using Bitkey.

3. Pick a Bitcoin mining pool
The next stage is to sign up to a pool; you can solo mine, but you need some serious hardware to make it worthwhile. You can find a list of pools on the Bitcoin wiki.

We'll walk you through the process of signing up for Slush's Pool because it's one we've used a lot, but the same procedure can be used for any of the major pools.

4. Jump in
Head over to the Slush Pool website and click on 'Sign up here' at the top-right. On the registration page choose a username, then enter your email address and password. The Slush Pool website will send you a confirmation email. Click the link to validate your email address. You'll see that a 'worker' has been created for you, so you can begin mining. Although it's not compulsory, you should ideally have one worker per device.

5. Funded mining
You need to tell your mining pool where and when to send the funds from your mining exploits. On the Slush Pool website you can do this by clicking 'Settings' at the top-right, then click 'Bitcoin' on the left. Choose 'Payouts' then click the 'New Wallet' button. Paste in your public address for Bitcoin payouts here. If you're using a paper wallet this should be clearly marked. In Electrum you can view your current receiving address by clicking on the 'Receive' tab. Click 'Submit' when you're done.

Some miners also allow you to choose the payout threshold – in other words how many BTC you need to have mined before the Pool sends funds to your wallet. This is important as while it's risky to leave large amounts of BTC in an online wallet, transaction fees for sending BTC across the network are currently very high, so you could end up paying a lot for multiple smaller payments. Choose freely and wisely.

 6. Pool safety
Mining pools are a popular target for hackers for obvious reasons. To make sure no one can potentially pilfer your Bitcoins, first check that your pool uses SSL. This means your connection is secure – in most web browsers you'll see a padlock icon (in the address bar) if this is the case.

Certain mining pools such as Slush Pool also allow you to secure access to your account by using two-factor authentication. This introduces a second step for a successful login, and is therefore another hurdle to prevent hackers from breaking into your account. In order to use this you'll need access to a mobile device and an app such as Google Authenticator or FreeOTP.

7. Grab Bitcoin mining software
Now you need to download the mining software to your PC. You have a few options here, but to get started we'd recommend using GUIMiner, if only because it has such a straightforward interface.

It comes as a self-extracting archive and runs straight from the folder to which it's extracted.

8. Configure mining
Launch GUIMiner and select 'Slush's pool' from the Server menu. Type in the name of the worker that was created when you registered your account – it'll be [username].worker1 – and enter the password for the worker.

Select your graphics card from the Device menu and then hit the 'Start mining' button to get going.

9. View your progress
GUIMiner will now communicate with the servers to get shares for your machine to work with. You'll see your hash rate at the bottom right and the current state of your work in the bottom bar.

You can also see the console (useful if you have connection problems) or a summary page (great if you've got multiple cards) via the View menu.

10. Time to optimise
If you're running a mining rig instead of using specialized hardware, you can make a few small tweaks to make sure its running at peak efficiency.

To do that, you need to do a quick search to see what the recommend flags are for your graphics card. Take a look at the Mining hardware comparison webpage and search for your card in the table.

11. Data mining
The information you want from this table is under the Notes column. This is where you'll find the switches that push your graphics card that little bit harder, making them better at Bitcoin mining.

The important ones are those relating to the workload (-w) and whether to use vectors (-v). Enter these values into the Extra Flags block in GUIMiner, stop mining and then restart it.

12. Precision tuning
This should give your Bitcoin mining PC's performance a nice boost, but to really get the most from your card you need to turn your hand to a little overclocking.

We recommend grabbing EVGA's Precision X utility, although you can get quite far using the overclocking tools that are part of AMD's Catalyst drivers.

13. Beat the heat
Whether you're using a specialized ASIC Miner or your own rig, the device is going to run very hot when trying to mine BTC for you. Therefore, be sure to place your mining hardware somewhere with good ventilation so the heat can dissipate easily. Generally speaking, the cooler your mining machine, the more efficiently it will perform. Make sure to factor the costs of air conditioning and/or a heat pump into your mining calculations to be certain you’re still running a profitable enterprise.

If you live somewhere cold, you could follow in the footsteps of smart Siberians and use the excess heat from mining as a 'data furnace' to heat your home.

14. Keep mining profitable
As research continues into specialist mining equipment and the difficulty of mining increases, the highest profits from mining are usually earned by data centers based in locations where energy is inexpensive such as China. As a hobbyist miner, you can maximize your profits by following their example by using ASIC miners and keeping electricity costs down.

While relocating to China may not be on the cards, you can increase the efficiency of your rig by using an efficient PSU. You can get help with this in the Pools section of the BitcoinTalk forums.

An alternative way to get one over on the ‘big bully’ miners is to use renewable energy to power your mining machine – for example by installing solar panels on your property.

If you do this, remember that the advertised wattage for devices is usually the optimal amount you'll receive under ideal conditions. Solar panels in particular are affected not just by the amount of sunlight they receive, but by surface area, the angle at which they're placed, and the direction in which they're facing. Speak to a qualified installer, fully explain your needs, and get things right.

To get started, consider using an electricity usage monitor to measure the energy consumption of your mining device in kWh (kilowatt hours). These are very inexpensive and available from any hardware store.

Remember that the reward for mining Bitcoin halves every 210,000 blocks. You can find a more detailed explanation of this on the Bitcoin Wiki, but essentially, this means mining becomes less profitable over time, unless you can increase your hash rate – or the value of Bitcoin increases.