Author

Topic: How do I setup a headless bitcoin server? (Read 6309 times)

legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
November 23, 2012, 01:00:14 AM
#29
Also remember to backup your bitcoin wallet every generated address after 99 addresses have been generated other wise you will lost your BTC
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
November 23, 2012, 12:58:48 AM
#28
I think that you need to allow the ip address at 127.0.0.1 some systems don't consider 0.0.0.0 anything and it just a blackhole
also don't ever accept ip address as the value being *.*.*.* on a product system or with any high amount of BTC in your system with that enabeld anyone can brute force your username password and if its a non HTTPS connection then they can see the username/password with out any computation needed
hero member
Activity: 590
Merit: 500
isnt this funny, After all that work and breaking my head. Turns out that I have found an easier way to do things. I could just generate a bunch of addresses and keep them in a database and then hand them out to customers. I want to keep one address for each customer anyway. Then, if a customer wants to change the address for whatever reason, I could just give them another address not in use and then cycle their old address into a pool of unused addresses. That way my wallet doesn't fill up with addresses that will never be used. I could use block explorer for this. funny how I killed myself for nothing more than just knowing.O well thanks
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
Ok, the support guys got everything working for me.

I'm glad it works for you.

Quote
Now, how do i set up ssl connection? any ideas?

Basically the same thing, except you put ‘rpcssl=1’ is your bitcoin.conf and ask your JSON client to use SSL instead of plaintext.

Cheers,
hero member
Activity: 590
Merit: 500
Ok, the support guys got everything working for me. Now, how do i set up ssl connection? any ideas?
hero member
Activity: 590
Merit: 500
After switching to the new host, things didn't get fixed. But, with just one ticket to tech support and everything is in the works. I was allowed to see the firewall settings, just about every port open on my system was locked down on theirs. The are fixing it now. The difference having good support staff makes. Anyway, Thanks for all your help. Turns out the JSON API is great, if ports are open!
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
Sounds like you're on the right track — good luck in solving the problem (I'll keep an eye on this thread to see if I can contribute).

Cheers,
hero member
Activity: 590
Merit: 500
ok, here is something funny.
I setup on rackspace with ubuntu 10.10, Transfered my bitcoin folder minus my wallet. Guess what, It works just fine now.
But here is the kicker.

I run a php script on my pc which is using easyphp, which is just apache + php and mysql, script connects and everything.
On my hosted site. I get the same error. I am getting the feeling that my host is the issue. maybe some php settings. I have to investigate. Thankfully I am already like 70% through with my transfer to a new host. Hopefully they dont have this problem!
hero member
Activity: 590
Merit: 500
I just set up a vps on rackspace with ubuntu 10.10. I am getting it set to do some testing.
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
I'm afraid I don't know enough about Windows to be able to help you, I hope some of the Windows guys in the forum can.

Cheers,
hero member
Activity: 590
Merit: 500
ok, I change to a new port, Windows 7 doesn't allow me to put a port higher than 1024 in telnet. So this is what I did, Verified port 999 was open, Telnet server on that port is reachable from remote device, I used my android phone on 3g, telnet started right up as expected. Retested the php script running on my webhost and still the error. again, log has no mention of a connection. If i try to go to http://myserv:999 on my phone It tries to download a file.

Here is a c&p of my debug log
Code:

Bitcoin version 0.3.20.1 beta
Default data directory C:\Users\Eric\AppData\Roaming\Bitcoin
Bound to port 8333
Loading addresses...
dbenv.open strLogDir=C:\Users\Eric\AppData\Roaming\Bitcoin/database strErrorFile=C:\Users\Eric\AppData\Roaming\Bitcoin/db.log
Loaded 31755 addresses
 addresses               101ms
Loading block index...
LoadBlockIndex(): hashBestChain=00000000000095aa5e8a  height=121809
 block index            1504ms
Loading wallet...
nFileVersion = 32100
fGenerateBitcoins = 1
nTransactionFee = 0
addrIncoming = 255.255.255.255:8333
fMinimizeToTray = 1
fMinimizeOnClose = 1
fUseProxy = 0
addrProxy = 127.0.0.1:9050
 wallet                   43ms
Done loading
mapBlockIndex.size() = 121813
nBestHeight = 121809
mapKeys.size() = 132
mapPubKeys.size() = 132
mapWallet.size() = 44
mapAddressBook.size() = 18
ThreadRPCServer started
sending: version (85 bytes)
host ip 0: 192.168.1.100
addrLocalHost = 192.168.1.100:8333
ThreadIRCSeed started
ThreadMessageHandler started
ThreadOpenConnections started
ThreadSocketHandler started
IRC :giraffe.heliacal.net NOTICE AUTH :*** Looking up your hostname...
IRC :giraffe.heliacal.net NOTICE AUTH :*** Found your hostname
IRC SENDING: NICK x442121147

IRC SENDING: USER x442121147 8 * : x442121147

IRC :giraffe.heliacal.net 001 x442121147 :Welcome to the LFNet Internet Relay Chat Network x442121147
IRC :giraffe.heliacal.net 002 x442121147 :Your host is giraffe.heliacal.net[92.243.23.21/6667], running version hybrid-7.2.3
IRC :giraffe.heliacal.net 003 x442121147 :This server was created Mar 12 2011 at 16:30:05
IRC :giraffe.heliacal.net 004 x442121147 giraffe.heliacal.net hybrid-7.2.3 CDGabcdfgiklnorsuwxyz biklmnopstveI bkloveI
trying connection  lastseen=-0.1hrs lasttry=-362365.3hrs
connected
sending: version (85 bytes)
received: version (85 bytes)
Added time data, samples 2, offset +21 (+0 minutes)
sending: verack (0 bytes)
sending: getaddr (0 bytes)
sending: getblocks (933 bytes)
version message: version 31900, blocks=121809
IRC SENDING: USERHOST x442121147

IRC :giraffe.heliacal.net 302 x442121147 :[email protected]
GetIPFromIRC() userhost is IP 24.189.105.93
GetIPFromIRC() returned 24.189.105.93
IRC SENDING: NICK u2PcjPcsGAf6CuQ

IRC SENDING: JOIN #bitcoin

IRC SENDING: WHO #bitcoin

received: verack (0 bytes)
trying connection  lastseen=-0.1hrs lasttry=-362365.3hrs
IRC got join
connected
sending: version (85 bytes)
trying connection  lastseen=-0.1hrs lasttry=-362365.3hrs
connected
sending: version (85 bytes)
IRC got who
IRC got who
IRC got who
IRC got who
IRC got who
IRC got who
AddAddress()
IRC got new address
IRC got who
AddAddress()
IRC got new address
received: version (85 bytes)
Added time data, samples 3, offset -4 (+0 minutes)
sending: verack (0 bytes)
sending: getaddr (0 bytes)
version message: version 32002, blocks=121809
IRC got who
IRC got who
IRC got who
AddAddress()
IRC got new address
IRC got who
IRC got who
IRC got who
IRC got who
AddAddress()
IRC got new address
IRC got who
IRC got who
AddAddress()
IRC got new address
IRC got who
IRC got who
IRC got who
IRC got who
AddAddress()
IRC got new address
IRC got who
IRC got who
IRC got who
IRC got who
IRC got who
IRC got who
AddAddress()
IRC got new address
IRC got who
IRC got who
IRC got who
IRC got who
IRC got who
AddAddress()
IRC got new address
IRC got who
IRC got who
IRC got who
AddAddress()
IRC got new address
IRC got who

IRC got who
received: verack (0 bytes)
sending: addr (31 bytes)
IRC got who
IRC got who
IRC got who

IRC got who
trying connection  lastseen=-0.9hrs lasttry=-362365.3hrs
IRC got who

IRC got who

received: addr (30003 bytes)
IRC got who

IRC got join
AddAddress()
IRC got new address
received: addr (30003 bytes)
received: addr (15603 bytes)
received: version (85 bytes)
Added time data, samples 4, offset +6 (+0 minutes)
sending: verack (0 bytes)
sending: getaddr (0 bytes)
version message: version 32100, blocks=121809
received: verack (0 bytes)
sending: addr (31 bytes)
received: addr (30003 bytes)
received: addr (3871 bytes)
IRC got join
IRC got join
AddAddress()
IRC got new address
received: addr (30003 bytes)
received: addr (19743 bytes)
AddAddress()
IRC got join
IRC got join
I cut out a crap load of irc Get Host.
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
netstat reports that I am listening on 0.0.0.0:15147.

Ok, and what happens when you telnet to that port from a remote computer?

Cheers,
hero member
Activity: 590
Merit: 500
netstat reports that I am listening on 0.0.0.0:15147. this entire things is more complicated than I expected. I bet i will eventually have an aha moment and call myself an idiot!
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
just says that connection refused.

Connection refused typically happens when there is nothing listening on the expected address and port.

Cheers,
hero member
Activity: 590
Merit: 500
I checked my debug log and there is no mention of something trying to connect. I don't understand that at all. Ports are open. Could it be the webhost I am using? I dont thik that should be an issue.
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
why is it only my pc can access it, It must be that I am missing some setting but which one?

Could you quote the relevant parts of debug.log when a remote host attempts to connect to the server?

I am windows illiterate, but on Linux you can do e.g. “netstat .anp | grep bitcoind” to see which address(es) and port(s) bitcoind is listening on, and your bitcoind should be listening on 0.0.0.0:15147 accoriding to your config.

Cheers,
hero member
Activity: 590
Merit: 500
Ok, I scraped the host on VPS idea because I don't want to spend money while researching on a fix. I have this thing working now if it is from localhost. I can even put my no-ip url and it works on if i am on my pc. Once i go to another pc and try to connect it does not and there are like no error at all. just says that connection refused.

The problem is when I try to use it from another server.
In my conf file I have
rpcusername=qwe
rpcpassword=asd
rpsallowip=*.*.*.*
rpcport=15147
I am running windows 7, Firewall off, Ports are forwarded correctly.
why is it only my pc can access it, It must be that I am missing some setting but which one? thanks
hero member
Activity: 590
Merit: 500
In using the php jsonapi. The error I get is could not connect.i tried the allowip and even set it to all welders and it didn't work . I even tried using a server from rackspace and still no dice. I will post the log a little later.
legendary
Activity: 1652
Merit: 2301
Chief Scientist
tail -f ~/.bitcoin/debug.log
... will show you what bitcoind is doing.
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
I cant have server A connect to server B with the JSON api and the error messages are all the same.

Right, then you have to use the rpcallowip parameter (without this parameter bitcoind listens on localhost only).

Could you show us the relevant error messages, please?  That would make it easier to help you.  Also, could you show us your setup?  You have bitcoind running on remote host B, and you want to sit on host A and be able to remote control the bitcoind running on host B.  Is that correct?

Cheers,
hero member
Activity: 590
Merit: 500
Makes the entire json api useless doesn't it.

It might, but it depends on the context.  If you want to read account status or do transactions from within a webapp the JSON API is pretty handy and lightweight (the alternative would be to execute a bitcoind shell command and possibly parsing the output).  For the everyday usage (like transferring bitcoins, generating new addresses) the commandline interface should be sufficient.

Cheers,
The first example is exactly what i want to do, but it just doesnt work for me at all. I cant have server A connect to server B with the JSON api and the error messages are all the same.
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
Makes the entire json api useless doesn't it.

It might, but it depends on the context.  If you want to read account status or do transactions from within a webapp the JSON API is pretty handy and lightweight (the alternative would be to execute a bitcoind shell command and possibly parsing the output).  For the everyday usage (like transferring bitcoins, generating new addresses) the commandline interface should be sufficient.

Cheers,
hero member
Activity: 590
Merit: 500
Sounds interesting. Makes the entire json api useless doesn't it. Im gonna have to give this a try. Seems like it will be more secure also.  thanks for the help.
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
that got the server running but I cant conenct to it externally.
here is my conf file
rpcuser=xxx
rpcpassword=xxx
rpctimeout=30
rpcallowip=*.*.*.*
server=1
rpcport=8332

should it be different?
rpcallowip is like that so it takes all connection, i think.

My ~/.bitcoin/bitcoin.conf only has

Code:
rpcuser=myUsername
rpcpassword=myPassword

This make bitcoind bind to localhost/127.0.0.1 and port 8332.  You should only choose something else than localhost if you're on a trusted localnet.

To connect from an external host (example.com), use ssh:

Code:
me@home:~$ ssh [email protected] bitcoind getinfo

Cheers,
hero member
Activity: 590
Merit: 500
that got the server running but I cant conenct to it externally.
here is my conf file
rpcuser=xxx
rpcpassword=xxx
rpctimeout=30
rpcallowip=*.*.*.*
server=1
rpcport=8332

should it be different?
rpcallowip is like that so it takes all connection, i think.
also, as soon as i close putty ssh connection the server goes down again. I have change to fedora 14.
hero member
Activity: 566
Merit: 500
Unselfish actions pay back better
Any ideas?
Code:
$ nohup bitcoind -server &

Cheers,
hero member
Activity: 590
Merit: 500
that didnt work either. Any ideas?
legendary
Activity: 1078
Merit: 1005
Hello,
I am trying to setup a headless bitcoin server.I only have ssh access. I am using ubunto 9.10. when I do ./bitcoind64 I just get a blank line. and a blinking curser. I cant access it though. if i do ctrl + c and then do ./bitcoind help or getinfo it says it cannot connect to server. can someone help me out here?
Try: bitcoind -daemon
hero member
Activity: 590
Merit: 500
Hello,
I am trying to setup a headless bitcoin server.I only have ssh access. I am using ubunto 9.10. when I do ./bitcoind64 I just get a blank line. and a blinking curser. I cant access it though. if i do ctrl + c and then do ./bitcoind help or getinfo it says it cannot connect to server. can someone help me out here?
Jump to: