Question

How do I keep my Python script running?

Hello, I recently purchased a droplet and have gotten everything up and running. I am using it for a Reddit bot I coded in Python. However, I noticed that in order to run the script I need to open Putty on my computer and keep it open. Is there anyway to run my Python script on my droplet without needing to use my computer.

Basically I am looking to run my python script 24/7 without use of my computer, which is what I thought the VPS was for, I just cannot figure it out. I am rather new to this so I apologize for my terminology or level of question.

Language: Python OS: Ubuntu

Subscribe
Share

Just follow this tutorial. Use screen for running u=yout script 24/7. You don’t have to Login all time. https://www.digitalocean.com/community/tutorials/how-to-install-and-use-screen-on-an-ubuntu-cloud-server

You need to set up a Python ip list. You need to randomly change the ip so that it will not be supervised and restricted by the website. When you frequently use the same ip to visit the same website, it will be regarded as an improper visit and will be restricted. You need to go to www.Tomatoip.io network to buy multiple real ips to run your Python program,


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

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.

Use screen or nohup.

@raghavyadav990 if that’s the case screen doesn’t work 24/7