# NextCloud Office and Collabora CODE

**URL:** <https://help.nextcloud.com/t/nextcloud-office-and-collabora-code/153054>\
**Category:** ℹ️ Support\
**Created:** [January 5, 2023, 3:53pm UTC](https://help.nextcloud.com/t/nextcloud-office-and-collabora-code/153054 "2023-01-05T15:53:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rippletide](https://help.nextcloud.com/letter_avatar/rippletide/32/6_22734026db12803ebb3e059622ac3534.png) [@rippletide](https://help.nextcloud.com/u/rippletide)\
**Post date:** [January 5, 2023, 3:53pm UTC](https://help.nextcloud.com/t/nextcloud-office-and-collabora-code/153054/1 "2023-01-05T15:53:08Z")

</div>

I have set up a couple of other NextCloud servers in the past and have not run into this issue.

But in setting up NC 25.02 and enabling the use of NextCloud Office and install the Collobora CODE server it will not open .odt files or .docx files or really any files that require using a Nextcloud office app.

I can get it working by going to the Nextcloud Office Administration settings and toggling off “Use the built-in CODE” and then reselecting it.

This seems to will allow it to work for a short period. Have not determined how long, but it seems to quit working if Apache server or PHP service is reloaded or restarted. I then have to do the above to make it start working again. It seems it is interrupted any time a cron job that reloads the Apache server is run.

This is the error in the logs that seems to be connected to this issue.

[no app in context] Warning: Host 127.0.1.1 was not connected to because it violates local access rules

GET /index.php/core/preview?fileId=42&c=96e1fbdcf8ad60802e1c738d82676fa8&x=250&y=250&forceIcon=0&a=0  
from 99.126.142.194 by shane at 2023-01-05T15:43:45+00:00

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 5, 2023, 9:00pm UTC](https://help.nextcloud.com/t/nextcloud-office-and-collabora-code/153054/2 "2023-01-05T21:00:57Z")

</div>

welcome to the forum @rippletide 🤝

Please use the search, most of the problems have been discussed already!

```auto
# for docker 
docker exec --user www-data <nextcloud container name> php occ config:system:set allow_local_remote_servers --value true --type bool

# native install (sudo might be required)
php occ config:system:set allow_loca_remote_servers --value true --type bool

```

See below:

> [@Error when trying to connect (Host violates local access rules)](https://help.nextcloud.com/t/error-when-trying-to-connect-host-violates-local-access-rules/85704):
>
> 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](http://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: Faile…

> [@Can't connect to OnlyOffice document server after update to NC19](https://help.nextcloud.com/t/cant-connect-to-onlyoffice-document-server-after-update-to-nc19/83958):
>
> Get errors: Error onlyoffice OCP\Http\Client\LocalServerException: Host violates local access rules Warning no app in context Host 192.168.0.50 was not connected to because it violates local access rules Everything was working before update to NC19. I have added in my config.php: ‘onlyoffice’ =\> array ( ‘verify\_peer\_off’ =\> true, ),

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 2:21pm UTC](https://help.nextcloud.com/t/nextcloud-office-and-collabora-code/153054/3 "2024-12-14T14:21:00Z")

</div>


