Need advice to setup AppAPI/HaRP with official Docker Container nextcloud:stable-apache

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):
    • Nextcloud Hub 25 Autumn (32.0.1)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Linux raspberrypi-IN 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux
  • Web server and version (e.g, Apache 2.4.25):
    • Apache/2.4.65
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • replace me
  • PHP version (e.g, 8.3):
    • 8.3.27
  • Is this the first time you’ve seen this error? (Yes / No):
    • YES
  • When did this problem seem to first start?
    • since upgrade to Nextcloud 32
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Docker Container nextcloud:stable-apache
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

S. https://github.com/nextcloud/HaRP/issues/59

Using the official Docker-Container nextcloud:stable-apache i am unable to setup the new AppAPI.
The Container appapi-harp starts as well as the test-app nc_app_test-deploy.
But the heartbeats get lost on their way back.

In Nextcloud-Log:
[app_api] Warnung: Failed heartbeat on http://nextcloud/exapps/test-deploy for 10 times. Most recent status=0, error: Client error: GET http://nextcloud/exapps/test-deploy/heartbeat resulted in a 400 Bad Request response:In Apache

lots of messages in access.log:
“GET /exapps/test-deploy/heartbeat HTTP/1.1” 400 14013 “-” “Nextcloud Server Crawler”

HaRP logs:
[DEBUG] [0e35e26b] Received hello handshake, responding with agent capabilities of: ‘’
[DEBUG] [0e35e26b] Health check, immediately disconnecting

I found this issue #44 suggesting to extent the apache VirtualHost configuration.
But modules proxy_module and proxy_http_module are not available in this Nextcloud/Apache/PHP-Container.

Please advise.

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

  1. Refresh Docker Container nextcloud:stable-apache to V.32

  2. Try to setup AppAPI

  3. suffer failures

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.

{"reqId":"Z3cN9N5Hwl7rvmXVi9QR","level":2,"time":"2025-10-27T10:22:52+00:00","remoteAddr":"","user":"--","app":"app_api","method":"","url":"--","message":"Failed heartbeat on https://nextcloud.raspberrypi-in.fritz.box/exapps/test-deploy for 60 times. Most recent status=0, error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://nextcloud.raspberrypi-in.fritz.box/exapps/test-deploy/heartbeat","userAgent":"--","version":"32.0.1.2","data":{"app":"app_api"},"id":"68ff4c133fa1a"}

{"reqId":"Z3cN9N5Hwl7rvmXVi9QR","level":3,"time":"2025-10-27T10:22:53+00:00","remoteAddr":"","user":"--","app":"app_api","method":"","url":"--","message":"ExApp test-deploy heartbeat check failed. Make sure that Nextcloud instance and ExApp can reach it other.","userAgent":"--","version":"32.0.1.2","data":{"app":"app_api"},"id":"68ff4c094387a"}

{"reqId":"q4GCis1duLs07TkXmRAs","level":3,"time":"2025-10-27T10:22:53+00:00","remoteAddr":"5.10.46.147","user":"welf","app":"app_api","method":"POST","url":"/apps/app_api/daemons/harp_proxy_host/test_deploy","message":"Error executing occ command. Return code: 1, stdout: , stderr: ","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0","version":"32.0.1.2","data":{"app":"app_api"},"id":"68ff4c0943854"}

{"reqId":"Z3cN9N5Hwl7rvmXVi9QR","level":3,"time":"2025-10-27T10:22:53+00:00","remoteAddr":"","user":"--","app":"app_api","method":"","url":"--","message":"ExApp test-deploy heartbeat check failed. Make sure that Nextcloud instance and ExApp can reach it other.","userAgent":"--","version":"32.0.1.2","data":{"app":"app_api"},"id":"68ff4c133f9fe"}

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/____:

error.log:

[Mon Oct 27 09:45:41.253722 2025] [php:notice] [pid 1237:tid 1237] [client 5.10.46.147:0] cURL error 7: Failed to connect to appapi-harp port 8780 after 1 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://appapi-harp:8780/exapps/app_api/v1.41/_ping

access.log:

5.10.46.147 - - [27/Oct/2025:09:44:05 +0000] "POST /apps/app_api/daemons/verify_connection HTTP/1.1" 200 733 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:44:30 +0000] "GET /apps/app_api/daemons HTTP/1.1" 200 1043 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:44:30 +0000] "PUT /apps/app_api/daemons/harp_proxy_host HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:44:36 +0000] "POST /apps/app_api/daemons/verify_connection HTTP/1.1" 200 733 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:45:41 +0000] "POST /apps/app_api/daemons/verify_connection HTTP/1.1" 200 734 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:45:44 +0000] "POST /apps/app_api/daemons/verify_connection HTTP/1.1" 200 733 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:45:50 +0000] "POST /apps/app_api/daemons/verify_connection HTTP/1.1" 200 733 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:45:57 +0000] "GET /apps/app_api/daemons/harp_proxy_host/test_deploy/status HTTP/1.1" 404 750 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:45:59 +0000] "POST /apps/app_api/daemons/harp_proxy_host/test_deploy HTTP/1.1" 500 769 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:47:25 +0000] "DELETE /apps/app_api/daemons/harp_proxy_host/test_deploy HTTP/1.1" 200 733 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:47:25 +0000] "GET /apps/app_api/daemons HTTP/1.1" 200 1043 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:47:27 +0000] "GET /apps/app_api/daemons HTTP/1.1" 200 1043 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:49:23 +0000] "POST /apps/app_api/daemons/verify_connection HTTP/1.1" 200 733 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:49:29 +0000] "GET /apps/app_api/daemons/harp_proxy_host/test_deploy/status HTTP/1.1" 404 750 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
5.10.46.147 - - [27/Oct/2025:09:49:31 +0000] "POST /apps/app_api/daemons/harp_proxy_host/test_deploy HTTP/1.1" 500 769 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"

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!):

as set in Docker Container nextcloud:stable-apache

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

The plain apache micro-services image is intended to be used behind an external reverse proxy. That’s also where the configuration you’re referencing would go.

If you’re looking for a more turnkey deployment, utilize Nextcloud AIO (which is also container based).

:face_with_spiral_eyes:
A webserver supporting PHP is neccessary to access NC - in any case.
This is why this is bundled in the Docker Container nextcloud:stable-apache. Which works very well so far.

Maybe i didn’t understand your comment.

Sorry for the missing link #44 . Just fixed it.

Here a set of hopefully more consistent messages.

appapi-harp logs:

    mode http
    bind 0.0.0.0:8780
    filter spoe engine exapps-spoe config /etc/haproxy/spoe-agent.conf
    http-request silent-drop if { var(txn.exapps.bad_request) -m int eq 1 }
    http-request return status 401 content-type text/plain string "401 Unauthorized" if { var(txn.exapps.unauthorized) -m int eq 1 }
    http-request return status 403 content-type text/plain string "403 Forbidden" if { var(txn.exapps.forbidden) -m int eq 1 }
    http-request return status 404 content-type text/plain string "404 Not Found" if { var(txn.exapps.not_found) -m int eq 1 }
    use_backend %[var(txn.exapps.backend)]
###############################################################################
# FRONTEND: ex_apps_https (only enabled if /certs/cert.pem exists)
###############################################################################
#_HTTPS_FRONTEND_ frontend ex_apps_https
#_HTTPS_FRONTEND_     mode http
#_HTTPS_FRONTEND_     bind 0.0.0.0:8781 ssl crt /certs/cert.pem
#_HTTPS_FRONTEND_     filter spoe engine exapps-spoe config /etc/haproxy/spoe-agent.conf
#_HTTPS_FRONTEND_     http-request silent-drop if { var(txn.exapps.bad_request) -m int eq 1 }
#_HTTPS_FRONTEND_     http-request return status 401 content-type text/plain string "401 Unauthorized" if { var(txn.exapps.unauthorized) -m int eq 1 }
#_HTTPS_FRONTEND_     http-request return status 403 content-type text/plain string "403 Forbidden" if { var(txn.exapps.forbidden) -m int eq 1 }
#_HTTPS_FRONTEND_     http-request return status 404 content-type text/plain string "404 Not Found" if { var(txn.exapps.not_found) -m int eq 1 }
#_HTTPS_FRONTEND_     use_backend %[var(txn.exapps.backend)]
###############################################################################
# BACKENDS: ex_apps & ex_apps_backend_w_bruteforce
###############################################################################
backend ex_apps_backend
    mode http
    server frp_server 0.0.0.0
    http-request set-path %[var(txn.exapps.target_path)]
    http-request set-dst var(txn.exapps.target_ip)
    http-request set-dst-port var(txn.exapps.target_port)
    http-request set-header EX-APP-ID %[var(txn.exapps.exapp_id)]
    http-request set-header EX-APP-VERSION %[var(txn.exapps.exapp_version)]
    http-request set-header AUTHORIZATION-APP-API %[var(txn.exapps.exapp_token)]
    http-request set-header AA-VERSION "32"  # TO-DO: temporary, remove it after we update all ExApps.
backend ex_apps_backend_w_bruteforce
    mode http
    server frp_server 0.0.0.0
    http-request set-path %[var(txn.exapps.target_path)]
    http-request set-dst var(txn.exapps.target_ip)
    http-request set-dst-port var(txn.exapps.target_port)
    http-request set-header EX-APP-ID %[var(txn.exapps.exapp_id)]
    http-request set-header EX-APP-VERSION %[var(txn.exapps.exapp_version)]
    http-request set-header AUTHORIZATION-APP-API %[var(txn.exapps.exapp_token)]
    http-request set-header AA-VERSION "32"  # TO-DO: temporary, remove it after we update all ExApps.
    filter spoe engine exapps-bruteforce-protection-spoe config /etc/haproxy/spoe-agent.conf
###############################################################################
# BACKEND: nextcloud_control (HTTP)
###############################################################################
backend nextcloud_control_backend
    mode http
    server nextcloud_control 127.0.0.1:8200
    http-request set-path %[var(txn.exapps.target_path)]
###############################################################################
# BACKEND: docker_engine (HTTP)
###############################################################################
backend docker_engine_backend
    mode http
    server frp_server 127.0.0.1
    http-request set-dst-port var(txn.exapps.target_port)
    http-request set-path %[var(txn.exapps.target_path)]
    # docker system _ping
    http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/_ping$ } METH_GET
    # docker inspect image
    http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/images/.*/json } METH_GET
    # container inspect: GET containers/%s/json
    http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/json } METH_GET
    # container inspect: GET containers/%s/logs
    http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/logs } METH_GET
    # image pull: POST images/create?fromImage=%s
    http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/images/create } METH_POST
    http-request deny
backend agents
      
    mode tcp
    timeout connect 5s
    timeout server  3m
    option spop-check
    server agent1 127.0.0.1:9600 check
INFO: /frps.toml already exists. Skipping FRP server configuration generation...
INFO: /frpc-docker.toml already exists. Skipping generation...
INFO: Starting Python HaProxy Agent on 127.0.0.1:8200 and 127.0.0.1:9600...
INFO: Starting FRP server on 0.0.0.0:8782...
INFO: Starting FRP client for Docker Engine...
INFO: Starting HAProxy...
[NOTICE]   (1) : Initializing new worker (27)
2025-10-29 11:46:40.234 [I] [sub/root.go:142] start frpc service for config file [/frpc-docker.toml]
2025-10-29 11:46:40.234 [I] [client/service.go:295] try to connect to server...
2025-10-29 11:46:40.267 [I] [client/service.go:287] [660b39a8989bc923] login to server success, get run id [660b39a8989bc923]
2025-10-29 11:46:40.267 [I] [proxy/proxy_manager.go:173] [660b39a8989bc923] proxy added: [bundled-deploy-daemon]
2025-10-29 11:46:40.273 [I] [client/control.go:168] [660b39a8989bc923] [bundled-deploy-daemon] start proxy success
[NOTICE]   (1) : Loading success.

nc_app_test-deploy log:

HP_SHARED_KEY is set, creating /frpc.toml configuration file…
Directory /certs/frp not found. Creating configuration without TLS certificates.
Starting frpc in the background…
Starting main application…
2025-10-29 10:47:16.658 [I] [sub/root.go:142] start frpc service for config file [/frpc.toml]
2025-10-29 10:47:16.681 [I] [client/service.go:295] try to connect to server…
2025-10-29 10:47:16.695 [W] [client/service.go:298] connect to server error: session shutdown
2025-10-29 10:47:16.696 [I] [sub/root.go:160] frpc service for config file [/frpc.toml] stopped
login to the server failed: session shutdown. With loginFailExit enabled, no additional retries will be attempted
Started
INFO:     Started server process [1]
INFO:     Waiting for application startup.
TRACE:    ASGI [1] Started scope={‘type’: ‘lifespan’, ‘asgi’: {‘version’: ‘3.0’, ‘spec_version’: ‘2.0’}, ‘state’: {}}
TRACE:    ASGI [1] Receive {‘type’: ‘lifespan.startup’}
TRACE:    ASGI [1] Send {‘type’: ‘lifespan.startup.complete’}
INFO:     Application startup complete.
INFO:     Uvicorn running on unix socket /tmp/exapp.sock (Press CTRL+C to quit)
HP_SHARED_KEY is set, creating /frpc.toml configuration file…
Found /certs/frp directory. Creating configuration with TLS certificates.
Starting frpc in the background…
Starting main application…
2025-10-29 10:47:34.078 [I] [sub/root.go:142] start frpc service for config file [/frpc.toml]
2025-10-29 10:47:34.080 [I] [client/service.go:295] try to connect to server…
2025-10-29 10:47:34.134 [I] [client/service.go:287] [fd4688cc4081d9b3] login to server success, get run id [fd4688cc4081d9b3]
2025-10-29 10:47:34.134 [I] [proxy/proxy_manager.go:173] [fd4688cc4081d9b3] proxy added: [test-deploy]
2025-10-29 10:47:34.137 [I] [client/control.go:168] [fd4688cc4081d9b3] [test-deploy] start proxy success
Started
INFO:     Started server process [1]
INFO:     Waiting for application startup.
TRACE:    ASGI [1] Started scope={‘type’: ‘lifespan’, ‘asgi’: {‘version’: ‘3.0’, ‘spec_version’: ‘2.0’}, ‘state’: {}}
TRACE:    ASGI [1] Receive {‘type’: ‘lifespan.startup’}
TRACE:    ASGI [1] Send {‘type’: ‘lifespan.startup.complete’}
INFO:     Application startup complete.
INFO:     Uvicorn running on unix socket /tmp/exapp.sock (Press CTRL+C to quit)

Apaches (inside docker container nextcloud:stable-apache) access.log:

178.208.102.193 - - [29/Oct/2025:10:45:33 +0000] “GET /settings/admin/app_api HTTP/1.1” 200 10604 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:45:37 +0000] “GET /apps/app_api/l10n/de.js?v=31f6462c-0 HTTP/1.1” 200 9410 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:45:37 +0000] “GET /apps/app_api/js/app_api-adminSettings.js?v=31f6462c-0 HTTP/1.1” 200 660530 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:45:45 +0000] “POST /apps/app_api/daemons/verify_connection HTTP/1.1” 200 734 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:45:55 +0000] “POST /apps/app_api/daemons/verify_connection HTTP/1.1” 200 734 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:47:01 +0000] “POST /apps/app_api/daemons/verify_connection HTTP/1.1” 200 733 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:47:10 +0000] “GET /apps/app_api/daemons/harp_proxy_host/test_deploy/status HTTP/1.1” 404 750 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:47:12 +0000] “POST /apps/app_api/daemons/harp_proxy_host/test_deploy HTTP/1.1” 500 769 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:48:40 +0000] “GET /apps/app_api/daemons HTTP/1.1” 200 1043 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:48:40 +0000] “DELETE /apps/app_api/daemons/harp_proxy_host/test_deploy HTTP/1.1” 200 733 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”
178.208.102.193 - - [29/Oct/2025:10:48:42 +0000] “GET /apps/app_api/daemons HTTP/1.1” 200 1043 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0”

Apaches (inside docker container nextcloud:stable-apache) error.log:

[Wed Oct 29 10:45:36.938828 2025] [php:notice] [pid 78:tid 78] [client 178.208.102.193:0] cURL error 28: Operation timed out after 3002 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://appapi-harp:8780/exapps/app_api/v1.41/_ping
[Wed Oct 29 10:45:48.374281 2025] [php:notice] [pid 94:tid 94] [client 178.208.102.193:0] cURL error 28: Operation timed out after 3002 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://appapi-harp:8780/exapps/app_api/v1.41/_ping
[Wed Oct 29 10:45:58.181916 2025] [php:notice] [pid 68:tid 68] [client 178.208.102.193:0] cURL error 28: Operation timed out after 3002 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://appapi-harp:8780/exapps/app_api/v1.41/_ping

appapi-harp is the name of the docker container running nextcloud-appapi-harp:release.
It is reachable from inside the docker container running apache and NC:

root@a4ad403f87fb:/var/www/html/config# curl -v telnet://appapi-harp:8780

  • Host appapi-harp:8780 was resolved.
  • IPv6: (none)
  • IPv4: 172.21.0.4
  • Trying 172.21.0.4:8780…
  • Connected to appapi-harp (172.21.0.4) port 8780
    GET /exapps/app_api/v1.41/_ping HTTP/1.1
    Host: appapi-harp

HTTP/1.1 401 Unauthorized
content-length: 16
content-type: text/plain

The containers have a common network nextcloud_default.

/btw
Which is the user i’d have to use with curl and the password from HP_SHARED_KEY?

Ports 8780 and 8782 are open:

UID          PID    PPID  C STIME TTY          TIME CMD
root       16694    1527  0 11:46 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8780 -container-ip 172.23.0.2 -container-port 8780 -use-listen-fd
root       16700    1527  0 11:46 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8780 -container-ip 172.23.0.2 -container-port 8780 -use-listen-fd
root       16709    1527  0 11:46 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8782 -container-ip 172.23.0.2 -container-port 8782 -use-listen-fd
root       16716    1527  0 11:46 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8782 -container-ip 172.23.0.2 -container-port 8782 -use-listen-fd

According to Configuring Your Reverse Proxy :

HaRP requires your reverse proxy to forward traffic from your public domain (e.g., nextcloud.com/exapps/) to the HaRP container’s HP_EXAPPS_ADDRESS.

but there is no example for Apache.
I guess, this is missing in the Docker Container nextcloud:stable-apache.
Apache example for “Configuring Your Reverse Proxy”? · Issue #44 · nextcloud/HaRP suggests such a configuration.