Bitcoin Forum
April 27, 2024, 05:08:24 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to run 2 bitcoin-qts?  (Read 940 times)
madmadmax (OP)
Hero Member
*****
Offline Offline

Activity: 740
Merit: 501



View Profile
April 16, 2013, 01:04:25 PM
 #1

How can I run two separate bitcoin servers that accept json-rcp commands on a single machine?








       ▄▄▄▄▄               ▄▄▄▄▄
   ▄▄█▀▀▀▀▀▀██▄        ▄▄█▀▀▀▀▀▀▀█▄
 ▄██▀        ▀██▄    ▄██▀         ▀█▄
██▀            ▀██▄  ▀▀             ██
██               ▀██        ▄▄▄▄▄▄▄▄██
██                ▀██▄      ▀▀▀▀▀▀▀▀▀▀
 ██▄          ▄██   ▀██▄          ▄▄▄
  ▀██▄      ▄██▀      ▀██▄▄     ▄██▀
    ▀▀██████▀▀          ▀▀██████▀▀


Unchained Smart Contracts
Decentralized Oracle
Infinitly Scalable
Blockchain Technology
Turing-Complete
State-Channels



                 ▄████▄▄    ▄
██             ████████████▀
████▄         █████████████▀
▀████████▄▄   █████████████
▄▄█████████████████████████
██████████████████████████
  ▀██████████████████████
   █████████████████████
    ▀█████████████████▀
      ▄█████████████▀
▄▄███████████████▀
   ▀▀▀▀▀▀▀▀▀▀▀

             ▄██▄
     ▄      ▐████   ▄▄
   █████     ██████████
    █████████████████▀
 ▄████████████▀████▌
██████████     ▀████    
 ▀▀   █████     ██████████
      ▀████▌▄████████████▀
    ▄▄▄███████████████▌
   ██████████▀    ▐████
    ▀▀▀  ████▌     ▀▀▀
         ▀███▀
f


1714237704
Hero Member
*
Offline Offline

Posts: 1714237704

View Profile Personal Message (Offline)

Ignore
1714237704
Reply with quote  #2

1714237704
Report to moderator
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.
1714237704
Hero Member
*
Offline Offline

Posts: 1714237704

View Profile Personal Message (Offline)

Ignore
1714237704
Reply with quote  #2

1714237704
Report to moderator
1714237704
Hero Member
*
Offline Offline

Posts: 1714237704

View Profile Personal Message (Offline)

Ignore
1714237704
Reply with quote  #2

1714237704
Report to moderator
1714237704
Hero Member
*
Offline Offline

Posts: 1714237704

View Profile Personal Message (Offline)

Ignore
1714237704
Reply with quote  #2

1714237704
Report to moderator
DarkHyudrA
Legendary
*
Offline Offline

Activity: 1386
Merit: 1000


English <-> Portuguese translations


View Profile
April 16, 2013, 01:11:52 PM
 #2

A VM inside the machine Tongue
Srsly, Idk, but at least having a VM would work...

And I'm wondering: y u want 2 clients open?

English <-> Brazilian Portuguese translations
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
April 16, 2013, 02:09:25 PM
 #3

set bitcoin.conf so they use different data directories, and listen on different ports.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
April 16, 2013, 03:13:26 PM
 #4

A VM inside the machine Tongue
Srsly, Idk, but at least having a VM would work...

And I'm wondering: y u want 2 clients open?

I run two nodes on one machine.  One node is a hub and accepts a ton of incoming connections from around the world.  The other node is only connected to that hub, and has a wallet.

I mostly did it because I have a cron job that detaches the wallet node and copies the block files out for distribution to my RAMdisk mining nodes, to speed their reboots.  I wanted to keep a well connected node running, despite shutting down the client every day, so I've been running two for quite a while now.  Turns out that there are nice privacy and security benefits from running them split like this too.

And grue has it exactly right, as usual.  You need two sets of data directories, two configuration files, and two sets of 2 ports.  You can even talk to both nodes using the bitcoind command line by specifying -conf= along with your commands.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
madmadmax (OP)
Hero Member
*****
Offline Offline

Activity: 740
Merit: 501



View Profile
April 16, 2013, 06:28:14 PM
 #5

A VM inside the machine Tongue
Srsly, Idk, but at least having a VM would work...

And I'm wondering: y u want 2 clients open?

Heard you like VM's so we put a VM in your VM so you can VM while you VM.

Seriously though, could I perhaps run two bitcoin "headless" daemons? If so is there any guide? Maybe we could use a different wallet and listen on different ports while using the same blockchain?








       ▄▄▄▄▄               ▄▄▄▄▄
   ▄▄█▀▀▀▀▀▀██▄        ▄▄█▀▀▀▀▀▀▀█▄
 ▄██▀        ▀██▄    ▄██▀         ▀█▄
██▀            ▀██▄  ▀▀             ██
██               ▀██        ▄▄▄▄▄▄▄▄██
██                ▀██▄      ▀▀▀▀▀▀▀▀▀▀
 ██▄          ▄██   ▀██▄          ▄▄▄
  ▀██▄      ▄██▀      ▀██▄▄     ▄██▀
    ▀▀██████▀▀          ▀▀██████▀▀


Unchained Smart Contracts
Decentralized Oracle
Infinitly Scalable
Blockchain Technology
Turing-Complete
State-Channels



                 ▄████▄▄    ▄
██             ████████████▀
████▄         █████████████▀
▀████████▄▄   █████████████
▄▄█████████████████████████
██████████████████████████
  ▀██████████████████████
   █████████████████████
    ▀█████████████████▀
      ▄█████████████▀
▄▄███████████████▀
   ▀▀▀▀▀▀▀▀▀▀▀

             ▄██▄
     ▄      ▐████   ▄▄
   █████     ██████████
    █████████████████▀
 ▄████████████▀████▌
██████████     ▀████    
 ▀▀   █████     ██████████
      ▀████▌▄████████████▀
    ▄▄▄███████████████▌
   ██████████▀    ▐████
    ▀▀▀  ████▌     ▀▀▀
         ▀███▀
f


deadweasel
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250



View Profile
April 16, 2013, 06:29:50 PM
 #6

A VM inside the machine Tongue
Srsly, Idk, but at least having a VM would work...

And I'm wondering: y u want 2 clients open?

Heard you like VM's so we put a VM in your VM so you can VM while you VM.

Seriously though, could I perhaps run two bitcoin "headless" daemons? If so is there any guide? Maybe we could use a different wallet and listen on different ports while using the same blockchain?

you can do it in unix by running one under a different user and specifying the -datadir.

edit: oops, answered by kjj:
And grue has it exactly right, as usual.  You need two sets of data directories, two configuration files, and two sets of 2 ports.  You can even talk to both nodes using the bitcoind command line by specifying -conf= along with your commands.

Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
April 16, 2013, 10:26:44 PM
 #7

Every node that runs is another copy of the block chain. (or make some sort of symbolic links maybe.)

kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
April 17, 2013, 12:17:00 AM
 #8

Every node that runs has different block files.  If you really need to save space, there are ways to partially synchronize them, at least with the old BDB index.  I haven't played with 0.8+ enough to know if the same trick would work there or not.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
madmadmax (OP)
Hero Member
*****
Offline Offline

Activity: 740
Merit: 501



View Profile
April 17, 2013, 06:16:17 AM
 #9

Is there any step by step guide on how to configure more than one bitcoin server that  accepts bitcoin-rpc commands?








       ▄▄▄▄▄               ▄▄▄▄▄
   ▄▄█▀▀▀▀▀▀██▄        ▄▄█▀▀▀▀▀▀▀█▄
 ▄██▀        ▀██▄    ▄██▀         ▀█▄
██▀            ▀██▄  ▀▀             ██
██               ▀██        ▄▄▄▄▄▄▄▄██
██                ▀██▄      ▀▀▀▀▀▀▀▀▀▀
 ██▄          ▄██   ▀██▄          ▄▄▄
  ▀██▄      ▄██▀      ▀██▄▄     ▄██▀
    ▀▀██████▀▀          ▀▀██████▀▀


Unchained Smart Contracts
Decentralized Oracle
Infinitly Scalable
Blockchain Technology
Turing-Complete
State-Channels



                 ▄████▄▄    ▄
██             ████████████▀
████▄         █████████████▀
▀████████▄▄   █████████████
▄▄█████████████████████████
██████████████████████████
  ▀██████████████████████
   █████████████████████
    ▀█████████████████▀
      ▄█████████████▀
▄▄███████████████▀
   ▀▀▀▀▀▀▀▀▀▀▀

             ▄██▄
     ▄      ▐████   ▄▄
   █████     ██████████
    █████████████████▀
 ▄████████████▀████▌
██████████     ▀████    
 ▀▀   █████     ██████████
      ▀████▌▄████████████▀
    ▄▄▄███████████████▌
   ██████████▀    ▐████
    ▀▀▀  ████▌     ▀▀▀
         ▀███▀
f


grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
April 17, 2013, 04:36:03 PM
 #10

Is there any step by step guide on how to configure more than one bitcoin server that  accepts bitcoin-rpc commands?
windows:

1. go to %appdata% (or wherever it's located for your OS)
2. make a copy of bitcoin folder, and rename it something like "bitcoin2"
3. put this in bitcoin.conf (create if it doesn't exist).
%appdata%\bitcoin:
Code:
rpcuser=user1
rpcpassword=mypassword1

%appdata%\bitcoin2
Code:
rpcuser=user2
rpcpassword=mypassword2
port=8335
rpcport=8334
4. open the folder where bitcoind.exe is installed, shift-right click the folder, "open command window here"
5. start bitcoind.exe
6. bitcoind.exe -datadir=%appdata%\bitcoin2

congratulations. now you have 2 servers running. rpc port for server 1 is 8332, server 2 is 8334

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
madmadmax (OP)
Hero Member
*****
Offline Offline

Activity: 740
Merit: 501



View Profile
April 17, 2013, 05:34:23 PM
 #11

Is there any step by step guide on how to configure more than one bitcoin server that  accepts bitcoin-rpc commands?
windows:

1. go to %appdata% (or wherever it's located for your OS)
2. make a copy of bitcoin folder, and rename it something like "bitcoin2"
3. put this in bitcoin.conf (create if it doesn't exist).
%appdata%\bitcoin:
Code:
rpcuser=user1
rpcpassword=mypassword1

%appdata%\bitcoin2
Code:
rpcuser=user2
rpcpassword=mypassword2
port=8335
rpcport=8334
4. open the folder where bitcoind.exe is installed, shift-right click the folder, "open command window here"
5. start bitcoind.exe
6. bitcoind.exe -datadir=%appdata%\bitcoin2

congratulations. now you have 2 servers running. rpc port for server 1 is 8332, server 2 is 8334

Thanks, incredibly detailed and you all were very patient.








       ▄▄▄▄▄               ▄▄▄▄▄
   ▄▄█▀▀▀▀▀▀██▄        ▄▄█▀▀▀▀▀▀▀█▄
 ▄██▀        ▀██▄    ▄██▀         ▀█▄
██▀            ▀██▄  ▀▀             ██
██               ▀██        ▄▄▄▄▄▄▄▄██
██                ▀██▄      ▀▀▀▀▀▀▀▀▀▀
 ██▄          ▄██   ▀██▄          ▄▄▄
  ▀██▄      ▄██▀      ▀██▄▄     ▄██▀
    ▀▀██████▀▀          ▀▀██████▀▀


Unchained Smart Contracts
Decentralized Oracle
Infinitly Scalable
Blockchain Technology
Turing-Complete
State-Channels



                 ▄████▄▄    ▄
██             ████████████▀
████▄         █████████████▀
▀████████▄▄   █████████████
▄▄█████████████████████████
██████████████████████████
  ▀██████████████████████
   █████████████████████
    ▀█████████████████▀
      ▄█████████████▀
▄▄███████████████▀
   ▀▀▀▀▀▀▀▀▀▀▀

             ▄██▄
     ▄      ▐████   ▄▄
   █████     ██████████
    █████████████████▀
 ▄████████████▀████▌
██████████     ▀████    
 ▀▀   █████     ██████████
      ▀████▌▄████████████▀
    ▄▄▄███████████████▌
   ██████████▀    ▐████
    ▀▀▀  ████▌     ▀▀▀
         ▀███▀
f


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!