[GH-ISSUE #1429] php artisan koel:init fails to generate app key on first run #818

Closed
opened 2026-02-26 02:34:21 +03:00 by kerem · 1 comment
Owner

Originally created by @tidux on GitHub (Mar 12, 2022).
Original GitHub issue: https://github.com/koel/koel/issues/1429

Describe the bug
I installed Koel as described in https://docs.koel.dev/#using-a-pre-compiled-archive and the default credentials failed.

To reproduce

$ wget https://github.com/koel/koel/releases/download/v5.1.13/koel-v5.1.13.tar.gz
$ tar xvf koel-v5.1.13.tar.gz
$ cd koel-v5.1.13
# configure MySQL database and user
$ composer install
$ php artisan koel:init --no-assets
# select "mysql" driver and enter DB credentials
# set media directory
$ php artisan serve

At this point the bug happens: I am met with a 500 internal server error when I attempt to log in with the default credentials. The error in laravel.log is the following:

[2022-03-12 01:25:06] local.ERROR: No application encryption key has been specified. {"exception":"[object] (Illuminate\\Encryption\\MissingAppKeyException(code: 0): No application encryption key has been specified. at $KOEL_DOCUMENT_ROOT/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:101)

Expected behavior
I expected to be able to log in.

Environment

  • Koel version [e.g. v4.1.0]
  • OS: Slackware 15.0
  • Browser: Firefox 98
  • PHP version: v7.4
  • Node version: not installed on server

Additional context
Add any other context about the problem here.

Originally created by @tidux on GitHub (Mar 12, 2022). Original GitHub issue: https://github.com/koel/koel/issues/1429 **Describe the bug** I installed Koel as described in https://docs.koel.dev/#using-a-pre-compiled-archive and the default credentials failed. **To reproduce** ``` $ wget https://github.com/koel/koel/releases/download/v5.1.13/koel-v5.1.13.tar.gz $ tar xvf koel-v5.1.13.tar.gz $ cd koel-v5.1.13 # configure MySQL database and user $ composer install $ php artisan koel:init --no-assets # select "mysql" driver and enter DB credentials # set media directory $ php artisan serve ``` At this point the bug happens: I am met with a 500 internal server error when I attempt to log in with the default credentials. The error in laravel.log is the following: ``` [2022-03-12 01:25:06] local.ERROR: No application encryption key has been specified. {"exception":"[object] (Illuminate\\Encryption\\MissingAppKeyException(code: 0): No application encryption key has been specified. at $KOEL_DOCUMENT_ROOT/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:101) ``` **Expected behavior** I expected to be able to log in. **Environment** - Koel version [e.g. v4.1.0] - OS: Slackware 15.0 - Browser: Firefox 98 - PHP version: v7.4 - Node version: not installed on server **Additional context** Add any other context about the problem here.
kerem closed this issue 2026-02-26 02:34:21 +03:00
Author
Owner

@tidux commented on GitHub (Mar 12, 2022):

Update: this appears to be a transient failure with php koel:init. Re-running php artisan koel:init --no-assets with a pre-configured .env file resolved the issue. This might be worth updating the documentation so I'll leave the ticket open.

<!-- gh-comment-id:1065783037 --> @tidux commented on GitHub (Mar 12, 2022): Update: this appears to be a transient failure with `php koel:init`. Re-running `php artisan koel:init --no-assets` with a pre-configured .env file resolved the issue. This might be worth updating the documentation so I'll leave the ticket open.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#818
No description provided.