0

I have a node application in development in a ubuntu server through SSH connection, I'm using bitvise ssh client, and running node server.js through its GUI terminal.

But then when I exit the ssh client, the server terminal is closed remotely, how can I keep it open? I'm not sure if the question is related to this specific client or to SSH in general.

1
  • 1
    Lookup how to use the "screen" application (among others), running on the server, to keep a virtual terminal open between connections. 'screen' is included with desktop and server flavors of Ubuntu - you probably already have it installed. Try man screen
    – user535733
    Feb 5, 2019 at 12:48

1 Answer 1

2

Just use nohup command ending by &. So your node command will be like this :

nohup node server.js &

Note that all output of your node command will be written into nohup.log file. Also consider using systemd config to keep this script running into a production server.

Not the answer you're looking for? Browse other questions tagged .