Nextcloud Error on TrueNAS

Hey guys!

I want to install nextcloud on my TrueNAS and I’ve encountered the following issue:

Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user ‘dbadmin’@‘localhost’ (using password: YES)

Do you know how to fix that?

(latest TrueNAS Version: TrueNAS-12.0-U3.1; latest Nextcloud version: 21.0.1)

Can you log into the mysql database manually using that username and password?

Hello.
Yes, it’s been a few days since the last updates. The problem is that only MySql 8 is supported. The strange thing is that Nextcloud is an officially supported plugin from Truenas, and so far I can only read confused questions and no response from official sources. :wink: Maybe the solution will help you.

Have a nice day. :v: :slightly_smiling_face:

Update SQL commands to be compatible with MySQL 8.x
https://github.com/freenas/iocage-plugin-nextcloud/pull/40/files

I can’t specifically speak about the Nextcloud FreeNAS plugin, however just in general - FreeNAS plugins are usually poorly maintained and oftentimes are not updated between versions. I can’t say I install anything on my FreeNAS installation from plugins.

I followed these instructions for installing Nextcloud within FreeNAS jail. I thought they were very useful and detailed.https://www.samueldowling.com/2020/07/24/install-nextcloud-on-freenas-iocage-jail-with-hardened-security/

Were you able to fix this. I had to redo my TrueNas and now I’ve lost my nextcloud because of this same issue.

Were you able to fix this and get it working?

Relax, he already gave you the solution, he made the changes and create a PR but until it will be merged you can just SSH to your TrueNAS and run this.

create nextcloud.json with this content:

{
    "name": "Nextcloud",
    "plugin_schema": "2",
    "release": "12.2-RELEASE",
    "artifact": "https://github.com/EliasGabrielsson/iocage-plugin-nextcloud.git",
    "official": false,
    "properties": {
        "nat": 1,
        "nat_forwards": "tcp(80:8282)"
    },
    "pkgs": [
        "ffmpeg",
        "nextcloud-php74",
        "php74-pecl-imagick-im7",
        "php74-bcmath",
        "php74-gmp",
        "php74-pcntl",
        "nginx",
        "mysql80-server"
    ],
    "packagesite": "http://pkg.FreeBSD.org/${ABI}/latest",
    "fingerprints": {
        "iocage-plugins": [
            {
                "function": "sha256",
                "fingerprint": "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"
            }
        ]
    },
    "revision": "0"
}

run this command:

iocage fetch -P nextcloud.json

thanks @moddo

Hi, having the same Problem with the Plugin, I have one question to krnlpck. Im not so familiar with coding. I can SSH into my Nextcloud-Plugin Jail. Could you just specify, what you mean be ‘create nextcloud.json’. Does this mean to create a file named ‘nextcloud.json’ using an Command Line Text Editor (such as vi or nano) in the root directory with the content listed and then run the command ‘iocage fetch -P nextcloud.json’?? Sorry for this probably stupid question…

Hi, again, could you just kindly specific the steps to get the plugin working, especially how to ‚create nextcloud.json‘ ?
Kind regards

yes, create the file nextcloud.json and run the iocage, but not in the jail, on the truenas