you don't give us much to go on. no sample code, no error message, no info on how the service is started.
My guess is file permission or missing environment variables. How are you hosting the service on the Mac? Mac being Berkley unix uses launchd rather than systemd.