Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 27, 2025

Nextcloud 32 recommends HaRP (AppAPI HaProxy Reversed Proxy) over Docker Socket Proxy for ExApp deployments. This PR implements HaRP support while maintaining full backward compatibility with DSP.

Changes

Core Implementation

  • start.sh: Entry point script from HaRP repository that conditionally starts FRP client when HP_SHARED_KEY is present, passes through to normal startup otherwise
  • Dockerfile: Install FRP client via Alpine package manager (apk add frp), add curl and bash dependencies, update ENTRYPOINT to use start.sh wrapper
  • Simplified Installation: Uses native Alpine 3.21 FRP package instead of manual binary download

Documentation

  • Updated Prerequisites to recommend HaRP for NC32+
  • Added concise HaRP Support section with link to official documentation

Compatibility

Works transparently with both deployment methods:

Deployment HP_SHARED_KEY Behavior
HaRP Set FRP client runs, connects to HaRP
DSP Unset Direct startup, no FRP overhead

TLS automatically enabled when /certs/frp directory is present.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature] HaRP support</issue_title>
<issue_description>Since Nextcloud 32, HaRP (AppAPI HaProxy Reversed Proxy) is recommended instead of Docker Socket Proxy. Are there any plans to adapt workflow_ocr_backend?

https://github.com/nextcloud/HaRP/#adapting-exapps-to-use-harp</issue_description>

<agent_instructions>Do adjustments mentioned in https://github.com/nextcloud/HaRP/#adapting-exapps-to-use-harp</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@R0Wi Thanks for the heads up! Good to know that there is some action needed 😄 Will definitely look into this.

Would you volunteer to test the new version? So is your HA proxy already running properly?</comment_new>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add HaRP support for workflow_ocr_backend Add HaRP support for Nextcloud 32+ Oct 27, 2025
Copilot AI requested a review from R0Wi October 27, 2025 18:51
Copilot AI requested a review from R0Wi October 27, 2025 19:30
@R0Wi R0Wi force-pushed the copilot/add-harp-support branch 2 times, most recently from e6f035b to 7835aca Compare October 28, 2025 12:10
Copilot AI and others added 5 commits October 28, 2025 12:18
Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>
Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>
Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>
* Add docker socket to devcontainer
* Consolidate chmod +x for start.sh
@R0Wi R0Wi force-pushed the copilot/add-harp-support branch from 7835aca to b9582cf Compare October 28, 2025 12:18
* Ensure containers "serviceuser" is able to write /frpc.toml
* Write python integration tests to ensure container is able to start properly with frpc enabled
@R0Wi R0Wi force-pushed the copilot/add-harp-support branch from b8e31c0 to 528f684 Compare October 30, 2025 17:14
@R0Wi R0Wi force-pushed the copilot/add-harp-support branch from 528f684 to 8f092d8 Compare October 30, 2025 17:17
R0Wi added 3 commits November 2, 2025 20:11
* Switch to "gosu" to start the main process as "serviceuser" instead of using docker "USER" directive
* Default user for docker commands will be root now (so NC docker commands are able to copy certs etc)
* Let serviceuser own /certs directory so that frpc process is able to use the certs from there
@github-actions
Copy link

Code Coverage

Package Line Rate Health
. 95%
model 100%
Summary 95% (97 / 102)

Minimum allowed line rate is 60%

@R0Wi R0Wi marked this pull request as ready for review November 16, 2025 20:03
@R0Wi R0Wi merged commit f5ae6ef into master Nov 16, 2025
2 checks passed
@R0Wi R0Wi deleted the copilot/add-harp-support branch November 16, 2025 20:03
R0Wi added a commit that referenced this pull request Nov 16, 2025
…arp-support

Add HaRP support for Nextcloud 32+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] HaRP support

2 participants