ioan
September 8, 2025, 3:37pm
1
Hello everybody,
I would like to install the latest version of Nextcloud via the Quick Install method.
This is similar to Can't install Nextcloud
That post didn’t have a resolution.
Here’s my setup:
Domain : subdomain.domain.tld
Alias : www.subdomain.domain.tld
Domain redirection to subdomain.domain.tld
SSL enabled and working via Let's Encrypt
HTTPS redirection enabled
HSTS enabled
Web Template APACHE2 : default
Backend Template PHP-FPM : PHP-8_2
Proxy Template : default
Installation attempts fail with the following message:
Could not open input file: ‘/home/hestiauser/web/subdomain.domain.tld/public_html/occ’ Error: cmd exited with errors
Data Loss Warning!
Your web folder already has files uploaded to it. The installer will overwrite your files and/or the installation might fail.
Please make sure ~/web/subdomain.domain.tld/public_html is empty!
That directory was empty to being with.
Any idea how to go about this?
Thank you.
ioan
September 8, 2025, 5:06pm
3
Thank you. It worked.
If you want to share, how did you come across this solution?
1 Like
sahsanu
September 8, 2025, 5:34pm
4
ioan:
Thank you. It worked.
You’re welcome
I tested the installation and noticed an error in the log when executing the installation command (see /var/log/hestia/nginx-error.log on your side). It looks like the command doesn’t handle quoted strings correctly, so I removed the parts where the quotes were being added.
--- NextcloudSetup.php 2025-07-21 10:45:27.000000000 +0200
+++ ncpatch 2025-09-08 19:25:25.789429924 +0200
@@ -44,21 +44,27 @@
$this->config["server"]["php"]["supported"],
);
+$occPath = $this->getDocRoot("occ");
+
+// Verificar que occ existe
+if (!file_exists($occPath)) {
+ throw new Exception("Nextcloud installation incomplete. OCC command not found at: " . $occPath);
+}
$this->appcontext->runUser(
"v-run-cli-cmd",
[
"/usr/bin/php" . $options["php_version"],
- quoteshellarg($this->getDocRoot("occ")),
+ $this->getDocRoot("occ"),
"maintenance:install",
"--database mysql",
"--database-name " .
- quoteshellarg($this->appcontext->user() . "_" . $options["database_name"]),
- "--database-host " . quoteshellarg($options["database_host"]),
+ $this->appcontext->user() . "_" . $options["database_name"],
+ "--database-host " . $options["database_host"],
"--database-user " .
- quoteshellarg($this->appcontext->user() . "_" . $options["database_user"]),
- "--database-pass " . quoteshellarg($options["database_password"]),
- "--admin-user " . quoteshellarg($options["username"]),
- "--admin-pass " . quoteshellarg($options["password"]),
+ $this->appcontext->user() . "_" . $options["database_user"],
+ "--database-pass " . $options["database_password"],
+ "--admin-user " . $options["username"],
+ "--admin-pass " . $options["password"],
],
$status,
);
@@ -67,9 +73,9 @@
"v-run-cli-cmd",
[
"/usr/bin/php" . $options["php_version"],
- quoteshellarg($this->getDocRoot("occ")),
+ $this->getDocRoot("occ"),
"config:system:set",
- "trusted_domains 2 --value=" . quoteshellarg($this->domain),
+ "trusted_domains 2 --value=" . $this->domain,
],
$status,
My knowledge of PHP is zero, so I didn’t submit a PR to fix it (I hope someone with PHP knowledge can review it). Other installers have the same problem.
4 Likes
system
Closed
October 8, 2025, 8:14pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.