Still can't get Nextcloud running even in a Portainer

Currently reading
Still can't get Nextcloud running even in a Portainer

239
35
NAS
DS918+
Operating system
  1. macOS
Mobile operating system
  1. iOS
Kinda taking your advice and I've installed Portainer and then Nextcloud. As it looked easy with no CLI I followed this tutorial. Synology: How to Install Nextcloud Using Docker

A couple of failures gets me back to the same error. On creating a user for Nextcloud I run into

Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory

FWIW I also tried a fully manual install of NC in www using Synology's MariaDB and phpMyAdmin. That never got me anywhere. Ditto installing NC via Docker.

So using Portainer gets me the furthest but not to my goal.

Maybe Nextcloud (the latest) is broken. Maybe some clever person hear would like to see if they can get NC running. Or maybe I'll see if OwnCloud works...
 
Did you specify the 3307 port that the Synology MariaDB10 uses when connecting to it?
Have you given the user and pass permissions to remotely connect to the database?
 
Did you specify the 3307 port that the Synology MariaDB10 uses when connecting to it?
If you're asking me (the OP)... No and yes. I followed step 10 in the instructions I linked above. But in my final attempt I used "localhost:3306", which got me to the same error (as above).
Have you given the user and pass permissions to remotely connect to the database?
Yes but that doesn't seem to be my problem as I have a "No such file or directory" error.
I just had to use PUID and PGID of the http user for some reason. When i tried the admin user, it didn't work for me.
OK, going to try this. But why/how did you decide on the http user? And did you use the same user for PUID and GUID? I had used the user ID of the current (admin role but not "admin") user and group ID 100 "users" (cos that's what it looked like in the tutorial linked to above).
 
OK none of this is working for me. Tried @SynoMan 's http user but still I end up with the same "Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory" error. I'm using Portainer like you all said would solve my probems.... ;)

Shall I give up and just use iCloud now?

I'd give OwnCloud a go but there aren't too many tutorials on installation. It _should_ be the same but being as I'm failing here I don't want to just substitute one failure for another.
 
OK, going to try this. But why/how did you decide on the http user? And did you use the same user for PUID and GUID? I had used the user ID of the current (admin role but not "admin") user and group ID 100 "users" (cos that's what it looked like in the tutorial linked to above).
I was googling a bit, and then I've seen on the NAS that the http group is the System default group for Web services. I'd say I'll give it a go and worked. But as Telos said, maybe I can put my admin user to the http group.


OK none of this is working for me. Tried @SynoMan 's http user but still I end up with the same "Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory" error. I'm using Portainer like you all said would solve my probems.... ;)
That error is not because of Portainer. Hmm, interesting. I'm not getting that. Do you get this screen:

Screenshot 2021-09-07 at 10.23.56.png



And where it says localhost what do you put in there?
 
And where it says localhost what do you put in there?
I started with "mariadb" cos that's what the tutorial said. I've tried "localhost", "localhost:3306" and "localhost:3307" and 127.0.01 and various other combos.

So meanwhile I watched this You Tube and I see the bloke has a port for his MariaDB, which I don't. And his is totally different. So I don't even know what the port for my database is. Should I?

Screenshot 2021-09-07 at 09.52.49.png


Or, you can try with Linuxserver image, maybe: Docker Hub

I don't see how that will make any difference. Surely my real problem is getting a connection to the data base. BTW did you actually go past that screen, get logged into the actual Nextcloud? See the list of files?
 
I started with "mariadb" cos that's what the tutorial said. I've tried "localhost", "localhost:3306" and "localhost:3307" and 127.0.01 and various other combos.
Tried with mysql? Or try with this: yourNASip:DBport. For DBport choose the left number.


I don't see how that will make any difference. Surely my real problem is getting a connection to the data base. BTW did you actually go past that screen, get logged into the actual Nextcloud? See the list of files?
Actually, I don't get that screen. I just run my docker-compose and I open the NC on http://myNASip:NCport and it shows me the screen to create an admin account. I set the credentials and the installation begins automatically and after 10-15 seconds the NC opens up.

But I manually create a DB in phpMyAdmin and set a user for this database. I am also running a separate container for MariaDB.

And this is my docker-compose for NC:
YAML:
version: "3.5"
services:
  app:
    image: nextcloud:latest
    restart: always
    network_mode: bridge
    container_name: nextcloud
    ports:
      - 8787:80
    volumes:
      - /volume1/docker/nextcloud/html:/var/www/html
      - /volume1/docker/nextcloud/custom_apps:/var/www/html/custom_apps
      - /volume1/docker/nextcloud/config:/var/www/html/config
      - /volume1/docker/nextcloud/data:/var/www/html/data
      - /volume1/docker/nextcloud/themes:/var/www/html/themes/
    environment:
      - PUID=1031
      - PGID=1023
      - TZ=London/Europe
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=user_nextcloud
      - MYSQL_PASSWORD=********
      - MYSQL_HOST=192.168.0.8:3338


Before running that make sure to create all folders in the File station.

More, as Telos mentioned, I've created a dedicated user on my NAS only for this container and add it to the http group. Gave him only permission to nextcloud folder in File station. All other permissions are on Deny or No access.
 
Meanwhile I tried and failed again. This time this error
Error while trying to initialise the database: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
when using this You Tube. Which did seem nice and simple. Still no database access it would appear.

Or try with this: yourNASip:DBport. For DBport choose the left number.
Have a look at the screenshot of my Portainer, I don't have ports for my MariaDB. But I see in your docker-compose you do. So this tutorial is wrong, missing bits?
But I manually create a DB in phpMyAdmin and set a user for this database. I am also running a separate container for MariaDB.
So not a "stack"? You already have MariaDB installed in a container, ditto phpMyAdmin? So just like running them from the Synology Docker then? ;) And manually creating a database in phpMyAdmin is what I remember doing last year. So I should forget the whole stack business and use separate containers.

Back again soon...
 
So earlier I hadn't changed the default data folder in the set-up screen. Now I see it should be /docker/nextcloud. And I've set the whole folder permissions for http. That gives an owner of 33 and group http. Because that's all I can do in the DSM interface.

Anyways, new error.


Seems I've given write access, http has full access.

Anyway, back to iCloud
 
If you know how to extract a zip, make a bash script executable. I can provide a template that allows to configure NextCloud that takes care of the complete configuration (incl. admin setup).

With minor modifications it can be adopted to generate a docker-compose.yml that could be used in Portainer to deploy compose stack.
 

Attachments

  • nextcloud_template.zip
    1 KB · Views: 25
If you know how to extract a zip, make a bash script executable
The former yes, the latter, no.

Thanks but honestly this is just another way to skin a cat. I can install everything, I have gone back to the Synology Docker and have followed my instructions from last year. I have Nextcloud, MariaDB and phpMyAdmin all running. What I don't have is access (see above).

I messed with the permissions but still this cat is dead.

As I say, too many ways to skin a cat and too many of the tutorials I'm seeing miss out a vital piece of information. And my brain doesn't work in such a way that that's obvious to me. And then someone suggests a new way to do things. I appreciate it @one-eyed-king but I think I really ought to either get a Microsoft 365 subscription or dust down the iCloud.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

How did you create the Portainer container in first place? As in exact docker run commands or in case...
Replies
7
Views
1,404
Thank you for this - I'll give it a go and see where I get - worst case I learn something as I go!
Replies
6
Views
1,642

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top