jailkit configuration

Discussion in 'Installation/Configuration' started by nhybgtvfr, Feb 14, 2019.

  1. nhybgtvfr

    nhybgtvfr Active Member

    has anyone managed to get nodejs and npm working for jailkit ssh users?

    i'm having trouble getting a working config.
    I've got close, as root, I've apt-get install nodejs and npm. and with this set in the jk_init.ini file:

    [node]
    comment = NodeJS
    executables = /usr/bin/npm, /usr/bin/node, /usr/bin/nodejs, /usr/local/bin/elmi-to-json
    directories = /usr/share/npm, /usr/lib/nodejs, /usr/local/lib/node_modules

    and as the jailkitted ssh user, logged in, and run nodejs -v (returns v8.10.0) and npm -v (returns 3.5.2), (server is ubuntu 18.04)

    as this user, I've then changed to the web folder, and tried npm install to install the required additional local node modules.
    it initially had problems connecting to the registry using https, stating that it couldn't get the local issuer certificate.
    I can fix that by using the --registry option and specifying the url with an http connection, eg npm install --registry http://registry.npmjs.org/
    but then some dependencies fail because it's trying to get them from other urls, eg https://github.com/stoeffel/..... , again with unable to get the local issuer certificate. but I can find no way of changing this part to use http instead.

    I know it's not an ispconfig problem, just hoping someone has come across the issue before and can point me in the right direction.

    if I can resolve the jailkit user being able to get the local issuer certificate, that *might* fix everything.

    the customer wants more sites using nodejs and npm. I know it'll be simple if they just have their own vps, would be nice getting it working on shared hosting, especially as the big hosting companies don't seem to offer it.
     

Share This Page