Skip to content

Add new deployment configuration with Apache and 3 hosts in documentation #85

@manik0u

Description

@manik0u

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Feature request

**Which Nextcloud Version are you currently using:Nextcloud Hub 25 Autumn(32.0.3)

**Is your feature request related to a problem? It's very difficult to deploy HaRP with Apache Reverse Proxy. There is no clear instructions on the official documentation

Describe the solution you'd like
After a lot of tests, I find a way to deploy on my configuration.
I would like to share it to help the community.

This is my infrastructure
Image

Please see below the steps I follow
All of the following steps are based on a Almalinux Distro. Please customize for your distribution.

On the Host2 Docker

Creation of Cert folder (if necessary)

mkdir -p /some/path/{certs,}

Open ports

firewall-cmd --permanent --zone=public --add-port=8780/tcp
firewall-cmd --permanent --zone=public --add-port=8782/tcp
firewall-cmd --reload

Deploy of the HaRP Container

docker run \
  -e HP_SHARED_KEY="some_very_secure_password" \
  -e NC_INSTANCE_URL="https://cloud.acme.com" \
  -e HP_TRUSTED_PROXY_IPS="192.168.0.0/24" \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /some/path/certs:/certs \
  -p 8780:8780 \
  -p 8782:8782 \
  --name appapi-harp -h appapi-harp \
  --restart unless-stopped \
  -d ghcr.io/nextcloud/nextcloud-appapi-harp:release

On the Host3 Apache Reverse Proxy - Reverse proxy redirections

On the virtual Host "cloud.acme.com" of the apache conf file
Add the following lines (before the existing configuration)

        #  AppAPI Configuration
        ProxyPass /exapps/ http://<IP_host2_docker>:8780/exapps/
        ProxyPassReverse /exapps/ http://<IP_host2_docker>:8780/exapps/

On the Nextcloud Web Interface - Daemon Register

Add the following configuration :

Daemon Configuraiton template : HaRP Proxy (HOST)
Surname : appapi-harp
Display name : appapi-harp
Deployment method : docker-install
HaRP host : <IP_host2_docker>:8780
HaRP shared key : some_very_secure_password
Nextcloud URL : https://cloud.acme.com
FRP server address : <IP_host2_docker>:8782
Docker network : bridge

Finally, test the whole setup with “Test deploy” in the 3-dots menu of the deploy daemon.

Additional tests from the network of your hosts

curl -fsS \
  -H "harp-shared-key: some_very_secure_password" \
  -H "docker-engine-port: 24000" \
  http://<IP_host2_docker>:8780/exapps/app_api/v1.41/_ping
curl -fsS \
  -H "harp-shared-key: some_very_secure_password" \
  -H "docker-engine-port: 24000" \
  https://cloud.acme.com/exapps/app_api/v1.41/_ping

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
I think this issue is related to
#42
#44

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions