Error 'Could not open input file: console.php' when trying to test-deploy after registering Deploy-Daemon

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.3
  • Operating system and version (e.g., Ubuntu 24.04):
    • Gentoo Linux (up to date)
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.66
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Apache 2.4.38 (Raspbian)
  • PHP version (e.g, 8.3):
    • 8.4.16
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • when trying to test deployment
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Error ‘Could not open input file: console.php’

Steps to replicate it (hint: details matter!):

  1. Set up Proxy settings for AppAPI on the Nextcloud Server

  2. Test Proxy Settings using ‘netcat’ as suggestet

  3. Configure, Test and Deploy Deployment-Daemon in Nextcloud

  4. Try to Test-Deploy from Daemon menu

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

PASTE HERE{"reqId":"aU5gkkiHGYHhHY_b5AFc4wAAAEQ","level":3,"time":"2025-12-26T11:16:50+01:00","remoteAddr":"192.168.2.1","user":"user","app":"app_api","method":"POST","url":"/index.php/apps/app_api/daemons/harp_proxy_host/test_deploy","message":"Error executing occ command. Return code: 1, stdout: , stderr: Could not open input file: console.php\n","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","version":"32.0.3.2","data":{"app":"app_api"},"id":"694e60ac0bfa1"}

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

no relevant messages in both server and reverse-proxy logs

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.server.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "cloud.server.com",
        "overwriteprotocol": "https",
        "overwritewebroot": "\/",
        "overwritecondaddr": "^192\\.168\\.2\\.81$",
        "dbtype": "mysql",
        "version": "32.0.3.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Europe\/Berlin",
        "installed": true,
        "theme": "",
        "loglevel": 3,
        "maintenance": false,
        "maintenance_window_start": 1,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtpport": "25",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "debug": false,
        "appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v1",
        "appstore.experimental.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": true,
        "overwrite.cli.url": "https:\/\/cloud.server.com",
        "mysql.utf8mb4": true,
        "updater.release.channel": "stable",
        "default_phone_region": "DE",
        "app_install_overwrite": {
            "0": "keeweb",
            "1": "audioplayer",
            "2": "camerarawpreviews",
            "4": "uploaddetails",
            "5": "files_inotify",
            "6": "bruteforcesettings",
            "7": "files_downloadactivity",
            "8": "cookbook",
            "9": "bookmarks",
            "10": "video_converter",
            "11": "extract",
            "12": "apporder",
            "13": "twofactor_u2f"
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        }
    }
}

Setup:

Router: 192.168.2.1

Reverse-Proxy: Apache at 192.168.2.81

Server: Apache at 192.168.2.10, Nextcloud installed in Subdirectory /nextcloud

I found a Reverse-Proxy config for Apache here:

https://github.com/nextcloud/HaRP/issues/44#issuecomment-3362786323

As my Installation is in a Subdirectory, I changed

 <Location /exapps/>

to

 <Location /nextcloud/exapps/>

I then testet the Proxy configuration as suggestet here:

https://github.com/nextcloud/HaRP#verify-that-the-reverse-proxy-configuration-is-correct

The output is:

GET /exapps//hello HTTP/1.1
Host: cloud.server.com
User-Agent: curl/7.64.0
Accept: */*
Via: 1.1 cloud.server.com
X-Forwarded-For: 192.168.2.81, 192.168.2.81
X-Forwarded-Host: cloud.server.com, cloud.server.com
X-Forwarded-Server: cloud.server.com, cloud.server.com
X-Real-IP: 192.168.2.81
X-Forwarded-Proto: https
Connection: Keep-Alive

So I assume that the Proxy configuration is correct.

Then I registered the Deploy-Daemon in Netxtcloud and the connection test is successful:

Bildschirmfoto vom 2025-12-26 11-15-47

But the Deployment-Test fails instantly:

Bildschirmfoto vom 2025-12-26 11-17-04

There is not even a trace of a connection in the HAProxy container, the last Log messages are

INFO: Starting HAProxy...
[NOTICE]   (1) : Initializing new worker (27)
[NOTICE]   (1) : Loading success.
2025-12-26 09:42:13.024 [I] [sub/root.go:142] start frpc service for config file [/frpc-docker.toml]
2025-12-26 09:42:13.025 [I] [client/service.go:295] try to connect to server...
2025-12-26 09:42:13.044 [I] [client/service.go:287] [8d09dc9f245eb773] login to server success, get run id [8d09dc9f245eb773]
2025-12-26 09:42:13.045 [I] [proxy/proxy_manager.go:173] [8d09dc9f245eb773] proxy added: [bundled-deploy-daemon]
2025-12-26 09:42:13.047 [I] [client/control.go:168] [8d09dc9f245eb773] [bundled-deploy-daemon] start proxy success

The only error message appearing in the Nextclod Log is:

Error
app_api
Error executing occ command. Return code: 1, stdout: , stderr: Could not open input file: console.php

which seems kind of strange to me.

Can anyone help me here? I’m a bit lost at this point.

Thanks in advance.

I just tried with cURL and get a “404 Not Found” for “https://cloud.server.com/console.php”.

The reason for this is the following RewriteRule in the .htaccess file on the Nextcloud server:

RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]

So it’s intended, that console.php isn’t reachable from outside. But shouldn’t it work internally?

Is there any way to check, how Nextcloud tries to connect?

No one any idea, what possibly is wrong with my setup?

This isn’t coming from an external HTTP transaction. This is failing when the app_api runOccCommand() function tries to execute your local occ binary. occ then requires (includes) console.php.

Anything unusual about where your occ command is installed (it should be in the root of your Nextcloud install)? And console.php located in the same place?

Thanks for your reply.

The occ and console.php are both in my nextcloud root directory, owned by user and group apache (not www-data as this is Gentoo).

Everything else in Nextcloud works without any problem.

If you set your loglevel to 1 and re-test, there should be some additional details about the command specifics (like directory/etc). That may turn up something interesting.

With loglevel set to 1, I get this:

"reqId":"aWfTNzh5KzTJFeSkzsDDsgAAAAA","level":1,"time":"2026-01-14T18:32:39+01:00","remoteAddr":"192.168.2.1","user":"user","app":"app_api","method":"POST","url":"/index.php/apps/app_api/daemons/harp_proxy_host/test_deploy","message":"Calling occ(directory=null): 'app_api:app:register' '--silent' 'test-deploy' 'harp_proxy_host' '--info-xml' 'https://raw.githubusercontent.com/nextcloud/test-deploy/main/appinfo/info.xml' '--test-deploy-mode' '--no-ansi' '--no-warnings'","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","version":"32.0.3.2","data":{"app":"app_api"}}
{"reqId":"aWfTNzh5KzTJFeSkzsDDsgAAAAA","level":3,"time":"2026-01-14T18:32:39+01:00","remoteAddr":"192.168.2.1","user":"user","app":"app_api","method":"POST","url":"/index.php/apps/app_api/daemons/harp_proxy_host/test_deploy","message":"Error executing occ command. Return code: 1, stdout: , stderr: Could not open input file: console.php\n","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","version":"32.0.3.2","data":{"app":"app_api"}}

note: there is no subdirectory daemons in my nextcloud directory under apps/app_api

Am I right, that the fact that in the link is /index.php/apps/app_api/daemonsdoes mean, the subdirectory hasn’t to be physically present?

just upgraded to version 32.0.4. Still the same error.

I have the same issue, have you found a solution yet ?

Using /nextcloud/exapps in the Location directive makes no sense. The Location is not a folder on your server but the path which was sent by the browser. So if you want to use HaRP within your Nextcloud domain as https://nextcloud-domain.example/exapps/ then you would use this in Apache:

        # Nextcloud HaRP
        <Location /exapps/>
                ProxyPreserveHost On
                ProxyPass http://127.0.0.1:8780/exapps/ nocanon
                ProxyPassReverse http://127.0.0.1:8780/exapps/
                RequestHeader set X-Real-IP %{REMOTE_ADDR}s
                RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s
                RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
        </Location>

Also having Nextcloud in a subfolder like https://mydomain.example/nextcloud is not recommended. Even if you somehow manage to do this - this will break in many places. Always have a regular domain without any “subfolder” in the path.

Using /nextcloud/exapps in the Location directive makes no sense. The Location is not a folder on your server but the path which was sent by the browser.

Thanks for pointing this out. I tried this first, but as it failed, I changed it to fit the subfolder on the Server.

Also having Nextcloud in a subfolder like https://mydomain.example/nextcloud is not recommended. Even if you somehow manage to do this - this will break in many places. Always have a regular domain without any “subfolder” in the path.

Just for clarification, no. My Nextcloud is directly reachable through https://cloud.mydomain.example.

The reverse proxy just redirects that to a subfolder on the Server actually hosting Nextcloud. I run it like this for years without any problems.

In the meantime, I switched from Apache to a NGINX reverse proxy, but still facing the same error.

All tests to verify the proxy is working correctly (found here) are successful, including the last one:

curl -v https://cloud.mydomain.example/exapps/hello
* Host cloud.mydomain.example:443 was resolved.
* IPv6: (none)
* IPv4: xxx.xxx.xxx.xxx
*   Trying xxx.xxx.xxx.xxx:xxx...
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* SSL Trust Anchors:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
*   CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519MLKEM768 / RSASSA-PSS
* ALPN: server accepted http/1.1
* Server certificate:
*   subject: CN=cloud.mydomain.example
*   start date: Dec  4 14:56:17 2025 GMT
*   expire date: Mar  4 14:56:16 2026 GMT
*   issuer: C=US; O=Let's Encrypt; CN=R12
*   Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 2: Public key type RSA (4096/152 Bits/secBits), signed using sha256WithRSAEncryption
*   subjectAltName: "cloud.mydomain.example" matches cert's "cloud.mydomain.example"
* SSL certificate verified via OpenSSL.
* Established connection to cloud.mydomain.example (xxx.xxx.xxx.xxx port 443) from xxx.xxx.xxx.xxx port 53572 
* using HTTP/1.x
> GET /exapps/hello HTTP/1.1
> Host: cloud.mydomain.example
> User-Agent: curl/8.17.0
> Accept: */*
> 
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):

But I still get the error regarding console.php.

unfortunately not yet.

Could you share your setup/configuration, so we possible find similarities?

Nextcloud and Docker on the same host - with Nextcloud bare metal

I run Nextcloud on a self hosted apache server and reachable via nextcloud.mydomain.com. Apache is running as user nextcloud (tried also with www-data).

HaRP is configured as Harp Proxy (host) - docker-install on the same host with apache server Nextcloud . Check connection on daemon deploy run succesfully.

Test deploy is giving the error below, same error if i want to install an ExAPP from Nextcloud WebGUI

Error app_api Error executing occ command. Return code: 1, stdout: , stderr: Could not open input file: console.php Jan 27, 2026, 10:42:53 PM
Info app_api Calling occ(directory=null): ‘app_api:app:register’ ‘–silent’ ‘test-deploy’ ‘harp_proxy_host’ ‘–info-xml’ ‘https://raw.githubusercontent.com/nextcloud/test-deploy/main/appinfo/info.xml’ ‘–test-deploy-mode’ ‘–no-ansi’ ‘–no-warnings’ Jan 27, 2026, 10:42:53 PM

If i run the installation of an ExAPP from CLI, then is installed correctly:

:~# cd /usr/local/www/nextcloud

:~# /usr/local/customphp/bin/php -v php.ini occ app_api:app:register talk_bot_ai
ExApp talk_bot_ai deployed successfully.
ExApp talk_bot_ai successfully registered.

My working configuration…

Nextcloud:

<?php
$CONFIG = array (
  'instanceid' => 'xxxx',
  'passwordsalt' => 'xxxx',
  'secret' => 'xxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxx',
  ),
  'datadirectory' => '/mnt/nextcloud-data',
  'skeletondirectory' => '',
  'overwrite.cli.url' => 'xxxx',
  'dbtype' => 'mysql',
  'version' => '32.0.3.2',
  'installed' => true,
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,
  'dbname' => 'xxxx',
  'dbhost' => 'xxxx',
  'dbuser' => 'xxxx',
  'dbpassword' => 'xxxx',
  'dbpersistent' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'dbindex' => 0,
  ),
  'knowledgebaseenabled' => false,
  'theme' => '',
  'simpleSignUpLink.shown' => false,
  'loglevel' => 2,
  'log_authfailip' => true,
  'mysql.utf8mb4' => true,
  'mail_from_address' => 'xxxx',
  'mail_domain' => 'xxxx',
  'mail_smtpmode' => 'sendmail',
  'mail_smtphost' => 'xxxx',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpname' => 'xxxx',
  'mail_smtppassword' => 'xxxx',
  'updater.release.channel' => 'stable',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 180',
  'has_rebuilt_cache' => true,
  'default_language' => 'de',
  'default_phone_region' => 'DE',
  'check_data_directory_permissions' => false,
  'log_rotate_size' => 10485760,
  'profile.enabled' => false,
  'preview_max_x' => 1920,
  'preview_max_y' => 1920,
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => true,
  'mail_smtpport' => '465',
  'trusted_proxies' => 
  array (
    0 => 'xxxx',
    1 => 'xxxx',
    2 => '127.0.0.1',
    3 => '::1',
  ),
  'auth.bruteforce.protection.enabled' => true,
  'ratelimit.protection.enabled' => true,
  'reference_opengraph' => false,
  'integrity.check.disabled' => false,
  'defaultapp' => 'files',
  'maintenance_window_start' => 22,
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
  ),
  'app_install_overwrite' => 
  array (
  ),
  'forbidden_filename_characters' => 
  array (
    0 => '\\',
    1 => '/',
  ),
  'forbidden_filename_extensions' => 
  array (
    0 => '.filepart',
    1 => '.part',
  ),
  'memories.db.triggers.fcu' => true,
  'memories.exiftool' => '/var/www/nextcloud/apps/memories/bin-ext/exiftool-amd64-glibc',
  'memories.vod.path' => '/var/www/nextcloud/apps/memories/bin-ext/go-vod-amd64',
  'memories.index.path.blacklist' => 'xxxx',
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\HEIC',
    4 => 'OC\\Preview\\BMP',
    5 => 'OC\\Preview\\XBitmap',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\TXT',
    8 => 'OC\\Preview\\MarkDown',
    9 => 'OC\\Preview\\Movie',
    10 => 'OC\\Preview\\MKV',
    11 => 'OC\\Preview\\MP4',
    12 => 'OC\\Preview\\AVI',
    13 => 'OC\\Preview\\Image',
    14 => 'OC\\Preview\\Imaginary',
  ),
  'dbtableprefix' => 'oc_',
  'memories.gis_type' => 1,
  'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
  'memories.vod.ffprobe' => '/usr/bin/ffprobe',
  'enable_previews' => true,
  'preview_imaginary_url' => 'http://127.0.0.1:9000',
);

Apache configuration for the Nextcloud site including a number of services:

  • /standalone-signaling → Nextcloud Talk High Performance Backend
  • /push → Client Push
  • /exapps/ → HaRP for Docker based apps
<VirtualHost *:443>
        DocumentRoot /var/www/nextcloud

        ServerName my.domain.example

        <Directory /var/www/nextcloud>
                Options +SymlinksIfOwnerMatch
                AllowOverride All
                Require all granted
                # Fix possible sync errors in Nextcloud for big files
                LimitRequestBody 0
        </Directory>

        # Service discovery
        Redirect 301 ^/.well-known/carddav /remote.php/dav/
        Redirect 301 ^/.well-known/caldav /remote.php/dav/
        Redirect 301 ^/.well-known/webfinger /index.php/.well-known/webfinger
        Redirect 301 ^/.well-known/nodeinfo /index.php/.well-known/nodeinfo

        # Nextcloud Client Push
        ProxyPass /push/ws ws://127.0.0.1:7867/ws
        ProxyPass /push/ http://127.0.0.1:7867/
        ProxyPassReverse /push/ http://127.0.0.1:7867/

        # Nextcloud HaRP
        <Location /exapps/>
                ProxyPreserveHost On
                ProxyPass http://127.0.0.1:8780/exapps/ nocanon
                ProxyPassReverse http://127.0.0.1:8780/exapps/
                RequestHeader set X-Real-IP %{REMOTE_ADDR}s
                RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s
                RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
        </Location>

        # Nextcloud Talk High Performance Backend
        ProxyPass "/standalone-signaling" "ws://127.0.0.1:8090"
        RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
        RequestHeader set X-Real-IP %{REMOTE_ADDR}s
        RewriteEngine On
        RewriteRule ^/standalone-signaling/spreed/$ - [L]
        RewriteRule ^/standalone-signaling/api/(.*) http://127.0.0.1:8090/api/$1 [L,P]

        # HSTS with a validity of 180 days (180*24 = 15552000 seconds)
        Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"

        # Permissions-Policy to allow features required by Nextcloud
        Header always set Permissions-Policy "geolocation=(self),microphone=(self),camera=(self),fullscreen=(self)"

        ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
        CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined

        # PHP FPM
        Include "/etc/apache2/conf-available/php8.4-fpm-nextcloud.conf"

        # Certificates for HTTPS

        SSLCertificateFile /etc/letsencrypt/live/my.domain.example/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/my.domain.example/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

Thanks for sharing.

Just to get it right:
The <Location /exapps/> directive is at the server Nextcloud actually runs, not at the reverse proxy, that forwards external traffic to hosts inside the network?

“The server Nextcloud actually runs” and “reverse proxy” are the same server.

I have everything installed on one machine:

  • Apache
  • PHP-FPM
  • MariaDB
  • Nextcloud is installed in /var/www/nextcloud
  • Client push is installed as app in Nextcloud and also with a Systemd unit to run it
  • Docker container for Collabora
  • Docker container for Nextcloud Talk High Performance Backend
  • Docker container for HaRP

Apache is serving Nextcloud itself using PHP-FPM but it also acts as reverse proxy for the Nextcloud Talk High Performance Backend and HaRP. So every incoming request from outside to /exapps/ will be forwarded to http://127.0.0.1:8780/exapps/ - on the same machine of course, since 127.0.0.1 is localhost.

Collabora runs in its own domain, but also on the same machine and also with a reverse proxy provided by Apache (which I did not show here since this is not relevant for the topic), installed as described in Nextcloud Office | Arno Welzel .

So the whole structure is as following:

flowchart TD
    A[Internet] -->|HTTPS| B[Apache<br>nextcloud.domain.example]
    B -->|php-fpm| D[Path: /<br>Nextcloud in<br>/var/www/nextcloud]
    B -->|proxy| E[Path: /push/<br>Client Push<br>as Systemd unit]
    B -->|proxy| F[Path: /standalone-signaling/<br>Nextcloud Talk HPB<br>as Docker container]
    B -->|proxy| G[Path: /exapps/<br>HaRP as<br>Docker container]

Thanks for clarification.

My setup is a bit different, as I use NGINX (formerly apache) as a reverse proxy on my Webserver, pointing the https://cloud.server.com to the internal server which actually hosts Nextcloud in a subdirectory (because there a more Webservices running on that machine).

Could the error be related to the fact, that neither my reverse proxy nor my Nextcloud server are listening on port 80, because I enabled “redirect HTTP to HTTPS” on both and HaRP is pure HTTP?

I tried my setup also with apache nextcloud running on :80 and :443, port forward on my router and proxy harp configured in apache virtual host.

I can open https://nextcloud.mydomain.com/exapps/ which shows the proxy is working correctly.

Still i got the error regarding opening console.php when tried Test Deploy within Nextcloud WebUI.

Using the same config.php for Nextcloud as above.

The only difference is that i use mod_php in apache instead of php-fpm

Going once again through this topic, figure it out what cause the error, same as for @groovy

The app it fails to detect the root folder on Nextcloud installation and the directory stay on null

“message”:"Calling occ(directory=null): ‘app_api:app:register’

Manually changing in the file /nextcloudinstallfolder/apps/app_api/lib/Service/AppAPIService.php

this line

$occDirectory = null;

change to

$occDirectory = “/nextcloudinstallfolder”;

allows the test_deploy app to go forward.

Now i need to figure it out why the root folder is not detected correctlly.

For me installing the exapps via CLI works correctly