There is one server on which NextCloud is installed.All connections to it go through Nginx.It acts as a proxy providing HTTPS.It is necessary to raise OpenVPN on the same server and ensure that access to NextCloud is only inside OpenVPN.That is, only clients OpenVPN could reach files.Can this be done somehow?

1 Answers 1

Of course you can.
After you configure the VPN, reconfigure NextCloud so that he listened only to the VPN interface.