Bitcoin Forum
May 10, 2024, 05:49:49 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Access Bitcoin daemon from a virtual machine  (Read 612 times)
IdiotCoder (OP)
Member
**
Offline Offline

Activity: 193
Merit: 26


View Profile
March 06, 2017, 05:36:00 PM
 #1

This is my first time trying to run the Bitcoin daemon from the command line. Initially I gave up trying to do this locally and was wairing around for myp[artner to buy a dedicated host for my server. However, I'm getting bored waiting around for him to send me the server info. I have a Mac and an Ubuntu VM. It only has 5GB of disk storage and when I tried downloading the blockchain file to the VM, the disk ran out of space.

How do I install the daemon on my Mac and access it programmatically from the VM in PHP? I'm using Bitcoin RPC to access the daemon. 
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
nekochan
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
March 24, 2017, 06:24:13 PM
 #2

Yeah the current block chain is around 100GB. Well with port forwarding you could let the server connect to your mac (through your public ip) OR through a reverse SSH tunnel (I'd prefer this because you wouldn't need to open a port on your pc). but your mac would have to run all the time it's needed. Also I'm sure you can set ip white list in the config files (for more security). Then for PHP I don't know I've never used any like that but I'm sure you could find some.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
March 25, 2017, 12:27:35 AM
 #3

This is my first time trying to run the Bitcoin daemon from the command line. Initially I gave up trying to do this locally and was wairing around for my partner to buy a dedicated host for my server. However, I'm getting bored waiting around for him to send me the server info. I have a Mac and an Ubuntu VM. It only has 5GB of disk storage and when I tried downloading the blockchain file to the VM, the disk ran out of space.

How do I install the daemon on my Mac and access it programmatically from the VM in PHP? I'm using Bitcoin RPC to access the daemon. 

You might want to look at places like sourceforge and github to see if someone has already made a PHP interface for this problem.

You could always use the -prune command in the latest release of bitcoin core in order to get the full blockchain to download and not have to use up 100GB of space that you don't have on that vm (instead, only the last 2GB are kept)
icanscript
Hero Member
*****
Offline Offline

Activity: 686
Merit: 502



View Profile
March 25, 2017, 02:05:48 AM
 #4

Bitcoin uses JSON-RPC Connection.

https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)

I think there is some easybitcoin.php class or something if I remember also.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!