Bitcoin Forum
April 27, 2024, 01:03:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Making bitcoind run in the background?  (Read 2634 times)
Chick (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


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.

1714179793
Hero Member
*
Offline Offline

Posts: 1714179793

View Profile Personal Message (Offline)

Ignore
1714179793
Reply with quote  #2

1714179793
Report to moderator
1714179793
Hero Member
*
Offline Offline

Posts: 1714179793

View Profile Personal Message (Offline)

Ignore
1714179793
Reply with quote  #2

1714179793
Report to moderator
In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714179793
Hero Member
*
Offline Offline

Posts: 1714179793

View Profile Personal Message (Offline)

Ignore
1714179793
Reply with quote  #2

1714179793
Report to moderator
1714179793
Hero Member
*
Offline Offline

Posts: 1714179793

View Profile Personal Message (Offline)

Ignore
1714179793
Reply with quote  #2

1714179793
Report to moderator
sublimnl
Member
**
Offline Offline

Activity: 96
Merit: 10


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
Merit: 250

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: 1218
Merit: 1000



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

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





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

|
  TRUE BLOCKCHAIN GAMING PLATFORM 
DECENTRALISED AUTONOMOUS UNIVERSES

  HOME PAGE                                                                  WHITE PAPER 
|
Chick (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


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
Newbie
*
Offline Offline

Activity: 54
Merit: 0



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

uh, on linux:

<program name> &

.. runs it in the background.
WakiMiko
Newbie
*
Offline Offline

Activity: 59
Merit: 0



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
danystatic
Full Member
***
Offline Offline

Activity: 235
Merit: 100


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
Merit: 1024



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.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
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!