Does anyone know where I might find a tutorial on how to deploy a bitcoinj server (essentially a replica of a bitcoind server with an rpc API) on Heroku?

1 Answer 1


I had a horrendus time doing this because of the fact that the jar is not available in a public site. Their docs to install it in a local repo and point maven at it seemed promising, but in the end I can tell you the best way:

  1. Start by forking a Java Maven project. Instructions to do that are here: http://java.heroku.com/

  2. Clone your project.

  3. Clone bitcoinj from git.

  4. Copy the dependencies from the pom.xml of both the top level project from bitcoinj, AND the one in the 'core' directory into your project's pom.xml. You'll also have to include some version numbers which are set in properties in the pom.xml to make it work.

  5. Copy everything from bitcoinj/core/main/src/java/ into your project.

  6. Assuming you've done all this, you should now be able to compile your project, including bitcoinj which you copied in from step 5 into your project, because you copied all the required dependencies into your pom.xml in step 4.

  7. Make a main class with a main method and get a static network parameters for production, make a block chain, a block store, and a peer group, and wire those up. Make a new wallet and a new ECKey, add the key to the wallet and the wallet to the block chain.

  8. Modify your pom.xml to point the appassembler plugin at your main class so it runs when you deploy the app.

  9. git push heroku master

  10. Send yourself some coins, watch your wallet onCoinsRecieved fire.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.