Bitcoin Forum
July 28, 2024, 04:21:27 AM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Running a Node off a VPS  (Read 1571 times)
Squrk (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
December 18, 2012, 06:22:10 PM
 #1

Hello,

I have a VPS which I am not using and I am probably never going to use, So I will thinking of running it as a bitcoin node. Am I correct in saying all I need to do is run bitcoind with the argument "-server"?
I have opened port 8332 and while running "bitcoind -server" I do not see any network activity.

2 scenarios  exist that I can see.

1. I am doing it wrong. Which is very likely

2. The network activity is so low that it doesn't even show up on my graphs

Thanks for any help.
rabit
Member
**
Offline Offline

Activity: 62
Merit: 10


View Profile
December 18, 2012, 07:55:23 PM
 #2

You can start it with bitcoind --daemon .

To check if you have connections run bitcoind getconnectioncount .

If you have limited memory on your VPS, you could also add a cron job to restart bitcoind every time it crashes (this happens frequently on my VPS). I use this script for restarting (bitcoin runs through user bitcoin so you need to change the ps -u bitcoin...):

#!/bin/bash  

test=`ps -u bitcoin | grep -e bitcoind`

if [ "$test" = "" ];
then
~/bitcoin-0.7.1-linux/bin/64/bitcoind -daemon
fi
Squrk (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
December 18, 2012, 11:29:23 PM
 #3

bitcoind getconnectioncount  Cheesy

Thanks, It is working but connection count is only 8. I must have not port forwarded correctly.

Thanks for the bash script, my VPS hasn't crashed in ages. I will test how long it lasts before a crash to see if cron job is necessary.
phantomcircuit
Sr. Member
****
Offline Offline

Activity: 463
Merit: 252


View Profile
December 19, 2012, 12:15:52 AM
 #4

bitcoind getconnectioncount  Cheesy

Thanks, It is working but connection count is only 8. I must have not port forwarded correctly.

Thanks for the bash script, my VPS hasn't crashed in ages. I will test how long it lasts before a crash to see if cron job is necessary.

You want to open 8333 not 8332 (8332 is rpc)
Digigami
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


View Profile
December 19, 2012, 12:18:29 AM
 #5

bitcoind getconnectioncount  Cheesy

Thanks, It is working but connection count is only 8. I must have not port forwarded correctly.

Thanks for the bash script, my VPS hasn't crashed in ages. I will test how long it lasts before a crash to see if cron job is necessary.

Edit your config file in /.bitcoin/bitcoin.conf

add/edit the line:
maxconnections=x

x = how many to want to limit it to.. default is 8, if this option is not specified.
phantomcircuit
Sr. Member
****
Offline Offline

Activity: 463
Merit: 252


View Profile
December 19, 2012, 06:35:08 PM
 #6

bitcoind getconnectioncount  Cheesy

Thanks, It is working but connection count is only 8. I must have not port forwarded correctly.

Thanks for the bash script, my VPS hasn't crashed in ages. I will test how long it lasts before a crash to see if cron job is necessary.

Edit your config file in /.bitcoin/bitcoin.conf

add/edit the line:
maxconnections=x

x = how many to want to limit it to.. default is 8, if this option is not specified.

That's the outbound connection limit.

This is a VPS so I assume he has a public ipv4 address.

He'll end up with ~40 connections if other peers can connect.
Digigami
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


View Profile
December 19, 2012, 06:37:42 PM
 #7

bitcoind getconnectioncount  Cheesy

Thanks, It is working but connection count is only 8. I must have not port forwarded correctly.

Thanks for the bash script, my VPS hasn't crashed in ages. I will test how long it lasts before a crash to see if cron job is necessary.

Edit your config file in /.bitcoin/bitcoin.conf

add/edit the line:
maxconnections=x

x = how many to want to limit it to.. default is 8, if this option is not specified.

That's the outbound connection limit.

This is a VPS so I assume he has a public ipv4 address.

He'll end up with ~40 connections if other peers can connect.

Really? I was unaware it was for outbound only.

I could never get any more connections than 8 unless I changed it in the config. Simply port forwarding did not let me get anymore. I'll need to read up on that again sometime to be sure I guess.

Edit to add: directly from the wiki page "running bitcoind"
Quote
# Maximum number of inbound+outbound connections.
 #maxconnections=
That seems to mean to me it's incoming and outbound connections, else the wiki is wrong..
phantomcircuit
Sr. Member
****
Offline Offline

Activity: 463
Merit: 252


View Profile
December 19, 2012, 06:42:21 PM
 #8

bitcoind getconnectioncount  Cheesy

Thanks, It is working but connection count is only 8. I must have not port forwarded correctly.

Thanks for the bash script, my VPS hasn't crashed in ages. I will test how long it lasts before a crash to see if cron job is necessary.

Edit your config file in /.bitcoin/bitcoin.conf

add/edit the line:
maxconnections=x

x = how many to want to limit it to.. default is 8, if this option is not specified.

That's the outbound connection limit.

This is a VPS so I assume he has a public ipv4 address.

He'll end up with ~40 connections if other peers can connect.

Really? I was unaware it was for outbound only.

I could never get any more connections than 8 unless I changed it in the config. Simply port forwarding did not let me get anymore. I'll need to read up on that again sometime to be sure I guess.

Edit to add: directly from the wiki page "running bitcoind"
Quote
# Maximum number of inbound+outbound connections.
 #maxconnections=
That seems to mean to me it's incoming and outbound connections, else the wiki is wrong..

Let me correct myself a bit.

maxconnections is inbound and outbound, however it defaults to 125 not 8.
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!