<p>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:</p>

<ol>
<li><p>Start by forking a Java Maven project. Instructions to do that are here: <a href="http://java.heroku.com/" rel="nofollow">http://java.heroku.com/</a></p></li>
<li><p>Clone your project.</p></li>
<li><p>Clone bitcoinj from git.</p></li>
<li><p>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.</p></li>
<li><p>Copy everything from bitcoinj/core/main/src/java/ into your project.</p></li>
<li><p>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.</p></li>
<li><p>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.</p></li>
<li><p>Modify your pom.xml to point the appassembler plugin at your main class so it runs when you deploy the app.</p></li>
<li><p>git push heroku master</p></li>
<li><p>Send yourself some coins, watch your wallet onCoinsRecieved fire.</p></li>
</ol>

CC BY-SA 3.0
2013-04-18T08:47:56.953Z
2013-04-18T08:47:56.953Z
Travis Savo
<p>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?</p>

<bitcoind><json-rpc><bitcoinj><java>
How to run Bitcoinj on Heroku?
ZenBalance
# How to run Bitcoinj on Heroku?

(Asked by: username_0 on 2013-02-21)

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?

**Tags:** bitcoind, json-rpc, bitcoinj, java


---

## 1 answers

### Answer by username_1 on 2013-04-18. Score: 2

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.


---

