nextcloud/all-in-one · error · InvalidSettingConfigurationException
The remote repo must contain ':'. For valid urls, see the re
Error message
The remote repo must contain ':'. For valid urls, see the remote examples at https://borgbackup.readthedocs.io/en/stable/usage/general.html#repository-urls
What it means
Second rule of validateBorgRemoteRepo(): after the '@' check, the repo string must also contain ':' — separating host from path in borg's 'user@host:path' shorthand or marking host:port in full 'ssh://user@host:port/...' URLs. A value like 'borg@backup.example.com' (host but no path) throws InvalidSettingConfigurationException → HTTP 422 with a link to borg's repository-URL docs.
Source
Thrown at php/src/Data/ConfigurationManager.php:764
// Prevent backup to be contained in Nextcloud Datadir as this will delete the backup archive upon restore
// See https://github.com/nextcloud/all-in-one/issues/6607
if (str_starts_with($location . '/', rtrim($this->nextcloudDatadirMount, '/') . '/')) {
throw new InvalidSettingConfigurationException("The path must not be a children of or equal to NEXTCLOUD_DATADIR, which is currently set to " . $this->nextcloudDatadirMount);
}
} else {
$this->validateBorgRemoteRepo($repo);
}
}
private function validateBorgRemoteRepo(string $repo) : void {
$commonMsg = "For valid urls, see the remote examples at https://borgbackup.readthedocs.io/en/stable/usage/general.html#repository-urls";
if ($repo === "") {
// Ok, remote repo is optional
} elseif (!str_contains($repo, "@")) {
throw new InvalidSettingConfigurationException("The remote repo must contain '@'. $commonMsg");
} elseif (!str_contains($repo, ":")) {
throw new InvalidSettingConfigurationException("The remote repo must contain ':'. $commonMsg");
}
}
public function deleteBorgBackupLocationItems() : void {
// Delete the variables
$this->startTransaction();
$this->borgBackupHostLocation = '';
$this->borgRemoteRepo = '';
$this->commitTransaction();
// Also delete the borg config file to be able to start over
if (file_exists(DataConst::GetBackupKeyFile())) {
if (unlink(DataConst::GetBackupKeyFile())) {
error_log('borg.config file deleted to be able to start over.');
}
}
}
View on GitHub (pinned to 6b788eec5e)
Solutions
- Append the path with a colon: 'borg@backup.example.com:./repo', or use the full URL 'ssh://borg@backup.example.com:22/./repo'
- Verify the string contains both '@' and ':' before submitting
- Consult the linked borg general-usage docs for the valid URL forms
Example fix
// before borg_remote_repo = 'borg@backup.example.com' // after borg_remote_repo = 'borg@backup.example.com:./repo'
Defensive patterns
Strategy: validation
Validate before calling
if (trim($repo) !== '' && (!str_contains($repo, '@') || !str_contains($repo, ':'))) {
$errors[] = "Remote repo url must contain '@' and ':' — e.g. borg@host:./repo";
} Try / catch
use AIO\Data\InvalidSettingConfigurationException;
try {
$configurationManager->setBorgLocationVars($location, $repo);
} catch (InvalidSettingConfigurationException $e) {
$formErrors[] = $e->getMessage();
} Prevention
- Always include the repository path after the host ('user@host:./repo')
- Test the URL with 'borg info <url>' before pasting it into AIO
- Guard templates that interpolate only the host into the repo field
When it happens
Trigger: Submitting 'borg@backup.example.com' without the repository path; a truncated copy-paste that lost everything after the host; edits of shell history that accidentally deleted the colon.
Common situations: First-time borg users omitting the path portion of the ssh shorthand; URLs damaged during copy-paste or templating.
Related errors
- The remote repo must contain '@'. For valid urls, see the re
- Please enter a path or a remote repo url!
- Location and remote repo url are mutually exclusive!
- The path must start with '/', and must not end with '/'! Ano
- The path must not be a children of or equal to NEXTCLOUD_DAT
AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21).
Data as JSON: /api/errors/2aac13d152e74bd9.
Report an issue: GitHub.