<p>You could use screen or a similar tool like tmux or byoblu. 
Otherwise use the NOHUP command. </p>

<p>nohup is a POSIX command to ignore the HUP (hangup) signal. The HUP signal is, by convention, the way a terminal warns dependent processes of logout.
Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected.
nohup is a low-level utility simply configuring a command to ignore a signal. As seen below, nohup is very far from being a full-featured batch system solving all the problems of running programs asynchronously.</p>

<blockquote>
  <p>$ nohup abcd &amp;</p>
  
  <p>$ exit</p>
</blockquote>

<p>Alternatives:
The screen or tmux command can also detach a process from the current shell. It allows to reattach to the process later on.
e.g. the following call will run somescript.sh detached from SIGHUP and in the background:</p>

<blockquote>
  <p>$ screen -A -m -d -S somename ./somescript.sh &amp;</p>
</blockquote>

<p><a href="https://en.wikipedia.org/wiki/Nohup" rel="nofollow">https://en.wikipedia.org/wiki/Nohup</a></p>

<p>My advice is to learn to use screen (or tmux) so you can later re-attach the process to the main shell and interact with it.</p>

CC BY-SA 3.0
2013-11-12T15:49:07.783Z
2013-11-12T16:36:54.560Z
2013-11-12T16:36:54.560Z
ddddavidee
<p>I'm using Ubuntu 12.04. </p>

<p>I've tested several scripts that try to get bitcoind running on startup but none have worked out for me.</p>

<p>I'm getting a little bit desperate because I can't even get bitcoind running once I exit my SSH session.</p>

<p>Any clues on how to get bitcoind running once I exit the SSH session?</p>

<p>Best Regards,</p>

CC BY-SA 3.0
2013-11-12T13:34:50.567Z
`bitcoind -daemon`? Otherwise, what version of bitcoind are you using, and what do you see in debug.log?
Nate Eldredge
CC BY-SA 3.0
2013-11-12T13:46:36.127Z
the last line of debug.log. addcon thread interrupt
opencon thread interrupt
msghand thread interrupt
dumpaddr thread stop
Flush(false)
DBFlush(false) ended               0ms
StopNode()
net thread interrupt
ERROR: CAddrman::Write() : open failed
Flushed 11563 addresses to peers.dat  37ms
André
CC BY-SA 3.0
2013-11-12T13:47:19.927Z
I tried to run with bitcoind -daemon but onde I exit the SSH session the bitcoind stops
André
CC BY-SA 3.0
2013-11-12T14:14:24.137Z
@André how do you know it stops?
Loourr
CC BY-SA 3.0
2013-11-12T14:29:12.977Z
@Loour, when I telnet the host on 8332 not answer anymore. If I enter again the shell is not running anymore. I've also discovered that when I run "bitcoind -daemon &" the process goes to the pid(example) 12994, but one minute later the pid is on 12995. For this reason when I close the SSH this pid go away. Any clues?
André
CC BY-SA 3.0
2013-11-12T15:10:58.840Z
@André Maybe try rebuilding the packages? I really don't know though. Just doing `bitcoind -daemon` has always worked for me. It might also be something with the computer. Does it exit out of other shell scripts when you disconnect?
Loourr
<bitcoind>
When I exit SSH session bitcoind goes down
André
# When I exit SSH session bitcoind goes down

(Asked by: username_0 on 2013-11-12)

I'm using Ubuntu 12.04.

I've tested several scripts that try to get bitcoind running on startup but none have worked out for me.

I'm getting a little bit desperate because I can't even get bitcoind running once I exit my SSH session.

Any clues on how to get bitcoind running once I exit the SSH session?

Best Regards,

**Tags:** bitcoind

> **Comments:**
> **username_1**: `bitcoind -daemon`? Otherwise, what version of bitcoind are you using, and what do you see in debug.log?  
> **username_0**: the last line of debug.log. addcon thread interrupt opencon thread interrupt msghand thread interrupt dumpaddr thread stop Flush(false) DBFlush(false) ended               0ms StopNode() net thread interrupt ERROR: CAddrman::Write() : open failed Flushed 11563 addresses to peers.dat  37ms  
> **username_0**: I tried to run with bitcoind -daemon but onde I exit the SSH session the bitcoind stops  
> **username_2**: @username_0 how do you know it stops?  
> **username_0**: @Loour, when I telnet the host on 8332 not answer anymore. If I enter again the shell is not running anymore. I've also discovered that when I run "bitcoind -daemon &" the process goes to the pid(example) 12994, but one minute later the pid is on 12995. For this reason when I close the SSH this pid go away. Any clues?  
> **username_2**: @username_0 Maybe try rebuilding the packages? I really don't know though. Just doing `bitcoind -daemon` has always worked for me. It might also be something with the computer. Does it exit out of other shell scripts when you disconnect?  

---

## 1 answers

### Answer by username_3 on 2013-11-12. Score: 1

You could use screen or a similar tool like tmux or byoblu.
Otherwise use the NOHUP command.

nohup is a POSIX command to ignore the HUP (hangup) signal. The HUP signal is, by convention, the way a terminal warns dependent processes of logout.
Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected.
nohup is a low-level utility simply configuring a command to ignore a signal. As seen below, nohup is very far from being a full-featured batch system solving all the problems of running programs asynchronously.

> $ nohup abcd &
>
> $ exit

Alternatives:
The screen or tmux command can also detach a process from the current shell. It allows to reattach to the process later on.
e.g. the following call will run somescript.sh detached from SIGHUP and in the background:

> $ screen -A -m -d -S somename ./somescript.sh &

<https://en.wikipedia.org/wiki/Nohup>

My advice is to learn to use screen (or tmux) so you can later re-attach the process to the main shell and interact with it.


---

