How to manually install Nextcloud on FreeNAS in an iocage jail with hardened security

How to manually install Nextcloud on FreeNAS in an iocage jail with hardened security v2.0.1

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
I started reading your doc and from the very first lines, I noticed something significant is missing : a complete backup for Nextcloud also includes a another resource : custom_apps. By saving the config and database, you backup stuff related to external apps. But by not backing up the apps themselves, you may end up in trouble
Interesting, this is the first time I've heard this. The nextcloud documentation seems to disagree with you though; they only specify configuration, data, database and themes. I also don't actually have a folder called custom_apps in my nextcloud installation directory. I suspect there are probably differences between the docker image and the regular server distribution

About restoring backups, you do not always want to overwrite the existing Nextcloud with the one to be restored. All the restore I did here were for recovering few files. For that, I have to deploy a new and parallel server, one that can run a previous version of Nextcloud, its apps, etc. Also, if one is using server-side encryption, the encryption keys are in the database and required for a restore. For these reasons, I would suggest you to put a restore procedure about how to restore without affecting the main instance.
I'm not convinced this needs a guide. The solution is just to follow the restoration procedure in a new jail. I haven't tried this though (parallel instances), so I'm not sure where the issues lie. Off the top of my head, perhaps there's a risk in having two nextcloud instances look at the same data/modify the same database, so maybe doing a deep copy of the data in to the new jail first would be useful. I'm not sure. Something to think about.

Note that I don't actually address the process of backing everything up; this was beyond the scope of the guide. What I _do_ do, is configure things in a way that allows the jail to be nuked and re-created without worrying about losing data. This provides _some_ insulation to user error when maintaining/installing the software.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
so maybe doing a deep copy of the data in to the new jail first would be useful.

Hi again,

Here, for my restore, I just clone the snapshot holding the data and mount the clone in the recovered instance. That way, there is no need to actually --copy-- the data, no need for double space, etc.

I also don't actually have a folder called custom_apps in my nextcloud installation directory. I suspect there are probably differences between the docker image and the regular server distribution

Yes, I guess that may be the difference between the two... In the doc, they rely on their app store for you to re-install whatever app you had. That idea works but only for the latest versions. For backups that may be up to 5 years old in my case, I do not wish to rely on such a mechanism.

perhaps there's a risk in having two nextcloud instances look at the same data/modify the same database,

Yes and No here. When doing HA or higher load systems, you end up with multiple frontends querying the same database and serving the same data. That is good for HA and high performance. But when you talk about restoring an older version to recover a few data, you need the old database (calendars and contacts are there, so are encryption keys if you do server side encryption) and the old data. As such, you need two sets and not just one like for HA / High Perf.

Congrats for your doc, the more complete one I saw so far,
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
samuel-emrys updated How to manually install Nextcloud on FreeNAS in an iocage jail with hardened security with a new update entry:

How to manually install Nextcloud on FreeNAS in an iocage jail with hardened security

The Guide: https://www.samueldowling.com/2020/...n-freenas-iocage-jail-with-hardened-security/

This guide will show you how to manually set up and configure a Nextcloud server in an iocage jail, as well as how to harden your security to make sure your information is safe. Specifically, this guide covers:
  • Organise your datasets
  • Set up and configuration of a FAMP (FreeBSD, Apache, MySQL, PHP) web server stack
  • Optimise your database
  • Install...

Read the rest of this update entry...
 

John Doe

Guru
Joined
Aug 16, 2011
Messages
635
hi Samuel,

thanks for the efforts for this guideline. I tried to install it but it seems that there is a problem with the mysql:


Code:
root@nextcloud:~ # service mysql-server start
Starting mysql.
mysql_secure_installation
root@nextcloud:~ # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Enter current password for root (enter for none):


starting mysql takes quite long....

Code:
top

last pid: 50059;  load averages:  0.65,  0.51,  0.51   up 67+10:46:17  21:00:30
11 processes:  1 running, 10 sleeping
CPU:  0.0% user,  0.0% nice,  0.2% system,  0.2% interrupt, 99.6% idle
Mem: 277M Active, 3064M Inact, 35G Wired, 970M Free
ARC: 28G Total, 16G MFU, 11G MRU, 5223K Anon, 148M Header, 430M Other
     26G Compressed, 37G Uncompressed, 1.40:1 Ratio
Swap: 8192M Total, 8192M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
50059 root          1  20    0  7924K  3152K CPU1    1   0:00   0.01% top
47109 root          1  20    0 10840K  5404K select  1   0:00   0.00% httpd
47451 root          1  20    0  7488K  3956K pause   1   0:00   0.00% csh
47450 root          1  52    0  6948K  2852K wait    0   0:00   0.00% login
47120 root          1  20    0  6460K  2344K nanslp  1   0:00   0.00% cron
46972 root          1  20    0  6420K  2464K select  0   0:00   0.00% syslogd
47112 www           1  52    0 10840K  5292K accept  0   0:00   0.00% httpd
47115 www           1  52    0 10840K  5292K accept  0   0:00   0.00% httpd
47117 www           1  52    0 10840K  5292K accept  0   0:00   0.00% httpd
47113 www           1  52    0 10840K  5292K accept  1   0:00   0.00% httpd
47116 www           1  52    0 10840K  5292K accept  1   0:00   0.00% httpd



Code:
root@nextcloud:/tmp # ls
.font-unix      .ICE-unix       .X11-unix       .XIM-unix


Code:
root@nextcloud:/tmp # pkg install mariadb104-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed



any idea?
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
hi Samuel,

thanks for the efforts for this guideline. I tried to install it but it seems that there is a problem with the mysql:


Code:
root@nextcloud:~ # service mysql-server start
Starting mysql.
mysql_secure_installation
root@nextcloud:~ # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Enter current password for root (enter for none):

The issue here is that the mysql service hasn't started. I've rarely seen this happen for new installations; are you migrating an old installation by any chance? If so, one workaround would be to do a backup of the database, and reimport it after you've installed this one fresh. Otherwise, it might be worth using the mysqld_safe instructions to see if you have any luck starting the service that way. This is covered in the guide, but for clarity:
Code:
$ mysqld_safe --skip-grant-tables &
$ service mysql-server start


If the service successfully starts, you should get significantly more output than just Starting mysql.. Note: the process of backing up the database is covered in the "Upgrading" section of the guide, but essentially, to back up the database, it means using this command:

Code:
root@nextcloud:/tmp $ mysqldump --single-transaction -u root -p nextcloud > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak


Having said that, I think mysqldump probably requires a working mysql service, so you can only really do this if you haven't nuked your old installation yet.

Other things to check:
  • is /var/db/mysql owned by the mysql user?
  • is /var/db/mysql empty?
 

ChaosBlades

Contributor
Joined
Jul 4, 2015
Messages
137
The issue here is that the mysql service hasn't started. I've rarely seen this happen for new installations; are you migrating an old installation by any chance? If so, one workaround would be to do a backup of the database, and reimport it after you've installed this one fresh. Otherwise, it might be worth using the mysqld_safe instructions to see if you have any luck starting the service that way. This is covered in the guide, but for clarity:
Code:
$ mysqld_safe --skip-grant-tables &
$ service mysql-server start


If the service successfully starts, you should get significantly more output than just Starting mysql.. Note: the process of backing up the database is covered in the "Upgrading" section of the guide, but essentially, to back up the database, it means using this command:

Code:
root@nextcloud:/tmp $ mysqldump --single-transaction -u root -p nextcloud > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak


Having said that, I think mysqldump probably requires a working mysql service, so you can only really do this if you haven't nuked your old installation yet.

Other things to check:
  • is /var/db/mysql owned by the mysql user?
  • is /var/db/mysql empty?
I have the same issue. I added an issue to the github yesterday before I found the thread.

Here is the full output of the commands from my github issue.

Like I said on github... This is on FreeNAS-11.3-U3.2 and I also tried switching the repo to latest with the same error. Also tried mariadb103-server with the same error.

iocage create -r 11.3-RELEASE -n tst dhcp=on
iocage start tst
iocage console tst
pkg update
pkg install -y nano wget ca_root_nss apache24 mariadb104-server
sysrc apache24_enable=yes
service apache24 start
sysrc mysql_enable=yes
service mysql-server start
mysql_secure_installation

root@tst:~ # sysrc apache24_enable=yes
apache24_enable: -> yes
root@tst:~ # service apache24 start
Performing sanity check on apache24 configuration:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
Starting apache24.
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
root@tst:~ # sysrc mysql_enable=yes
mysql_enable: -> yes
root@tst:~ # service mysql-server start
Installing MariaDB/MySQL system tables in '/var/db/mysql' ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system


Two all-privilege accounts were created.
One is root@localhost, it has no password, but you need to
be system 'root' user to connect. Use, for example, sudo mysql
The second is mysql@localhost, it has no password either, but
you need to be the system 'mysql' user to connect.
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr/local' ; /usr/local/bin/mysqld_safe --datadir='/var/db/mysql'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/local/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
Consider joining MariaDB's strong and vibrant community:

Starting mysql.
root@tst:~ # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Enter current password for root (enter for none):

Edit: Almost forgot mysqld_safe --skip-grant-tables &

root@tst:~ # service mysql-server stop
mysql not running? (check /var/db/mysql/tst.pid).
root@tst:~ # mysqld_safe --skip-grant-tables &
[1] 69840
root@tst:~ # 200625 06:59:49 mysqld_safe Logging to '/var/db/mysql/tst.err'.
200625 06:59:49 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql

root@tst:~ # service mysql-server start
mysql already running? (pid=69935).
root@tst:~ # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Enter current password for root (enter for none):
 
Last edited:

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
The response is replicated on the GitHub issue, but the process I followed to rectify this:
  1. Modify the 'socket' parameter in /usr/local/etc/mysql/my.cnf; change the value from /var/run/mysql/mysql.sock to /tmp/mysql.sock
  2. Run /usr/local/bin/mysqld_safe --datadir='/var/db/mysql' &. This should get the server started, from which point you should be able to execute mysql_secure_installation and get everything configured. From here on, service mysql-server start, stop, and status should be enough to manage the mysql service.
Edit: It is necessary to change the path in (1) to /tmp/mysql.sock. This is the path that mysql_secure_installation expects
Edit2: Instructions updated to reflect updating the configuration file prior to starting the mysql server in v2.0.1
 
Last edited:

John Doe

Guru
Joined
Aug 16, 2011
Messages
635
The response is replicated on the GitHub issue, but the process I followed to rectify this:
  1. Modify the 'socket' parameter in /usr/local/etc/mysql/my.cnf; change the value from /var/run/mysql/mysql.sock to /tmp/mysql.sock
  2. Run /usr/local/bin/mysqld_safe --datadir='/var/db/mysql' &. This should get the server started, from which point you should be able to execute mysql_secure_installation and get everything configured. From here on, service mysql-server start, stop, and status should be enough to manage the mysql service.
Edit: It is necessary to change the path in (1) to /tmp/mysql.sock. This is the path that mysql_secure_installation expects
Edit2: Instructions updated to reflect updating the configuration file prior to starting the mysql server in v2.0.1

jep, solved to problem
 

peter_cd.cn

Dabbler
Joined
Feb 9, 2018
Messages
39
Found some error today while installing php74.

Code:
Number of packages to be installed: 78

The process will require 228 MiB more space.

Proceed with this action? [y/N]: y
[nextcloud] [1/78] Installing tpm-emulator-0.7.4_2...
===> Creating groups.
Using existing group '_tss'.
===> Creating users
Creating user '_tss' with uid '601'.
pw: user '_tss' disappeared during update
pkg: PRE-INSTALL script failed


I was running this command:
pkg install php74 php74-bz2 php74-ctype php74-curl php74-dom php74-exif php74-fileinfo php74-filter php74-gd php74-iconv php74-intl php74-json php74-ldap php74-mbstring php74-opcache php74-openssl php74-pdo php74-pdo_mysql php74-pecl-APCu php74-pecl-imagick php74-pecl-redis php74-posix php74-session php74-simplexml php74-xml php74-xmlreader php74-xmlwriter php74-xsl php74-zip php74-zlib php74-bcmath php74-gmp
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
Found some error today while installing php74.

Code:
Number of packages to be installed: 78

The process will require 228 MiB more space.

Proceed with this action? [y/N]: y
[nextcloud] [1/78] Installing tpm-emulator-0.7.4_2...
===> Creating groups.
Using existing group '_tss'.
===> Creating users
Creating user '_tss' with uid '601'.
pw: user '_tss' disappeared during update
pkg: PRE-INSTALL script failed


I was running this command:
pkg install php74 php74-bz2 php74-ctype php74-curl php74-dom php74-exif php74-fileinfo php74-filter php74-gd php74-iconv php74-intl php74-json php74-ldap php74-mbstring php74-opcache php74-openssl php74-pdo php74-pdo_mysql php74-pecl-APCu php74-pecl-imagick php74-pecl-redis php74-posix php74-session php74-simplexml php74-xml php74-xmlreader php74-xmlwriter php74-xsl php74-zip php74-zlib php74-bcmath php74-gmp
Hi @peter_cd.cn, this isn't an issue with this nextcloud guide, rather something to do with FreeBSD/FreeNAS/TrueNAS generally, or your environment. For what it's worth, I just copy and pasted the command you provided to replicate this and it worked fine for me. A quick google of the error yielded this FreeBSD bug report which proposes a solution. If the proposed solution doesn't resolve the issue for you, please reply to that thread for further assistance.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
pw: user '_tss' disappeared during update
Run pwd_mkdb -p /etc/master.passwd; pwd_mkdb /etc/master.passwd inside the jail and try again.
 

dlock82

Cadet
Joined
Mar 25, 2021
Messages
3
Hello,

I'm new here so please bear with me. I installed Nextcloud on Freenas back in 2019 following Sam's awesome guide. I was running Nextcloud version 17. My system has been upgraded to TrueNAS core with Jail release 11.3p14. I attempted to do a manual upgrade and now consistently get stuck with the ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) even after following all of the suggestions in this post. I tried created a fresh Jail and ended up with the same error. I have scoured the Internet with no luck. I feel like this might be a FreeBSD problem but I'm at my wits end trying to figure it out and my Nextcloud is still down.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
What does service mysql-server status show?
If it's not running does it run after service mysql-server start?
If not, what's in /var/db/mysql/<yourjailhostname>.err?

This is simply your database server not starting like it used to after your update. Possibly there have been incompatible changes, e.g. to the config file or to the defaults. I assume you have not run mysql_upgrade, either?
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
What does service mysql-server status show?
If it's not running does it run after service mysql-server start?
If not, what's in /var/db/mysql/<yourjailhostname>.err?

This is simply your database server not starting like it used to after your update. Possibly there have been incompatible changes, e.g. to the config file or to the defaults. I assume you have not run mysql_upgrade, either?
It might also be that the socket has moved locations. @dlock82 you could also try running updatedb followed by locate mysql.sock to make sure that it still lives at /tmp/mysql.sock (if the server is actually running)
 

dlock82

Cadet
Joined
Mar 25, 2021
Messages
3
What does service mysql-server status show?
If it's not running does it run after service mysql-server start?
If not, what's in /var/db/mysql/<yourjailhostname>.err?

Code:
root@nextcloud:~ # mysql status
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


Code:
2021-03-21 22:52:54 0 [Note] InnoDB: Completed initialization of buffer pool
2021-03-21 22:52:55 0 [ERROR] InnoDB: Missing MLOG_CHECKPOINT at 4621751437 between the checkpoi>
2021-03-21 22:52:55 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-03-21 22:52:55 0 [Note] InnoDB: Starting shutdown...
2021-03-21 22:52:55 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-03-21 22:52:55 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-03-21 22:52:55 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-03-21 22:52:55 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-03-21 22:52:55 0 [ERROR] Aborting
2021-03-21 22:52:54 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1,>
2021-03-21 22:52:54 0 [Note] InnoDB: Completed initialization of buffer pool
2021-03-21 22:52:55 0 [ERROR] InnoDB: Missing MLOG_CHECKPOINT at 4621751437 between the checkpoi>
2021-03-21 22:52:55 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-03-21 22:52:55 0 [Note] InnoDB: Starting shutdown...
2021-03-21 22:52:55 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-03-21 22:52:55 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-03-21 22:52:55 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-03-21 22:52:55 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-03-21 22:52:55 0 [ERROR] Aborting


These are the last few lines in the .err log around the time I started upgrading but before I came the current roadblock.

This is simply your database server not starting like it used to after your update. Possibly there have been incompatible changes, e.g. to the config file or to the defaults. I assume you have not run mysql_upgrade, either?

Today I upgraded the jail to 12.2p4 and still no luck. It just won't start.
 

dlock82

Cadet
Joined
Mar 25, 2021
Messages
3
It might also be that the socket has moved locations. @dlock82 you could also try running updatedb followed by locate mysql.sock to make sure that it still lives at /tmp/mysql.sock (if the server is actually running)

Code:
root@nextcloud:~ # mysqld_safe --skip-grant-tables &
[1] 24402
root@nextcloud:~ # 210325 19:28:07 mysqld_safe Logging to '/var/log/mysql/mysqld.err'.
210325 19:28:07 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
/usr/local/etc/rc.d/mysql-server start
Installing MariaDB/MySQL system tables in '/var/db/mysql' ...

Installation of system tables failed!  Examine the logs in
/var/db/mysql for more information.

The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:

    shell> /usr/local/bin/mysql_install_db --defaults-file=~/.my.cnf

You can also try to start the mysqld daemon with:

    shell> /usr/local/libexec/mysqld --skip-grant-tables --general-log &

and use the command line tool /usr/local/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/local/bin/mysql -u root mysql
    mysql> show tables;

Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in /var/db/mysql that may be helpful.

The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss

Please check all of the above before submitting a bug report
at http://mariadb.org/jira

/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
[1]  + Done                          mysqld_safe --skip-grant-tables
root@nextcloud:~ #
 

Cook1e_mr

Dabbler
Joined
Jul 30, 2020
Messages
13
Hi All,

I am having problems installing this, I get to the web configuration section (i have started fresh several times now) and i get a gateway timeout error and it never completes the install

1622382093374.png


I have also tried to install via CLI using

Code:
su -m www -c "php /usr/local/www/nextcloud/occ maintenance:install --database=\"mysql\" --database-name=\"nextcloud\" --database-user=\"nextcloud_admin\" --database-pass=\"mypassword\" --database-host=\"localhost:/tmp/mysql.sock\" --admin-user=\"ncadmin\" --admin-pass=\"mypassword\" --data-dir=\"/mnt/data""


however this drives
1622382201066.png


checking the database I can see it exists
1622382310956.png


and I have verified the permissions also

1622382388490.png


the UID and GID of the mysql user was 88 in the install.

Does anyone know what the issue is here?

thanks in advance
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
Hi All,

I am having problems installing this, I get to the web configuration section (i have started fresh several times now) and i get a gateway timeout error and it never completes the install

View attachment 47446

I have also tried to install via CLI using

Code:
su -m www -c "php /usr/local/www/nextcloud/occ maintenance:install --database=\"mysql\" --database-name=\"nextcloud\" --database-user=\"nextcloud_admin\" --database-pass=\"mypassword\" --database-host=\"localhost:/tmp/mysql.sock\" --admin-user=\"ncadmin\" --admin-pass=\"mypassword\" --data-dir=\"/mnt/data""


however this drives View attachment 47447

checking the database I can see it exists View attachment 47448

and I have verified the permissions also

View attachment 47449

the UID and GID of the mysql user was 88 in the install.

Does anyone know what the issue is here?

thanks in advance

Hey, so to be clear, when you navigate to your IP, do you get the blue set-up screen where you can enter all of your information? or does this screen fail to load altogether?

If you do get to the screen, can you confirm for me that the mysql socket is actually running at /tmp/mysql.sock?

Code:
ls -al /tmp/mysql.sock


If nothing shows here, then this is likely your issue. The solution will be to replace this with the correct path to the socket, or configure the socket to be created in this location (I think the default location is now /var/run/mysql/mysql.sock). You can find it with:

Code:
/usr/libexec/locate.updatedb
locate mysql.sock
 

Cook1e_mr

Dabbler
Joined
Jul 30, 2020
Messages
13
Thank you for the reply.

I can confirm I do get the blue setup screen.

I can also confirm the output of that command

Screenshot_20210530-161715_Termius.jpg
 

Cook1e_mr

Dabbler
Joined
Jul 30, 2020
Messages
13
Top