Systemd Config for Always‑On Applications

You can run Magic Mirror as a background service so your applications are automatically live on boot and restart if the process exits.

Create /etc/systemd/system/magic-mirror.service with the contents below. Replace the placeholders (your‑user, your‑domain, port) with real values:

[Unit]
Description=Magic Mirror App
After=network.target

[Service]
User=<YOUR_UNIX_USER>
ExecStart=/usr/local/bin/magic-mirror mirror <YOUR_DOMAIN>.nodelink.ca <PORT>
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Reload systemd, enable, and start the service:

sudo systemctl daemon-reload
sudo systemctl enable magic-mirror.service
sudo systemctl start magic-mirror.service

Verify that it is running and view logs:

systemctl status magic-mirror.service
journalctl -u magic-mirror.service -f