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

  1. 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)
  2. Look it up in your password manager or the notes from the initial AIO backup setup
  3. 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

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


AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21). Data as JSON: /api/errors/e555a0796be280ec. Report an issue: GitHub.