#1606·Heimdall

php artisan register:app fails: "There are no commands defined in the "register" namespace"

Author: HK-MoebiusCreated Sep 16, 2026Updated Sep 16, 2026

Registering a private app as described in the Heimdall-Apps wiki no longer works. The command exists in app/Console/Commands/RegisterApp.php, but artisan does not know it.

Steps to reproduce

  1. Put a private app folder, e.g. MyApp, into SupportedApps.
  2. Run:
    bash
    docker exec -it heimdall php /app/www/artisan register:app MyApp

Expected behaviour

Application Added - MyApp - <appid>

Actual behaviour

ERROR  There are no commands defined in the "register" namespace.

php artisan list does not show register:app either.

Cause

Since the move to the new Laravel application structure, bootstrap/app.php only passes the console routes file to withRouting():

php
->withRouting(
    ...
    commands: __DIR__.'/../routes/console.php',
    ...
)

withRouting() then calls withCommands([routes/console.php]). Because that array is not empty, ApplicationBuilder::withCommands() does not add its default path app/Console/Commands. As a result, RegisterApp is never discovered.

Suggested fix

Register the commands directory explicitly in bootstrap/app.php, for example:

php
->withCommands([
    __DIR__.'/../app/Console/Commands',
])

Workaround

Until this is fixed, the command can be registered and run manually:

bash
docker exec -i heimdall sh -c 'cat > /tmp/register.php' <<'PHP'
<?php
require '/app/www/vendor/autoload.php';
$app = require '/app/www/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();
$kernel->registerCommand($app->make(App\Console\Commands\RegisterApp::class));
$kernel->call('register:app', ['folder' => 'MyApp']);
echo $kernel->output();
PHP
docker exec -it -u abc heimdall php /tmp/register.php

Environment

  • Heimdall version: 2.8.3
  • Installation: linuxserver/heimdall Docker image on Unraid