Harp Nextcloud — Install !new!
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 harp nextcloud install
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
Unlocking High-Performance Microservices: A Guide to Nextcloud HaRP
Nextcloud has evolved from a simple file-sharing tool into a comprehensive productivity suite. With the release of Nextcloud 32, a new architectural component called HaRP (High-performance AppAPI Reverse Proxy)
has become the recommended way to manage "ExApps"—external applications that run as microservices outside the main PHP stack.
This guide explores what HaRP is, why it’s essential for modern Nextcloud deployments, and how to install it. What is HaRP? Historically, Nextcloud used a Docker Socket Proxy (DSP) Since you are looking to install Nextcloud HaRP
to manage external apps. However, DSP had limitations, particularly with real-time features like WebSockets.
replaces the old system by acting as a fast reverse proxy that: Enables WebSockets : Allows real-time communication for apps like Nextcloud Talk without passing through the heavy PHP stack. Simplifies Networking
: ExApps no longer need to expose ports to the host; they connect outbound to HaRP using an internal FRP (Fast Reverse Proxy) client. Improves Performance
: Reduces resource overhead by routing traffic directly to the containerized microservices. Prerequisites Before you begin, ensure you have: Nextcloud 32 or higher installed. Docker and Docker Compose set up on your server. app enabled within your Nextcloud instance. Step 1: Deploy the HaRP Container
HaRP is distributed as a Docker image. You can deploy it using a simple docker run command or a Compose file. Essential Environment Variables: HP_SHARED_KEY : A secure password shared between Nextcloud and HaRP. NC_INSTANCE_URL : The URL of your Nextcloud instance (e.g.,
Here’s a concise review of installing Nextcloud via HARP (likely referring to a hosting platform or automated deployment script — if you meant a specific service like HARP Platform or HARP.io, let me know). I’ll focus on the general experience of using a pre-configured HARP-based Nextcloud deployment.
Step 7: Monitoring & Backup with Rancher
Step 5: CI/CD Pipeline (GitLab Example)
Create .gitlab-ci.yml to automate upgrades and security patches. Step 7: Monitoring & Backup with Rancher Step
stages: - validate - deployvariables: HELM_RELEASE: nextcloud NAMESPACE: nextcloud CHART_VERSION: "4.5.0" # update weekly
before_script:
- apk add helm kubectl curl
- kubectl config use-context rancher/project-xxx/nextcloud
validate: stage: validate script: - helm lint nextcloud/ - kubeval nextcloud-values.yaml
deploy: stage: deploy only: - main script: - helm upgrade --install $HELM_RELEASE bitnami/nextcloud --namespace $NAMESPACE --values nextcloud-values.yaml --version $CHART_VERSION --set image.tag=latest - kubectl rollout status statefulset/nextcloud -n $NAMESPACE
Add a weekly scheduled pipeline to check for new Nextcloud images and re-deploy.
Step 3: Writing the harp.json Configuration for Nextcloud
This is the heart of the harp nextcloud install. Paste the following configuration, replacing the placeholders with your actual values.
"app": "nextcloud",
"version": "1.0.0",
"domain": "cloud.yourdomain.com", // CHANGE THIS
"server":
"host": "your-server-ip", // CHANGE THIS
"user": "root",
"ssh_key": "~/.ssh/id_rsa"
,
"services":
"database":
"type": "postgres",
"version": "15",
"credentials":
"db_name": "nextcloud_db",
"username": "nextcloud_user",
// Generate a strong password here!
"password": "YOUR_STRONG_DB_PASSWORD"
,
"cache":
"type": "redis",
"version": "7"
,
"webserver":
"type": "nginx",
"php_version": "8.2"
,
"env":
"NEXTCLOUD_ADMIN_USER": "admin",
"NEXTCLOUD_ADMIN_PASSWORD": "YOUR_ADMIN_PASSWORD", // CHANGE THIS
"NEXTCLOUD_TRUSTED_DOMAINS": "cloud.yourdomain.com",
"NEXTCLOUD_DEFAULT_PHONE_REGION": "US"
,
"storage":
"data": "/var/nextcloud/data"
,
"features":
"lets_encrypt": true,
"backup":
"enabled": true,
"schedule": "0 2 * * *", // 2 AM daily
"retention_days": 7
,
"cron": true // For Nextcloud background jobs