Have all of your devices call in, and know when they were online last
- Install deps:
yarn
- Create some certificates. I like self-signing
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
- Run the server
node server
Do it lazily with cURL!
curl -X POST -H "authorization: secrets don't go on github" https://SERVER_URL:5001/key/laptop -k
curl -H "authorization: secrets don't go on github" https://SERVER_URL:5001/all -k
Create a Systemd service unit:
[Unit]
Description=Phone Home Service
[Service]
ExecStart=/path/to/curl_script
[Install]
WantedBy=multi-user.target
- Save it under
/etc/systemd/system/phone-home.service
- Start the service
sudo systemctl start phone-home.service
- Enable it!
sudo systemctl enable phone-home.service