Skip to content

feat(nextcloud): add optional HaRP sidecar for AppAPI support#4727

Draft
blastik wants to merge 7 commits intotruenas:masterfrom
blastik:feat/nextcloud-harp-appapi
Draft

feat(nextcloud): add optional HaRP sidecar for AppAPI support#4727
blastik wants to merge 7 commits intotruenas:masterfrom
blastik:feat/nextcloud-harp-appapi

Conversation

@blastik
Copy link
Copy Markdown
Contributor

@blastik blastik commented Mar 30, 2026

Summary

Adds HaRP (HAProxy Reverse Proxy) as an opt-in sidecar container within the Nextcloud app, enabling Nextcloud AppAPI for External Apps (ExApps). This eliminates the need for users to manually deploy HaRP as a separate Custom App.

  • HaRP container: ghcr.io/nextcloud/nextcloud-appapi-harp:release with Docker socket access, configurable port and shared key
  • Nginx integration: /exapps/ reverse proxy location when HTTPS/nginx is enabled
  • Auto-configuration: before-starting hook auto-installs app_api and registers the HaRP deploy daemon via occ app_api:daemon:register, with Docker network name derived from ix_context.app_name
  • Backward compatible: disabled by default, zero impact on existing installations

Files changed (12)

File Change
app.yaml Version bump 2.3.13 → 2.4.0, added HaRP run_as_context
ix_values.yaml Added harp_image, harp_container_name, harp_port
questions.yaml Added harp config section (enabled, shared_key, port)
templates/docker-compose.yaml HaRP container block + daemon registration hook
templates/macros/nc.jinja.conf /exapps/ nginx location block
templates/macros/nc.jinja.sh harp_daemon_register macro
templates/test_values/harp-values.yaml New: HaRP + HTTP test
templates/test_values/harp-https-values.yaml New: HaRP + HTTPS test
templates/test_values/{basic,https,imaginary,no-cron}-values.yaml Added harp: enabled: false

Closes #3417

Test plan

  • Render with harp-values.yaml (HTTP) — verify HaRP container and daemon registration hook
  • Render with harp-https-values.yaml (HTTPS) — verify nginx /exapps/ location block
  • Render with basic-values.yaml — verify no HaRP artifacts when disabled
  • Deploy on TrueNAS with HaRP enabled — verify daemon auto-registers in AppAPI settings
  • Install an ExApp via AppAPI — verify end-to-end functionality

blastik and others added 7 commits March 30, 2026 23:34
Add HaRP (HAProxy Reverse Proxy) as an opt-in sidecar container within
the Nextcloud app, enabling Nextcloud AppAPI for External Apps (ExApps).

- HaRP container with Docker socket access, configurable port and shared key
- Nginx `/exapps/` reverse proxy location when HTTPS is enabled
- Auto-install app_api and register HaRP deploy daemon via before-starting hook
- Docker network name derived from ix_context.app_name at runtime
- Security warning note when HaRP is enabled
- Test values for both HTTP and HTTPS configurations
- Backward compatible: disabled by default, existing installs unaffected

Closes truenas#3417
The generate_metadata.py script expects all containers (including
conditional ones) to appear in the labels section. HaRP was already
listed in the networks enum but missing from labels.
@blastik blastik mentioned this pull request Apr 7, 2026
3 tasks
@stavros-k
Copy link
Copy Markdown
Contributor

Due to how nextcloud works and the reliance of our side to create custom scripts to make it work, this type of additions are only accepted on the nextcloud app in the test train that utilizes our custom image.

This requires changes in the https://github.com/truenas/containers repo first.

Which has to handle both setup and cleanup.

@stavros-k stavros-k marked this pull request as draft April 7, 2026 14:50
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.

[Enhancement]: Support Nextcloud AppAPI

2 participants