How to keep progress of server when reconnecting?
My goal is to run a discord.py discord bot 24/7
When i connect to SSH with Bitvise and run the python file it works fine until i close Bitwise when it resets and when i reconnect the console i get is cd'd in localhost even though i left it in a different folder and the python script stops running.
I've follow a youtube video and changed my firewall settings
ufw default deny incoming
ufw default allow outgoing
ufw allow 2
ufw enable
1 Reply
Log in to your Linux server via SSH.
Run the command "screen -S <name-of-session>". This will create a new screen session with the name you specified.</name-of-session>
Run the command "cd <location-of-bot-files>". This will move you to the directory containing your Discord bot files.</location-of-bot-files>
Run the command "node bot.js" to start your Discord bot.
Now your Discord bot is running in a screen session. To view the session, run the command "screen -r <name-of-session>".</name-of-session>
To disconnect from the session without stopping the bot, press Ctrl+A then Ctrl+D.
~ Andy | NexusPIPE