No response from web server when screen is locked

Hi folks,

I have a 2018 Mac Mini running headless (macOS 11.5) which I access using Screens or Termius. It's set to never sleep or power nap as it is acting as a home automation server, NAS, etc. I'm using a number of named triggers called through the webserver to control things like Airfoil (with keyboard shortcuts) from the home automation server. HTTPS and shared secret are off because everything is limited to the same machine. This works beautifully if the "display" (in this case Screens) is active and unlocked, but as soon as the screen locks, BTT no longer responds to commands when called with my scripts or via the command line. Am I perhaps missing a privacy setting somewhere in the Mac settings? Surely BTT is meant to keep listening when the display is locked.

Sample URL call:
curl "http://127.0.0.1:xxxx/trigger_named/?trigger_name=hp_vol_up"

Imprint | Privacy Policy