Hello,
I’ve succesfully installed Nextcloud using setup-nextcloud.php script but I can’t make it work with PostgreSQL 14.
After I set up DB information in index.php and click “Install” Nextcloud shows an error:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.
It seems that Nextcloud can’t create tables because the DB is empty.
I’m pretty sure I set up PostgreSQL correctly because I can connect to the DB manually as Nextcloud user and creating/removing tables works fine.
Here’s pg_hba.conf:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 scram-sha-256
# IPv6 local connections:
host all all ::1/128 scram-sha-256
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
And config.php:
<?php
$CONFIG = array (
'instanceid' => '***',
'passwordsalt' => '***',
'secret' => '***',
'trusted_domains' =>
array (
0 => '***',
),
'datadirectory' => '/var/www/html/nextcloud/data',
'dbtype' => 'pgsql',
'version' => '28.0.3.2',
'overwrite.cli.url' => 'http://***/nextcloud',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => '***',
'installed' => true,
);
Also there’s an error in nextcloud.log after installation: Could not decrypt or decode encrypted session data
- but I’m not sure if it’s related to the problem.