Linux monitoring agent

Protect your server with Server Guardian Pro

Install the lightweight agent on your Linux server to securely send CPU, memory, disk, network, process, service and port metrics to the Server Guardian Pro app.

01

Read-only monitoring

The agent collects operating system information without restarting services, killing processes or changing server settings.

02

No public monitoring port

The Pro agent sends data to the backend through HTTPS. You do not need to expose port 9091 or create a new inbound firewall rule.

03

Private agent token

A unique token identifies the installation. Keep it private and use it only to link this server inside the Server Guardian Pro app.

Automatic installation

Run the complete block below as a user with sudo access. It detects the CPU architecture, downloads the correct binary, creates the configuration and installs the systemd service.

Before starting: the server needs a supported Linux architecture, systemd, curl and outbound HTTPS access to serverguardianpro.projy.ai.
Complete installation
set -e

MACHINE="$(uname -m)"
case "$MACHINE" in
  x86_64|amd64)
    BUILD="amd64"
    ;;
  aarch64|arm64)
    BUILD="arm64"
    ;;
  i386|i486|i586|i686)
    BUILD="386"
    ;;
  *)
    echo "Unsupported architecture: $MACHINE"
    exit 1
    ;;
esac

DOWNLOAD_URL="https://projy.nyc3.cdn.digitaloceanspaces.com/server-guardian-pro/server-guardian-pro-agent-linux-${BUILD}"
SERVER_HOSTNAME="$(hostname)"

sudo install -d -m 0755 /usr/local/bin
sudo install -d -m 0755 /etc/server-guardian-pro

curl -fL "$DOWNLOAD_URL" -o /tmp/server-guardian-pro-agent
sudo install -m 0755 /tmp/server-guardian-pro-agent /usr/local/bin/server-guardian-pro-agent
rm -f /tmp/server-guardian-pro-agent

if [ ! -f /etc/server-guardian-pro/config.json ]; then
  sudo tee /etc/server-guardian-pro/config.json >/dev/null <<JSON
{
  "base_url": "https://serverguardianpro.projy.ai",
  "server_uuid": "${SERVER_HOSTNAME}",
  "agent_token": "",
  "agent_uuid": "",
  "agent_version": "1.0.0",
  "fast_poll_seconds": 5,
  "metrics_poll_seconds": 60,
  "inventory_poll_minutes": 30,
  "send_processes": true,
  "send_services": true,
  "send_ports": true,
  "max_processes": 50,
  "max_services": 100,
  "max_ports": 100,
  "ports_to_check": [22, 80, 443, 3306, 5432, 6379, 9091],
  "log_file": "/var/log/server-guardian-pro.log"
}
JSON
  sudo chmod 0600 /etc/server-guardian-pro/config.json
fi

sudo tee /etc/systemd/system/server-guardian-pro-agent.service >/dev/null <<'SERVICE'
[Unit]
Description=Server Guardian Pro Agent
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=root
WorkingDirectory=/etc/server-guardian-pro
ExecStart=/usr/local/bin/server-guardian-pro-agent
Restart=always
RestartSec=5
NoNewPrivileges=true
PrivateTmp=true

[Install]
WantedBy=multi-user.target
SERVICE

sudo systemctl daemon-reload
sudo systemctl enable --now server-guardian-pro-agent
sudo systemctl status server-guardian-pro-agent --no-pager
Expected result: systemd should show active (running). On the first successful check-in, the agent generates or stores its private identity values in the configuration file.

Manual downloads

Use uname -m to identify your server architecture, then download the matching executable.

Check the architecture

Linux architecture
uname -m
x86_64 = linux-amd64 aarch64 = linux-arm64 i386 or i686 = linux-386
Build Recommended for Download Manual command
linux-amd64 Most VPS, dedicated servers, cloud instances and x86_64 Linux machines. server-guardian-pro-agent-linux-amd64
linux-arm64 ARM 64-bit servers, AWS Graviton and modern Raspberry Pi systems. server-guardian-pro-agent-linux-arm64
linux-386 Legacy 32-bit Intel and compatible Linux systems. server-guardian-pro-agent-linux-386
Install a manually downloaded binary
chmod +x server-guardian-pro-agent
sudo install -m 0755 server-guardian-pro-agent /usr/local/bin/server-guardian-pro-agent

Configuration

The agent uses /etc/server-guardian-pro/config.json. The backend can return plan limits and collection intervals, while the local file keeps the server identity and collection preferences.

Keep the token private: never place agent_token in a URL, public screenshot, support ticket, shell history or source repository.

Edit with vi

Open the configuration file using the server editor.

Edit configuration
sudo vi /etc/server-guardian-pro/config.json

Protect the file

Only root should be able to read or change the agent identity.

Secure permissions
sudo chown root:root /etc/server-guardian-pro/config.json
sudo chmod 0600 /etc/server-guardian-pro/config.json
Reference configuration
{
  "base_url": "https://serverguardianpro.projy.ai",
  "server_uuid": "server01",
  "agent_token": "",
  "agent_uuid": "",
  "agent_version": "1.0.0",
  "fast_poll_seconds": 5,
  "metrics_poll_seconds": 60,
  "inventory_poll_minutes": 30,
  "send_processes": true,
  "send_services": true,
  "send_ports": true,
  "max_processes": 50,
  "max_services": 100,
  "max_ports": 100,
  "ports_to_check": [22, 80, 443, 3306, 5432, 6379, 9091],
  "log_file": "/var/log/server-guardian-pro.log"
}

Connect the server to the app

After the service starts and completes its first check-in, use the generated agent token to claim the server in Server Guardian Pro.

Step 1 Start the agent Wait until the service is active and the first backend check-in succeeds.
Step 2 Read the token Copy the private agent token from the local configuration file.
Step 3 Open the app Select the option to add or connect a new server.
Step 4 Link the server Choose a server name and paste the token when requested.
Read the generated token locally
sudo grep '"agent_token"' /etc/server-guardian-pro/config.json
Security note: copy only the token value into the app. Do not send the complete configuration file to another person.

Diagnostics

Use these commands when the server does not appear online in the app or metrics stop updating.

Service status

Current status
sudo systemctl status server-guardian-pro-agent --no-pager

Live systemd logs

Follow logs
sudo journalctl -u server-guardian-pro-agent -f

Agent log file

Last 100 lines
sudo tail -n 100 /var/log/server-guardian-pro.log

Check backend connectivity

An HTTP 401 response is expected without a token and confirms that DNS, TLS and the backend route are reachable.

HTTPS connectivity
curl -sS -o /dev/null -w 'HTTP %{http_code}\n' \
  https://serverguardianpro.projy.ai/api/serverguardian/agent/config

Restart after configuration changes

Restart the service after editing the JSON file.

Restart agent
sudo systemctl restart server-guardian-pro-agent
sudo systemctl status server-guardian-pro-agent --no-pager
Firewall: allow outbound TCP 443 to the Server Guardian Pro backend. No additional inbound rule is required for the Pro agent.

Update the agent

Download the newest binary for the current architecture, replace the executable and restart the service. The existing configuration and token are preserved.

Update using automatic architecture detection
set -e

case "$(uname -m)" in
  x86_64|amd64) BUILD="amd64" ;;
  aarch64|arm64) BUILD="arm64" ;;
  i386|i486|i586|i686) BUILD="386" ;;
  *) echo "Unsupported architecture: $(uname -m)"; exit 1 ;;
esac

DOWNLOAD_URL="https://projy.nyc3.cdn.digitaloceanspaces.com/server-guardian-pro/server-guardian-pro-agent-linux-${BUILD}"

curl -fL "$DOWNLOAD_URL" -o /tmp/server-guardian-pro-agent
sudo systemctl stop server-guardian-pro-agent
sudo install -m 0755 /tmp/server-guardian-pro-agent /usr/local/bin/server-guardian-pro-agent
rm -f /tmp/server-guardian-pro-agent
sudo systemctl start server-guardian-pro-agent
sudo systemctl status server-guardian-pro-agent --no-pager

Disable the service

Stop without removing files
sudo systemctl disable --now server-guardian-pro-agent

Remove the agent

Uninstall and keep no local config
sudo systemctl disable --now server-guardian-pro-agent
sudo rm -f /etc/systemd/system/server-guardian-pro-agent.service
sudo rm -f /usr/local/bin/server-guardian-pro-agent
sudo rm -rf /etc/server-guardian-pro
sudo systemctl daemon-reload
Copied