ServerBackup Agent
Linux and Windows Downloads

Install ServerBackup on Linux or download it for Windows.

On Linux, the ServerBackup binary creates its own user, directories, configuration, systemd service, and log rotation. A Windows executable is also available for download. After the first Linux start, copy the generated agent token from the logs and link the server in the app.

Step 01

Before Linux installation

Confirm the Linux architecture, root access, and outbound network connectivity. Windows users can go directly to the Windows section.

Linux architecture

Supported builds are AMD64, ARM64, and 386.

Administrative access

The installation command must run with sudo or as root.

Network access

The server must reach the backend and storage services through HTTPS.

Check the server
uname -m
command -v curl
systemctl --version
Select the correct binary. Installing a binary for another architecture causes an Exec format error.
Step 02

Download and install on Linux

Automatic detection is the simplest option. Manual commands are also available for each Linux architecture.

This script detects the architecture, downloads the correct binary, and calls its embedded installer.

Automatic architecture detection
BACKEND_URL="https://backup.projy.ai"

ARCH="$(uname -m)"

case "$ARCH" in
  x86_64|amd64)
    DOWNLOAD_URL="https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup-linux-amd64"
    ;;
  aarch64|arm64)
    DOWNLOAD_URL="https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup-linux-arm64"
    ;;
  i386|i486|i586|i686|x86)
    DOWNLOAD_URL="https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup-linux-386"
    ;;
  *)
    echo "Unsupported architecture: $ARCH"
    exit 1
    ;;
esac

curl -fL "$DOWNLOAD_URL" -o /tmp/serverbackup
chmod +x /tmp/serverbackup
sudo /tmp/serverbackup install --backend-url "$BACKEND_URL"
rm -f /tmp/serverbackup
AMD64 installation
curl -fL \
  https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup-linux-amd64 \
  -o serverbackup-linux-amd64

chmod +x serverbackup-linux-amd64

sudo ./serverbackup-linux-amd64 install \
  --backend-url https://backup.projy.ai
ARM64 installation
curl -fL \
  https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup-linux-arm64 \
  -o serverbackup-linux-arm64

chmod +x serverbackup-linux-arm64

sudo ./serverbackup-linux-arm64 install \
  --backend-url https://backup.projy.ai
386 installation
curl -fL \
  https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup-linux-386 \
  -o serverbackup-linux-386

chmod +x serverbackup-linux-386

sudo ./serverbackup-linux-386 install \
  --backend-url https://backup.projy.ai
After installation, the command is available globally as serverbackup.
Install without starting the service

Use --no-start when you want to inspect or edit the generated configuration before the first registration.

Install only
sudo ./serverbackup-linux-amd64 install \
  --backend-url https://backup.projy.ai \
  --no-start

sudo vi /etc/serverbackup/config.json

sudo systemctl enable --now serverbackup
Install from the source repository

The repository script is now only a wrapper. It finds the compiled binary in dist/ and calls the binary's install command.

Repository installation
sudo ./scripts/install.sh
Installer actions

What the install command creates

The embedded installer prepares the complete operating environment and does not overwrite an existing configuration file.

System user

Creates the restricted serverbackup

Configuration

Creates /etc/serverbackup/config.json with the backend URL and safe defaults only when it does not already exist.

Local data

Creates /var/lib/serverbackup, including temporary, lock, and queue storage used by the agent.

Logs

Creates /var/log/serverbackup and installs the logrotate policy.

Binary

Copies the executable to /usr/local/bin/serverbackup.

Service

Creates serverbackup.service, enables it at boot, and starts it unless --no-start is used.

Installed paths
/usr/local/bin/serverbackup
/etc/serverbackup/config.json
/var/lib/serverbackup/
/var/lib/serverbackup/tmp/
/var/lib/serverbackup/locks/
/var/lib/serverbackup/queue/
/var/log/serverbackup/
/etc/systemd/system/serverbackup.service
/etc/logrotate.d/serverbackup
Step 03

Find and link the agent token

On the first start, the service registers automatically and prints the generated agent_token in the logs.

  1. Confirm that the service started successfully.
  2. Open the service logs and locate the token beginning with sbk_agent_.
  3. Copy the full token and enter it in the ServerBackup app to link the server.
  4. After linking, treat the token as a secret and do not publish it.
Check service status
sudo systemctl status serverbackup --no-pager
Follow the first registration
sudo journalctl -u serverbackup -f
Search recent service logs for the token
sudo journalctl -u serverbackup -n 200 --no-pager \
  | grep -E "agent_token|sbk_agent_"
Search the agent log file
sudo grep -E "agent_token|sbk_agent_" \
  /var/log/serverbackup/serverbackup.log
🔒
Protect the token. Anyone with the full agent token may attempt to link or authenticate as the server. Copy it only into the official app.
The token did not appear

Check whether the service started, whether the backend URL is correct, and whether the server can reach the backend.

Initial diagnosis
sudo serverbackup status
sudo serverbackup config-test \
  --config /etc/serverbackup/config.json

sudo journalctl -u serverbackup -n 200 --no-pager
Step 04

Configuration

The installer creates a basic configuration with the backend URL and default values. Existing configuration is preserved during reinstall or update.

The default configuration file is /etc/serverbackup/config.json. Use vi to edit it.
Edit configuration
sudo vi /etc/serverbackup/config.json
Validate configuration
sudo serverbackup config-test \
  --config /etc/serverbackup/config.json
Apply changes
sudo systemctl restart serverbackup
sudo systemctl status serverbackup --no-pager
Default configuration structure
/etc/serverbackup/config.json
{
  "backend_url": "https://backup.projy.ai",
  "agent_token": "",
  "server_uuid": "",
  "hostname": "",
  "heartbeat_interval_seconds": 60,
  "plans_interval_seconds": 60,
  "request_timeout_seconds": 60,
  "execution_timeout_minutes": 720,
  "temporary_directory": "/var/lib/serverbackup/tmp",
  "log_directory": "/var/log/serverbackup",
  "log_level": "info",
  "verify_tls": true
}
Do not delete registration values. Once registered, the agent stores agent_token and server_uuid in this file.
Step 05

Manage the service

Use the agent command for a quick status check and systemd for service control.

Agent status

Shows the status reported by the installed agent.

Command
sudo serverbackup status

Systemd status

Shows process state and recent service output.

Command
sudo systemctl status serverbackup --no-pager

Restart

Use after changing configuration or troubleshooting a temporary failure.

Command
sudo systemctl restart serverbackup

Stop

Stops heartbeats, plan checks, and new backup execution.

Command
sudo systemctl stop serverbackup

Start

Starts the installed agent service.

Command
sudo systemctl start serverbackup

Enable at boot

Ensures the agent starts automatically after a reboot.

Command
sudo systemctl enable serverbackup
Verify automatic startup
sudo systemctl is-enabled serverbackup
sudo systemctl is-active serverbackup
Step 06

Logs and monitoring

The agent writes detailed local logs and also sends service output to the system journal.

Live systemd logs

Best option for startup and registration problems.

Journal
sudo journalctl -u serverbackup -f

Recent service logs

Shows the last 200 lines without entering a pager.

Journal
sudo journalctl -u serverbackup -n 200 --no-pager

Main agent log

Initialization, registration, heartbeat, and plan checks.

File log
sudo tail -f /var/log/serverbackup/serverbackup.log

Backup executions

Scheduled time, sources, archive, size, checksum, and result.

File log
sudo tail -f /var/log/serverbackup/executions.log

Errors only

Communication, authentication, disk, dump, archive, and upload errors.

File log
sudo tail -f /var/log/serverbackup/errors.log

Audit events

Registration, configuration, manual runs, updates, and cleanup.

File log
sudo tail -f /var/log/serverbackup/audit.log
Log rotation is installed automatically at /etc/logrotate.d/serverbackup.
Step 07

Debug and troubleshooting

Use this sequence when the service does not start, the token is missing, or backups fail.

Complete quick diagnosis

Status, configuration, permissions, and logs
sudo serverbackup status

sudo serverbackup config-test \
  --config /etc/serverbackup/config.json

sudo systemctl status serverbackup --no-pager -l

sudo ls -ld \
  /etc/serverbackup \
  /var/lib/serverbackup \
  /var/lib/serverbackup/tmp \
  /var/log/serverbackup

sudo ls -l \
  /usr/local/bin/serverbackup \
  /etc/serverbackup/config.json

sudo journalctl -u serverbackup -n 200 --no-pager

Run the agent in the foreground

Stop the systemd service first to avoid two agent processes running at the same time.

Foreground debug
sudo systemctl stop serverbackup

sudo -u serverbackup \
  /usr/local/bin/serverbackup run \
  --config /etc/serverbackup/config.json
Return to service mode
sudo systemctl start serverbackup
sudo systemctl status serverbackup --no-pager
Service fails with Exec format error

The binary does not match the server architecture.

Check architecture
uname -m
file /usr/local/bin/serverbackup
Configuration is invalid

Validate the JSON before restarting. Check commas, quotation marks, backend URL, directory paths, and value types.

Validate
sudo serverbackup config-test \
  --config /etc/serverbackup/config.json
The server cannot register or send heartbeat

Confirm DNS, system time, outbound HTTPS access, and the configured backend URL.

Network checks
getent hosts backup.projy.ai
curl -I https://backup.projy.ai
timedatectl status
The agent cannot read a backup directory

The service runs as the serverbackup user. Grant controlled access using a group or ACL instead of making the directory public.

Test read permission
sudo -u serverbackup test -r /path/to/backup \
  && echo "Readable" \
  || echo "Permission denied"
A database backup fails

Confirm that the required database client is installed and available in the system path.

Database clients
command -v mysqldump
command -v mariadb-dump
command -v pg_dump
command -v mongodump
A backup reports insufficient disk space

Check the filesystem containing the agent temporary directory. The agent uses /var/lib/serverbackup/tmp for temporary archives and dumps.

Disk usage
df -h /var/lib/serverbackup/tmp
sudo du -sh /var/lib/serverbackup/tmp
Manual operations

Agent commands

These commands help verify the installation and run a specific backup plan when needed.

Show version

Displays the installed agent version and build information.

Command
serverbackup version

Validate configuration

Checks the configuration without starting the service.

Command
sudo serverbackup config-test \
  --config /etc/serverbackup/config.json

Run a specific plan

Starts one plan manually using its backend plan ID.

Command
sudo -u serverbackup serverbackup run-plan \
  --plan-id 12 \
  --config /etc/serverbackup/config.json

Run the main process

Starts the agent directly outside systemd for troubleshooting.

Command
sudo -u serverbackup serverbackup run \
  --config /etc/serverbackup/config.json
Step 08

Update the agent

Replace only the binary. Keep the existing configuration, registration, local queue, and logs.

The update procedure does not replace /etc/serverbackup/config.json or remove data under /var/lib/serverbackup.
Automatic update by architecture
ARCH="$(uname -m)"

case "$ARCH" in
  x86_64|amd64)
    DOWNLOAD_URL="https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup-linux-amd64"
    ;;
  aarch64|arm64)
    DOWNLOAD_URL="https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup-linux-arm64"
    ;;
  i386|i486|i586|i686|x86)
    DOWNLOAD_URL="https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup-linux-386"
    ;;
  *)
    echo "Unsupported architecture: $ARCH"
    exit 1
    ;;
esac

curl -fL "$DOWNLOAD_URL" -o /tmp/serverbackup-new
chmod +x /tmp/serverbackup-new

sudo systemctl stop serverbackup
sudo cp -f \
  /usr/local/bin/serverbackup \
  /usr/local/bin/serverbackup.previous

sudo install -m 0755 \
  /tmp/serverbackup-new \
  /usr/local/bin/serverbackup

sudo /usr/local/bin/serverbackup config-test \
  --config /etc/serverbackup/config.json

sudo systemctl start serverbackup
sudo systemctl status serverbackup --no-pager

rm -f /tmp/serverbackup-new
Rollback: Restore the previous binary if the updated service does not start correctly.
Rollback to the previous binary
sudo systemctl stop serverbackup

sudo cp -f \
  /usr/local/bin/serverbackup.previous \
  /usr/local/bin/serverbackup

sudo chmod 0755 /usr/local/bin/serverbackup
sudo systemctl start serverbackup
sudo systemctl status serverbackup --no-pager
Windows

Download the Windows agent

Use the native Windows executable on supported Windows servers. The automatic user, systemd, and logrotate setup described above applies only to Linux.

The Windows executable is distributed as serverbackup.exe. Keep it in a protected directory and run PowerShell as Administrator when administrative access is required.

Download with PowerShell

PowerShell
New-Item -ItemType Directory `
  -Force `
  -Path "C:\Program Files\ServerBackup"

Invoke-WebRequest `
  -Uri "https://projy-ai.nyc3.digitaloceanspaces.com/server-backup/serverbackup.exe" `
  -OutFile "C:\Program Files\ServerBackup\serverbackup.exe"

Check the executable

PowerShell
& "C:\Program Files\ServerBackup\serverbackup.exe" version

& "C:\Program Files\ServerBackup\serverbackup.exe" --help

Direct browser download

Download serverbackup.exe

Windows service setup may differ from Linux. Use the commands exposed by serverbackup.exe --help for the installed Windows build. Do not use the Linux systemd commands on Windows.
Downloads

Direct download links

Choose the Linux file that matches uname -m, or download the Windows executable.

Build Typical architecture Download
AMD64 x86_64 serverbackup-linux-amd64
ARM64 aarch64, arm64 serverbackup-linux-arm64
386 i386, i686 serverbackup-linux-386
Windows Windows serverbackup.exe
Step 09

Uninstall the agent

The built-in uninstall command removes the service and installed binary while preserving configuration and local data.

Safe uninstall
sudo serverbackup uninstall
The uninstall command keeps the existing configuration and data so the server can be reinstalled without losing its local registration state.
Confirm preserved files
sudo ls -la /etc/serverbackup
sudo ls -la /var/lib/serverbackup
sudo ls -la /var/log/serverbackup
Permanent cleanup: Run the commands below only when you intentionally want to erase configuration, registration, queued results, temporary files, and local logs.
Remove all preserved files
sudo rm -rf /etc/serverbackup
sudo rm -rf /var/lib/serverbackup
sudo rm -rf /var/log/serverbackup
Security

Important operating rules

Keep credentials, tokens, backup sources, and database access protected.

Protect configuration

The configuration should be readable only by the serverbackup user and authorized administrators.

Never publish tokens

Do not send the full agent token through tickets, screenshots, public logs, or source code.

Grant minimum access

Use controlled groups or ACL rules for protected backup directories.

Protect database credentials

Use dedicated backup users with only the permissions required to create dumps.

Monitor free space

Keep enough space available under /var/lib/serverbackup/tmp.

Test restoration

A backup is useful only when its files and database dumps can be restored successfully.