Config.php Nextcloud

  • Hi, that's me again, i can join Nextcloud from my internal ip, and i want join from a "duckdns" or external ip ... so i have a trusted domain error...


    and when i open Nextcloud/config/config.php i had that :



    <?php

    $CONFIG = array (

    'htaccess.RewriteBase' => '/',

    'memcache.local' => '\\OC\\Memcache\\APCu',

    'apps_paths' =>

    array (

    0 =>

    array (

    'path' => '/var/www/html/apps',

    'url' => '/apps',

    'writable' => false,

    ),

    1 =>

    array (

    'path' => '/var/www/html/custom_apps',

    'url' => '/custom_apps',

    'writable' => true,

    ),

    ),


    As you can see, i dont have any trusted domain option on my config.php ,

    i try all i watch on the forum, thats why i creat a new thread !!


    What i can do ?

  • i utilise portainer to install nextcloud, that my docker-compose :


    version: '2'


    volumes:

    nextcloud:

    db:


    services:

    db:

    image: mariadb

    restart: always

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

    volumes:

    - db:/var/lib/mysql

    environment:

    - MYSQL_ROOT_PASSWORD=mypwd

    - MYSQL_PASSWORD=mypsw

    - MYSQL_DATABASE=nextcloud

    - MYSQL_USER=nextcloud


    app:

    image: nextcloud

    restart: always

    ports:

    - 8080:80

    links:

    - db

    volumes:

    - /Nextcloud:/var/www/html

    environment:

    - MYSQL_PASSWORD=mypsw

    - MYSQL_DATABASE=nextcloud

    - MYSQL_USER=nextcloud

    - MYSQL_HOST=db

    - NEXTCLOUD_TRUSTED_DOMAINS= 192.168.1.131

  • Please refer to this manual, there you might find a solution:


    https://www.linuxbabe.com/ubun…tu-20-04-nginx-lemp-stack

    That link is to run Nextcloud on the server and NOT on docker.



    @OP

    That docker stack is quite old and doesn't run Nextcloud behind a reverse proxy (AFAIK) and will also put the folders on the root partition.

    That is a wrong approach, mainly because it will fill up really fast.

    And, if I recall correctly, that yml would then, need an upgrade with another tutorial to put it behind proxy-server.


    The best way is for you to follow the guide here on the forum and you won't need anything else:

    [How-To] Nextcloud with Letsencrypt using OMV and docker-compose - Guides - openmediavault

  • Finally i reinstall mariadb, and nextcloud, than i hv access to my config.php. i had letsencrypt to...


    that my config.php :


    <?php

    $CONFIG = array (

    'memcache.local' => '\\OC\\Memcache\\APCu',

    'datadirectory' => '/data',

    'instanceid' => 'ocgubdku1bd8',

    'passwordsalt' => 'TXMQB640A5YtoUYFr9Jh6fAmRGJ/LE',

    'secret' => 'pQdOkxRDLS51MWjeesL3+XngjTXkNiy8Gl9S5Q9McaOQToqo',

    'trusted_domains' =>

    array (

    0 => '192.168.1.131:443',

    1 => 'nextcloud.<ricardosrvomv>.duckdns.org',

    ),

    'trusted_proxies' => ['letsencrypt'],

    'overwrite.cli.url' => 'https://nextcloud.<ricardosrvomv>.duckdns.org/',

    'overwritehost' => 'nextcloud.<ricardosrvomv>.duckdns.org',

    'overwriteprotocol' => 'https',

    'dbtype' => 'mysql',

    'version' => '21.0.0.18',

    'dbname' => 'nextcloud',

    'dbhost' => '192.168.1.131:3306',

    'dbport' => '',

    'dbtableprefix' => 'oc_',

    'mysql.utf8mb4' => true,

    'dbuser' => 'nextcloud',

    'dbpassword' => 'passwordnextcloud',

    'installed' => true,


    i still dont have access to my nextcloud...

    );

  • Please, mask your config.php sensible information (the db password, passwordsalt, etc) and try to use the "code" button.


    Did you create the stack in Portainer?


    Are ALL the containers in the same network?


    The config.php has, at least one error (although something more is wrong):

    Code
    'trusted_domains' =>
    array (
    0 => '192.168.1.131:443',#<<--This is wrong, since you have Letsencrypt ('https://192.168.1.131:450') When is properly done, 450 will bypass it. It must be added/changed in the stack. Instructions below. 
    1 => 'nextcloud.<ricardosrvomv>.duckdns.org',
    ),


    Your stack must have this added on the Nextcloud service:


    Code
    app:
    image: nextcloud
    restart: always
    ports:
    - 8080:80
    - 450:443  #<<--- This is needed to bypass Letsencrypt and get access to NC via LAN
    links:
    - db


    Also, have you made sure that you are using the letsencrypt proxy-conf/nextcloud.subdomain.conf

    I think it's the same proccess as SWAG:


    Go to the folder of Letsencrypt named "proxy-confs" and there's a "nextcloud.subdomain.conf.sample". You have to rename it and restart Letsencrypt:

    cp nextcloud.subdomain.conf.sample nextcloud.subdomain.conf

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!