Posts by brunetton


    I'm very enthusiastic about installing Nextcloud as a Kodi plugin, that will define for me the systemd service. But I've to say that I'm more or less hopeless; after having tried initializing Nextcloud container and make it communicate with MariaDB.

    In sort

    I installed NextCloud and MariaDB addons, but when I connect to NextCloud UI for the install process (when we specify DB address, user and password), I got



    SQLSTATE[HY000] [2002] Connection refused


    I followed the steps detailed in this thread. Here are the detailed steps I followed:

    • install mariadb, with no user and pre-created db, or with a dedicated user and nc database (nc for NextCloud) as read in this thread

      • waiting for the installation to complete (cheching with docker logs that all installation steps finished and that the server is actually ready and listening)

      • in case I installed with a dedicated user:

        • checked that the user ('nextcloud'@'%') had all privileges by using mysql command in mariadb container
        • also checked the nextcloud password
    • install NextCloud addon

    • Wait for install to finish (checking container's logs)

    • reboot (I wonder why, but I tried ad it's mentioned by a moderator user in this comment, I did it without thinking)

    • checked that I'm able to access mariadb from another container:

      • installed Adminer image
      • added this container onto lsio network
      • successfully logged onto DB as root and nextcloud user (using, witch is MariaDB IP address in lsio network)
    • but when I try to connect MariaDB from Nextcloud, this just doesn't works:

      SQLSTATE[HY000] [2002] Connection refused

    I tried all combinations of:

    • using MariaDB root login / pass, or dedicated nc DB user / pass (that have all privileges on nc database)
    • using as DB host and port: all combinations of ("", "mariadb") for host and ("3306", blank) for port

    Later I noticed that in NextCloud log file for every attempt there was this error:



    "remoteAddr":"","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Host was not connected to because it violates local access rules","version":""

    I checked in Nextcloud's config.php file (/storage/.kodi/userdata/addon_data/docker.linuxserver.nextcloud/config/www/nextcloud/config/config.php) and my box LAN IP address is whitelisted in trusted domains:

    'trusted_domains' =>
    array (
    0 => '',

    I also tested to add 'allow_local_remote_servers' => true, as I read here (without understanding deeply)

    Containers network problems

    When I launch bash on nextcloud container (docker exec -it nextcloud bash):

    • I'm not able to ping mariadb container
      • using its name mariadb
      • using its IP in lsio network ( in my case)
    • I realized that I'm not able to access internet neither. Here's the content of /etc/resolv.conf:

      options ndots:0

    I suppose this isn't "normal", but I'm not an expert in networking.

    Final thoughts

    I'm wondering where did I missed something.

    • is the problem is related to the "local access rules violation" problem ?
    • is the problem is related to the communication issues between the 2 containers ? I'm on the verge to define my own docker-compose file and make a systemd service to see if that helps

    Additional information

    • LibreELEC v9.2.6 on Raspberry Pi4
    LibreELEC:~ # docker inspect -f '{{ index .Config.Labels "build_version" }}' mariadb version:- 110.4.17mariabionic-ls8 Build-date:- 2021-01-23T01:27:05-05:00
    LibreELEC:~ # docker inspect -f '{{ index .Config.Labels "build_version" }}' nextcloud version:- 20.0.6-ls117 Build-date:- 2021-01-26T13:30:45-05:00

    Does anyone have any clue ? aptalca maybe ? I'd be grateful !

    Thanks for reading !

    After some weekd of testing, I'm back to my first solution: `sshfs` mount. I don't know why but sftp method is not usable on big files (files that needs buffering): Kodi freeze for a while then come back to file list.
    In contrary the buffering is doing well with sshfs mount.


    I'm trying LibreElec for some days now and I've to say that I'm very happy ! Thanks to all of you. I like the simplicity of the system, the ability to use systemd to make my own services, Docker, etc. The system is simple yet extensible.

    But I'm playing videos from a private server. This server is only accessible via ssh (no FTP, SFTP, etc), and only with an identity file (no password auth).

    • first I've used a systemd service that mounted this remote directory on a local directory using `sshfs`
      • but this has the big disadvantage of let Kodi think this directory was a normal directory and there were 2 drawbacks:
        • when the server is off Kodi becomes non responsive for a long time (some minutes), probably waiting for the system to list files on this directory, without any timeout
        • I had buffering issues that I didn't solved by tweaking advancedsettings.xml files
    • today I got the solution from
      • putted my ssh identity files in `/storage/.ssh`
      • used the sshfs plugin with
        • correct username
        • no password
      • surprisingly the plugin uses root ssh keys to identify an user with another name

    I can't test video streaming now but at least I can browse distant files :)