Repository navigation
Remote Storage
BBS supports creating borg repositories on remote SSH hosts like rsync.net, BorgBase, Hetzner Storage Box, and any SSH-accessible server with borg installed. Agents back up directly to the remote host at native speed — no backup data flows through the BBS server. After each backup completes, catalog metadata is streamed back to BBS so that the file browser and search remain fully functional for restores.

What It Does:
- Stores borg repositories on remote SSH hosts instead of the BBS server's local disk
- Agents connect directly to the remote host for backups and restores
- BBS server connects over SSH for maintenance operations (prune, compact, check)
- SSH private keys are encrypted at rest with AES-256-GCM
Why Use It:
- Geographic Redundancy: Store backups in a different physical location without S3
- Provider Choice: Use dedicated borg hosting from rsync.net, BorgBase, Hetzner, etc.
- Cost Effective: Many providers offer inexpensive append-only borg storage
- Simplicity: No S3, rclone, or object storage configuration required — just SSH
Normal (local) flow:
Agent --SSH--> BBS Server --borg create--> /var/bbs/home/repo
Remote SSH flow:
Agent --SSH--> Remote Host --borg create--> ssh://user@host/./repo
BBS Server --SSH--> Remote Host (for prune/compact/check)
With remote storage, backup data never touches the BBS server. The agent connects directly to the remote host to create archives. The BBS server connects to the remote host separately for server-side maintenance operations like prune, compact, and check.
-
Backups: The agent receives the remote SSH key in its task payload, writes it to a temporary file, and runs
borg createdirectly against the remote host - Restores: Same direct connection — the agent extracts files from the remote repository
- Maintenance: The BBS server SSH's to the remote host to run prune, compact, check, and other borg operations
- Monitoring: Archive listings and file catalogs are populated by the BBS server querying the remote repo over SSH
| Provider | Port | Remote Borg Path | Base Path | Notes |
|---|---|---|---|---|
| rsync.net | 22 | borg1 |
./ |
Dedicated borg hosting, append-only support |
| BorgBase | 22 | (default) | ./repo |
Borg-specific hosting with monitoring |
| Hetzner Storage Box | 23 | (default) | ./backups |
Affordable storage with SSH access |
| Any SSH server | Custom | Custom | Custom | Any server with borg installed |
Remote SSH hosts are managed on the Storage page and can be reused across multiple repositories and clients.
- Navigate to Storage
- In the Remote Storage (SSH) card, click Add SSH Host
- Pick your provider (BorgBase, Hetzner, rsync.net) or Custom for any SSH server with borg
- Fill in the connection details. The Custom form has these fields:
| Field | Required | Description | Example |
|---|---|---|---|
| Name | Yes | Descriptive name for this host | rsync.net Production |
| Provider Preset | No | Auto-fills common settings | rsync.net, BorgBase, Hetzner |
| Host | Yes | Hostname or IP address | ch-s010.rsync.net |
| Port | Yes | SSH port (default: 22) |
22 (rsync.net), 23 (Hetzner) |
| Username | Yes | SSH username |
12345 (rsync.net account number) |
| Base Path | No | Base directory on remote host |
./ (default, relative to home) |
| SSH Private Key | Yes | PEM-format private key | Paste full key including headers |
| Remote Borg Path | No | Custom borg binary name |
borg1 (required for rsync.net) |
- Click Add Host
BBS checks these fields when a host is saved, on the web and over the API:
| Field | Rule |
|---|---|
| Host | A hostname or IP address. No spaces, no user@, no ssh://. |
| Username | Letters, digits, dot, dash and underscore only. Can't start with a dash. |
| Remote Borg Path | A command name or a path, for example borg1, borg-1.4 or /usr/local/bin/borg. No spaces, and can't start with a dash. |
The settings are checked again before every use, not only when saved (BBS 2.98.6 and later). A host saved before these checks existed whose settings fail them is not used: connection tests and server-side operations (prune, compact, check, catalog jobs) stop with "This Remote SSH host's settings are not valid", and a warning naming the host is written to the log. Agents refuse to back up to a repository address whose SSH user or host fails the same rules. Edit the host, correct the field, and save it to use it again.
Selecting a provider preset auto-fills the Port, Base Path, and Remote Borg Path fields:
-
rsync.net: Port 22, Base Path
./, Remote Borg Pathborg1 -
BorgBase: Port 22, Base Path
./repo -
Hetzner Storage Box: Port 23, Base Path
./backups - Custom: All fields blank for manual entry
After adding a host, verify connectivity:
- Open the host's menu (the three-dot button) on the Storage page and click Test Connection
- BBS will SSH to the host and run
borg --version(or the custom borg binary) - A green success message shows the borg version installed on the remote host
- A red error message indicates connection or borg availability issues
- Navigate to Clients → Select a client → Repos tab
- Click Add Repository
- In the Storage dropdown, select Remote SSH
- In the Remote Host dropdown, select your configured host
- Enter a repository name and choose encryption settings
- Click Create Repo
BBS will run borg init on the remote host over SSH. If initialization succeeds, the repository is ready for backups.
Note: The "Remote SSH" option only appears in the Storage dropdown if you have at least one remote host configured on the Storage page.
Only admins can place a repository on a Remote SSH host, whether creating it or importing an existing one, on the web or over the API (BBS 2.98.3 and later). A host's SSH key is shared by every repository on that host, so other users are refused.
- Go to Storage
- Open the host's menu (three-dot button) and click Edit
- Update the fields as needed. The field rules apply.
- Leave the SSH Private Key field blank to keep the existing key
- Max Concurrent Jobs limits how many jobs touch this host at once (blank uses the global limit; see Storage-Setup)
- Click Save Changes
- Go to Storage
- Open the host's menu and click Delete
- Confirm the deletion
Delete only appears when no repository uses the host. Delete or migrate those repositories first.
Remote repositories work identically to local repositories for backup purposes:
- Create a backup plan that targets the remote repository
- Schedule it as you would any backup plan
- The agent backs up directly to the remote host
The only difference is the data path — instead of flowing through the BBS server, data goes directly from the agent to the remote host.
All restore types work with remote repositories:
- File restore: Browse archives, select files, restore to the agent
- MySQL restore: Extract database dumps from remote archives and import
- PostgreSQL restore: Extract database dumps from remote archives and import
All server-side maintenance operations work over SSH:
- Prune: Removes old archives per retention policy
- Compact: Reclaims space after pruning
- Check: Verifies repository integrity
- Repair: Fixes repository errors
- Break Lock: Removes stale locks
- Catalog Sync: Rebuilds archive listing from remote repo
- Catalog Rebuild: Rebuilds file catalog from remote repo
These are queued and executed by the BBS server, which SSH's to the remote host to run the borg commands.
Remote repositories do not support offsite sync. They are already offsite. The Offsite Copies card is hidden on remote repository detail pages, and only local repositories can be synced.
Remote repositories display differently on the detail page:
- Badge: A blue "Remote SSH" badge appears next to the repository name
-
Location: Shows
user@host:portinstead of a local filesystem path - Config Name: The remote host configuration name appears in parentheses
- S3 Section: Hidden (not applicable for remote repos)
- Maintenance: All maintenance buttons work normally (operations run over SSH)
SSH private keys are encrypted using AES-256-GCM before being stored in the database. The encryption uses BBS's APP_KEY from the server configuration.
Agent-side (backups and restores):
- The BBS server decrypts the SSH key and includes it in the task payload sent to the agent
- The agent writes the key to a temporary file (
/tmp/bbs-remote-ssh-key) with0600permissions -
BORG_RSHis configured to use this temporary key file - After the borg operation completes (or fails), the temporary key file is deleted in a
finallyblock
Server-side (maintenance):
- The BBS server decrypts the SSH key
- Writes it to a temporary file with
0600permissions - Runs borg commands with
BORG_RSHpointing to the temporary key - Deletes the temporary key file after the operation
- Use a dedicated SSH key pair for BBS — do not reuse keys from other systems
- Grant the key minimal permissions on the remote host (borg-only access if supported)
- Enable append-only mode on the remote host — see Append-Only Mode on Remote Hosts below
- Rotate SSH keys periodically by editing the host configuration in Settings
Append-only is the single most important defense against ransomware hitting your backups. It lets a client write new archives but forbids deleting or modifying existing ones. Even a fully compromised agent — stolen SSH key, ransomware, hostile insider — can add backups but cannot erase the ones already on disk.
For repositories stored directly on the BBS server, append-only is enforced automatically. Every agent SSH key installed on BBS is registered with a forced command (bbs-ssh-gate) that execs borg serve --append-only --restrict-to-path <tenant>. The agent cannot bypass it — even if it tries to issue a borg delete, the server-side borg serve refuses.
Prune and compact still work because they run from the BBS server itself, which holds a separately-privileged key path.
When the repository lives on a third-party SSH host (rsync.net, BorgBase, Hetzner, etc.), BBS does not control the remote's authorized_keys file, so the forced command has to be configured on the remote side. Every major borg-friendly provider supports this; the setup is a one-time edit.
The pattern (from the upstream borg docs) is:
command="borg serve --append-only --restrict-to-path /path/to/repo",restrict ssh-ed25519 AAAA… backup-client
-
command="…"— forces every SSH session from this key to runborg serve --append-only, ignoring whatever the client asked for. -
--restrict-to-path— limits access to a specific repository path. If you omit this the key can reach any repo on the account. -
restrict— disables port forwarding, X11, PTY, and other SSH features the key doesn't need.
You can even mix modes by using different keys: one append-only key for BBS, and a separate full-access key you keep offline for occasional manual pruning.
- SSH in with a full-access key:
ssh <account>@<your-server>.rsync.net - Open
.ssh/authorized_keysand find the line for the key you gave to BBS - Prepend the forced command:
Note: rsync.net uses
command="borg1 serve --append-only --restrict-to-path /data/home/<account>",restrict ssh-ed25519 AAAA… bbs-agentborg1(notborg) as the binary name — same as BBS's Remote Borg Path setting. - Save. Next BBS backup will still work; any delete/prune attempt from the agent will be rejected by borg serve.
- Run prune/compact from BBS's own maintenance buttons — those use the server-side key path which BBS also forces through
borg serve, but without--append-only, so cleanup still works.
BorgBase has first-class UI support — no authorized_keys editing required:
- Log in to the BorgBase dashboard
- Go to Account → SSH Keys
- Find the key you added for BBS and check Append-only
- Save
Done. BorgBase rewrites the forced command on its side.
Hetzner exposes a standard authorized_keys file via SFTP. Their borg access docs cover the SSH setup; the append-only addition is the command= prefix.
- Connect with SFTP:
sftp -P 23 u<XXXXXX>@u<XXXXXX>.your-storagebox.de - Download
.ssh/authorized_keyslocally:get .ssh/authorized_keys - Edit the line for the BBS key:
Adjust the path to match the Base Path you configured in BBS (default:
command="borg serve --append-only --restrict-to-path /home/backups",restrict ssh-ed25519 AAAA… bbs-agent./backups, which resolves to/home/backupson the box). - Upload it back:
put authorized_keys .ssh/authorized_keys - Your next BBS backup will still succeed; destructive commands are rejected.
On any Linux box running your own SSH + borg, edit the BBS key's line in the user's ~/.ssh/authorized_keys:
command="borg serve --append-only --restrict-to-path /srv/backups/bbs",restrict ssh-ed25519 AAAA… bbs-agent
This is the same pattern BBS itself uses internally — it's the canonical borg ransomware-resistance configuration.
- Backups: keep working normally. The agent doesn't know or care that the server refuses deletes.
-
Prune / compact (from BBS): will fail against the offsite repo if you forced
--append-onlyon the only key BBS has. You have two choices:- Accept that offsite retention is handled manually (log in with a full-access key when you need to clean up).
- Keep two separate keys: one append-only key installed in BBS as the agent/backup path, and a separate full-access key used only for maintenance. BBS currently wires one key per remote host, so if you go the two-key route, the simpler option is to let retention happen on the BBS-local copy and treat the offsite copy as archival.
- Restores: still work fine. Borg extract reads from the repo; nothing about append-only blocks reads.
After enabling append-only, try to delete an archive manually from a client machine:
borg delete ssh://user@host/./repo::test-archive
You should see:
Remote: Cannot delete archives when --append-only is set
If the delete succeeds, the forced command isn't being applied — double-check the authorized_keys syntax (no line breaks, correct quoting around the command).
rsync.net provides dedicated borg hosting with optional append-only mode.
- Get your account: Sign up at rsync.net and note your account number (used as username)
- Add your SSH key: Upload your public key via the rsync.net web portal
-
Configure BBS:
- Host: Your assigned server (e.g.,
ch-s010.rsync.net) - Port:
22 - Username: Your account number (e.g.,
12345) - Base Path:
./ - Remote Borg Path:
borg1(required — rsync.net usesborg1for BorgBackup 1.x)
- Host: Your assigned server (e.g.,
- Test Connection: Should show borg version 1.x
Important: rsync.net uses
borg1as the borg binary name, notborg. You must set the Remote Borg Path toborg1or backups will fail.
BorgBase is a managed borg repository hosting service.
- Create a repository on BorgBase and note the SSH connection string
- Add your SSH key to BorgBase
-
Configure BBS:
- Host: Your BorgBase server hostname
- Port:
22 - Username: Your BorgBase repo identifier
- Base Path:
./repo - Remote Borg Path: (leave blank)
- Test Connection: Should show the borg version
BorgBase accounts and the plan size. When you link a BorgBase account by API token (Storage → BorgBase), BBS reads the repository list and usage through the BorgBase API. BorgBase API tokens can no longer read the account's plan, so BBS does not know the plan's size or repository limit on its own. Open the account, click Edit and enter your plan's storage in Plan size to get a percentage on the usage bars; leave it blank to show usage without one.
Hetzner Storage Boxes support borg over SSH on port 23.
- Enable SSH on your Storage Box in the Hetzner Robot panel
-
Add your SSH key via the Hetzner panel or
ssh-copy-id -
Install borg on the Storage Box (if not pre-installed):
ssh -p 23 uXXXXXX@uXXXXXX.your-storagebox.de borg --version -
Configure BBS:
- Host:
uXXXXXX.your-storagebox.de - Port:
23 - Username:
uXXXXXX - Base Path:
./backups - Remote Borg Path: (leave blank)
- Host:
- Test Connection: Should show the borg version
Any server with borg installed can be used as a remote storage host.
- Install borg on the remote server
- Create a dedicated user for BBS backups
-
Add the BBS SSH public key to the user's
~/.ssh/authorized_keys - Configure BBS with the server's connection details
- Test Connection to verify borg is accessible
Error: "Connection refused" or "Connection timed out"
Solutions:
- Verify the hostname and port are correct
- Check that SSH is enabled on the remote host
- Verify firewall rules allow outbound SSH from the BBS server
- Try connecting manually:
ssh -p PORT user@host
Error: "Permission denied (publickey)"
Solutions:
- Verify the SSH private key matches the public key on the remote host
- Check that the key is in PEM format (starts with
-----BEGIN) - Ensure the remote user's
~/.ssh/authorized_keyscontains the corresponding public key - Check file permissions on the remote host (
~/.sshshould be 700,authorized_keysshould be 600)
Error: "borg: command not found" or similar
Solutions:
- Verify borg is installed on the remote host
- For rsync.net, set Remote Borg Path to
borg1 - For custom servers, ensure borg is in the user's PATH or specify the full path
Error: "This Remote SSH host's settings are not valid"
Cause: The host's Host, Username or Remote Borg Path fails the field rules. This happens to hosts saved before the rules existed.
Solutions:
- Open the host on the Storage page, click Edit, correct the field named in the message, and click Save Changes
- The log has a warning naming each host that needs this
Borg's SSH connections to a remote host send a keep-alive every 10 seconds, as the borg documentation recommends. A connection that gets no answer for 30 keep-alives in a row (about five minutes) is closed.
When ssh closes a connection, its reason (for example a timeout) appears in the job log, not only borg's "Broken Pipe".
Solutions:
- Read the ssh reason in the job log; it usually points to the network or the remote host
- Check for firewalls or NAT devices that drop idle connections between the client or BBS server and the remote host
- Check for stale locks on the remote repository afterwards (use Break Lock)
Cause: The temporary SSH key file was not written before borg started.
Solutions:
- Update to BBS v1.2.1 or later (this bug was fixed for database restores)
- Check the agent log (
/var/log/bbs-agent.log) for key write errors - Verify the agent has write permissions to
/tmp/
Error: "Remote SSH config not found"
Solutions:
- The remote host configuration may have been deleted
- Check the Storage page to verify the host exists
- The repository may have an orphaned
remote_ssh_config_id
Error: SSH timeout during prune/compact/check
Solutions:
- Large repositories may take time — check if the operation is still running
- Verify the BBS server can reach the remote host
- Check for stale locks on the remote repository (use Break Lock)
| Feature | Remote SSH | S3 Offsite Sync |
|---|---|---|
| Storage type | SSH server with borg | S3-compatible object storage |
| Data format | Native borg repository | Borg repository mirrored via rclone |
| Agent connection | Direct to remote host | Through BBS server (local repo) |
| Local copy on BBS | No | Yes (primary copy is local) |
| Deduplication | Native borg dedup | Borg dedup + rclone sync |
| Restore speed | Direct from remote host | Download from S3, then restore |
| Provider examples | rsync.net, BorgBase, Hetzner | AWS S3, Wasabi, Backblaze B2 |
| Best for | Primary offsite storage | Secondary offsite copy |
| Append-only support | Yes (provider-dependent) | No (S3 lifecycle rules instead) |
When to use Remote SSH: You want your primary (and only) repository to live on a remote host. No local disk usage on the BBS server.
When to use S3 Offsite Sync: You want a local repository on the BBS server with an additional cloud copy for disaster recovery.
You can use both: Create some repositories locally with S3 sync, and other repositories on remote SSH hosts. They are independent features.
Next: Repositories | S3-Offsite-Sync | Settings
📖 User Manual
Getting Started
Using BBS
- Dashboard
- Managing Clients
- Client Profiles
- Linux Agent Setup
- macOS Agent Setup
- Windows Agent Setup
- Docker Agent Setup
- Repositories
- Storage Setup
- Backup Plans
- Restoring Files
- Database Backups
- Plugins
- Remote Storage
- S3 Offsite Sync
Monitoring
Administration
- Settings
- User Management
- Single Sign-On
- Two-Factor Authentication
- Updating BBS
- Server Backup and Restore
Reference