Harp Nextcloud Access

Prior works like Siyu et al. (2022) integrated blockchains with cloud storage for audit trails. Harp uses a lightweight, permissionless hash chain stored locally per user — no proof-of-work required.

Have you deployed Harp with Nextcloud? Share your experiences in the comments below.

This paper outlines the role and architecture of HaRP (High-performance AppAPI Reverse Proxy) within the Nextcloud ecosystem, particularly its necessity for Nextcloud 32+ and its support for WebSockets in External Apps (ExApps). HaRP: The High-Performance Gateway for Nextcloud ExApps

Modern cloud collaboration platforms are increasingly moving toward microservices to handle resource-intensive tasks like AI and real-time document editing. Nextcloud’s AppAPI framework allows developers to build "External Apps" (ExApps) in any language. However, traditional proxy methods often bottlenecked performance and lacked support for real-time protocols. This paper explores HaRP, the recommended proxy for Nextcloud 32+, which optimizes communication by bypassing the standard PHP stack and providing secure tunneling via FRP (Fast Reverse Proxy). 1. Introduction

Historically, Nextcloud relied on the Docker Socket Proxy (DSP) to manage external integrations. While functional, DSP is being deprecated—with removal scheduled for Nextcloud 35—due to its complexity and inability to support modern protocols like WebSockets. HaRP (Nextcloud AppAPI HaProxy Reverse Proxy) serves as a modern replacement, designed to simplify deployment while significantly boosting performance for real-time features. 2. Key Architectural Components harp nextcloud

HaRP introduces several architectural improvements over its predecessor:

Direct Communication Path: Unlike previous setups, HaRP routes requests directly to ExApps, bypassing the Nextcloud PHP process. This reduces latency and saves server resources.

FRP-Based Tunneling: Using Fast Reverse Proxy (FRP) tunnels, ExApp containers do not need to expose ports to the host or be directly reachable from the main Nextcloud server. This enables easier NAT traversal and deployment on remote hosts, such as specialized GPU servers for AI workloads.

WebSocket Support: One of HaRP's primary advantages is enabling end-to-end WebSocket traffic. This eliminates the need for inefficient polling, allowing for cleaner real-time architectures in Nextcloud Hub. 3. Deployment and Security HaRP is designed to be highly secure and flexible: Prior works like Siyu et al

Authentication & Protection: It includes built-in brute-force protection and uses secret tokens (HP_SHARED_KEY) for authentication between services.

Automated TLS: The system automatically generates the necessary certificates for FRP communications, ensuring secure tunnels by default.

Multi-Docker Management: A single HaRP instance can manage multiple Docker engines, facilitating large-scale distributed environments. 4. Conclusion

As Nextcloud moves toward version 35, the transition from DSP to HaRP is critical for administrators and developers. By providing a future-proof path for External Apps, HaRP ensures that Nextcloud remains a scalable, low-latency platform capable of supporting the next generation of real-time collaboration tools. Adapting ExApps to HaRP - Nextcloud Documentation Then enable it via occ : sudo -u

Inside your Nextcloud apps directory:

git clone https://github.com/harp-net/nextcloud-harpbridge /var/www/html/apps/harpbridge

Then enable it via occ:

sudo -u www-data php occ app:enable harpbridge

Note: As of the latest release, this requires Docker and experimental plugins. Always back up your config.php.

When two nodes (e.g., a laptop and a Nextcloud server) reconnect after offline periods:

  • Generate a new merge commit hash and sync to both sides.
  • Unlike standard Nextcloud conflict files (conflicted copy), Harp preserves a linearized history.