Installing the Amplify Agent

Get the Amplify Agent running on your server in minutes. The agent is a lightweight Python application that collects metrics and sends them to GetPageSpeed Amplify.

Prerequisites

  • A Linux-based operating system (Ubuntu, Debian, CentOS, RHEL, Amazon Linux)
  • NGINX installed and running
  • Python 2.7 or 3.6+ installed
  • Root or sudo access
  • Network access to amplify.getpagespeed.com

Quick Install

Run this command on your server to install the agent:

curl -sS https://amplify.getpagespeed.com/install | sudo bash -s -- -k YOUR_API_KEY

Replace YOUR_API_KEY with your actual API key from the Getting Started page.

Note

The install script automatically detects your operating system and installs the appropriate packages.

Manual Installation

Ubuntu/Debian

# Add the NGINX signing key
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg

# Add the Amplify repository
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/amplify/debian $(lsb_release -cs) amplify-agent" | sudo tee /etc/apt/sources.list.d/amplify-agent.list

# Install the agent
sudo apt update
sudo apt install nginx-amplify-agent

CentOS/RHEL

# Add the Amplify repository
sudo rpm --import https://nginx.org/keys/nginx_signing.key

cat << 'EOF' | sudo tee /etc/yum.repos.d/nginx-amplify.repo
[amplify-agent]
name=Amplify Agent
baseurl=https://pkgs.nginx.com/amplify/centos/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://nginx.org/keys/nginx_signing.key
EOF

# Install the agent
sudo yum install nginx-amplify-agent

Configuration

After installation, configure the agent with your API key:

sudo cp /etc/amplify-agent/agent.conf.default /etc/amplify-agent/agent.conf
sudo sed -i "s/api_key.*$/api_key = YOUR_API_KEY/" /etc/amplify-agent/agent.conf

Starting the Agent

# Start the agent
sudo systemctl start amplify-agent

# Enable auto-start on boot
sudo systemctl enable amplify-agent

# Check status
sudo systemctl status amplify-agent
Success!

Your server should appear in the dashboard within a few minutes. Head to the Servers page to see your metrics!