Skip to main content

Installing Agent on Linux Server

This guide walks you through installing the Pluton Agent on headless Linux servers. The server installer downloads and installs the agent directly from the Pluton CDN, making it ideal for remote or automated deployments.


Prerequisites

Before installing the Pluton Agent:

  • Linux server with systemd (Ubuntu Server, Debian, RHEL, CentOS, Rocky Linux, AlmaLinux, etc.)
  • Root/sudo access on the target machine
  • Active Pluton PRO license with available device slots
  • Internet access to download the agent package from CDN
  • Supported architectures: x86_64 (amd64), ARM64 (aarch64)

Step 1: Create a Device in Pluton UI

Before installing the agent, create a device entry in Pluton:

  1. Navigate to Devices in the main navigation
  2. Click "Add Device" in the top-right corner
  3. Fill in the device details:
    • Device Name: A descriptive name (e.g., "Production Database Server")
    • Device Type: Select appropriate type (Device, Virtual Machine, Database, etc.)
  4. Click "Create Device"
  5. Download the configuration file (pluton-agent.json)

Step 2: Download the Configuration File

After creating the device:

  1. Open the device details page
  2. Click "Download Configuration" to get pluton-agent.json
  3. Transfer this file to your server (via SCP, SFTP, etc.)
# Example: Transfer config file to server
scp pluton-agent.json user@your-server:/tmp/

Step 3: Install the Agent

The simplest way to install on a server:

curl -sSL https://dl.usepluton.com/agent/scripts/install.sh | sudo bash -s -- --config /tmp/pluton-agent.json

Option B: Interactive Installation

If you don't have a config file, run interactively:

curl -sSL https://dl.usepluton.com/agent/scripts/install.sh | sudo bash

You will be prompted to enter:

  • Agent ID
  • Server URL
  • API Key
  • Signing Key
  • Encryption Key
  • License Key

Option C: Non-Interactive with Config File

For fully automated deployments:

curl -sSL https://dl.usepluton.com/agent/scripts/install.sh | sudo bash -s -- \
--config /path/to/pluton-agent.json \
--non-interactive

Option D: Install Specific Version

To install a specific agent version:

curl -sSL https://dl.usepluton.com/agent/scripts/install.sh | sudo bash -s -- \
--config /path/to/pluton-agent.json \
--version 1.0.5

Installation Parameters

ParameterRequiredDescription
--config <file>Yes*Path to JSON configuration file
--upgradeNoUpgrade existing installation (preserves config)
--non-interactiveNoRun without prompts
--version <version>NoSpecific version to install (default: latest)
--helpNoShow help message

*Required for fresh installations unless running interactively


Configuration File Format

The pluton-agent.json file should contain:

{
"agentId": "your-agent-id",
"apiKey": "your-api-key",
"signingKey": "your-signing-key",
"serverUrl": "https://your-pluton-server-ip-or-domain.com",
"encryptionKey": "your-32-character-encryption-key",
"licenseKey": "your-license-key"
}

What Gets Installed

The server installer creates the following:

ComponentLocationDescription
Agent binary/opt/pluton-agent/bin/pluton-agentMain agent executable
Restic/opt/pluton-agent/bin/resticBackup tool
Rclone/opt/pluton-agent/bin/rcloneCloud sync tool
Helper scripts/opt/pluton-agent/bin/*.shFile, metrics, and update helpers
Uninstall script/opt/pluton-agent/bin/uninstall.shBuilt-in uninstaller
Configuration/etc/pluton-agent/pluton-agent.envEnvironment configuration
Data directory/var/lib/pluton-agent/Agent data and state
Systemd service/etc/systemd/system/pluton-agent.serviceService definition
Sudoers config/etc/sudoers.d/pluton-agentPrivilege escalation rules
Wrapper scripts/usr/local/bin/prclone, /usr/local/bin/presticCLI wrappers
Agent symlink/usr/local/bin/pluton-agentSystem-wide agent command

Verify Installation

Check if the agent is running:

# Check service status
sudo systemctl status pluton-agent

# View recent logs
sudo journalctl -u pluton-agent -n 50

# Check agent version
pluton-agent --version

# Check in Pluton UI - device should show as "Online"

Managing the Agent Service

# Start the agent
sudo systemctl start pluton-agent

# Stop the agent
sudo systemctl stop pluton-agent

# Restart the agent
sudo systemctl restart pluton-agent

# View live logs
sudo journalctl -u pluton-agent -f

# Check status
sudo systemctl status pluton-agent

# Enable/disable on boot
sudo systemctl enable pluton-agent
sudo systemctl disable pluton-agent

Using the CLI Wrappers

The installation creates wrapper scripts for direct command-line access:

# Use restic with agent configuration
prestic snapshots

# Use rclone with agent configuration
prclone listremotes

# Run agent commands directly
pluton-agent --version

Upgrading the Agent

To upgrade an existing installation while preserving configuration:

curl -sSL https://dl.usepluton.com/agent/scripts/install.sh | sudo bash -s -- --upgrade

The upgrade process:

  1. Loads existing configuration from /etc/pluton-agent/pluton-agent.env
  2. Stops the running service
  3. Downloads and installs the latest version
  4. Restarts the service with preserved configuration

Upgrade to Specific Version

curl -sSL https://dl.usepluton.com/agent/scripts/install.sh | sudo bash -s -- \
--upgrade \
--version 1.0.6

Uninstalling the Agent

Use the built-in uninstall script:

sudo /opt/pluton-agent/bin/uninstall.sh

Or download and run directly:

curl -sSL https://dl.usepluton.com/agent/scripts/uninstall.sh | sudo bash

Uninstall Options

OptionDescription
--force or -fSkip confirmation prompts
--keep-dataKeep data directory (useful for reinstall)
--remove-rearAlso remove ReaR if installed by agent
--help or -hShow help message

Examples:

# Non-interactive uninstall
sudo /opt/pluton-agent/bin/uninstall.sh --force

# Uninstall but keep data for reinstall
sudo /opt/pluton-agent/bin/uninstall.sh --keep-data

# Uninstall including ReaR
sudo /opt/pluton-agent/bin/uninstall.sh --remove-rear

This will:

  • Stop and disable the systemd service
  • Remove agent binaries and installation directory
  • Remove configuration directory
  • Remove sudoers configuration
  • Remove wrapper scripts
  • Remove the dedicated pluton-agent user
  • Remove data directory (unless --keep-data is used)

Ansible/Automation Example

For configuration management tools like Ansible:

- name: Install Pluton Agent
hosts: servers
become: yes
vars:
pluton_config:
agentId: "{{ agent_id }}"
apiKey: "{{ vault_api_key }}"
secretKey: "{{ vault_secret_key }}"
serverUrl: "https://your-pluton-server-ip-or-domain.com"
encryptionKey: "{{ vault_encryption_key }}"
licenseKey: "{{ vault_license_key }}"
serverPublicKey: "{{ server_public_key }}"
tasks:
- name: Create config file
copy:
content: "{{ pluton_config | to_json }}"
dest: /tmp/pluton-agent.json
mode: "0600"

- name: Install agent
shell: |
curl -sSL https://dl.usepluton.com/agent/scripts/install.sh | \
bash -s -- --config /tmp/pluton-agent.json --non-interactive

- name: Remove config file
file:
path: /tmp/pluton-agent.json
state: absent

Troubleshooting

Agent Shows "Offline" in Pluton UI

  1. Check service status:

    sudo systemctl status pluton-agent
  2. Check network connectivity:

    # Test connection to the server
    nc -zv your-pluton-server-ip
  3. Review agent logs:

    sudo journalctl -u pluton-agent -n 100 --no-pager

Service Fails to Start

  1. Check configuration:

    sudo cat /etc/pluton-agent/pluton-agent.env
  2. Verify file permissions:

    ls -la /etc/pluton-agent/
    ls -la /var/lib/pluton-agent/
    ls -la /opt/pluton-agent/bin/
  3. Test binary manually:

    sudo -u pluton-agent /opt/pluton-agent/bin/pluton-agent --version
  4. Check for missing dependencies:

    ldd /opt/pluton-agent/bin/pluton-agent

Download Fails

  1. Verify license key is valid

  2. Check internet connectivity:

    curl -I https://dl.usepluton.com/agent/releases/latest/version
  3. Check DNS resolution:

    nslookup dl.usepluton.com
  4. Check for proxy requirements:

    # If behind a proxy
    export https_proxy=http://proxy.example.com:8080
    curl -sSL https://dl.usepluton.com/agent/scripts/install.sh | sudo -E bash -s -- --config /tmp/config.json

Permission Denied Errors

  1. Check sudoers configuration:

    sudo visudo -c -f /etc/sudoers.d/pluton-agent
  2. Verify user exists:

    id pluton-agent
  3. Check directory ownership:

    ls -la /var/lib/pluton-agent/

SELinux Issues (RHEL/CentOS)

If SELinux is blocking the agent:

# Check for denials
sudo ausearch -m avc -ts recent

# Create policy module (if needed)
sudo audit2allow -a -M pluton-agent
sudo semodule -i pluton-agent.pp

# Or set permissive mode for troubleshooting
sudo setenforce 0

Security Considerations

  • The agent runs as a dedicated pluton-agent user with limited privileges
  • Credentials are stored in /etc/pluton-agent/pluton-agent.env with 640 permissions
  • The sudoers configuration grants only specific, necessary privileges for backup operations
  • All communication with the Pluton server is over HTTPS, authenticated using API keys

Important: After installation, delete the configuration file as it contains sensitive credentials:

rm -f /tmp/pluton-agent.json

File Locations Reference

PurposeLocation
Agent binary/opt/pluton-agent/bin/pluton-agent
Restic binary/opt/pluton-agent/bin/restic
Rclone binary/opt/pluton-agent/bin/rclone
Uninstall script/opt/pluton-agent/bin/uninstall.sh
Environment config/etc/pluton-agent/pluton-agent.env
Rclone config/etc/pluton-agent/rclone.conf
Data directory/var/lib/pluton-agent/
Progress files/var/lib/pluton-agent/progress/
Identity keys/var/lib/pluton-agent/identity/
Service file/etc/systemd/system/pluton-agent.service
Sudoers file/etc/sudoers.d/pluton-agent