How come my website isn't hosted 24/7?

Howdy everyone, sorry in advance if this is a silly question, I’m still pretty new to linux & digitalocean, and I’m having a bit of an issue.

How come whenever I close the droplet’s web console tab, my website stops responding?

I’m using Ubuntu linux, and the droplet says its still on, but for some reason the website is only hosted when I’m in the console. I also have to manually run the flask app again to get the website up and running.

Could somebody tell me how I could keep my flask application running 24/7? I’m sure this is just some small step I forgot about.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

You need to run the flask application with something like gunicorn.

Kindly check this article for how to deploy your application 24/7. That way, when you close your console tab, your website will keep running.

Hi @gabrielgavrilov11,

As @seanmavley mentioned in order to run your flask application even after you close your Console, you need another service.

Another option for your Flask app is the PM2 service. You can check this tutorial from ore information on how to install and configure it : Install and configure PM2