The server stoped after xshell exit

i built a local Blynk server on a CentOS ,it’s seems everything is OK.
i can start the server by Xshell ,the port 9443 is OK,the 8442 is fine too. But ,when i quit the Xshell ,the server is stoped. So,how can i keep the server is running after i quit Xshell.

1 Like

Welcome to the overwhelming world of Linux :wink: Google your general question and you will find dozens of ways to branch, disown, make persistent, etc… scripts.

I don’t know what is best or any cons to this, but I add an ampersand --> & after the command when starting the script from crontab or rc.local or even from the CLI.

If from the CLI (Shell, terminal, whatever) I then give it time to show the server started response, then I CTRL-X out and carry on, or close the CLI.

To have my server running automatically at RPi startup I have added this line to my/etc/rc.local file Note the & at the end.

sudo java -jar /home/gunner/server-0.24.4.jar -dataFolder /home/gunner/Blynk &
1 Like