How to retrive KNIME server URL to be used in workflow

Hello,

in order to create a workflow which create REST Api links and will run on different servers, I would like to extract the current server URL, I am running the workflow on.

I tried the Extract Sytem/Context properties node on the server, but I could not find the URL there. Did I miss something like a server setting to be shown here or are there other options?

Thank you!
Lars

KNIME Server doesn’t necessarily know its URL (it could be running behind a Webserver). Assuming a more simple setup, then you should be able to use your existing strategy just so long as the HOSTNAME environment variable is correctly set.

Best,

Jon

Hey Jon,

could you please point me to the place/file where the HOSTNAME variable is set? I checked some setting files and couldn’t find the empty Hostename string.

What would be the workaround?

Thank you!
Lars

P.S. Our KNIME Server runs behind NGINX

PPS. We found a Workaround using a Java snippet:

Hi Lars,

As far as I know, there is no node that can provide that information. But I just tried your workaround and it works great, thanks for that! :slight_smile:

Cheers,
Roland