Bitcoin Forum
May 22, 2024, 04:17:28 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to setup a full node on a headless *nix machine  (Read 4084 times)
Nemo1024 (OP)
Legendary
*
Offline Offline

Activity: 1680
Merit: 1014



View Profile WWW
June 29, 2013, 12:42:38 PM
 #1

As the subject says.
I have a high-speed Internet connection and a machine running FreeBSD 24/7 in headless mode (no X-Window), which nevertheless has CPU power, memory and disk space to spare.
How do I set up a full node on such machine? Which ports do I need to open in my Internet router? Are there any security concerns that I need to be aware of?
Sorry, if the answer exists from before, but searching the board for "full node setup" gave a huge amount of unrelated answers...

“Dark times lie ahead of us and there will be a time when we must choose between what is easy and what is right.”
“We are only as strong as we are united, as weak as we are divided.”
“It is important to fight and fight again, and keep fighting, for only then can evil be kept at bay, though never quite eradicated.”
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
June 29, 2013, 09:04:59 PM
 #2

1. forward your ports (if you can't find them, you suck)
2. execute "./bitcoind &" in terminal

THAT'S IT

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: 1025



View Profile
June 29, 2013, 09:16:14 PM
 #3

Rather than forking it into the background of your current session, you'd be better off setting up a config file and an init script.

I use slackware, so I wrote my own.  You can probably find scripts for more popular distributions if you look.  Here is an excerpt from my rc.bitcoind:

Code:
bitcoind_start() {
  if [ -x $BINFILE ]; then
    echo "Waiting for NTP before starting bitcoin..."
    /usr/sbin/ntp-wait
    echo "Starting bitcoind:  $BINFILE"
    sudo -u bitcoind $BINFILE -conf=$CONFFILE -pid=$PIDFILE -daemon -datadir=$DATADIR
  fi
}

If you don't care about incoming connections, you don't need to forward any ports.  If you do want incoming connections, open TCP port 8333 (or forward it).

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

Activity: 1680
Merit: 1014



View Profile WWW
June 29, 2013, 09:43:01 PM
Last edit: June 29, 2013, 09:56:56 PM by Nemo1024
 #4

Using a script is a good idea. And thanks for the port number info.
The source seems to be already in the ports tree under net-p2p/bitcoin
Any configuration consideration I should be concerned about?
Will try to build and see how it goes from there.

@grue: Though the answer is not very informative, you get points for the avatar and the subtext. My move: I am looking for tinderbox and a torch in my sack.  Grin

“Dark times lie ahead of us and there will be a time when we must choose between what is easy and what is right.”
“We are only as strong as we are united, as weak as we are divided.”
“It is important to fight and fight again, and keep fighting, for only then can evil be kept at bay, though never quite eradicated.”
Nemo1024 (OP)
Legendary
*
Offline Offline

Activity: 1680
Merit: 1014



View Profile WWW
June 29, 2013, 10:43:02 PM
 #5

Hmm... FeeBSD port (even after portupgrade) contains bitcoin-0.7.1
Will try to build from Linux source for 0.8.3 tomorrow, though I don't have high hopes for success.

“Dark times lie ahead of us and there will be a time when we must choose between what is easy and what is right.”
“We are only as strong as we are united, as weak as we are divided.”
“It is important to fight and fight again, and keep fighting, for only then can evil be kept at bay, though never quite eradicated.”
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!