nextcloud/all-in-one · error · InvalidSettingConfigurationException
The path must start with '/', and must not end with '/'! Ano
Error message
The path must start with '/', and must not end with '/'! Another option is to use the docker volume name 'nextcloud_aio_backupdir'.
What it means
Path-format rule in validateBorgLocationVars(): a local borg backup location must start with '/' and must not end with '/', or be exactly the docker volume name 'nextcloud_aio_backupdir'. Anything else — relative paths, trailing slashes, Windows paths, pasted quotes — throws InvalidSettingConfigurationException → HTTP 422 in the AIO UI. The path denotes a bind-mount source on the Docker host that the AIO interface manages.
Source
Thrown at php/src/Data/ConfigurationManager.php:743
}
private function validateBorgLocationVars(string $location, string $repo) : void {
if ($location === '' && $repo === '') {
throw new InvalidSettingConfigurationException("Please enter a path or a remote repo url!");
} elseif ($location !== '' && $repo !== '') {
throw new InvalidSettingConfigurationException("Location and remote repo url are mutually exclusive!");
}
if ($location !== '') {
$isValidPath = false;
if (str_starts_with($location, '/') && !str_ends_with($location, '/')) {
$isValidPath = true;
} elseif ($location === 'nextcloud_aio_backupdir') {
$isValidPath = true;
}
if (!$isValidPath) {
throw new InvalidSettingConfigurationException("The path must start with '/', and must not end with '/'! Another option is to use the docker volume name 'nextcloud_aio_backupdir'.");
}
// 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, "@")) {View on GitHub (pinned to 6b788eec5e)
Solutions
- Use an absolute path with no trailing slash: '/mnt/backup'
- Or submit exactly 'nextcloud_aio_backupdir' to use the pre-created docker volume
- Remove quotes, backslashes and surrounding whitespace introduced by copy-paste
Example fix
// before borg_backup_host_location = 'mnt/backup/' // after borg_backup_host_location = '/mnt/backup'
Defensive patterns
Strategy: validation
Validate before calling
$isValidPath = (str_starts_with($location, '/') && !str_ends_with($location, '/'))
|| $location === 'nextcloud_aio_backupdir';
if (trim($location) !== '' && !$isValidPath) {
$errors[] = "Path must start with '/' and not end with '/' (or be 'nextcloud_aio_backupdir')";
} Try / catch
use AIO\Data\InvalidSettingConfigurationException;
try {
$configurationManager->setBorgLocationVars($location, $repo);
} catch (InvalidSettingConfigurationException $e) {
$formErrors[] = $e->getMessage();
} Prevention
- Use a pattern check client-side: ^/.+[^/]$ or the exact volume name
- Strip quotes, backslashes and whitespace from pasted paths
- Offer the 'nextcloud_aio_backupdir' volume as a dropdown option to avoid typing errors
When it happens
Trigger: Submitting 'mnt/backup' (no leading slash), '/mnt/backup/' (trailing slash), 'backup' (relative), 'C:\backup' (Windows-style), or a value with stray quotes/spaces from copy-paste; anything that is not the literal volume name 'nextcloud_aio_backupdir'.
Common situations: Copy-paste from tutorials that add a trailing slash; Windows users entering drive-letter paths; users unaware of the pre-created volume option.
Related errors
- The path must not be a children of or equal to NEXTCLOUD_DAT
- Please enter a path or a remote repo url!
- Location and remote repo url are mutually exclusive!
- The remote repo must contain '@'. For valid urls, see the re
- The remote repo must contain ':'. For valid urls, see the re
AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21).
Data as JSON: /api/errors/7516f66abc633727.
Report an issue: GitHub.