Author

Topic: Armory and Bitcoind in separate Docker containers (Read 822 times)

legendary
Activity: 3640
Merit: 1345
Armory Developer
September 15, 2018, 06:49:21 AM
#4
Armory connects to your node via the Bitcoin P2P layer. It also needs local disk access to the blockchain data your node maintains. You need to devise a scheme where the blockchain data is natively available to Armory, as network sharing does not work with Armory (it needs to mmap the blockchain files). I do not think Core requires that however, check with them.

After you've figured this part, you need change the hardcoded node IP within Armory's code:

https://github.com/goatpig/BitcoinArmory/blob/master/cppForSwig/BlockUtils.cpp#L885

At any rate, why do you want to split Armory from bitcoind? Consider that Armory is 2 processes, one db/server that only connects to bitcoind and only has public address data, and one client/gui that does all things wallets and only connects to the db/server. These speak to each other over an unencrypted socket.

If your goal is to keep your wallets in a separate container from bitcoind (which needs WAN access), then the following scheme satisfies that and is easier to setup:

Run ArmoryDB along bitcoind in the same docker container, then expose ArmoryDB to your LAN through nginx. This lets the GUI (with your wallet data) connect from another docker container.
newbie
Activity: 3
Merit: 0
Ok, I'm now struggling with the same issue.

I run bitcoind in a docker and map it to the host file system via `-v ` switch, and expose ports via `-p`. Armory sees the blockchain and actually sends several RPC commands (`-debug=rpc` of the bitcoind), so the communicaiton seems to be Ok. However, still 'Node offline' appears in the status. Armory 0.96.4.

I've read here and there that Armory doesn't (only) use RPC and I try to figure out what I'm missing from the available sources.

Any ideas or success stories?
newbie
Activity: 2
Merit: 0
I have Bitcoind working nicely in a Docker container, but I still haven't been able to get Armory to work with it from a separate docker container.
After more searching on the forums, I stumbled on this message:
https://bitcointalksearch.org/topic/m.11385165

Here, justusranvier claims he got what I am trying to do working, by running each component in two separate virtual machines.
Are there instructions for how to do this?

In another post, I found this:
https://bitcointalksearch.org/topic/m.1712623

Here, etotheipi claims people have done what I am trying to do by making a small change to the python code. Any tips on what the change might be?

More reading leads me to believe that Armory connects to Bitcoind as a normal peer over localhost. Is there a way to get it to connect to a different address other than 127.0.0.1?
I'm not necessarily talking about a remote bitcoind, since I still have filesystem access to the blockchain, however my Docker containers have different IP addresses.

Thanks again for any help.
PS: Does Armory have an IRC channel? I cannot seem to find one.
newbie
Activity: 2
Merit: 0
Hello all,

I've been playing with Docker, and I currently have a setup that runs both Armory and Bitcoind inside the same container. This works just fine, as expected. I'm using the volumes feature to have the blockchain mounted to the host machine, like this:

Code:

   Docker          Host
+----------+  +------------+
| Armory   |  |            |
|    |     +--+ Blockchain |
| Bitcoind |  |            |
+----------+  +------------+


The container and the host are the same machine, so no networking is needed to do the mount.
One of the things I would like to do is put Armory and Bitcoind into separate containers, and mount the same Blockchain to both containers, like this:

Code:

   Docker          Host
+----------+  +------------+
|          |  |            |
| Bitcoind +--+ Blockchain |
|          |  |            |
+----+-----+  +-----+------+
     |              |
+----------+        |
|          |        |
|  Armory  +--------+
|          |
+----------+


The non-Docker equivalent to this would be running two guest virtual machines in Virtualbox (one with Armory, one with Bitcoind) and mounting the same host folder to both machines.
The issue I am having with this is that I do not fully understand how Armory and Bitcoind communicate.
Some threads I have read here indicate that there are RPC calls being made, while other threads are indicating that Armory acts as a local peer on the Bitcoin network.
It seems evident that I need to set up some special networking between the two containers, but I'm not sure what else is needed.
Can anyone help me out? I need to know which ports to connect between the containers and which config files to edit.

This thread talks about the RPC/local peer connections, and seems to hint that what I am trying to do is possible, but the information is confusing to me:
https://bitcointalksearch.org/topic/bitcoin-qtbitcoind-on-a-different-machine-333224

Thank you for your help.
Jump to: