Closed mohamed-hmd closed 4 years ago
Describe the bug I have a problem I am currently running the bot on vps ubuntu, but after closing the terminal, the bot stops working. What is the solution please.
Have you tried to use as a service?
run sudo su
before running commands below
echo -e "[Unit]\nDescription=WBOT service\n[Service]\nType=simple\nExecStart=/PATH/TO/WBOT/EXECUTABLE\n[Install]\nWantedBy=multi-user.target" > /etc/systemd/system/wbot.service
systemctl daemon-reload
systemctl start wbot # execute wbot in background
journalctl -e -u wbot
the last command is to see the QR code
As this is a node project you can also use process managers like Pm2 or forever to keep the process running.
@mohamed-hmd This can only happen when you run the bot by SSHing into VPS and running it through that terminal. As you close SSH connection, terminal also closes. Install GUI for Ubuntu and then open terminal.
Reopen if needed.
Describe the bug I have a problem I am currently running the bot on vps ubuntu, but after closing the terminal, the bot stops working. What is the solution please.