Let the jekyll server run unlimited time

I installed jekyll on my VPS server but I would like to know if it was possible to let the server run even by closing the putty console.

I have been told that this may be possible with pm2 but I have no idea how to do it.

Thanks a lot for your answers.

why? would be easier to use apache or something else I would think. The built in jekyll server is not really a production server.

when you close the console does jekyll stop running? not sure how PM2 would help, other than to start it when the server restarts, though I am no PM2 expert that is for sure.

thank you for your answer, when i close the putty console my website stops working because jekyll is stopped

any why not use apache or nginx or another web server? that is what those are made for.

I would assume your VPS already has one installed no?

A dynamic website would need a running server. A STATIC site generator does not. Please try to grasp the concept of SSGs, as I think you are missing the essence.