Giter Site home page Giter Site logo

danb35 / freenas-iocage-nextcloud Goto Github PK

View Code? Open in Web Editor NEW
251.0 26.0 71.0 13.66 MB

Script to create an iocage jail on FreeNAS for the latest Nextcloud 28 release, including Caddy, MariaDB or PostgreSQL, and Let's Encrypt

License: GNU General Public License v3.0

Shell 100.00%
freenas freenas-scripts iocage nextcloud-installation nextcloud

freenas-iocage-nextcloud's People

Contributors

basilhendroff avatar danb35 avatar erikthorsell avatar gitstashpop avatar jacopx avatar migsi avatar ornias1993 avatar rafallukawiecki avatar sam-harry avatar samuel-emrys avatar sohalt avatar timvherpen avatar tschettervictor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freenas-iocage-nextcloud's Issues

caddy won't serve a certificate

Ok, this https thing drives me crazy.

2019/12/29 18:55:28 [INFO] Serving https://XXXXXXX(sanitized)
2019/12/29 18:55:32 http: TLS handshake error from 192.168.1.226:62037: no certificate available for ''
2019/12/29 18:55:58 http: TLS handshake error from 192.168.1.226:62053: no certificate available for ''

Was checking caddy logs why I'm getting SSL_ERROR_INTERNAL_ERROR_ALERT from Firefox, and this weird webserver won't serve me the self signed certificate.

Rationale: This is a test instance, but already with real names/adresses. I use a traefik proxy which takes care of letsencrypt etc, so I just want a self signed cert internally.
With letsenecrypt the whole setup does not work (because it can't behind the proxy), but with self-signed cert everything starts up nicely.

Just can't access the page either using the name (traefik returns 'Bad Gateway' which means no proper response) or the IP. When I use the IP Firefox gives me this weird SSL ERROR.

Any idea?
I don't know much about webservers, just that I hate them ;) (and that stuff like nextcloud NEVER works the first time because of s*** like this)

Anyway, thanks a lot for providing this script, works great except this one 'small' issue, which I guess is because of this caddy server.

Settings used:

JAIL_IP="192.168.1.112"
DEFAULT_GW_IP="192.168.1.1"
POOL_PATH="/mnt/tank/nextcloud"
TIME_ZONE="Europe/Berlin"
HOST_NAME="XXXX"
SELFSIGNED_CERT=1
CERT_EMAIL="XXXX"

Internal server error

I am unable to access nextcloud and I honestly don't know what to do.
I saw under the issues that someone had a similar problem and fixing it was under the nextcloud config.php

but this didn't fix my issue. here is the log file, https://drive.google.com/open?id=1Pb3UNVHeLI-AZC2UU62kc4gI4gZFL1B8, i wanted to paste it here but the output is like... holy cow there is a lot.

One thing i see a lot in the log file is, "Is the matching PHP module installed and enabled?"

I don't know what this means and i would like some help. please!

502 Bad Gateway

Hi there, i get this error when finish a fresh installation, Caddyfile seems to be fine.

In the Jail configuration the IPv4 is set manually,

Any idea?

Thanks.

Fresh install, webserver not running

I ran through the script, everything returned as a success.

CloudFlare shows my site as offline, and browsing out to the local IP shows the site refused to connect.

My redacted install config:

JAIL_IP="192.168.0.3"
DEFAULT_GW_IP="192.168.0.1"
POOL_PATH="/mnt/NAS-pool"
TIME_ZONE="America/New_York"
HOST_NAME="XXXXX"
DNS_CERT=1
CERT_EMAIL="[email protected]"
DNS_PLUGIN="cloudflare"
DNS_ENV="[email protected]_API_KEY=XXXXXXXXXXX"
DB_PATH="$POOL_PATH/nextCloud/db"
FILES_PATH="$POOL_PATH/nextCloud/files"
PORTS_PATH="$POOL_PATH/nextCloud/portsnap"

Running FreeNAS 11.2-U4.1

security/performance issues with default install

After deploying the nextcloud-instance with this script, there are two warnings reported by the instance itself (under admin/settings/administration/overview):

  • The "X-Frame-Options" HTTP header is not set to "SAMEORIGIN". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.
  • Some columns in the database are missing a conversion to big int.

Both issues can be easily fixed:

For the first issue, add
X-Frame-Options "SAMEORIGIN"
in the "header" section of the Caddyfile.

For the second issue, execute
sudo -u www php /usr/local/www/nextcloud/occ db:convert-filecache-bigint
once after install.

N'autorise pas la connexion.

Hello, can you help me ?

Script run but Web don't work.
i put config file and the error whitch i see.

I get all puty log install if you need it.

Thanks.

% cat nextcloud-config

JAIL_IP="192.168.1.72"
DEFAULT_GW_IP="192.168.1.254"
POOL_PATH="/mnt/Vol_1"
TIME_ZONE="Europe/Paris"
HOST_NAME="cloud.nd30.fr"
STANDALONE_CERT=1
CERT_EMAIL="[email protected]"
JAIL_NAME="Cloud"

I see this error near finish

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /usr/local/www/nextcloud/lib/private/Console/Application.php:166
Stack trace:
#0 /usr/local/www/nextcloud/console.php(96): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /usr/local/www/nextcloud/occ(11): require_once('/usr/local/www/...')
#2 {main}
Your data directory is readable by other users
Please change the permissions to 0770 so that the directory cannot be listed by other users.

Stopped automatically renewing letsencrypt

After installing this and using it for about a couple of months now, the letsencrypt certificate has stopped renewing, and I are getting emails saying that my certificate will expire soon.
Any tips for fixing this?

I am running FreeNAS-11.2-STABLE.

White screen of death

First of all thanks for this great script!

After some time using I get a white screen of death with the installation. Now the second time on a different server. It seems that's there a problem with the db connection.

Did anyone else has the same problem?

Here is the error log entry:

[Wed Apr 10 08:19:31.315439 2019] [proxy_fcgi:error] [pid 4287:tid 34469042432][client 10.60.9.241:12282] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'localhost' (using password: YES) in /usr/local/www/apache24/data/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /usr/local/www/apache24/data/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->se...\nPHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'localhost' (using password: YES) in /usr/local/www/apache24/data/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /usr/local/www/apache24/data/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->se...\n'

These are my DB Dataset Settings
image

Or am I the first one?
I don't use SSL from the script since I have a reverse proxy running.
Thankful for any help!

EDIT: Just noticed that the folder /root/ is empty. After installation there was file containing the db login credentials... maybe something to do with than? Maybe theres a sort of autoclean the /root folder? But could not find any info on that.

Impossible to access nextcloud web page on https

I need help for configure access on Nextcloud web page on https

my domain name xxx.fr => my own NS

on my NS, a Zimbra mail server is up and use https.
on my freenas nextcloud on a jail and my server on a VM.

When Nextcloud was on http i can join both, since i put Nextcloud on https, i access zimbra but error on NextCloud.

Can you help me?

Set default SNI for Caddy

Some reverse proxy configs do not play nice with SNI (or would take config changes to work nice with SNI). Simply put, under some reverse proxies (OPNSENSE, nginx for example) it fails under default settings due to SNI failure. Normally one would solve this by fixing their proxy config.

However, because the caddy server for this project just serves Nextcloud and Nextcloud only, I suggest setting the default-sni flag on caddy. This ensures SSL request without (propper) SNI tag get the same certificate as requests that do.

This would be a security issue when hosting multiple sites, but with just nextcloud there is barely any risk. SNI is simply not required on single-ip, single-site setups like this.

Problem with assigned IP when installing?

I have assigned IP in the config file, and it reads:

JAIL_IP="192.168.1.75"

However when I run ./nextcloud-jail.sh
I get the following message:
Please provide a valid ip: Only decimal digits permitted in '75\r' in 192.168.1.75\r'

[QUESTION] Which documentation to follow?

Hi Danb35,

Just a quick question: which install instructions should I follow? The one here on github or the one posted on the Freenas forum?

I ask because I see some differences in the reccomendations, e.g.:
https://www.ixsystems.com/community/resources/scripted-installation-of-nextcloud-17-in-iocage-jail.90/

It's also preferred to have three datasets created on your pool: files (for the Nextcloud data files), db (for the MariaDB database files), and portsnap (for the FreeBSD ports collection). If you do create these datasets, for best performance, set atime to off for files and db, and set the record size for db to 16 KB (this can be found in the Advanced settings). If you don't create these datasets, the script will create directories on your pool instead.

Whereas
https://github.com/danb35/freenas-iocage-nextcloud

Although not required, it's recommended to create two datasets on your main storage pool: one named files, which will store the Nextcloud user data; and one called db, which will store the SQL database. For optimal performance, set the record size of the db dataset to 16 KB (under Advanced Settings in the FreeNAS web GUI). It's also recommended to cache only metadata on the db dataset; you can do this by running zfs set primarycache=metadata poolname/db.

Thanks in advance,
Cheers,
Wilbert

Check for empty db directory

If $DB_PATH isn't empty, it probably means that there's a previous MySQL/MariaDB installation, which will break the script.

Move .well-known outside Nextcloud root

If the .well-known directory (used for HTTP validation for Let's Encrypt) is present inside the Nextcloud directory, the built-in Nextcloud updater will throw an error. Better to add an alias to the nextcloud.conf file telling it to look elsewhere for that path, and update the acme.sh command correspondingly.

cannot login after fresh install

I tried logging in with default admin account and auto generated password, but keep getting wrong "Wrong username or password"

I have used the password from /root/nextcloud_db_password.txt file.

Error 504 time out

Hello,

I've installed the script several times (superb job!) on my freenas server and always happens the same.

The resulting installed nextcloud server is sluggish and throws back constant time out errors, making it totally unusuable.

If I install the pluging version. it works like a charm (although no https version then :( )

I'm I doing something stupid or wrong.??

thanks for the wonderful work.

DNS Setting

There needs to be and option to set the resolver or nothing will install.

I was able to get it fixed by editing the script and changed the jail creations to DHCP since I have everything reserved there.

Updating mariaDB [question]

Hi @danb35, thanks for the script first of all! ;)

I'm here to asking a question, what is the most secure and best way to update mariaDB within a Jail already in production?
Is there any particular reason to do/not do that?

Thanks in advance, it could be a silly question!

Webmin Password

I really hate to be this guy right now.. but for some reason after installing the jail and setting up dns-o-matic + cloudflare and configuring my opnsense firewall to allow all of this to work I've completely forgot my login/password for the panel (first time logging in) , I've checked the generated passwords.txt and that isn't working for me.

Any insight on resetting the password or finding it locally would be grateful ... Thank you for such a rad script that worked perfectly for me first time (aside from my own fault here)

Failed to create jail

I get this at the very beginning

-11.3-RELEASE-P5 was not found!
-Failed to create jail
-root@pool:~/freenas-iocage-nextcloud #

question HOST

sorry to open an issue about this but I do not know how to contact you else: about the HOST_NAME:

HOST_NAME is the fully-qualified domain name you want to assign to your installation. You must own (or at least control) this domain, because Let's Encrypt will test that control. STANDALONE_CERT and DNS_CERT control which validation method Let's Encrypt will use to do this. If HOST_NAME is accessible to the outside world--that is, you have ports 80 and 443 (at least) forwarded to your jail, so that if an outside user browses to http://HOST_NAME/, he'll reach your jail--set STANDALONE_CERT to 1, and DNS_CERT to 0. If HOST_NAME is not accessible to the outside world, but your DNS provider has an API that allows you to make automated changes, set DNS_CERT to 1, and STANDALONE_CERT to 0. In that case, you'll also need to copy configs/acme_dns_issue.sh_orig to configs/acme_dns_issue.sh, edit its contents appropriately, and make it executable (chmod +x configs/acme_dns_issue.sh).

i do not have a domain at all ... i intend to access my nextcloud over VPN.
is there a way to set nextcloud up without having to put a domain at all?

thanks for your help and also thanks for the script. it's awesome you did this!

BR, Silvan

Redis errors on installation

When running the script, setting the Nextcloud memcache.locking to Redis generates a bunch of error messages. Fixed in #36 by setting the host/port first.

php73-memcache failed to install

the installation process cant find the - php73-memcache package

  - php73-exif...
  - php73-gmp...
  - php73-memcache...
    - php73-memcache failed to install, retry #1
    - php73-memcache failed to install, retry #2
    - php73-memcache failed to install, retry #3
pkg: No packages available to install matching 'php73-memcache' have been found in the repositories
  - php73-opcache...
  - php73-pcntl...
  - php73-pecl-imagick...

the installation completes without any further error messages, however most likely due to this error I am not able to access the webui.
I am running FreeNAS 11.2U7

any ideas?

Allow creation of self-signed cert and/or no SSL at all.

Right now, the script depends on being able to issue a certificate from Let's Encrypt. For users for whom this isn't possible or desirable, give the option to create a self-signed cert for the jail, or to not use SSL at all.

permission error on default.json

Hello,

i would like to create a Nextcloud jails with your script but when i launch i have this error:

PermissionError: [Errno 1] Operation not permitted: '/mnt//iocage/defaults.json'

I run the script with user root and the script is executable.

Any ideas?

thanks

Client apps can't connect

Client apps (Windows phone, iOS, Mac Desktop, at least) can't connect to a Nextcloud installation done with this script. iOS client continues to loop back to the login screen. Mac Desktop app says "connection refused" when username/password are entered.

DNS-omatic

The DNS-o-matic part is not clear to me. It has a lot of services... which are as far as I can see all 3rd party services.
What is the point \ advantage in using dns-o-matic instead of a service like dynu dynamic dns?
Or should I use the cloudflare service?

Second question: With a domain name, cloudflare as dns supplier, and the dynamic dns service setup at the router (pfsense) it should work with out opening any ports in the router?

Edit:
I have a paid domain. The suggested freenom.com doesn't seem to have any domain avaiable (free or paid)… and at questions there is no reply.

Script issue

Running 11.1-U6 and currently have the following errors when running this script.

JAIL_IP="192.168.1.56"
DEFAULT_GW_IP="192.168.1.1"
INTERFACE="igb0"
VNET="off"
POOL_PATH="/mnt/Data"
JAIL_NAME="nextcloud"
TIME_ZONE="America/Los_Angeles" # See http://php.net/manual/en/timezones.php
HOST_NAME="FQDN"
STANDALONE_CERT=1
DNS_CERT=0
SELFSIGNED_CERT=0
NO_CERT=0
TEST_CERT="--test"

Instead of using the right mountpoint it created a new mountpoint in /mnt/iocage which is what I do not want. I think this bypasses the /mnt/Data dataset?

Shared object "libdl.so.1" not found, required by "bash", I see this line alot.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")
True
Repeats 6x
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

Shared object "libdl.so.1" not found, required by "bash"
True
Repeats 10x

iocage console nextcloud
Edit /etc/motd to change this login announcement.
Shared object "libdl.so.1" not found, required by "bash"

Then dumps me into the same exact dir as I started before issuing a iocage console command, I don't think I am actually in the jail at this point because I should be seeing nextcloud in the prompt line.

It also made the following dirs in /mnt/Data which I feel should have been made in its own jail dir

db
files
portsnap

No config.php

Hi there I have no way of finding the nextcloud config now it is installed and can access the web interface for both nextcloud and FreeNAS separately but can’t find a way to enable the noip service

Any help thanks.

DNS Issue

There needs to be and option to set the resolver or nothing will install.

I was able to get it fixed by editing the script and changed the jail creations to DHCP since I have everything reserved there.

mariadb update

First, please note that I'm not an experienced contributor. However, I want to give it a try.

I believe the mariadb101-server pkg has been upgraded to mariadb102-server at least with my freenas -U4 version and the original mariadb101-server pkg isn't included in the pkg-list anymore.

After having changed the list of pkg to be installed in the script the installation of mariadb works smooth. However, the commands for creating the database fail because of some user privilege issues. Mariadb introduced a new handling of "mysql -u root" and there exist new commands in this context like "ALTER USER".

I somehow managed to get nextcloud running by logging into the mariadb interface and then more or less adjusting the database creation commands. However, I believe someone else will better know what he/she is doing.

Hope this helps.

LAN access

I initially ran the script to have access through a domain, but now I want to configure it to only be accessible from the lan with just the lan IP. I'm looking through the Caddyfile and every file in /usr/local/www/nextcloud/ and I do not see an equivalent nginx/html/apache config file to adjust the settings for https access.

I currently get this error when trying to access it from the lan: 404 Site 192.168.1.12 is not served on this interface. (http)
I get this error when attempting to access https://192.168.1.7 : This site can't provide a secure connection

Cant't upload lager files

Hi Folks. I'm new to this so i would need some help. I always get a fatal error when uploading lager files. Uploading Photos, Mp3 and so small files work. Max Filesize is set to 5 GB. It is impossible to upload a file over the browser or the client.

Fatal webdav Sabre\DAV\Exception\BadRequest: expected filesize 100000000 got 64389120   2019-04-25T12:56:56+0200
Error no app in context Sabre\DAV\Exception\BadRequest: expected filesize 100000000 got 64389120   2019-04-25T12:56:56+0200
Fatal webdav Sabre\DAV\Exception\BadRequest: expected filesize 100000000 got 73121792   2019-04-25T12:56:36+0200
Error no app in context Sabre\DAV\Exception\BadRequest: expected filesize 100000000 got 73121792   2019-04-25T12:56:36+0200
Error PHP unlink(/mnt/files/appdata_ocvb538qn4em/css/core/3108-812e-css-variables.css): No such file or directory at /usr/local/www/apache24/data/nextcloud/lib/private/Files/Storage/Local.php#227   2019-04-25T12:50:41+0200
Fatal webdav Sabre\DAV\Exception\BadRequest: expected filesize 100000000 got 7110656   2019-04-25T12:38:43+0200
Error no app in context Sabre\DAV\Exception\BadRequest: expected filesize 100000000 got 7110656   2019-04-25T12:38:43+0200
Fatal webdav Sabre\DAV\Exception\BadRequest: expected filesize 100000000 got 19480576   2019-04-25T12:38:26+0200
Error no app in context Sabre\DAV\Exception\BadRequest: expected filesize 100000000 got 19480576   2019-04-25T12:38:26+0200

i tried to fix this using google but i don't get it working. Tried to create a new jail with a new installation same problem.

I'm running FreeNAS-11.2-U3.

I hope you can help me

Script fails when IP configuration is bound to secondary bridge

I tried running the script on FreeNAS 11.2-U8.

My FreeNAS host has two NICs (igb0, igb1) connected to two managed switch ports that tag packets for different VLANs, one for internal LAN (10.0.0.0/24), one for a DMZ (10.0.1.0/24). I use tunables to create bridge1 and add igb1 to that bridge, but I don't know how to tell the script to add the jail to bridge1.

The jail then has a 10.0.1.2 IP but it's in the 10.0.0.0/24 VLAN, so it stops when testing connectivity to pkg.freebsd.org.

Is there any way to tell the script to attach the VNET to another bridge that bridge0?

First time logging into Nextcloud after install is complete

I apologize if this is a complete nub question but i need to know what to put into the "Configure the database" the first time i pull up my nextcloud site. What ever i try i can not get past this screen. I used the txt file that gave me the MariaDB root password, the Nextcloud database password, and the Nextcloud Administrator password, but every combination that i use do not get me in.

Database user ---?
Database password---?
Database name---?
Database host---?

Bare in mind i used the following as my nextcloud-config:

JAIL_IP="10.0.0.15"
DEFAULT_GW_IP="10.0.0.1"
INTERFACE="re0"
VNET="off"
POOL_PATH="/mnt/tank"
JAIL_NAME="nextcloud"
TIME_ZONE="America/Los_Angeles" # See http://php.net/manual/en/timezones.php
HOST_NAME="***.com" # not my real website
DATABASE="mariadb"
STANDALONE_CERT=0
DNS_CERT=0
SELFSIGNED_CERT=0
NO_CERT=1
TEST_CERT=""

chrome_2019-03-20_13-27-19

Any help would be greatly really appreciated.

Cannot reach my nextcloud instance... restarting Caddy fixes it.

Have it with some regularity, and I do not know why.

Try to access my Nextcloud, and it is not running. I enter a shell, service caddy restart and everything is great.

Don't know where to look to fix. Tried adding caddy-restart.sh to crontab, but does not seem to help.

Currently on FreeNAS 11.3 Beta, with NC17.

Database Fails to reconnect after reboot

FreeNAS version FreeNAS-11.2-U2 (Build Date: Feb 14, 2019 20:8)

Run script - works perfectly, able to upload to Nextcloud site via FQDN with letsEncrypt certificte.

Reboot FreeNas box - NextCloud Web page returns error 500

Further investigation appears to show the database not reconnecting.

Quik fix is to delete the jail and db folders and re-run the script, but the MySQL user account appears to be getting 'brokwn' on reboot.,

nextcloud installation has a little flaw regarding integrated help

While I like the script and I think it is very useful, there seems to be a small glitch/flaw with it. Perhaps it's not even the script, but just a bug which occurs in certain circumstances, I don't know.

The thing is that the integrated help is not working properly. You can easily see it for yourself if you try to open it. It is found under options/controls (the wheel in the upper right corner), then "Help/Hilfe".

I couldn't find out why this is. I also asked the question in the official nextcloud-forum, but I did not get any answers. Do you also have the same phenomenon? I tried finding instances of nextcloud to check if this is just a bug with every instance, but if I look here: https://try.nextcloud.com/ this cannot be seen here, so it seems to be specific to FreeBSD or this script.

My thread in the official forum: https://help.nextcloud.com/t/nextcloud-integrated-help-incorrectly-spawns-nested-frame-within-nextcloud/69961

iocage 11.2-RELEASE-p15 End-of-Life, script no longer working?

Hi Danb35,
Thanks for you efforts in creating this script!

I was trying to get Nextcloud installed using your script on a brand-new, clean installed, Freenas 11.2U6. I've retried installing everything from scratch a couple of times, pulling my hair out wondering why it wasn't working. I was never able to connect to the WebUI of Nextcloud. Then I reviewed the complete installation output and noticed:

...
php_fpm_enable: -> YES

===> Cleaning for php73-pecl-redis-5.0.2
===> Cleaning for php71-pecl-redis-5.0.2
===> Cleaning for php72-pecl-redis-5.0.2
===> Cleaning for php74-pecl-redis-5.0.2
/!\ ERROR: /!\

Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.

*** Error code 1

Stop.
make: stopped in /usr/ports/databases/pecl-redis

===> Cleaning for php73-pecl-APCu-5.1.18
===> Cleaning for php71-pecl-APCu-5.1.18
===> Cleaning for php72-pecl-APCu-5.1.18
/!\ ERROR: /!\

Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.

*** Error code 1

Stop.
make: stopped in /usr/ports/devel/pecl-APCu
...

'make' stops... that can't be good right?

Could this be the culprit for me not being able to connect to the UI neither using FQDN (HTTP/HTTPS) nor IP? I'm able to ping the jail on both FQDN and IP. When I stop the jail, the pings stop. Caddy seems to start when using 'service caddy start', but php-pfm throws errors like:

ERROR: no data have been read from pipe php-fpm
and/or:
ERROR 502 /index.php/] dial tcp 127.0.0.1:9000: connect: connection refused

It feels to me like the installation is partially broken, even though it just finished installing and I didn't even get the chance to break it yet...

Any insights would be greatly appreciated!

Can't reach web page after remove staging script

I went through initial setup and everything went well, tested both locally and remotely, was ready to get the let's encrypt cert, ran the remove staging script as suggested because I used the default jail name, and now I can not reach the web page. I thought I got the known bug because I got the following output:

% sudo iocage fstab -l nextcloud
+-------+---------------------------------------------------------------------------------------------------------------------------+
| INDEX | FSTAB ENTRY |
+=======+===========================================================================================================================+
| 0 | /mnt/bigdata/portsnap/db /mnt/bigdata/iocage/jails/nextcloud/root/var/db/portsnap nullfs rw 0 0 |
+-------+---------------------------------------------------------------------------------------------------------------------------+
| 1 | /mnt/bigdata/db /mnt/bigdata/iocage/jails/nextcloud/root/var/db/mysql nullfs rw 0 0 |
+-------+---------------------------------------------------------------------------------------------------------------------------+
| 2 | /mnt/bigdata/files /mnt/bigdata/iocage/jails/nextcloud/root/media/files nullfs rw 0 0 |
+-------+---------------------------------------------------------------------------------------------------------------------------+

but after following the bug fix instructions nothing has changed.

Error when trying to access nextcloud

So I've installed nextcloud on my Freenas 11.1-U2 box and according to the Script everything went just fine.
However when I try to access the web-page of nextcloud I get:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

The nextcloud.log prints:
[Sat May 12 22:23:40.787327 2018] [proxy_fcgi:error] [pid 48700:tid 34399133952] [client 192.168.1.9:52932] AH01071: Got error 'PHP message: {"reqId":"b458QqKvjA3ddhdpYgWR","level":3,"time":"2018-05-12T22:23:40+02:00","remoteAddr":"192.168.1.9","user":"--","app":"index","method":"GET","url":"\\/favicon.ico","message":"Exception: {\\"Exception\\":\\"OCP\\\\\\\\AppFramework\\\\\\\\QueryException\\",\\"Message\\":\\"Could not resolve clientService! Class clientService does not exist\\",\\"Code\\":0,\\"Trace\\":\\"#0 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/AppFramework\\\\\\/Utility\\\\\\/SimpleContainer.php(118): OC\\\\\\\\AppFramework\\\\\\\\Utility\\\\\\\\SimpleContainer->resolve('clientService')\\\\n#1 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/ServerContainer.php(132): OC\\\\\\\\AppFramework\\\\\\\\Utility\\\\\\\\SimpleContainer->query('clientService')\\\\n#2 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/AppFramework\\\\\\/Utility\\\\\\/SimpleContainer.php(74): OC\\\\\\\\ServerContainer->query('clientService')\\\\n#3 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\...\nPHP message: {"reqId":"b458QqKvjA3ddhdpYgWR","level":3,"time":"2018-05-12T22:23:40+02:00","remoteAddr":"192.168.1.9","user":"--","app":"core","method":"GET","url":"\\/favicon.ico","message":"Exception: {\\"Exception\\":\\"OCP\\\\\\\\AppFramework\\\\\\\\QueryException\\",\\"Message\\":\\"Could not resolve clientService! Class clientService does not exist\\",\\"Code\\":0,\\"Trace\\":\\"#0 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/AppFramework\\\\\\/Utility\\\\\\/SimpleContainer.php(118): OC\\\\\\\\AppFramework\\\\\\\\Utility\\\\\\\\SimpleContainer->resolve('clientService')\\\\n#1 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/ServerContainer.php(132): OC\\\\\\\\AppFramework\\\\\\\\Utility\\\\\\\\SimpleContainer->query('clientService')\\\\n#2 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/AppFramework\\\\\\/Utility\\\\\\/SimpleContainer.php(74): OC\\\\\\\\ServerContainer->query('clientService')\\\\n#3 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/...\nPHP message: {"reqId":"b458QqKvjA3ddhdpYgWR","level":3,"time":"2018-05-12T22:23:40+02:00","remoteAddr":"192.168.1.9","user":"--","app":"core","method":"GET","url":"\\/favicon.ico","message":"Exception: {\\"Exception\\":\\"RedisException\\",\\"Message\\":\\"Redis server went away\\",\\"Code\\":0,\\"Trace\\":\\"#0 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Memcache\\\\\\/Redis.php(103): Redis->setnx('d91775ed7b26f6e...', 0)\\\\n#1 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Lock\\\\\\/MemcacheLockingProvider.php(77): OC\\\\\\\\Memcache\\\\\\\\Redis->add('files\\\\\\/10223877d...', 0)\\\\n#2 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Storage\\\\\\/Common.php(709): OC\\\\\\\\Lock\\\\\\\\MemcacheLockingProvider->acquireLock('files\\\\\\/10223877d...', 2)\\\\n#3 \\\\\\/usr\\\\\\/local\\\\\\/www\\\\\\/apache24\\\\\\/data\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Storage\\\\\\/Wrapper\\\\\\/Wrapper.php(592): OC\\\\\\\\Files\\\\\\\\Storage\\\\\\\\Common->acquireLock('scanner::appdat.....\n', referer: https://192.168.1.115/

I am unable to find any problems regarding clientService via google, so I'm sorta out of ideas on how to debug this.
Any hints?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.