How to setup AppAPI

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):
    • latest
  • Operating system and version (e.g., Ubuntu 24.04):
    • Rocky Linux 9
  • Web server and version (e.g, Apache 2.4.25):
    • Apache
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • replace me
  • PHP version (e.g, 8.3):
    • replace me
  • Is this the first time you’ve seen this error? (Yes / No):
    • n.a.
  • When did this problem seem to first start?
    • with setting up
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • replace me
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

Which setting up for AppAPI must I use?

Apache with Nextclouds runs direct in the system.
Docker is setup.

I’m trying the script below:

#! /usr/bin/bash
docker run
-e HP_SHARED_KEY=“**********”
-e NC_INSTANCE_URL="https://cloud.xxxx.nl
-v /var/run/docker.sock:/var/run/docker.sock
-v pwd/certs:/certs
–name appapi-harp
-h appapi-harp
–restart unless-stopped
-p 8780:8780
-p 8782:8782
-d Package nextcloud-appapi-harp · GitHub

From which directory must I run it?

Why are the certs installed in the /root/ directory anddo I need them?

Which option to use in the nextcloud AppAPI setup page?

See: AppAPI

Hello, to help you, we unfortunately need to clarify a few questions first.

  • Do you use a reverse proxy in front of your Nextcloud?
  • What kind of installation are you using? AIO, Bare Metal, SNAP

It will be difficult without this information. You don’t need to worry about the certificates; that happens automatically in the background.

Bare metal

No reverse proxy.

Okay, let’s give it a try.

First, please edit your initial post and change your URL to my.cloud.nl. Please do not post your actual address here in the forum.

The original code is

docker run \
  -e HP_SHARED_KEY="some_very_secure_password" \
  -e NC_INSTANCE_URL="https://127.0.0.1:8080" \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v `pwd`/certs:/certs \
  --name appapi-harp -h appapi-harp \
  --restart unless-stopped \
  -p 8780:8780 \
  -p 8782:8782 \
  -d ghcr.io/nextcloud/nextcloud-appapi-harp:release

You should use this one as well. You can create the password using openssl rand -hex 32.

Test whether you can use the local IP 127.0.0.1, since everything is running on the same system.

My configuration

This is my command for creating the Docker container.

However, I have a proxy manager in front of it. In principle, though, it should work for you too. You would just need to set NC_INSTANCE_URL to https://your.url and HP_EXAPPS_ADDRESS to your server’s IP address.

docker run \
-e HP_SHARED_KEY="PASSWORT" \
-e NC_INSTANCE_URL="http://DOMAIN" \
-e HP_EXAPPS_ADDRESS="INTERNE-IP:8780" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`/certs:/certs \
--name appapi-harp -h appapi-harp \
--restart unless-stopped \
--network host \
-d ghcr.io/nextcloud/nextcloud-appapi-harp:release

NC_INSTANCE_URL=“https://127.0.0.1:8080” doesn’t work.
8080 is not used in the system and the webserver only rsponds to URL’s.

The password trick is a good option to use.

How is this used? -v `pwd`/certs:/certs \

When I run the image the certificates are installed in the working directory, in my case /root/certs.
What is the best directory to get them in and do I need them at all?

I not familiar whit docker

See AppAPI for what I have done. Its my website.