Mine Monero on Heroku using Node.js


Note: SFDC Brewery does not endorse or support Monero & mining Monero on Heroku. This is just for demo purposes.

What is Monero?

Monero is a secure, private, untraceable currency that is open-source and freely available to all. You are your own bank, you control and are responsible for your funds, and nobody can trace your transfers. For more information visit Monero official website

SFDC Brewery Monero miner

1) Fork or Clone this Repository

2) Run “npm start”

3) Create a (free) account on https://coin-hive.com/ and get your API Key under Settings / Sites & API Keys (ex. OwZyZ3HVKjMeMTrodeXC2iZ7ZGY8eOdT)

4) Replace the API key in index.js (line 7) with your API Key

5) Create a (free) account on http://www.heroku.com

6) On Heroku create a new application

alt text

7) Add the following buildpacks

  • heroku/nodejs
  • https://github.com/jontewks/puppeteer-heroku-buildpack.git

alt text alt text

8) Connect your Heroku app to your GitHub repo and enable the automatic deployment feature

alt text

9) Verify that the solution builds

alt text

10) The solution is basically a web server that does nothing but behind the scenes is using the heroku server to mine monero

alt text

11) Login to your coin-hive account and verify you are receiving reward

Note: After 30 minutes the heroku instance will go to sleep so be sure to sign up for another free service (https://uptimerobot.com/) which can ping your url every 5 minutes to make sure it stays up.


Get the full code Git repo

Warning: According to few responses, we observed Heroku suspending the accounts for mining inside it. So, try it on a Heroku demo org.

If you like this article, consider reading:

  1. Monero White Paper
  2. Heroku Developement Center
Written on March 31, 2018