Bitcoin Forum
December 06, 2016, 02:30:17 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Making bitcoind run in the background?  (Read 2269 times)
Chick
Member
**
Offline Offline

Activity: 70


View Profile
July 03, 2011, 01:01:55 AM
 #1

Hey guys, what would be the best way to make bitcoind run on startup and run in the background? Currently, I'm running it through a ssh window and whenever I close the ssh client, the daemon goes down.

I was thinking about setting up a screen for it, is this a good idea? I did see a start-up script that I could use.

1481034617
Hero Member
*
Offline Offline

Posts: 1481034617

View Profile Personal Message (Offline)

Ignore
1481034617
Reply with quote  #2

1481034617
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481034617
Hero Member
*
Offline Offline

Posts: 1481034617

View Profile Personal Message (Offline)

Ignore
1481034617
Reply with quote  #2

1481034617
Report to moderator
1481034617
Hero Member
*
Offline Offline

Posts: 1481034617

View Profile Personal Message (Offline)

Ignore
1481034617
Reply with quote  #2

1481034617
Report to moderator
1481034617
Hero Member
*
Offline Offline

Posts: 1481034617

View Profile Personal Message (Offline)

Ignore
1481034617
Reply with quote  #2

1481034617
Report to moderator
sublimnl
Member
**
Offline Offline

Activity: 97


View Profile
July 03, 2011, 01:03:43 AM
 #2

Start up script is the best way... especially if you are looking for it to run on boot in case the machine goes down..
bitplane
Sr. Member
****
Offline Offline

Activity: 321

Firstbits: 1gyzhw


View Profile WWW
July 03, 2011, 01:55:39 AM
 #3

If you want to start it manually via ssh, press ctrl+z to suspend the process, then type bg to resume it in the background. Finally disown to detach the background process from the shell, then you can safely disconnect your ssh session.

But yeah, running it on startup via cron is the best way. Run crontab -e as the user you want to run bitcoind as and add an @reboot line. See man cron for more info.
BCEmporium
Legendary
*
Offline Offline

Activity: 938



View Profile
July 03, 2011, 02:00:47 AM
 #4

Actually you can use monit to start and monitor it. It already bundles with a startup script for monit and 1 minute after it fires up bitcoind
Chick
Member
**
Offline Offline

Activity: 70


View Profile
July 03, 2011, 02:31:12 AM
 #5

If you want to start it manually via ssh, press ctrl+z to suspend the process, then type bg to resume it in the background. Finally disown to detach the background process from the shell, then you can safely disconnect your ssh session.

But yeah, running it on startup via cron is the best way. Run crontab -e as the user you want to run bitcoind as and add an @reboot line. See man cron for more info.

The startup script seemed to work well. Works flawlessly when shutting down and restarting.

SeriousWorm
Jr. Member
*
Offline Offline

Activity: 54



View Profile
July 03, 2011, 01:27:01 PM
 #6

uh, on linux:

<program name> &

.. runs it in the background.
WakiMiko
Jr. Member
*
Offline Offline

Activity: 59



View Profile
July 03, 2011, 03:44:43 PM
 #7

just start it with -daemon and it will continue running even if you log out of your ssh session

1APeJ2DiUNdsNizn47MBeAwbjaugEgg4Zn
danystatic
Full Member
***
Offline Offline

Activity: 189


View Profile
December 09, 2013, 05:32:02 PM
 #8

But how can it be monitor, it is running in background and after some time it stops and shutsdown.... service is down.

And have to manually restart it.
kjj
Legendary
*
Offline Offline

Activity: 1302



View Profile
December 10, 2013, 03:41:21 AM
 #9

just start it with -daemon and it will continue running even if you log out of your ssh session

This is the correct answer.

If you are having problems with it crashing, consider getting a better box.  Smiley  Or a cron job that checks to see if it is running and restarts it as necessary.

p2pcoin: a USB/CD/PXE p2pool miner - 1N8ZXx2cuMzqBYSK72X4DAy1UdDbZQNPLf - todo
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!