coollabsio/coolify · error · RuntimeException

Failed to encrypt transfer bundle.

Error message

Failed to encrypt transfer bundle.

What it means

Error "Failed to encrypt transfer bundle." thrown in coollabsio/coolify.

Source

Thrown at app/Services/ServerTransfer/ServerTransferBundle.php:113

    /**
     * Encrypt an entire bundle for mailbox/API transport with a user passphrase.
     *
     * @param  array<string, mixed>  $bundle
     * @return array{encrypted: true, schema_version: int, payload: string}
     */
    public static function encryptWithPassphrase(array $bundle, string $passphrase): array
    {
        if ($passphrase === '') {
            throw new RuntimeException('Passphrase must not be empty.');
        }

        $json = json_encode($bundle, JSON_THROW_ON_ERROR);
        $key = hash('sha256', $passphrase, true);
        $iv = random_bytes(16);
        $cipher = openssl_encrypt($json, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
        if ($cipher === false) {
            throw new RuntimeException('Failed to encrypt transfer bundle.');
        }

        $mac = hash_hmac('sha256', $iv.$cipher, $key);

        return [
            'encrypted' => true,
            'schema_version' => self::SCHEMA_VERSION,
            'payload' => base64_encode($iv.$mac.$cipher),
        ];
    }

    /**
     * @param  array<string, mixed>  $encrypted
     * @return array<string, mixed>
     */
    public static function decryptWithPassphrase(array $encrypted, string $passphrase): array
    {
        if (! data_get($encrypted, 'encrypted')) {

View on GitHub (pinned to 70b9acc424)

When it happens

Trigger: Thrown at app/Services/ServerTransfer/ServerTransferBundle.php:113 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17). Data as JSON: /api/errors/074e18743d1e2fe1. Report an issue: GitHub.