A cryptocoin faucet based on Django.
- Make sure you have Python 3 and Django installed. (To check:
python --versionanddjango-admin version) - Install the JSON RPC library:
pip install jsonrpclib-pelix(sudo may be required) - Download the repository on your server.
- Edit faucet/settings.py: Change your SECRET_KEY to a random string of 50 characters. You should also change ALLOWED_HOSTS to only allow requests from your domain.
- Edit faucet/faucet_settings.py: This is where most of the faucet configuration goes. You need to set rpc_url to point to your Bitcoin/Altcoin daemon, and optionally change the rest of the variables to customize the faucet.
- Edit faucetapp/templates/faucetapp/base.html to customize the look of the faucet site, and to edit the footer text.
- Optional: If you want to enable reCAPTCHA, you need to get the public and private keys from the reCAPTCHA admin page. After registering, select your site. You'll find the sitekey under client side integration (in the HTML snippet reCAPTCHA asks you to embed), and the private key under server side integration.
- Run
python manage.py migrateto initialize the database. - Optional: Create a Django admin user by running
python manage.py createsuperuser. This allows you to view the faucet logs under /admin when the server is running. - You're done! Run
python manage.py runserver 0.0.0.0to run the faucet on the Django development server. - If you'd like to run the faucet on a production server you should look into integrating Django with a real web server like nginx or Apache.