I patched neko's code to use getenv() to grab instance url at startup and store it as a global rather than static const.