I'm not sure I get the problem. If it's only available on your local network, then you access it with an address such as http://192.168.2.1:22300/joplin, so just set APP_NAME to that same value?
It's basically like when I run in it dev mode. In that case I access it using http://localhost:22300