How to keep instance running after disconnecting SSH.


So currently I have a Lightsail instance, with a domain connected to it.

I SSH into the instance and do ./ which is a script I have to start a webserver. Great, the webserver now works and the domain is also working. But as soon as I disconnect the SSH connection, the website is no longer up. If I go back into it again, I can see that the processes are not running anymore, but my instance has been active this entire time.

How do I keep it running when I'm not connected to it?

asked 8 months ago93 views
1 Answer
Accepted Answer

To fix your immediate need:

./ &

That puts it in the background.

profile picture
answered 8 months ago
  • I'm not sure why I didn't think of this... for context, my even makes use of & to run some of the commands in there. Yep, doing ./ & fixes it.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions