pm2 and jailkit configuration

Discussion in 'Installation/Configuration' started by brody182, Jan 11, 2020.

  1. brody182

    brody182 Member

    I'm trying to run apps with pm2 in a jail environment using jailkit. I think I have to configure a path somewhere but I'm lost with it. My config files:

    Description=PM2 process manager


    ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect
    ExecReload=/usr/lib/node_modules/pm2/bin/pm2 reload all
    ExecStop=/usr/lib/node_modules/pm2/bin/pm2 kill

  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Youi do not write much about what is not working.
    So I just guess some command is not available in the jail? Add the necessary commands and their run time libraries to the jail. Jailkit has commands for this.
    More info can be found with Internet Search Engines or Oliver Sessings Jailkit documentation.
  3. brody182

    brody182 Member

    What paths do I put in here?

  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is that configuration file in a place where the application does find it?
    Since the application is run in a jail, you have to use paths that are valid inside that jail. If this is ISPConfig and jailed user, at least on my host the home directory is not /home/jail/home/<user>, but /home/<user>. Check what directories you have by logging in as that jailed user with the usual command line commands.
  5. brody182

    brody182 Member

    you are correct my jail directory is /home/<user>, however, I don't want to target a specific user, I want it to apply to all users

    the config file is ( /etc/jailkit/jk_init.ini)
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That looks like jailkit configuration file. Is that related to your problem, whatever it is?
    Each jailed user has his/her own jail, so I can not see how you could have paths inside jail apply to all users.
    Now you should know which paths you need to set. Since I have no idea what is not working in that PM2 setup, I can help no more.

Share This Page