Running Cells behind a Nginx reverse proxy
Specific Cells parameters¶
During your Pydio Cells installation (actually at the beginning) you will be prompted for 2 important parameters:
-
Internal Url: is the url used to bind your cells to the server.
-
External Url: is the url used to access your cells from outside.
In this case for the reverse proxy, we must pay extra attention to the External URL as it has to match the address of the reverse proxy entrypoint that is going to be used to access Cells.
For instance if Cells is running under 192.168.0.12 and the Reverse proxy 192.168.1.201 both running on 2 completely different networks and/or publicly exposed.
Note: in the examples below we use ip addresses but you can also use domains (make sure that they are reachable)
Cells Server | Reverse proxy Server |
---|---|
192.168.0.12 | 192.168.1.201 |
Hence on Cells Server we use the following values upon installation, we also want to access Cells through https.
(assuming that we are binding Cells on port 8080, internal_url)
Internal URL | External URL |
---|---|
192.168.0.12:8080 | https://192.168.1.201 |
To resume, we will access Cells through https://192.168.1.201
while Cells is actually running on another server (192.168.0.12).
Basic NGINX reverse proxy configuration¶
Cells Sync¶
Mandatory section for the Sync Client to work behind a Nginx reverse proxy.
If your Cells Server is running behind a Nginx reverse proxy you must meet 2 requirements and then add the config below to your main nginx reverse proxy configuration.
TLS and HTTP2 meaning that the reverse proxy and Cells must communicate with SSL (you can use the self signed option during installation).
Once that is done you must set a port for grpc in this example it's 33060,
to set it you have the folllowing env variable, PYDIO_GRPC_EXTERNAL=33060
otherwise you can set it when running the binary with the following flag --grpc_external, for instance;
./cells start --grpc_external=33060
In all those examples you can subsitute the port 33060 by the port of your choice
Also make sure to put the address/domain on which your Cells Server is running (refer to the arrays above) line grpc_pass.
Below you can have a look at the complete file
Finale note¶
Make sure to substitute the values of the certificates and ip/domains.
The complete configuration¶
cells.conf