Kiosk Control page (and PHP was broken all along)
Why: Damien didn't want to remember adb shell am start … incantations just to change what the Fire 7 kiosk shows.
I added a password-protected Kiosk Control page to the Admin Hub. Rather than the server pushing commands over adb, we flipped it around: the tablet's kiosk app (v1.1) polls the server once a minute and applies whatever URL / refresh interval / "reload now" request it finds. That works whether or not adb is alive on the host. Along the way we found PHP had been 404ing site-wide.
1. PHP fix on the skyhouse.dev proxy host
NPM proxy host 9's Advanced config had root /var/www/html; only in location /. The location ~ \.php$ block inherited NPM's default root, so php-fpm got a bogus SCRIPT_FILENAME and answered "File not found." for every .php — including the old /home/processfeedback.php.
- Action: added
root /var/www/html;to the PHP location, both in NPM's DB (proxy_host.advanced_config, id 9, so it survives regeneration) and in the generated/home/plex/npm/data/nginx/proxy_host/9.conf;nginx -t+ reload. - Backups:
/home/plex/dev/fire/backups/npm-proxy_host-9.*.bak-20261008.
2. The control page
index.php: login (bcrypt hash, 30-day session cookie, CSRF token), URL + auto-refresh minutes, "Reload now", and a status box showing the tablet's last check-in and what it's displaying.config.php: what the tablet polls; requires the device key, records last-seen.- Secrets live in
auth.phpand state indata/*.phpas<?php return [...]files, so hitting them directly prints nothing.data/is mode 0777 so php-fpm (www-data) can write it. - Password is in Damien's hands (put it in Vaultwarden). To change it, generate a new hash with
docker exec npm-php-1 php -r 'echo password_hash("NEW", PASSWORD_DEFAULT);'and paste it intoauth.php.
3. Tablet app v1.1
The app polls https://skyhouse.dev/serverjournal/kiosk/config.php every 60 s once a device_key is set (done over adb; stored in the app's prefs). Offline or server down = it keeps showing the last page. The adb extras still work as a local override until the next poll.
Net effect: the kiosk is now managed from a web page, and PHP works on skyhouse.dev again.
← Back to Admin Hub