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.