If your environment specifically uses Harp as a static build server:
This is where the magic happens. From your local terminal (inside the nextcloud-harp folder), run:
harp deploy
What happens behind the scenes?
This process takes approximately 3-5 minutes.
objectStore: enabled: true type: s3 s3: bucket: nextcloud-data region: us-east-1 endpoint: https://minio.example.com accessKey: "minioadmin" secretKey: "minioadmin123"
mariadb: enabled: true auth: existingSecret: mariadb-secret database: nextcloud username: nextcloud primary: persistence: enabled: true size: 20Gi
ingress: enabled: true ingressClassName: traefik hostname: nextcloud.example.com tls: true annotations: cert-manager.io/cluster-issuer: letsencrypt-prod
"features":
"search":
"engine": "elasticsearch",
"version": "8.x"
Create an Ansible playbook that deploys a lightweight K3s cluster (ideal for edge/self-hosted) or a full K8s on VMs.
provision-cluster.yml (excerpt):
- hosts: all
become: yes
roles:
- role: xanmanning.k3s
vars:
k3s_version: v1.27.4+k3s1
k3s_server_manifests_templates:
- longhorn.yaml
k3s_install_hard_links: true
Run:
ansible-playbook -i inventory/hosts.ini provision-cluster.yml
Then import the cluster into Rancher via the rancher2 Ansible module or Rancher UI.
This guide assumes "HARP" refers to a Linux server/environment (e.g., a host named HARP). If you meant a different HARP (Harp static site server, HARP stack, or a hosting provider), tell me and I’ll adapt.
Prerequisites
Step 1 — Update system
Step 2 — Install required packages
Step 3 — Secure and configure MariaDB
Step 4 — Download Nextcloud
Step 5 — Configure PHP
Step 6 — Nginx site config
Step 7 — Obtain HTTPS certificate
Step 8 — Complete web-based setup
Step 9 — Recommended post-install
Troubleshooting tips
If you want, I can:
(High-performance AppAPI Reverse Proxy) is the modern, recommended deployment daemon for Nextcloud 32+
, designed to bridge the gap between your core Nextcloud instance and External Apps (ExApps)
. While traditional Nextcloud setups rely on a local PHP stack, HaRP uses FRP (Fast Reverse Proxy)
tunnels to allow ExApps—which can be written in any language—to communicate securely without exposing ports or requiring complex network rules. Core Architecture
HaRP functions as a specialized reverse proxy that sits behind your primary web server (like Nginx or Caddy). Its primary roles include: Direct Routing
: It routes traffic directly from the client to ExApps, bypassing the heavy Nextcloud PHP process to improve performance. WebSocket Support
: Unlike older methods, HaRP enables full end-to-end WebSocket support for real-time features in external apps. harp nextcloud install
: It uses FRP to create outbound connections from ExApps back to the daemon, solving issues with NAT traversal and internal firewall restrictions. Installation & Deployment Steps For a standard Docker-based setup , follow these streamlined steps: Deploy the HaRP Container
: Run the daemon where your main reverse proxy can reach it. docker run -d \ --name appapi-harp \ -e HP_SHARED_KEY= "your_secure_key" \ -e NC_INSTANCE_URL= "https://yourcloud.com" \ -v /var/run/docker.sock:/var/run/docker.sock \ -p \ ghcr.io/nextcloud/nextcloud-appapi-harp:release Use code with caution. Copied to clipboard Register the Daemon Navigate to your Nextcloud Admin Settings Register Daemon and select the HaRP Proxy (Host) HP_SHARED_KEY used in your Docker command to establish the link. Configure Main Reverse Proxy : Update your primary proxy (e.g., Nginx) to redirect requests to the HaRP container on port Best Practices for Stability Version Compatibility : Ensure you are running Nextcloud 32 or higher for full support, as older methods are being deprecated. Network Security
: Launch the HaRP container within the same Docker network as your Nextcloud instance to limit external exposure. Internal Heartbeats
: If deploying in complex environments like Kubernetes, ensure internal routing is configured so the Nextcloud server can reach the /heartbeat endpoint through the proxy without throwing 404 errors. Docker Compose file to integrate HaRP with your existing Nextcloud setup? AppAPI and External Apps - Nextcloud Documentation
Since you are looking to install Nextcloud HaRP (HTTP Autoregister Reverse Proxy), this draft post outlines the steps to set up the new proxy system designed for Nextcloud 32+ External Apps (ExApps). Draft Post: Setting Up Nextcloud HaRP for External Apps
OverviewNextcloud has introduced HaRP (HTTP Autoregister Reverse Proxy) to replace the older DockerSocketProxy method. HaRP allows External Apps (ExApps) to communicate directly with clients via WebSockets and high-performance proxies without taxing the main PHP stack. 1. Prerequisites
Nextcloud Version: 32 or later is recommended, as older methods (DSP) are being deprecated.
Docker Environment: A running Docker engine where you can host the HaRP container.
Network: Ensure the HaRP container can reach your Nextcloud instance (ideally on the same Docker network). 2. Deploying the HaRP Container
Run the HaRP container using Docker. You must define a shared key and your Nextcloud URL.
docker run -d \ --name nextcloud-harp \ --network nextcloud_network \ -e HP_SHARED_KEY="your_secure_password" \ -e NC_INSTANCE_URL="https://your-nextcloud-domain.com" \ -p 8780:8780 \ -p 8782:8782 \ ghcr.io/nextcloud/nextcloud-appapi-harp:release Use code with caution. Copied to clipboard Port 8780: Main proxy port for ExApps. Port 8782: FRP server port for external app connections. 3. Registering the Daemon in Nextcloud
Once the container is running, link it to your Nextcloud instance: Navigate to Settings > Administration > AppAPI. Click Register Daemon. Fill in the details: Display Name: HaRP Proxy Deployment Method: docker-install HaRP Host: HaRP Shared Key: (Must match HP_SHARED_KEY from Step 2) Click Check Connection and then Register. 4. Configuring Your Main Reverse Proxy
To allow external traffic to reach your apps through HaRP, add a redirect in your main proxy (e.g., Nginx or Apache) to forward /exapps/ requests to the HaRP container at port 8780.
Troubleshooting Tip: If you encounter a 404 Invalid request path error, verify that your Nextcloud URL in the NC_INSTANCE_URL variable exactly matches your actual instance URL, including the protocol (http/https).
nextcloud/HaRP: Fast Proxy for AppAPI(Nextcloud 32+) - GitHub If your environment specifically uses Harp as a
Setting Up Nextcloud HaRP for External Apps HaRP (Homeland App Runtime Platform) is the high-performance proxy bridge introduced in Nextcloud 32+ to facilitate External Apps (ExApps) like AI assistants and advanced office integrations. It replaces the older Docker Socket Proxy (DSP) by providing dedicated support for WebSockets and direct routing, which improves performance by bypassing the PHP stack. 1. Deploy the HaRP Container
The HaRP container acts as the intermediary between your Nextcloud instance and the external app containers.
Docker Pull: Ensure you have the latest image from the Nextcloud HaRP GitHub.
Networking: Launch the HaRP container on the same Docker network as your Nextcloud instance to ensure they can communicate.
Shared Key: Set a secure HP_SHARED_KEY environment variable in your Docker compose or run command. This key must match what you later enter in the Nextcloud UI. Example Command:
docker run -d --name nextcloud-appapi-harp \ --network nextcloud-net \ -e HP_SHARED_KEY="your_secure_key" \ -p 8780:8780 -p 8782:8782 \ nextcloud/nextcloud-appapi-harp:latest Use code with caution. Copied to clipboard 2. Configure Your Reverse Proxy
Because HaRP handles specific traffic for ExApps (often at /exapps/), you must update your main reverse proxy (e.g., Nginx Proxy Manager, Caddy) to redirect these requests.
Endpoint: Requests to https://your-domain.com should be forwarded to the HaRP container's internal IP at port 8780.
WebSocket Support: Ensure your proxy configuration allows WebSocket upgrades for this path to enable real-time features. 3. Register the Daemon in Nextcloud
Once the container is running, you must link it to your Nextcloud instance via the AppAPI settings. Navigate to Administration settings > AppAPI. Click Register Daemon. Choose the appropriate preset:
HaRP Proxy (Host): For standard setups where ports are exposed to the host.
HaRP Proxy (Docker): If using a custom Docker network without exposed ports. HaRP All-in-One: Specifically for Nextcloud AIO users. Enter the Shared Key you defined in Step 1. Click Check connection and then Register. 4. Transitioning from DSP (Optional)
If you are upgrading an existing installation that uses the old Docker Socket Proxy: Install HaRP on the same engine.
Set HaRP as the default deployment daemon in the AppAPI settings.
Remove your existing ExApps (do not delete their data volumes) and reinstall them; they will now deploy via HaRP. Safely remove the old DSP container. Troubleshooting Common Issues AppAPI and External Apps - Nextcloud Documentation This is where the magic happens