nextcloud/all-in-one · error · InvalidSettingConfigurationException
Please enter the password!
Error message
Please enter the password!
What it means
In ConfigurationManager::setBorgRestoreLocationVarsAndPassword(): after the location/repo validation passes, an empty borg repository password is rejected — restoring a borg backup requires the encryption passphrase the repository was created with. Throws InvalidSettingConfigurationException → HTTP 422 shown on the AIO restore form; on success the password is stored as borg_restore_password and instanceRestoreAttempt is set.
Source
Thrown at php/src/Data/ConfigurationManager.php:790
$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.');
}
}
}
/**
* @throws InvalidSettingConfigurationException
*/
public function setBorgRestoreLocationVarsAndPassword(string $location, string $repo, string $password) : void {
$this->validateBorgLocationVars($location, $repo);
if ($password === '') {
throw new InvalidSettingConfigurationException("Please enter the password!");
}
$this->startTransaction();
$this->borgBackupHostLocation = $location;
$this->borgRemoteRepo = $repo;
$this->borgRestorePassword = $password;
$this->instanceRestoreAttempt = true;
$this->commitTransaction();
}
/**
* @throws InvalidSettingConfigurationException
*/
public function changeMasterPassword(string $currentPassword, string $newPassword) : void {
if ($currentPassword === '') {
throw new InvalidSettingConfigurationException("Please enter your current password.");
}
View on GitHub (pinned to 6b788eec5e)
Solutions
- Enter the borg backup password that was shown when the backup repository was created (displayed once in the AIO interface when backups were set up)
- Look it up in your password manager or the notes from the initial AIO backup setup
- If the passphrase is truly lost, an encrypted borg backup cannot be restored — there is no recovery mechanism
Example fix
// before borg_restore_host_location = '/mnt/backup' borg_restore_password = '' // after borg_restore_host_location = '/mnt/backup' borg_restore_password = '<the borg repo password>'
Defensive patterns
Strategy: validation
Validate before calling
if (trim($password) === '') {
$errors[] = 'The borg restore password is required';
} Try / catch
use AIO\Data\InvalidSettingConfigurationException;
try {
$configurationManager->setBorgRestoreLocationVarsAndPassword($location, $repo, $password);
} catch (InvalidSettingConfigurationException $e) {
$formErrors[] = $e->getMessage();
} Prevention
- Record the borg passphrase in a password manager the day backups are enabled
- Make the restore form's password field required (HTML required attribute)
- Preserve entered values across failed submits so users do not lose typed input
When it happens
Trigger: Submitting the restore form with 'borg_restore_password' empty or whitespace; location and repo filled but the password field forgotten; form resubmission after an earlier validation error cleared the field.
Common situations: Users who did not record the borg passphrase displayed when daily backups were enabled; the password field not surviving a round-trip of a failed submit.
Understand the failure class
Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.
Related errors
- Please enter your current password.
- Please enter a new password.
- Domain must contain at least one dot!
- Domain must not contain slashes!
- Domain must not contain colons!
AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21).
Data as JSON: /api/errors/e555a0796be280ec.
Report an issue: GitHub.