systemd Service
To make the agent start automatically on boot and restart on failure, configure it as a systemd service.
Create the service file
/etc/systemd/system/ezmon-agent.service
[Unit]
Description=EZMON Agent
After=network.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/ezmon-agent
Restart=always
RestartSec=10
Environment=EZMON_SERVER_URL=https://your-app.vercel.app
Environment=EZMON_AGENT_TOKEN=YOUR_AGENT_TOKEN
Environment=EZMON_AGENT_NAME=my-server
[Install]
WantedBy=multi-user.targetEnable and start
sudo systemctl daemon-reload
sudo systemctl enable ezmon-agent
sudo systemctl start ezmon-agentUseful commands
# Check status
sudo systemctl status ezmon-agent
# View live logs
sudo journalctl -u ezmon-agent -f
# Restart
sudo systemctl restart ezmon-agent
# Stop
sudo systemctl stop ezmon-agentIf you see 203/EXEC error, see Troubleshooting → 203/EXEC Error.
Last updated on