• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Node environment variables not returned by process.env

basdebruin

New Pleskian
Plesk Obsidian 18.0.36 / Ubuntu 20.04.3 / Node 14.18.0

process.env.XYZ does return undefined while XYZ is set as a custom environment variable. Other variable are returned fine. Is there a maximum to the number of environment variables or the total nr of characters in them? Removing one of the working environment variables does not solve the issue, so it does not look like it runs into a maximum.
 
So Plesk doesn't forward the ENV Vars to custom scripts (don't ask me why), but this will pass them to it if you run it as part of the command:
export $(cat ./location/of/.env | xargs) && node ./index.js // or whatever command you are trying to run that has methods referencing env vars.

Hope this helps
 
So Plesk doesn't forward the ENV Vars to custom scripts (don't ask me why), but this will pass them to it if you run it as part of the command:
export $(cat ./location/of/.env | xargs) && node ./index.js // or whatever command you are trying to run that has methods referencing env vars.

Hope this helps
I had Plesk with CloudLinux on a CentOs7, and the custom environment variables worked perfectly.
Last month, however, I switched to a new system with Plesk on Ubuntu 20, and now the custom environment variables don't work anymore.
Would this be a permissions issue?
 
Back
Top