omar omar - 24 days ago 11
Python Question

Running flask app on DigitalOcean: should I keep the ssh console open all the time?

A DO noob here:

I created a droplet that runs a flask application. My question is when I ssh into the droplet and restart the apache2 server, do I have to keep the console open all the time (that is I should not shut down my computer) for the application to be live?

What if I have a dynamic application that runs scripts in the background, do I have to keep the console open all the time for the dynamic parts to work?

Thanks

ps.
there's a similar question in SO about a NodeJs app but some parts of the answer they provided are irrelevant to my Flask app.

Answer

You can use the "screen" command to mantain the sesion open.

please see https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/

Comments