Skip to main content

Linux

We recommend using systemd to manage the hoop agent

  1. Download and install the hoop binary
curl -s -L https://releases.hoop.dev/release/install-cli.sh | sh
  1. Install the hoopagent systemd unit
info

Make sure to create a token in your local machine before starting the agent. E.g.: hoop admin create agent <name>

export HOOP_TOKEN=<AGENT_TOKEN>
cat - >/etc/systemd/system/hoopagent.service <<EOF
[Unit]
Description=Hoop Agent
After=network.target

[Service]
ExecStart=hoop start agent
Environment="HOME=/root"
Environment="HOOP_TOKEN=<TOKEN>"
Environment="HOOP_GRPCURL=app.hoop.dev:8443"
StandardOutput=true
Restart=on-failure
RestartSec=10s

[Install]
WantedBy=multi-user.target
EOF
  1. Reload the unit and start it
systemctl daemon-reload
systemctl enable hoopagent.service
systemctl start hoopagent