On a physical CORE, you'll need to request an ssh user assertion. This would not be valid for a production solution and only for development purposes.
See this How-To for more info.
If exporting the environment variable is required and you don't have ssh access, I think your best bet will be building a custom Node-RED snap.
... View more