Skip to content

Status API

Check if your homelab server is reachable and which SSH ports are open.

GET /api/status

Requires bearer token in Authorization header.

Authorization: Bearer <token>
{
"homelab_ip": "100.x.y.z",
"reachable": true,
"initrd_ssh_open": false,
"system_ssh_open": true,
"initrd_ssh_port": 2222
}
FieldTypeDescription
homelab_ipstringConfigured target server IP
reachablebooleanServer responds to ping
initrd_ssh_openbooleanDropbear SSH port is open
system_ssh_openbooleanMain SSH port (22) is open
initrd_ssh_portnumberConfigured dropbear port
{
"error": "Invalid or expired token"
}
reachableinitrd_sshsystem_sshServer State
falsefalsefalsePowered off
truetruefalseWaiting for LUKS unlock
truefalsetrueFully booted
truefalsefalseBooting (between stages)
  • Ping check: 3 seconds
  • SSH port check: 3 seconds per port

If the server is unreachable, the endpoint may take up to 6+ seconds to respond.

Terminal window
curl http://localhost/api/status \
-H "Authorization: Bearer $TOKEN"
Terminal window
# Server is off
{"reachable": false, "initrd_ssh_open": false, "system_ssh_open": false, ...}
# Server waiting for unlock (time to send passphrase!)
{"reachable": true, "initrd_ssh_open": true, "system_ssh_open": false, ...}
# Server fully booted
{"reachable": true, "initrd_ssh_open": false, "system_ssh_open": true, ...}

For automation, you can poll this endpoint to wait for state changes:

Terminal window
# Wait for server to reach initrd
while true; do
STATUS=$(curl -s http://localhost/api/status -H "Authorization: Bearer $TOKEN")
INITRD=$(echo $STATUS | jq -r '.initrd_ssh_open')
if [ "$INITRD" = "true" ]; then
echo "Ready for unlock"
break
fi
sleep 5
done