How to run dev mode in pm2

System Information
  • Strapi Version: v4.1.7 community edition
  • Operating System: Ubuntu 20.04 LTS
  • Database: SQLite
  • Node Version: v14.19.1
  • NPM Version: 6.14.16
  • Yarn Version: n/a

Hi all, I am new to Strapi and like the idea of a headless setup. Especially for speed and flexibility.

I am not a developer, but can manage Linux environment by the command line. Normally I am used to run daemonized processes by systemd in Ubuntu but found out that I need to do this for strapi by pm2.

Thanks to the documentation I was able to run Strapi, but when I started creating collections I got the information popup "The autoReload feature is required to use this plugin. Start your server with strapi develop", which I found out that it need to run in develop mode and currently is in production.
I searched how I can do this with pm2 and found Process Manager - Strapi Developer Docs and did the pm2 init . When running now with pm2 I got a 502 error. The topic was from Feb 2021, so I guess it was related to Strapi 3 instead of 4. So is there an update how to run pm2 in developer mode for Strapi 4?
PS. I don’t have a developer environment. Just working with my Chromebook and VPS to build a production Strapi. I will put it temporarily on develop mode to create the content types.

Thanks for helping.