Skip to content
OBLAIDISH NEWS
Laravel config backup breaks on server move fixed with password-protected archive
TX_236909Engineering

Laravel config backup breaks on server move fixed with password-protected archive

The laravel-config-backup package now stores plaintext inside a password-encrypted AES-256 ZIP, re-encrypting with the new APP_KEY on restore, solving the DecryptException issue when moving servers [DevTo].

When copying encrypted configuration rows from one server to another, Laravel developers encounter a DecryptException because Crypt::encryptString ties the ciphertext to the source server's APP_KEY [DevTo]. The laravel-config-backup package addresses this issue by storing plaintext inside a password-encrypted AES-256 ZIP. The archive is created by decrypting each row using the source APP_KEY, writing the plaintext values into a temporary folder, and then zipping the folder with a user-supplied password [GitHub]. On restore, the archive is unzipped with the same password, and each value is re-encrypted with the current APP_KEY before being written back to the database. A PHPUnit test confirms portability by generating two random 32-byte keys, backing up under the first, swapping to the second, and asserting that Crypt::decryptString returns the original secret [GitHub]. This approach provides true portability, a clear security boundary, and consistent authorization. By shifting the trust anchor from the framework key to a user-controlled password, laravel-config-backup forces developers to think about where secrets live, not just how they are stored [DevTo].

operator_channel
[ comments_offline · provider_not_configured ]
transmission_log

Subscribe to the broadcast.

Daily digest of the day's most important tech news. No fluff. Engineering signal only.

// delivered via substack · double-opt-in confirmation