Error when trying to connect (Host violates local access rules)

hey.

i did set up onlyoffice docker, the website says "
Thank you for choosing ONLYOFFICE!
Document Server is running"

its a completly different URL, not like “document.mycloud.com”. When i go to settings, then i type my url, it says: Error when trying to connect (Host violates local access rules)

It uses HTTPS with nginx proxy lets encrypt. both are using it. What do i have to do ?

i added
‘allow_local_remote_servers’ => true,

now i get
Error when trying to connect (cURL error 7: Failed to connect to 127.0.0.1 port 8888: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html))

the docker runs -p 127.0.0.1:8888:80 my conf.d/docserver.conf is reverse proxying 127.0.0.1:8888 with TLS 1.3, my nextcloud uses tls 1.2 if that might be important…

2 Likes

I’ve got the same error on 2 or 3 NC instances, all also running Docker Compose and OnlyOffice running on the same server (accessing it via /ds-vpath/ on http://onlyoffice-document-server) and an nginx reverse proxy (terminating https)… I also have 'allow_local_remote_servers'=>true but I’m also getting the “Host violates local access rules” error.

On one server, it seems (inexplicably) to allow access to OnlyOffice. I’m trying to work out what’s different between them.

I note also that on all 3 NC instances, I get a series of “blocked” requests for each page load, involving a bunch of js files like main.js, notifications.js, client.js, etc. apparently due to CSP (Content Security Policy). Oddly, this doesn’t seem to be completely breaking things (at least not on the instance where OO is accessible)…

Will report back if I get to the bottom of it.

I still have no new info about that, i am currently using Collabora/code docker image with Apache and Nginx Reverse Proxy to because i dont like the letsencryypt companion ssl configurations. Works good there.

Same problem here. Got Error when trying to connect (Host violates local access rules) and after setting 'allow_local_remote_servers'=>true I get Error when trying to connect (cURL error 7: Failed to connect to documentserver port 443: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://documentserver/healthcheck)

Here’s my config

version: '3'

volumes:
  nextcloud:
  db:

services:
  db:
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --skip-innodb-read-only-compressed
    restart: unless-stopped
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=[...]
      - MYSQL_PASSWORD=[...]
      - MYSQL_DATABASE=[...]
      - MYSQL_USER=[...]

  app:
    image: nextcloud
    links:
      - db
    volumes:
      - nextcloud:/var/www/html
      - /mnt/speicher/cloud:/var/www/html/data
    restart: unless-stopped
    environment:
      - REDIS_HOST=redis
    networks:
      default:
      proxy_net:

  redis:
    image: redis:4-alpine
    volumes:
      - ./redis:/data
    restart: "unless-stopped"

  documentserver:
    image: onlyoffice/documentserver
    volumes:
      - './logs:/var/log/onlyoffice'
      - './data:/var/www/onlyoffice/Data'
    expose:
      - '80'
      - '443'

networks:
  proxy_net:
    external: true
  default:

On the webinterface I set https://documentserver/ as the Onlyoffice address

Got it. In the default setup the documentserver doesn’t listen for https requests. You have to setup a certificate which then enables https on the documentserver. You can see how to do it in the Readme Docker Hub

Edit: Forget all that. Use the Community Document Server App instead. https://nextcloud.com/blog/how-to-install-onlyoffice-in-nextcloud-hub-and-new-integration-feature/