Fail to add trusted domain in nextcloud (docker)

I installed the docker image of nextcloud on my raspberry pi today using the following docker-compose.yml:

version: '2'

services:

  db:

    image: jsurf/rpi-mariadb

    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW

    restart: always

    volumes:

      - ./db:/var/lib/mysql

    environment:

      - MYSQL_ROOT_PASSWORD=linghao

      - MYSQL_PASSWORD=linghao

      - MYSQL_DATABASE=nextcloud

      - MYSQL_USER=nextcloud 

  app:

    image: arm32v7/nextcloud

    ports:

      - 8888:80

    links:

      - db

    volumes:

      - ./cloud/config:/var/www/html/config

      - ./data:/var/www/html/data

      - ./cloud/apps:/var/www/html/apps

    restart: always

It started the service successfully. But I can’t access nextcloud via my PC because the IP is not trusted. As shown in docker-compose.yml, the config folder in nextcloud docker container “/var/html/config” was mounted to the folder of raspberry pi “./cloud/config”. I added the IP of my PC in config.php under this folder and restarted the service. But it didn’t work. I am very sure that the added IP address is correct. This is really weird because after what I did the config.php should also be updated synchronously.
The trusted domains in config.php was modified as:

'trusted_domains' => 
  array (
    0 => 'localhost:8888',
    1 => '192.168.8.100',
  ),

in which 192.168.8.100 is the IP address of my PC under the same local network.

I am stupid. I should add the IP address of raspberry pi as well. It was solved.

1 Like