This article will guide you through setting up a Bitcoin faucet using FaucetBox so you can start earning Bitcoins today. A Bitcoin faucet is a website which dispenses Bitcoins in return for completing a captcha. The idea is to have a reward amount to less than the cost of acquiring a new customer, that way you can profit from monetizing the traffic to your site. FaucetBox provides an easy to use php script which can be setup in minutes on any webserver. The script uses FaucetBox’s API so you don’t need to run a bitcoin node or use any extra APIs in order to send bitcoins to users. Lets get started,
Sign up for FaucetBox.com, create your first faucet and give it a name.
Navigate to Faucetinabox.com and download the script
This is where we will be adding the database and the database username for the faucetbox script to use. Navigate to your website’s cPanel and click the My SQL Database Wizard.
Next give the database a name, in my case I named the database merkleFaucet.
Now create the database user and set it’s password for the faucet. In my case I named the user faucet.
Make sure to give the user all privileges.
Now that we setup the database on our webserver and downloaded the faucetbox script, unzip the downloaded zip file and copy it to your remote server.
After the script is done uploading right click and edit the config.php file. The config file will look like this:
Edit the $dbuser, $dbpass, and the $dbname variables. In our case $dbuser will be faucet, $dbpass will be the password we set for the user, and $dbname will be merkleFaucet which is the name we set for the database in step three.
In our case we uploaded our faucetinabox script inside the faucet folder so our faucet is located at themerkle.com/faucet. If your faucet is not setup correctly, the page will display an error stating that it cannot connect to the database “Can’t connect to database. Check your config.php.” That means that you need to check the three variables and make sure they are set correctly. If you did everything right you should see the faucetbox page:
As we can see the faucet is disabled and we don’t have any satoshis in our balance. Now that the hard part is done the fun part begins – customizing your faucet.
Go to the admin page by clicking on the link. You will be prompted for a faucet password but since you haven’t set it yet click reset password and enter the database password you setup earlier. Next, copy the provided password and use that in order to get access to the admin page.
Before the faucet can be fully activated it needs two more adjustments. First we need to set the FaucetBox API key which we can get from logging back into our original account created on faucetbox.com and clicking manage on the faucet we created.
Then click the Show API Key button which will display your API key.
Finally, copy the API key into the admin page of your faucet.
We are almost done, now we need to setup the API keys for the faucet’s captcha. In our case we will use reCaptcha as our captcha. Navigate here in order to get your reCaptcha API keys. You will need to be signed into a gmail account as reCaptcha is owned by Google.
You will be presented with a site key and a secret key:
Add the Site Key to the reCaptcha public key field in your faucetbox script and the Secret Key to the reCaptcha private key field. Also remember to change the default captcha to be reCaptcha and don’t forget to turn on the captcha by selecting the appropriate radio button.
Save the changes and if you did everything right you should see a confirmation message:
Navigating back to our faucet will show a fully operating (but empty) faucet:
Last but not least we must go back to our dashboard on faucetbox.com and add a balance to our faucet. By navigating to the balance tab in our faucetbox dashboard we can activate a deposit address for a currency of our choice. Since this faucet will dispense Bitcoins we will activate the Bitcoin deposit address. Keep in mind that faucetbox charges a 2.5% deposit fee. If you don’t want to pay any fees for running your faucet you are welcome to write your own interface for the faucet.
That is it, you should have a working faucet with an admin dashboard which you can use to further customize your faucet. If you have any questions feel free to leave them in the comment section below.
If you liked this article follow us on twitter @themerklenews and make sure to subscribe to our newsletter to receive the latest bitcoin and altcoin price analysis and the latest cryptocurrency news.