Run the agent as a Linux service

Install a Linux x64 agent under systemd and verify incoming records.

Run the agent as a Linux service

Use a Linux x64 host with systemd, sudo, curl and unzip. For an existing installation, inspect systemctl cat logship-agent and preserve the configured directories during upgrades. For a fresh installation:

curl -fL https://github.com/logship-io/logship-agent/releases/download/v0.9.25/LogshipAgent-linux-x64.zip -o logship-agent.zip
sudo mkdir /opt/logship-agent
sudo unzip -n logship-agent.zip -d /opt/logship-agent
sudo chmod +x /opt/logship-agent/Logship.Agent.ConsoleHost
sudo install -d -m 700 /var/lib/logship-agent

Save the agent configuration in /opt/logship-agent/appsettings.json. Supply your backend URL and receiving account ID. Keep Output.dataPath set to /var/lib/logship-agent.

sudo tee /etc/systemd/system/logship-agent.service >/dev/null <<'SERVICE'
[Unit]
Description=Logship collection agent
Wants=network-online.target
After=network-online.target
[Service]
WorkingDirectory=/opt/logship-agent
ExecStart=/opt/logship-agent/Logship.Agent.ConsoleHost
Restart=on-failure
[Install]
WantedBy=multi-user.target
SERVICE
sudo systemctl daemon-reload
sudo systemctl enable --now logship-agent
sudo journalctl -u logship-agent -f

Match the journal's verification ID in Settings → Account → Agents, approve, then query incoming disk records. Press Ctrl+C to stop following the journal. Restart with sudo systemctl restart logship-agent and check for a newer timestamp from this machine. On upgrade, stage the release separately, stop the unit, replace the executable, keep the configuration and state, and repeat that check.