Harp | Nextcloud

We implemented Harp as a Nextcloud app (PHP 8.2) with a companion daemon (Rust) for DAG operations and sync. The Rust component communicates via Unix sockets to avoid blocking PHP-FPM.

Key code snippet – hash chain insertion:

fn append_metadata(prev_hash: &[u8; 32], meta: &Metadata) -> [u8; 32] 
    let mut hasher = Sha3_256::new();
    hasher.update(meta.serialize());
    hasher.update(prev_hash);
    hasher.finalize().into()

Nextcloud hook registration (PHP):

\OCP\Util::connectHook('OC_Filesystem', 'post_write', '\OCA\Harp\Hooks', 'onFileChange');

Nextcloud is brilliant for storage and management. You get CalDAV, CardDAV, rich editing, and app ecosystems. However, default file access relies on the traditional WebDAV protocol. When you download a 50GB video file from your Nextcloud instance:

If the server is underpowered or far away, this fails. Harp bypasses the server entirely.

The core philosophy of Nextcloud is not merely software; it is "Digital Sovereignty." This term, often used in political science and cybersecurity, refers to the right and ability of individuals or organizations to control their own digital destiny.

When we use proprietary cloud services (Google Drive, Dropbox, iCloud), we are engaging in a form of digital tenancy. We rent space in a fortress we cannot see, guarded by sentinels we do not know. Nextcloud shifts this paradigm by allowing anyone to turn a spare computer, a rack server, or even a humble Raspberry Pi into a private cloud.

This shift is profound. It changes the internet from a series of centralized hubs (spokes) into a true decentralized network. In a Nextcloud world, your data lives in your home, or in a data center you contract with directly, encrypted with keys that only you possess. The software acts as a bridge between the complexity of server administration and the usability of a modern web interface. It makes the harp playable without requiring the musician to be a master carpenter.

Investigative journalists cannot trust central cloud servers. With Harp+Nextcloud, the Nextcloud server can be hosted on a cheap VPS (for search and indexing), but the actual document files never touch that VPS. They travel directly between journalists’ laptops via encrypted P2P.


We presented Harp Nextcloud, a practical extension that brings decentralized metadata reconciliation and verifiable integrity to the Nextcloud ecosystem. Our prototype demonstrates significant reductions in sync conflicts and recovery time, with modest overhead. Future work includes:

The Harp protocol is independent of Nextcloud and could be adapted to ownCloud or Seafile. Source code and benchmarks are available at: https://github.com/harp-nextcloud/harp-core (placeholder).


Before we discuss the solution, we must diagnose the pain points of current systems:

Harp solves the transfer problem. Nextcloud solves the organization problem.


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. harp nextcloud

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

In the evolving landscape of self-hosted microservices, HaRP (High-performance AppAPI Reverse Proxy) represents a fundamental shift in how Nextcloud interacts with external applications. Introduced for Nextcloud 32+, HaRP replaces the legacy Docker Socket Proxy (DSP) system, offering a more robust, scalable way to integrate specialized tools—like AI assistants or real-time collaboration editors—directly into your Hub. The Core Philosophy of HaRP

At its heart, HaRP acts as a dedicated traffic controller for the Nextcloud AppAPI. Unlike the old method that forced all traffic through the heavy Nextcloud PHP process, HaRP creates a direct bypass.

Bypassing the Bottleneck: It routes client requests directly to External Apps (ExApps), drastically reducing latency and freeing up server resources.

Protocol Freedom: By moving away from purely PHP-based routing, HaRP finally enables full WebSocket support for ExApps. This means real-time features like instant chat updates and collaborative whiteboarding no longer rely on inefficient "polling".

Zero-Config Tunneling: Using the FRP (Fast Reverse Proxy) protocol, HaRP allows ExApps to initiate outgoing connections. This eliminates the need to open risky firewall ports or manage complex NAT rules. Architectural Impact

HaRP is designed for distributed power. It allows you to run resource-heavy applications—such as AI models requiring high-end GPUs—on separate physical hardware while maintaining a seamless user experience within the main Nextcloud interface. A single HaRP instance can even manage up to 99 different Docker Engines across your network. Why You Should Care

If you are a maintainer or power user, the message from the Nextcloud Developer Manual is clear: DSP is legacy. It is scheduled for removal in Nextcloud 35. Switching to HaRP now ensures your ecosystem is future-proof, more secure with its built-in brute-force protection, and significantly faster.

Are you planning a migration from DSP or starting a fresh Nextcloud 32 install? I can help you with: The docker-compose configuration for a HaRP setup. Integrating ExApps on a remote GPU server. Configuring NGINX or Caddy to sit in front of HaRP. AIO and HARP for ExApp running remotely - ℹ️ Support

Title: "Unlocking Nextcloud's Potential with HARPs: A New Era of Heterogeneous Processing"

Introduction

Nextcloud has revolutionized the way we store, manage, and share data. As a popular self-hosted cloud storage solution, it offers a flexible and secure way to access files from anywhere. However, with the ever-growing demands of data processing, storage, and analysis, Nextcloud's capabilities can be further enhanced by leveraging Heterogeneous and Reconfigurable Processing Systems (HARPs). In this article, we'll explore the concept of HARPs and their potential integration with Nextcloud.

What are HARPs?

HARPs are novel computing architectures that combine the benefits of heterogeneous processing, reconfigurable computing, and hybrid memory systems. These systems enable efficient processing of diverse workloads, such as data analytics, machine learning, and scientific simulations. By incorporating Field-Programmable Gate Arrays (FPGAs), Graphics Processing Units (GPUs), and Central Processing Units (CPUs), HARPs offer unparalleled flexibility and performance.

Benefits of Integrating HARPs with Nextcloud

The integration of HARPs with Nextcloud can bring significant advantages, including:

Potential Use Cases

The combination of HARPs and Nextcloud can enable a range of exciting use cases:

Conclusion

The integration of HARPs with Nextcloud holds tremendous potential for enhancing the performance, security, and scalability of self-hosted cloud storage solutions. By leveraging the benefits of heterogeneous and reconfigurable processing, Nextcloud deployments can unlock new capabilities, improve efficiency, and provide a more responsive and secure experience for users. As the development of HARPs continues to advance, we can expect to see innovative applications and use cases emerge, further expanding the possibilities of Nextcloud and similar cloud storage solutions.

HaRP (High-performance AppAPI Reverse Proxy) is the modern networking backbone for Nextcloud’s External Apps (ExApps) ecosystem. Introduced as the recommended deployment daemon starting with Nextcloud Hub 32, HaRP replaces the older Docker Socket Proxy (DSP) to provide better performance, easier remote deployments, and native support for real-time protocols like WebSockets. What is Nextcloud HaRP?

HaRP is a specialized reverse proxy system designed to sit between your main web server (like Nginx or Apache) and individual External Apps. While traditional Nextcloud apps are written in PHP and run within the core server process, ExApps are standalone microservices—often written in Python, Rust, or Go—that run in their own Docker containers. HaRP serves two primary functions:

Deployment Management: It communicates with the Docker Engine to create, start, and stop ExApp containers.

Traffic Routing: It routes client requests directly to these containers, bypassing the Nextcloud PHP stack entirely for improved efficiency. Key Benefits of HaRP over Docker Socket Proxy (DSP)

WebSocket Support: Unlike the legacy proxy, HaRP enables full end-to-end WebSocket communication, allowing ExApps to feature real-time collaborative editing and live dashboards.

NAT Traversal with FRP: HaRP uses Fast Reverse Proxy (FRP) tunnels. This means ExApp containers do not need to expose any ports to the host or even be directly reachable by the Nextcloud server. We implemented Harp as a Nextcloud app (PHP 8

Simplified Remote Deployment: HaRP makes it significantly easier to run ExApps on a different physical server than the main Nextcloud instance.

Improved Security: By using a shared key and dedicated certificates, HaRP provides a more robust security model for managing external microservices. How to Install and Configure HaRP

For most users, especially those using Nextcloud All-in-One (AIO), HaRP is being integrated as the default option.

WebSockets in Nextcloud: creating real‑time apps via AppAPI

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

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. Nextcloud is brilliant for storage and management

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