koel / docker

A minimal docker image for the koel music streaming server.
https://hub.docker.com/r/phanan/koel/
MIT License
178 stars 54 forks source link

no API_KEY after key:generate #101

Closed karezza closed 2 years ago

karezza commented 2 years ago

After installing I'm seeing the following error:

PHP Fatal error:  Uncaught RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:44\nStack trace:\n#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(32): Illuminate\\Encryption\\Encrypter->__construct()\n#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(869): Illuminate\\Encryption\\EncryptionServiceProvider->Illuminate\\Encryption\\{closure}()\n#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(754): Illuminate\\Container\\Container->build()\n#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(841): Illuminate\\Container\\Container->resolve()\n#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(692): Illuminate\\Foundation\\Application->resolve()\n#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(826): Illuminat in /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php on line 44, referer: https://koel.k-dev.harmony.net/

Could this be because I made up an API_KEY rather than use the utility to generate one? I thought maybe so I tried to generate one using the command:

# php artisan key:generate --force
Application key set successfully.

Looks like it completed successfully but there is nothing new in .env

karezza commented 2 years ago

Just noticed this is forked off another project, going to work with the other project for a bit and see if I can figure out the issue.

Hyzual commented 2 years ago

Hi, unfortunately the original project this is forked from is no longer maintained. The APP_KEY is automatically generated, indeed if you need to generate it that's the right command to run. I'm surprised it didn't write it to .env file, I think there is also an artisan command to dump vars but I don't know it from the top of my head

Hyzual commented 2 years ago

Did you try running php artisan koel:init --no-assets? It should generate the APP_KEY

karezza commented 2 years ago

What I found out is if I don't try to provide an api key one is generated. For some reason I felt like I needed an api key before I knew how to generate one so by providing an invalid key I created a problem for myself. Got everything working now. Thank you!