Installation

Agent downloads

Download links for each version of the Raygun Agent can be found on the downloads page.

All links used below will always refer to the latest version.

Docker

The Raygun Agent can be run as a Docker container, see Docker instructions for more information.


Installing on Linux (using systemd)

Follow these steps to install the Raygun Agent on a Linux x64 machine running under systemd (Most desktop distributions like CentOS, Debian, Fedora, Ubuntu and derivatives are supported).

The Raygun Agent is built as a self-contained .NET Core application. The .NET Core runtime doesn’t need to be installed on the target machine.

1. Install dependencies

Ensure you have the dependencies needed to run the commands below.

sudo apt-get -y install unzip wget

Depending on your linux distribution, please also install the .NET Core 3.0 dependencies.

2. Download and extract the agent

Create a directory to install the Raygun Agent to. If you install the Raygun Agent to a different directory then also update the raygunagent.service file with the same directory. Then download the Raygun Agent zip file to that directory and give execute permission to the Agent and CLI executables.

sudo mkdir /opt/raygun

sudo wget https://downloads.raygun.com/APM/latest/RaygunAgent-netcore-linux.zip
sudo unzip -d /opt/raygun/agent -o RaygunAgent-netcore-linux.zip
sudo rm RaygunAgent-netcore-linux.zip
sudo chmod +x /opt/raygun/agent/RaygunAgent
sudo chmod +x /opt/raygun/agent/rgc

3. Install the systemd service

Copy the raygunagent.service configuration file to the systemd directory and reload the daemon to pick up the new service.

sudo mv /opt/raygun/agent/raygunagent.service /etc/systemd/system/
sudo systemctl daemon-reload

4. Start the service and register your agent

The final step is to start the new service and issue the command to register the agent with your API key.

sudo systemctl start raygunagent
sudo /opt/raygun/agent/rgc -register [YOUR-API-KEY]

Installing on Linux (using terminal)

Follow these steps to install the Raygun Agent on a Linux x64 machine (Most desktop distributions like CentOS, Debian, Fedora, Ubuntu and derivatives are supported).

The Raygun Agent is built as a self-contained .NET Core application. The .NET Core runtime doesn’t need to be installed on the target machine.

1. Install dependencies

Ensure you have the dependencies needed to run the commands below.

sudo apt-get -y install unzip wget

Depending on your linux distribution, please also install the .NET Core 3.0 dependencies.

2. Create a user account

Create a user account to run the Raygun Agent and configure a directory for logs and configuration settings.

sudo adduser --disabled-password --gecos '' raygun
sudo mkdir /usr/share/Raygun
sudo chown -R raygun:raygun /usr/share/Raygun

3. Download and extract the agent

Create a directory to install the Raygun Agent to (change this to what works best for you). Then download the Raygun Agent zip file to that directory and give execute permission to the Agent and CLI executables.

sudo mkdir /var/raygun
sudo chown -R raygun:raygun /var/raygun

sudo wget https://downloads.raygun.com/APM/latest/RaygunAgent-netcore-linux.zip
sudo unzip -d /var/raygun/agent -o RaygunAgent-netcore-linux.zip
sudo rm RaygunAgent-netcore-linux.zip
sudo chmod +x /var/raygun/agent/RaygunAgent
sudo chmod +x /var/raygun/agent/rgc

4. Run the agent

Run the agent in the terminal using the raygun user account, logging output to the terminal. Make sure you enter your API key below. You API key can be found on the setup instructions page when creating a new application in Raygun.

export Raygun_DefaultApiKey=[YOUR-API-KEY]
sudo -u raygun /var/raygun/agent/RaygunAgent

Installing on Windows (MSI)

Follow these steps to install the Raygun Agent on Windows Server 2008 or above using the MSI installer.

The Raygun APM Agent can be scripted to install silently, see the scripted installation instructions.

1. Download and install

Download the MSI installer to your server. Run the installer follow the on-screen prompts to complete installation.

Windows 64-bit - Installer for the 32-bit and 64-bit profiler and agent.
Windows 32-bit - Installer for the 32-bit profiler only and agent.

2. Run the agent

When installing with the MSI installer the Raygun Agent is configured as a Windows Service set to auto-start. When the installer completes, the agent will be running.

To configure the agent and your application please check the setup instructions for your application.


Installing on Windows (.NET Core)

Follow these steps to install the Raygun Agent on a Windows Server using .NET Core.

1. Install dependencies

The Raygun Agent has not been built self-contained as we assume you already have the .NET Core runtime installed. If required, download and install the .NET Core 3.0 runtime.

2. Download and extract the agent

Create a directory to install the Raygun Agent to (change this to what works best for you). Then download the Raygun Agent zip file to that directory.

$installto = "${env:ProgramFiles}\Raygun\RaygunAgent\"

New-Item -Path $installto -ItemType "directory"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://downloads.raygun.com/APM/latest/RaygunAgent-netcore.zip" -OutFile "${installto}\RaygunAgent-netcore.zip"
Add-Type -assembly "system.io.compression.filesystem"
[io.compression.zipfile]::ExtractToDirectory("${installto}\RaygunAgent-netcore.zip", $installto)
Remove-Item "${installto}\RaygunAgent-netcore.zip"

3. Run the agent

You can run the agent in the console or register it as a Windows Service. Make sure you enter your API key below. You API key can be found on the setup instructions page when creating a new application in Raygun.

$env:Raygun_DefaultApiKey = '[YOUR-API-KEY]'
dotnet "${env:ProgramFiles}\Raygun\RaygunAgent\RaygunAgent.dll"

To install as a Windows Service:

$agentpath = "${env:ProgramFiles}\Raygun\RaygunAgent"
$params = @{
  Name = "RaygunAgentNetCore"
  BinaryPathName = "${agentpath}\RaygunAgent.exe"
  DisplayName = "Raygun Agent"
  StartupType = "Automatic"
  Description = "Agent for Raygun APM"
}
New-Service @params
Start-Service $params.Name
Start-Process -FilePath "${agentpath}\rgc.exe" -ArgumentList "-register [YOUR-API-KEY]" -WindowStyle hidden