In case anyone is like me and is running dreamfactory on Openshift, the path to get to the .env file is ${OPENSHIFT_HOMEDIR}/app-root/runtime/repo/df.
I simply had to ssh into the application, navigate to the file, and then was able to add the line DF_ALLOW_FOREVER_SESSIONS=true to the .env file using VIM (or your editor of choice).
After doing this went to the api docs as mentioned above and confirmed that the setting was updated.