How to block download of document files in Onlyoffice

Hi Experts,

I am using the docker based deployment for Onlyoffice server and document.
But, in my environment I want user to restrict download of word/ppt/excel

There are 2 ways user can download.
From outside, you have option to download and download as.
From inside, I open a document there is an option to download it from the file menu.

I want to block this. Looking at few of the community discussion topic, I found few post we cannot disable it.

But do we have some documentation or some hack like placing NGINX in front of it to block the download. If yes, I need a particular location path for me at add 403 forbidden.

Can someone please suggest any document or workaround on this, i will highly appreciate it.

Hello @princesarvaiya

As an independent integrator this behavior should be implemented on your application side.

In the editors interface you can disable downloading via download permission set to false in editors initialization config:

You can open integrated test example via address of Document Server, then select Hamish Mitchell as a user (this user is not allowed to download files) and open any file for editing to check it out:

Thanks Constantine for reply,

For point number 2,

Can you share me the location of this config file within the docker container, and i can set this flag to false.

Hello @princesarvaiya

Please note that the initialization configuration file is provided by you as the independent integrator when running the editor to edit a file and is not located in your Document Server Docker container.

Currently, there is no way to completely disable the download functionality in Only Office. Because I have tried it earlier. However, there are a few workarounds that I found during my research at softpeo.

One workaround is to use a reverse proxy server, such as NGINX, to block access to the download endpoints. For example, you could create a new NGINX configuration file that includes the following lines:

location /download {
deny all;

location /download.aspx {
deny all;

This would block access to the /download and /download.aspx endpoints, which are the two endpoints that are used to download documents from OnlyOffice.

Hello @larryday
I believe that @Constantine is right. The proper way to disable download option is permissions section in the editor initialization config file. Nevertheless, probably your workaround solution will work (we didn’t test it properly, so I cannot predict possible issues).