# Nextcloud and collabora up, still cant edit documets

**URL:** <https://forum.collaboraonline.com/t/nextcloud-and-collabora-up-still-cant-edit-documets/3865>\
**Category:** Installation & Configuration\
**Created:** [July 9, 2025, 6:32am UTC](https://forum.collaboraonline.com/t/nextcloud-and-collabora-up-still-cant-edit-documets/3865 "2025-07-09T06:32:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ratnose](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/ratnose/32/1448_2.png) [@ratnose](https://forum.collaboraonline.com/u/ratnose)\
**Post date:** [July 9, 2025, 6:32am UTC](https://forum.collaboraonline.com/t/nextcloud-and-collabora-up-still-cant-edit-documets/3865/1 "2025-07-09T06:32:26Z")

</div>

I have added Collabora to my current Nextcloud instance. It answers with an “Ok” on the domain I have for it (office.mydomain.tld).  
I can add the URL to the Office settings in Nextcloud and everything checks out.  
I am running Nextcloud v31.0.6 and Collabora v25.04.3.2.  
I did add my CIDR to the Office settings.  
I must have missed something simple, I have searched and atm it is leaning towards the labels for collabora and Nextcloud. So if anyone has input I will be happy!

When trying to create/edit a document I get an error saying “Unauthorized WOPI host. Please try again later and report to your administrator if the issue persists”

Here’s the docker compose setup wth the Traefik labels.

```auto
    nextcloud:
    image: lscr.io/linuxserver/nextcloud:latest
    container_name: nextcloud
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=${TZ}
      - MYSQL_DATABASE=${MYSQL_DB}
      - MYSQL_USER=${MYSQL_USER}
      - MYSQL_PASSWORD=${MYSQL_PW}
      - MYSQL_HOST=${MYSQL_HOST}
      - MYSQL_PORT=${MYSQL_PORT}
      - NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN}
      - NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_ADMIN_PW}
      - REDIS_HOST=${REDIS_HOST}
      - REDIS_PORT=${REDIS_PORT}
      - REDIS_HOST_PASSWORD=${REDIS_PW}
    depends_on:
      - mariadb
      - redis
    volumes:
      - ./appdata/nextcloud:/config
      - /amsvartnir/nextcloudstorage/:/data
    #ports:
    # - 11100:80
    # - 12100:443
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.nextcloud.entrypoints=websecure"
        - "traefik.http.routers.nextcloud.rule=Host(`cloud.${DOMAIN}`)"
        - "traefik.http.routers.nextcloud.tls=true"
        - "traefik.http.routers.nextcloud.tls.certresolver=letencrypt"
        - "traefik.http.routers.nextcloud.middlewares=nextcloud_redirectregex@docker"
        - "traefik.http.middlewares.nextcloud_redirectregex.redirectregex.permanent=true"
        - "traefik.http.middlewares.nextcloud_redirectregex.redirectregex.regex=https://(.*)/.well-known/(?:card|cal)dav"
        - "traefik.http.middlewares.nextcloud_redirectregex.redirectregex.replacement=https://$${1}/remote.php/dav"
        - "traefik.http.services.nextcloud.loadbalancer.server.port=80"
    networks:
        - frontend
    restart: unless-stopped
    
  collabora:
    image: collabora/code
    container_name: collabora
    restart: unless-stopped
    environment:
      - TZ=${TZ}
      - aliasgroup1=https://cloud.${DOMAIN}
      - dictionaries=en_US,sv_SE
      - username=officeadmin
      - password=JEqSPSH0fTBgyFjCJl8BJDFJ
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.collabora.rule=Host(`office.${DOMAIN}`)"
        - "traefik.http.routers.collabora.entrypoints=websecure"
        - "traefik.http.routers.collabora.tls=true"
        - "traefik.http.routers.collabora.tls.certresolver=letencrypt"
        - "traefik.http.services.collabora.loadbalancer.server.port=9980"
    networks:
        - frontend

```

---

<div class="post-metadata">

**Author:** ![darshan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/darshan/32/2230_2.png) [@darshan](https://forum.collaboraonline.com/u/darshan)\
**Post date:** [July 10, 2025, 5:48am UTC](https://forum.collaboraonline.com/t/nextcloud-and-collabora-up-still-cant-edit-documets/3865/2 "2025-07-10T05:48:31Z")

</div>

hii @ratnose welcome to collabora online forum

The error you’re seeing (“Unauthorized WOPI host”) is coming straight out of the Collabora‐CODE host-whitelist. By default CODE will only accept WOPI hand-offs from hostnames you’ve explicitly allowed (as a regular-expression). In your compose you tried to set that with– aliasgroup1=[https://cloud.${DOMAIN}](https://cloud.$%7BDOMAIN%7D)but:

1. CODE doesn’t know “aliasgroup1”
2. Even if it did, you must _not_ include the https:// in the hostname
3. CODE expects a single env-var called domain (a regex) not alias\*

What you need to do is replace your aliasgroup1 line with a proper domain regex. For example, if your Nextcloud runs on cloud.example.tld, then:• in your collabora service stanza, drop aliasgroup1=… and add instead – domain=cloud.example.tld (that is a _regexp_ matching exactly cloud.example.tld)

Thanks  
Darshan

---

<div class="post-metadata">

**Author:** ![ratnose](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/ratnose/32/1448_2.png) [@ratnose](https://forum.collaboraonline.com/u/ratnose)\
**Post date:** [July 13, 2025, 7:25am UTC](https://forum.collaboraonline.com/t/nextcloud-and-collabora-up-still-cant-edit-documets/3865/3 "2025-07-13T07:25:06Z")

</div>

So I did what you suggested and it did not make any change.  
Still this WOPI error and I did also added this under “Allow list for WOPI requests”  
10.1.1.0/24, [https://cloud.example.tld](https://cloud.example.tld)

```auto
  collabora:
    image: collabora/code
    container_name: collabora
    restart: unless-stopped
    environment:
      - TZ=${TZ}
      - domain=https://cloud.${DOMAIN}
      - dictionaries=en_US,sv_SE
      - username=officeadmin
      - password= ****
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.collabora.rule=Host(`office.${DOMAIN}`)"
        - "traefik.http.routers.collabora.entrypoints=websecure"
        - "traefik.http.routers.collabora.tls=true"
        - "traefik.http.routers.collabora.tls.certresolver=letencrypt"
        - "traefik.http.services.collabora.loadbalancer.server.port=9980"
    networks:
        - frontend

```
