Skip to content

Nextcloud: occ maintenance:install writes wrong config into the config.php file #12

@TheRealBecks

Description

@TheRealBecks

When installing a new Nextcloud with the occ maintenance:install command the Nextcloud won't come up afterwards due to wrong database credentials:

php occ maintenance:install \
  -n \
  --data-dir "/var/www/nextcloud_data" \
  --database "pgsql" \
  --database-host "postgres" \
  --database-name "nextclouddatabasetest" \
  --database-user "nextcloudusertest" \
  --database-pass "lkj#acoiuqD4ic6!Bn21ac" \
  --admin-user "admintest" \
  --admin-pass "<slj#cvb45!o93iuwJFP9"

That will result into the following config.php file:

<?php
$CONFIG = array (
  'passwordsalt' => 'CuRTVGtkGk9/AFKCIgSp8KR5Q/3KUl',
  'secret' => 'WJMl4bhJDlgr1vMYidHfA5Mb0Dz+eXumlZRVolA7zOVzEP6R',
  'trusted_domains' => 
  array (
    0 => 'localhost',
  ),
  'datadirectory' => '/var/www/nextcloud_data',
  'dbtype' => 'pgsql',
  'version' => '32.0.1.2',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextclouddatabasetest',
  'dbhost' => 'postgres',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin',
  'dbpassword' => 'mPeDAdmwMqNyuQp4bstpNczWiDsdRK',
  'installed' => true,
  'instanceid' => 'ocyosehy194m',
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions