Nginx configuration

Dear community,

i’ve installed OnlyOffice community server via package manager (plain, not as docker) on debian 11 using nginx as ReverseProxy. But i don’t get it run and accessed via internet because i have problems writing a working nginx configuration file.

The example file at github is no help for me - i’d like a minimal file.

First of all i’m not sure

  1. where to put the configuration file (in /etc/nginx/conf.d/ and/or in /etc/onlyoffice/documentserver/nginx/?),

  2. what the right path for the root-directive is (/var/www/onlyoffice/ seems not to be right),

  3. what the right location-directive and server name / FDQN is,

  4. if there’s (another) OnlyOffice configuration file for naming the FDQN right.

I’m using Let’s Encrypt certificates.

Here is what my configuration “onlyoffice.conf” placed in /etc/nginx/conf.d/ looks like at the moment ( is set to a real existing value, has a working DNS-A-record):

server {
  server_tokens off;

  listen [::]:443 ssl; # managed by Certbot
  listen 443 ssl; # managed by Certbot
  ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
  ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
  include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

# root /usr/share/nginx/html/; <-- i don't know what to write here

  location / {
    proxy_pass; <-- i don't know what to write here
    proxy_http_version 1.1;

I appreciate every hint and would be glad about a minimal working configuration file.

Best regards

You are probably referring to configuration examples from here:

These are for Document Server, not for Community Server. Unfortunately, we do not have any proxy configuration examples for Community Server.

Thank you. But these examples don’t work for me.

Yes, we don’t have proxy configuration examples for ONLYOFFICE Workspace.

Hi, probably a bit too late but I struggled with this also and found the solution by edditing the
/etc/nginx/conf.d/ds.conf file

I replaced the include /etc/nginx/includes/ds-*.conf; line with:

include /etc/nginx/includes/onlyoffice-*.conf;

This did the trick, works perfect.

Can you please post the content of your files onlyoffice-.con*f in /etc/nginx/includes? That would be great.

Hi Blink,

I think I have been unclear . You need to edit the /etc/nginx/conf.d/ds.conf file.

There are 2 lines: include /etc/nginx/includes/ds-*.conf;

Just replace them with include /etc/nginx/includes/onlyoffice-*.conf;

Thats all, good luck

Hi pderuijter, i did understand you. Please post the contents of onlyoffice-*.conf. That’s what i need.

Hi Bink I just did some more testing.
THe settings I posted brakes the controlpanel so not working as expected yet.

by the way onlyoffice-*.conf is not a single file .
The include parameter means all the files beginning with onlyoffice-

Hi pderuijter, i know. * is a wilcard used to include all files starting with “onlyoffice-” and ending with “.conf”. I’m a webserver administrator. :wink: The problem is the right nginx reverse proxy setting.


i’ve got the same problem and finally i solve it ^^

My Onlyoffice Workspace is fully operationel

If someone are still concern, i can share my experience

Hello @gotenash
You can share your experience even if there aren’t new requests on this case (this is really old thread). We always appreciate it when users help each other.