You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: admin_manual/exapps_management/AppAPIAndExternalApps.rst
+89-2Lines changed: 89 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,12 +20,44 @@ If AppAPI is not installed, you can still install it by simply navigating to the
20
20
Setup deploy daemon
21
21
-------------------
22
22
23
-
A Deploy Daemon is a way for Nextcloud to install, communicate with, and control ExApps.
23
+
A Deploy Daemon is the way for Nextcloud to install, communicate with, and control ExApps.
24
24
25
25
.. note::
26
-
If you are using Nextcloud AIO with the "Docker Socket Proxy" container enabled, a Deploy Daemon will be automatically created and configured to work out-of-the-box.
26
+
If you are using Nextcloud AIO with the "HaRP" or "Docker Socket Proxy" container enabled, a Deploy Daemon will be automatically created and configured to work out-of-the-box.
27
27
Otherwise, follow the steps below to set up a Deploy Daemon from the AppAPI admin settings.
28
28
29
+
.. _ai-app_api_harp:
30
+
31
+
HaRP
32
+
~~~~
33
+
34
+
|This is the newer and the **recommended** way to install ExApps.
35
+
|It requires changes in the proxy of your Nextcloud instance. If you don't have access to the proxy, you can use the usual method :ref:`described below <ai-app_api_dsp>`.
36
+
37
+
1. Setup a Docker container called `HaRP <https://github.com/nextcloud/HaRP?tab=readme-ov-file#how-to-install-it>`_ that proxies access to Docker and to the ExApps for your Nextcloud instance. Be mindful of changing the values of ``HP_SHARED_KEY`` and ``NC_INSTANCE_URL``.
38
+
2. Go to AppAPI admin settings.
39
+
3. Click on the "Register Daemon" button.
40
+
4. | A filled form should appear. This default configuration ``HaRP Proxy (Host)`` should work for most setups. For Nextcloud AIO, use ``HaRP All-in-One``.
41
+
|If you are using Nextcloud in a custom docker network and would want the HaRP container to be limited to it, use the ``HaRP Proxy (Docker)`` option to have the fields pre-filled with the common options or change them manually.
42
+
|Here, you should ensure the HaRP container itself is launched with the same network as your Nextcloud instance optionally with no ports exposed to the host in step 1, and the same docker network is mentioned in the ``Network`` field in the deploy config.
43
+
5. Ensure the same shared key is used in the HaRP container and in the AppAPI settings.
44
+
6. Click "Check connection" to verify that the configuration is correct.
45
+
7. Click "Register" to save the Deploy Daemon configuration.
46
+
8. Set up a location redirect in your Nextcloud's main proxy configuration to redirect requests to the HaRP container. Some examples for popular reverse proxies can be found in `Configuring Your Reverse Proxy <https://github.com/nextcloud/harp?tab=readme-ov-file#configuring-your-reverse-proxy>`_ in the HaRP readme.
47
+
9. Test the whole setup with "Test deploy" in the 3-dots menu of the Deploy Daemon.
48
+
49
+
This is suitable for local setups where the Nextcloud server and the ExApps are on the same machine or in the same docker network.
50
+
The ExApps in this configuration or the ExApp server need not expose any ExApp related port (23000-23999) necessarily to the host, nor do they need to be reachable from the host. They should be able to reach the HaRP container at the FRP port and the Nextcloud instance.
51
+
For different/remote setups, see deployment configuration examples :doc:`here <./DeployConfigurations>`.
52
+
53
+
.. note::
54
+
The existing ExApps can be migrated to use the new HaRP proxy following `this guide <https://github.com/nextcloud/harp?tab=readme-ov-file#nextcloud-32-migrating-existing-exapps-from-dsp-to-harp>`_.
55
+
56
+
.. _ai-app_api_dsp:
57
+
58
+
Docker Socket Proxy
59
+
~~~~~~~~~~~~~~~~~~~~
60
+
29
61
1. Setup a Docker container called `docker-socket-proxy <https://github.com/nextcloud/docker-socket-proxy#readme>`_ that proxies access to Docker for your Nextcloud instance.
30
62
2. Go to the AppAPI admin settings.
31
63
3. Click on the "Register Daemon" button.
@@ -73,3 +105,58 @@ FAQ
73
105
* Parallel processing of AI workloads for the same app with multiple GPUs is currently not supported.
74
106
* Can I use the CPU and GPU in parallel for AI processing?
75
107
* No, you can only process AI workloads on either the CPU or GPU for one app. For different apps, you can decide whether to run them on CPU or GPU.
108
+
109
+
Docker Socket Proxy vs HaRP
110
+
---------------------------
111
+
112
+
|HaRP can be seen as Docker Socket Proxy version 2.0. It does all what Docker Socket Proxy does, but also addresses the main pain point of ExApps not being reachable by the Nextcloud server (or AppAPI).
113
+
|`FRP <https://github.com/fatedier/frp>`_ is used to create a tunnel between the ExApp and the HaRP container so there is no need for the ExApp containers to expose any ports to the host or to be reachable from the Nextcloud server.
114
+
|The Nextcloud server can reach the ExApp containers through the HaRP container.
115
+
116
+
HaRP has an additional benefit of being able to proxy requests coming from the Web interface or an API to the ExApp container without being proxies through the Nextcloud server, saving resources, improving performance and supporting additional protocols like WebSockets.
117
+
118
+
HaRP is the recommended way to run ExApps, but if you are not able to use it, Docker Socket Proxy is still supported.
119
+
120
+
Frontend requests in case of Docker Socket Proxy:
121
+
122
+
.. mermaid::
123
+
124
+
graph LR;
125
+
subgraph Browser
126
+
A[Frontend]
127
+
end
128
+
129
+
B[Proxy]
130
+
131
+
subgraph Services behind the proxy
132
+
C[Dcker Socket Proxy]
133
+
D[ExApp]
134
+
E[Nextcloud Server / AppAPI]
135
+
end
136
+
137
+
A --> B
138
+
B -->|Request to an ExApp| E --Converted to ExApp auth--> D
139
+
B -->|All other usual requests| E
140
+
141
+
142
+
Frontend requests in case of HaRP:
143
+
144
+
.. mermaid::
145
+
146
+
graph LR;
147
+
subgraph Browser
148
+
A[Frontend]
149
+
end
150
+
151
+
B[Proxy]
152
+
153
+
subgraph Services behind the proxy
154
+
C[HaRP]
155
+
D[ExApp]
156
+
E[Nextcloud Server / AppAPI]
157
+
end
158
+
159
+
B --All other usual requests--> E
160
+
A --> B
161
+
B --Direct request to an ExApp--> C --Converted to ExApp auth--> D
0 commit comments