Linux architecture
Supported builds are AMD64, ARM64, and 386.
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.
Confirm the Linux architecture, root access, and outbound network connectivity. Windows users can go directly to the Windows section.
Supported builds are AMD64, ARM64, and 386.
The installation command must run with sudo or as root.
The server must reach the backend and storage services through HTTPS.
uname -m
command -v curl
systemctl --version
Exec format error.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.
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
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
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
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
serverbackup.Use --no-start when you want to inspect or edit the generated configuration before the first registration.
sudo ./serverbackup-linux-amd64 install \
--backend-url https://backup.projy.ai \
--no-start
sudo vi /etc/serverbackup/config.json
sudo systemctl enable --now serverbackup
The repository script is now only a wrapper. It finds the compiled binary in dist/ and calls the binary's install command.
sudo ./scripts/install.sh
The embedded installer prepares the complete operating environment and does not overwrite an existing configuration file.
Creates the restricted serverbackup
Creates /etc/serverbackup/config.json with the backend URL and safe defaults only when it does not already exist.
Creates /var/lib/serverbackup, including temporary, lock, and queue storage used by the agent.
Creates /var/log/serverbackup and installs the logrotate policy.
Copies the executable to /usr/local/bin/serverbackup.
Creates serverbackup.service, enables it at boot, and starts it unless --no-start is used.
/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
On the first start, the service registers automatically and prints the generated agent_token in the logs.
sbk_agent_.sudo systemctl status serverbackup --no-pager
sudo journalctl -u serverbackup -f
sudo journalctl -u serverbackup -n 200 --no-pager \
| grep -E "agent_token|sbk_agent_"
sudo grep -E "agent_token|sbk_agent_" \
/var/log/serverbackup/serverbackup.log
Check whether the service started, whether the backend URL is correct, and whether the server can reach the backend.
sudo serverbackup status
sudo serverbackup config-test \
--config /etc/serverbackup/config.json
sudo journalctl -u serverbackup -n 200 --no-pager
The installer creates a basic configuration with the backend URL and default values. Existing configuration is preserved during reinstall or update.
/etc/serverbackup/config.json. Use vi to edit it.sudo vi /etc/serverbackup/config.json
sudo serverbackup config-test \
--config /etc/serverbackup/config.json
sudo systemctl restart serverbackup
sudo systemctl status serverbackup --no-pager
{
"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
}
agent_token and server_uuid in this file.Use the agent command for a quick status check and systemd for service control.
Shows the status reported by the installed agent.
sudo serverbackup status
Shows process state and recent service output.
sudo systemctl status serverbackup --no-pager
Use after changing configuration or troubleshooting a temporary failure.
sudo systemctl restart serverbackup
Stops heartbeats, plan checks, and new backup execution.
sudo systemctl stop serverbackup
Starts the installed agent service.
sudo systemctl start serverbackup
Ensures the agent starts automatically after a reboot.
sudo systemctl enable serverbackup
sudo systemctl is-enabled serverbackup
sudo systemctl is-active serverbackup
The agent writes detailed local logs and also sends service output to the system journal.
Best option for startup and registration problems.
sudo journalctl -u serverbackup -f
Shows the last 200 lines without entering a pager.
sudo journalctl -u serverbackup -n 200 --no-pager
Initialization, registration, heartbeat, and plan checks.
sudo tail -f /var/log/serverbackup/serverbackup.log
Scheduled time, sources, archive, size, checksum, and result.
sudo tail -f /var/log/serverbackup/executions.log
Communication, authentication, disk, dump, archive, and upload errors.
sudo tail -f /var/log/serverbackup/errors.log
Registration, configuration, manual runs, updates, and cleanup.
sudo tail -f /var/log/serverbackup/audit.log
/etc/logrotate.d/serverbackup.Use this sequence when the service does not start, the token is missing, or backups fail.
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
Stop the systemd service first to avoid two agent processes running at the same time.
sudo systemctl stop serverbackup
sudo -u serverbackup \
/usr/local/bin/serverbackup run \
--config /etc/serverbackup/config.json
sudo systemctl start serverbackup
sudo systemctl status serverbackup --no-pager
The binary does not match the server architecture.
uname -m
file /usr/local/bin/serverbackup
Validate the JSON before restarting. Check commas, quotation marks, backend URL, directory paths, and value types.
sudo serverbackup config-test \
--config /etc/serverbackup/config.json
Confirm DNS, system time, outbound HTTPS access, and the configured backend URL.
getent hosts backup.projy.ai
curl -I https://backup.projy.ai
timedatectl status
The service runs as the serverbackup user. Grant controlled access using a group or ACL instead of making the directory public.
sudo -u serverbackup test -r /path/to/backup \
&& echo "Readable" \
|| echo "Permission denied"
Confirm that the required database client is installed and available in the system path.
command -v mysqldump
command -v mariadb-dump
command -v pg_dump
command -v mongodump
Check the filesystem containing the agent temporary directory. The agent uses /var/lib/serverbackup/tmp for temporary archives and dumps.
df -h /var/lib/serverbackup/tmp
sudo du -sh /var/lib/serverbackup/tmp
These commands help verify the installation and run a specific backup plan when needed.
Displays the installed agent version and build information.
serverbackup version
Checks the configuration without starting the service.
sudo serverbackup config-test \
--config /etc/serverbackup/config.json
Starts one plan manually using its backend plan ID.
sudo -u serverbackup serverbackup run-plan \
--plan-id 12 \
--config /etc/serverbackup/config.json
Starts the agent directly outside systemd for troubleshooting.
sudo -u serverbackup serverbackup run \
--config /etc/serverbackup/config.json
Replace only the binary. Keep the existing configuration, registration, local queue, and logs.
/etc/serverbackup/config.json or remove data under /var/lib/serverbackup.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
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
Use the native Windows executable on supported Windows servers. The automatic user, systemd, and logrotate setup described above applies only to Linux.
serverbackup.exe. Keep it in a protected directory and run PowerShell as Administrator when administrative access is required.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"
& "C:\Program Files\ServerBackup\serverbackup.exe" version
& "C:\Program Files\ServerBackup\serverbackup.exe" --help
serverbackup.exe --help for the installed Windows build. Do not use the Linux systemd commands on Windows.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 |
The built-in uninstall command removes the service and installed binary while preserving configuration and local data.
sudo serverbackup uninstall
sudo ls -la /etc/serverbackup
sudo ls -la /var/lib/serverbackup
sudo ls -la /var/log/serverbackup
sudo rm -rf /etc/serverbackup
sudo rm -rf /var/lib/serverbackup
sudo rm -rf /var/log/serverbackup
Keep credentials, tokens, backup sources, and database access protected.
The configuration should be readable only by the serverbackup user and authorized administrators.
Do not send the full agent token through tickets, screenshots, public logs, or source code.
Use controlled groups or ACL rules for protected backup directories.
Use dedicated backup users with only the permissions required to create dumps.
Keep enough space available under /var/lib/serverbackup/tmp.
A backup is useful only when its files and database dumps can be restored successfully.