You do, set the environment variable of ipAddress
to your server IP before launching the server.
If using docker his instructions show it (fixed variable to proper case in case it matters on your system)
ipAddress=192.168.4.3 ./start.sh
EDIT4: Sorry I finally found the way to just launch pm2 and set the variable. PM2 - Environment Variables | Best Practices | PM2 Documentation
So looks like if you already have pm2 setup you could restart it like this to set the variable.
Replace 'app' with the name of the app shown when you run pm2 list
ipAddress=192.168.4.3 pm2 restart app --update-env
May need to run a pm2 save
again after this as well, not sure but it wont hurt anything.
Other Old Info:
Other Info
If you are not using docker, stop the pm2 process and try launching it manually like this (from the echo-speaks-server folder)
ipAddress=192.168.4.3 node index.js
I think that should set it according to what I found online. I am not sure exactly where that works into the pm2 command. Its a way to test it it will work though.
EDIT2: The pm2 ecosystem file thing looks slightly complicated and I would have to test it. I did however stumble into something. There should be an es_config.json that was generated, not sure where exactly since I set mine up in an odd way. It might be in the folder just above the node_modules folder or possibly in the echo-speaks-server folder. It may also be in the home folder of the users launching the process. Anyway.... if you find that file you should be able to edit the ipAddress in there. Stop server, edit file, restart server. Hopefully it will just use that value, could be wrong though, it may just reset it again.
EDIT3: Here is the info I found on setting env variable for PM2. You would need to create the ecosystem file and then launch that with pm2 instead of the index.js
How to create it: PM2 - Ecosystem File
More about variables: PM2 - Environment Variables
You would need something like this in the ecosystem file:
env: {
"ipAddress": "192.168.4.3",
}