docker-onlyoffice-nextcloud icon indicating copy to clipboard operation
docker-onlyoffice-nextcloud copied to clipboard

Document says it saved but it doesn't save

Open Soneji opened this issue 4 years ago • 7 comments

When I save a document it says document saved but there is no change written to disk. Below are my config files. I have looked in the nginx log and it is not showing anything.

I have also tried adding

‘onlyoffice’ =>
array (
‘verify_peer_off’ => true,
),

and

‘allow_local_remote_servers’ => true,

to my nextcloud config file

These are my nextcloud settings

Document Editing Service address: https://cloud.domain.com/
Secret key (leave blank to disable): ___
Advanced server settings
Document Editing Service address for internal requests from the server: http://onlyoffice-document-server/
Server address for internal requests from the Document Editing Service: https://cloud.domain.com/
  onlyoffice-document-server:
    container_name: onlyoffice-document-server
    image: onlyoffice/documentserver:latest
    stdin_open: true
    tty: true
    restart: always
    ports:
      - 6066:80
    expose:
      - '80'
      - '443'
    volumes:
      - ./onlyoffice/document_data:/var/www/onlyoffice/Data
      - ./onlyoffice/document_log:/var/log/onlyoffice
  app:
    image: nextcloud:apache
    restart: always
    ports:
      - 6065:80
    volumes:
      - ./webroot:/var/www/html
    environment:
      - MYSQL_HOST=db
      - REDIS_HOST=redis
    env_file:
      - db.env
    depends_on:
      - db
      - redis

My nginx conf for the onlyoffice site

map $http_host $this_host {
    "" $host;
    default $http_host;
}
map $http_x_forwarded_proto $the_scheme {
     default $http_x_forwarded_proto;
     "" $scheme;
}
map $http_x_forwarded_host $the_host {
    default $http_x_forwarded_host;
    "" $this_host;
}
map $http_upgrade $proxy_connection {
  default upgrade;
  "" close;
}
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

server {
    
    server_name office.domain.com; 
    location / {
	proxy_pass http://localhost:6066/;
	proxy_http_version 1.1;
    }
    

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

    client_max_body_size 10G;
    proxy_buffering off;

}

My nginx conf for my nextcloud site:

server {
    
    server_name cloud.domain.com;

    location / {
	proxy_set_header Host $host;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-Host $host:$server_port;
	proxy_set_header X-Forwarded-Server $host;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_pass http://localhost:6065/;
    }
    

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

    rewrite ^/.well-known/carddav$ https://cloud.domain.com/remote.php/dav redirect;

    rewrite ^/.well-known/caldav$ https://cloud.domain.com/remote.php/dav redirect;

    client_max_body_size 16400M;
    proxy_buffering off;
    add_header Strict-Transport-Security "max-age=15552000;" always;

}

server {
    if ($host = cloud.domain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    server_name cloud.domain.com;

    listen 80;
    listen [::]:80;
    return 404; # managed by Certbot


}

Soneji avatar Aug 20 '20 21:08 Soneji

Same issue here. Did you managed to make that work? Thanks.

amirmamaghani avatar Nov 21 '20 14:11 amirmamaghani

Nope

Soneji avatar Nov 22 '20 14:11 Soneji

@CarlOnlyoffice @alexanderonlyoffice

Soneji avatar Nov 22 '20 14:11 Soneji

Hello @soneji, Please try enabling https for NC+DS compose following this guide https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud/tree/feature/ssl Let me know if the issue persists.

CarlOnlyoffice avatar Nov 23 '20 08:11 CarlOnlyoffice

Hi @CarlOnlyoffice

I am using a different setup. I have setup onlyoffice behind a nginx reverse proxy on my server. I have already got SSL setup and the site appears to connect successfully over HTTPS but the file does not save.

Soneji avatar Jan 10 '21 20:01 Soneji

Had the same issue. Onlyoffice behind the proxy, not hosted on a seperate subdomain. I changed the following settings and then (auto-)saving worked for me:

As nextcloud admin: Settings -> ONLYOFFICE Screenshot 2021-10-17 123821

Edit: Deleted wrong screenshot

Jonn3y avatar Oct 17 '21 10:10 Jonn3y

Looks like the sync between onlyoffice and nextcloud takes a few seconds sometimes. Changed a doc in Onlyoffice Closed it Downloaded the File and opened it on my PC (Excel) Change was not visible Waited a few more seconds Downloaded file again and opened it on my PC with Excel CHANGE IS VISIBLE NOW! HURAAAY

Jonn3y avatar Oct 17 '21 10:10 Jonn3y