Resource icon

Scripted installation of Nextcloud 28 in iocage jail 2018-03-23

matttheew

Dabbler
Joined
Apr 30, 2017
Messages
14
Thanks for the reply. The missing space was a result of copy/paste. It's in the config.

Yes, it turns out caddy isn't running. I am seeing in the caddy log errors that it failed to find my zone as well as a message: "Invalid format for X-Auth-Key header".

Perhaps my cloudflare set up is wrong? My domain is registered with namecheap, I changed my name servers to CloudFlare and am using the API
in cloudflare shown as the zone ID.
 

sheenegarmi

Dabbler
Joined
Jul 26, 2019
Messages
18
script did it. I deleted the pool and created a new one to do everything from scratch. Through the script.
And I can not go to the site. Writes no access.
 

matttheew

Dabbler
Joined
Apr 30, 2017
Messages
14
I think I figured out my issue!
I replaced the zone ID API Key with my CloudFlare Global API key. Things are working now!!!

The only thing I can't get working is that my warden cage nextcloud jail was accessible via https://mydomain.tld and https://www.mydomain.tld

I used www.mydomain.tld in the config, and when I browse to mydomain.tld, I see a SSL handshake failure error from CloudFlare. Not that big of a deal, but it makes me think something is still a little off.

Additionally, I can't browse to nextcloud using the jail's local IP. When browsing to the local IP over HTTPS, I get an error "this site can't provide a secure connection". When browsing over HTTP, the site returns "404 Site 192.168.0.4 is not served on this interface" I imagine that this is the same reason as the above issue.

I think the only reason it's working is the automatic HTTPS certificate cloudflare issues.

I'm currently copying my files into my new iocage nextcloud jail using the Windows sync tool, so things are working! But I am concerned about the certificate in place that's causing those small issues.

Do you have a suggestion of how I could try to resolve this?

Thank you!
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I replaced the zone ID API Key with my CloudFlare Global API key.
I'd spotted that in your earlier post, but hadn't had time to respond--that will definitely do it.

I used www.mydomain.tld in the config, and when I browse to mydomain.tld, I see a SSL handshake failure error from CloudFlare. Not that big of a deal, but it makes me think something is still a little off.
That sounds like it's working as expected. Caddy configures a site (and generates a certificate) for the HOST_NAME you enter in the config. If you try to reach it using a different host name, you'll get a certificate error. I expect Cloudflare is masking the actual error; if you disable Cloudflare temporarily you'll see a cert name mismatch.

Additionally, I can't browse to nextcloud using the jail's local IP.
Again, this would be behaving as expected. Your jail does HTTPS using a cert from Let's Encrypt, which was issued for www.mydomain.tld. That doesn't match 192.168.0.4, so you'll get an error. You'll run into problems on HTTP because Caddy set up to serve www.mydomain.tld; it isn't set up to serve 192.168.0.4 (but if it were, it would redirect you to HTTPS, where you'd run into a certificate error).

The best way to address this is to see that www.mydomain.tld resolves to that jail from inside your LAN. I do that using the DNS resolver on my pfSense router; if your router doesn't support this feature, another way to deal with it would be an entry in your HOSTS.TXT file.
 

Silvan Burch

Explorer
Joined
May 1, 2016
Messages
65
[SOLVED]

forgot to add the email to the configuration ... my bad ;)


---

Hey dan, hey everyone

I've used this script before and it worked awesome!
I'm trying to setup nextcloud 16.0.3 again on FreeNAS 11.2-U5 with the script. After talking to danb directly, my config looks as follows:

Code:
JAIL_IP="192.168.23.81"
DEFAULT_GW_IP="192.168.23.1"
POOL_PATH="/mnt/sylas"
TIME_ZONE="Europe/Zurich"
NO_CERT=1
JAIL_NAME="nextcloud"
DB_PATH="/mnt/sylas/db"
FILES_PATH="/mnt/sylas/nextcloud"
PORTS_PATH="/mnt/sylas/portsnap"
DATABASE="mariadb"
INTERFACE="em0"
VNET="off"
HOST_NAME="192.168.23.81"


I do not wanna use any certificates or FQDN (since I do not have a domain and access the FreeNAS from outside over VPN). Therefore, HOST_NAME according to danb has been set to the IP of the jail itself.

The script runs fine and everything seems to be ok (i.e. database setup, no errors or anything).
However when I enter the IP in my browser, I am not able to access the nextcloud WebGUI but rather end up on the login screen of FreeNAS.

I do not know if there's a problem with the installation or if somehow the FreeNAS WebGUI has priority over the nextcloud WebGUI and therefore I cannot access it ...

anybody experienced something similar or has ideas how to solve it?

Thanks, Silvan

---

EDIT:

i tried connecting nextcloud over windows application and android.
Windows shows the following (kinda, translated): unknown error, no connection
Android app the following: malformed server configuration


also, during the script the following messages appear:

Code:
Destination: /mnt/iocage/jails/nextcloud/root/usr/ports does not exist or is not a directory.
Successfully added mount to nextcloud's fstab
Successfully added mount to nextcloud's fstab
Successfully added mount to nextcloud's fstab
Successfully added mount to nextcloud's fstab


and

Code:
The current PHP memory limit is below the recommended value of 512MB.
Nextcloud was successfully installed

The current PHP memory limit is below the recommended value of 512MB.
System config value mysql.utf8mb4 set to boolean true

The current PHP memory limit is below the recommended value of 512MB.
System config value logtimezone set to string Europe/Zurich

The current PHP memory limit is below the recommended value of 512MB.
System config value log_type set to string file

The current PHP memory limit is below the recommended value of 512MB.
System config value logfile set to string /var/log/nextcloud.log

The current PHP memory limit is below the recommended value of 512MB.
System config value loglevel set to string 2

The current PHP memory limit is below the recommended value of 512MB.
System config value logrotate_size set to string 104847600

The current PHP memory limit is below the recommended value of 512MB.
System config value memcache.local set to string \OC\Memcache\APCu

The current PHP memory limit is below the recommended value of 512MB.
System config value redis => host set to string /tmp/redis.sock

The current PHP memory limit is below the recommended value of 512MB.
System config value redis => port set to integer 0

The current PHP memory limit is below the recommended value of 512MB.
System config value memcache.locking set to string \OC\Memcache\Redis


but when i go into the jail and use php -i | grep memory i find the following:
Code:
memory_limit => 512M => 512M


in the www.conf, there is the following line about this:
Code:
;php_admin_value[memory_limit] = 32M


don't know if that has an influence or is even related ...


EDIT 2 (30. July)

i checked the nextcloud.log file and the only message in there (with different reqIds and date/time) is:

Code:
{"reqId":"ipJ86myWhoOec8PxQb68","level":3,"time":"2019-07-30T15:00:06+02:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":{"Exception":"RedisException","Message":"No such file or
directory","Code":0,"Trace":[{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/RedisFactory.php","line":88,"function":"connect","class":"Redis","type":"->","args":["\/tmp\/redis.sock",0,0]},{"file":"\/us
r\/local\/www\/nextcloud\/lib\/private\/RedisFactory.php","line":104,"function":"create","class":"OC\\RedisFactory","type":"->","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Memcache\/Redis
.php","line":42,"function":"getInstance","class":"OC\\RedisFactory","type":"->","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Memcache\/Factory.php","line":136,"function":"__construct","cla
ss":"OC\\Memcache\\Redis","type":"->","args":["6c6f61b0ebfeb280fbc6f70cee75b140\/lock"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Server.php","line":861,"function":"createLocking","class":"OC\\Me
mcache\\Factory","type":"->","args":["lock"]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"-
>","args":["*** sensitive parameters replaced ***"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":125,"function":"offsetGet","class":"Pimple\\Container","type":"->","args"
:["OCP\\Lock\\ILockingProvider"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":165,"function":"query","class":"OC\\ServerContainer","type":"->","arg
s":["OCP\\Lock\\ILockingProvider"]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":114,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppF
ramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":125,"function":"offsetGet","
class":"Pimple\\Container","type":"->","args":["LockingProvider"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Server.php","line":1812,"function":"query","class":"OC\\ServerContainer","type":"->","a
rgs":["LockingProvider"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Files\/View.php","line":117,"function":"getLockingProvider","class":"OC\\Server","type":"->","args":[]},{"file":"\/usr\/local\/w
ww\/nextcloud\/lib\/private\/Server.php","line":655,"function":"__construct","class":"OC\\Files\\View","type":"->","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Con
tainer.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/ServerContainer.php",
"line":125,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OCP\\Http\\Client\\IClientService"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleConta
iner.php","line":68,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCP\\Http\\Client\\IClientService"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/Simp
leContainer.php","line":98,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[{"name":"OC\\App\\AppStore\\Fetcher\\AppFetcher","__class__":"ReflectionClass"}]},{
"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":119,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OC\\A
pp\\AppStore\\Fetcher\\AppFetcher"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":150,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","
args":["OC\\App\\AppStore\\Fetcher\\AppFetcher"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Server.php","line":1521,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\App\\A
ppStore\\Fetcher\\AppFetcher"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Server.php","line":1160,"function":"getAppFetcher","class":"OC\\Server","type":"->","args":[]},{"file":"\/usr\/local\/www\
/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/usr\/loca
l\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":125,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OC\\Installer"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/
legacy\/util.php","line":739,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\Installer"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/base.php","line":653,"function":"checkServer","
class":"OC_Util","type":"::","args":[{"__class__":"OC\\SystemConfig"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/base.php","line":1056,"function":"init","class":"OC","type":"::","args":[]},{"file":"\/usr\
/local\/www\/nextcloud\/cron.php","line":41,"args":["\/usr\/local\/www\/nextcloud\/lib\/base.php"],"function":"require_once"}],"File":"\/usr\/local\/www\/nextcloud\/lib\/private\/RedisFactory.php","Line":88,
"CustomMessage":"--"},"userAgent":"--","version":"16.0.3.0"}



and in the messages file:

Code:
Jul 28 19:17:18 nextcloud syslogd: exiting on signal 15
Jul 28 19:17:21 nextcloud syslogd: kernel boot file is /boot/kernel/kernel
Jul 28 19:17:21 nextcloud root: /etc/rc: WARNING: failed to start redis
Jul 28 19:24:21 nextcloud syslogd: exiting on signal 15
Jul 28 19:24:24 nextcloud syslogd: kernel boot file is /boot/kernel/kernel
Jul 28 19:24:24 nextcloud root: /etc/rc: WARNING: failed to start redis
Jul 29 20:56:19 nextcloud syslogd: exiting on signal 15
Jul 29 21:09:56 nextcloud syslogd: kernel boot file is /boot/kernel/kernel
Jul 29 21:09:56 nextcloud root: /etc/rc: WARNING: failed to start redis
Jul 29 21:09:57 nextcloud syslogd: exiting on signal 15
Jul 30 14:59:36 nextcloud syslogd: kernel boot file is /boot/kernel/kernel
Jul 30 14:59:36 nextcloud root: /etc/rc: WARNING: failed to start redis


I guess the redis is the problem?

when i try to start it from the shell (service redis start) I get
"Fatal error, can't open config file '/usr/local/etc/redis.conf'"

I checked, the file is there ... own root:wheel

EDIT 3:

changed the premission from 'root:wheel' to 'root:redis' now it works ... but I get still the following error in the messages log:

Code:
Jul 30 17:06:04 nextcloud syslogd: exiting on signal 15
Jul 30 17:06:06 nextcloud syslogd: kernel boot file is /boot/kernel/kernel

 
Last edited:

matttheew

Dabbler
Joined
Apr 30, 2017
Messages
14
I'd spotted that in your earlier post, but hadn't had time to respond--that will definitely do it.


That sounds like it's working as expected. Caddy configures a site (and generates a certificate) for the HOST_NAME you enter in the config. If you try to reach it using a different host name, you'll get a certificate error. I expect Cloudflare is masking the actual error; if you disable Cloudflare temporarily you'll see a cert name mismatch.


Again, this would be behaving as expected. Your jail does HTTPS using a cert from Let's Encrypt, which was issued for www.mydomain.tld. That doesn't match 192.168.0.4, so you'll get an error. You'll run into problems on HTTP because Caddy set up to serve www.mydomain.tld; it isn't set up to serve 192.168.0.4 (but if it were, it would redirect you to HTTPS, where you'd run into a certificate error).

The best way to address this is to see that www.mydomain.tld resolves to that jail from inside your LAN. I do that using the DNS resolver on my pfSense router; if your router doesn't support this feature, another way to deal with it would be an entry in your HOSTS.TXT file.


Yus you are right, if I pause CloufFlare temporarily, I see the certificate error. This is no issue though, as my router does hairpin NAT, so www.mydomain.tld resolves to the jail without any issue. I can access from inside/outside my LAN, so I consider this project complete! I appreciate your help.
 

matttheew

Dabbler
Joined
Apr 30, 2017
Messages
14
One last thing - I am definitely seeing a much slower speed compared to my warden jail.

I'm currently uploading at 400kbs. Even if this is going over my internet connection, I have great speed and should be moving faster. My server is idle and a PC on the LAN that had a full sync from my warden jail is now uploading my data back into the new jail the script created. I have ~250gb to upload and after a day, I still have 8 days to upload all of this.

What could be the slowdown? Differences are now I am using cloudflare for DNS, and this script's jail vs my manually installed nginx warden jail.
What do you think could be the major slowdown difference here?
 

sheenegarmi

Dabbler
Joined
Jul 26, 2019
Messages
18
Strangely, after the firewall was completely disabled, everything worked and I was able to install the necessary applications. But when the ports were open 443 and 80. As I understand it, I use other ports or protocol.?
 
Last edited:

sheenegarmi

Dabbler
Joined
Jul 26, 2019
Messages
18
Code:
Sabre\DAV\Exception\BadRequest: expected filesize 10485760 got 10215424
/usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 156:

OCA\DAV\Connector\Sabre\File->put(null)

/usr/local/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php - line 45:

OCA\DAV\Connector\Sabre\Directory->createFile("954204160", null)

/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096:

OCA\DAV\Upload\UploadFolder->createFile("954204160", null)

/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525:

Sabre\DAV\Server->createFile("uploads/adm ... 0", null, null)

<<closure>>

Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

/usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:

call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])

/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:

Sabre\Event\EventEmitter->emit("method:PUT", [ Sabre\HTTP ... }])

/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:

Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

/usr/local/www/nextcloud/apps/dav/lib/Server.php - line 316:

Sabre\DAV\Server->exec()

/usr/local/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

OCA\DAV\Server->exec()

/usr/local/www/nextcloud/remote.php - line 163:

require_once("/usr/local/ ... p")


as I understand it, and for setting the limits of volume. But I can not find where to fix it.
And where is what files can be uploaded to the server.
 

matttheew

Dabbler
Joined
Apr 30, 2017
Messages
14
Hi,

My data has finally all uploaded to my server a couple of days ago. Today I wanted to send a movie to my parents, ~2.5gb. The upload was super slow - about 340kbs. Once finally uploaded, I shared a link as per usual, but my dad couldn't download it. The download stalled at 180MB.

I hopped onto a laptop I have hardwired in at my parents house and tried to download the same link - and was unable. It failed at 170MB.

What's going on here? Is there something in the config jail side and/or cloudflare side to fix this? I had very fast speed when I was using NC 15 in a warden jail.

my warden jail was using nginx with mysql, and my domain dns was through my registrar - namecheap. I have dyndns, and my namecheap dns entries were simply cnames to point *. and www. to the dyndns address.
my setup now matches the guide, with the note of my domain still with namecheap, using cloudflare name servers.

Any insight is much appreciated.


Thanks!
 

matttheew

Dabbler
Joined
Apr 30, 2017
Messages
14
Unfortunately, I've shutdown my NextCloud 16 jail created by this script.

Once I booted up my legacy warden NextCloud 15 jail and sync'd up my data... downloads were flying at 5mbps. That movie I shared with my dad downloaded in a couple of minutes.
I didn't touch anything on the CloudFlare side, so the underlying problem is with the config of this jail in my environment. I hope I can figure out what's the slowdown.
 

Thomas_VDB

Contributor
Joined
Sep 22, 2012
Messages
102
Hi,

The scripted installation of nextcloud on my FreeNAS has been working really well for a couple of months (using default parameters).
Now when I go to the URL (by domain name or by local IP-address in my network), I just get a blank page.
Restarted several times.
Can this have to do something with this mail that I received :
"...Your Let's Encrypt client used ACME TLS-SNI-01 domain validation to issue a certificate in the past 60 days. Below is a list of names and IP addresses validated (max of one per account)..."

If so, I've been reading that I need to update certbot or change some parameters, but I can't find the exact path and command to update the parameters or to update certbot.

Can somebody please walk me through this? Thanks in advance!

Kind regards!
Thomas.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I hope I can figure out what's the slowdown.
I hope so as well--I've tried several times to duplicate what you're seeing, but I haven't been able to. One thing you could try would be to install Nextcloud 15 instead--change line 203 of the script to FILE="latest-15.tar.bz2". Another would be to try @NasKar's script instead of mine; his uses nginx rather than Caddy.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If so, I've been reading that I need to update certbot
No version of my script has used certbot--depending on when you used it, it'd either have been using acme.sh or Caddy's built-in cert handling. When you ran it, did it install Nextcloud 15 or 16? And what's the output of iocage exec nextcloud service caddy status?
 

Thomas_VDB

Contributor
Joined
Sep 22, 2012
Messages
102
No version of my script has used certbot--depending on when you used it, it'd either have been using acme.sh or Caddy's built-in cert handling. When you ran it, did it install Nextcloud 15 or 16? And what's the output of iocage exec nextcloud service caddy status?
Hi,

Thanks for your quick reply. Don't know exactly which version it installed. I ran your script on the 13th of march this year. Does that help?
This is the output of "iocage exec nextcloud service caddy status" in the freenas shell :
"caddy does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable".
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
"caddy does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable".
OK, so you ran it before I made the switch to using Caddy as the web server. Enter the jail using iocage console nextcloud, and then see what happens with acme.sh: acme.sh --cron. If that fails (as in doesn't run at all), try /root/.acme.sh/acme.sh --cron.
 

vorchan

Cadet
Joined
Aug 6, 2019
Messages
7
Hello!

I ran the script successfully a few days ago and everything seems to be working well except an issue when downloading large files. The downloads timeout after about 50 - 60 seconds. This line shows up in nextcloud_error:

[ERROR 502 /remote.php/webdav/"FILE"] read tcp 127.0.0.1:15432->127.0.0.1:9000: i/o timeout

There is no corresponding error in php-fpm.log (or any other log file I have found). I have tried to solve the problem by changing these values in php.ini:
max_execution_time = 3600 (was 30)
max_input_time = 3600 (was 60)
post_max_size = 16G (was 1999M)
upload_max_size = 16G (was 1999M)
upload_max_filesize = 16G (was 2M)
default_socket_timeout = 3600 (was 60)

The change did not help, I am still getting the same error. I have tried downloading several files with size 1 - 4 GB and they all fail. Smaller files are downloading just fine. I have not made any other changes in the jail after running the script. I am downloading the files using Firefox on a Win10 machine.

Another small issue (maybe?) is that the downloads are quite slow. I get 20 - 30 MiB/s on in my local 1GB-network. If i download the same file over SMB from freenas i get ~110 MiB/s. This is not really a problem for me at the moment but I would love if someone has a suggestion how to improve the speed.

I should mention I am a noob at freenas as well as nextcloud...

Best regards,
vorchan
 

matttheew

Dabbler
Joined
Apr 30, 2017
Messages
14
Hello!

I ran the script successfully a few days ago and everything seems to be working well except an issue when downloading large files. The downloads timeout after about 50 - 60 seconds. This line shows up in nextcloud_error:

[ERROR 502 /remote.php/webdav/"FILE"] read tcp 127.0.0.1:15432->127.0.0.1:9000: i/o timeout

There is no corresponding error in php-fpm.log (or any other log file I have found). I have tried to solve the problem by changing these values in php.ini:
max_execution_time = 3600 (was 30)
max_input_time = 3600 (was 60)
post_max_size = 16G (was 1999M)
upload_max_size = 16G (was 1999M)
upload_max_filesize = 16G (was 2M)
default_socket_timeout = 3600 (was 60)

The change did not help, I am still getting the same error. I have tried downloading several files with size 1 - 4 GB and they all fail. Smaller files are downloading just fine. I have not made any other changes in the jail after running the script. I am downloading the files using Firefox on a Win10 machine.

Another small issue (maybe?) is that the downloads are quite slow. I get 20 - 30 MiB/s on in my local 1GB-network. If i download the same file over SMB from freenas i get ~110 MiB/s. This is not really a problem for me at the moment but I would love if someone has a suggestion how to improve the speed.

I should mention I am a noob at freenas as well as nextcloud...

Best regards,
vorchan




exactly my problem too! Install was successful, but upload/download speed was absolutely terrible.

I am trying some of @danb35 's suggestions - but not having much luck fixing this.
 

vorchan

Cadet
Joined
Aug 6, 2019
Messages
7
Hello again,

After playing around some more I think I actually managed to fix the failed download issue. I added these lines:

connect_timeout 3600s
read_timeout 3600s
send_timeout 3600s

under
fastcgi / 127.0.0.1:9000 php {
in Caddyfile (located in /usr/local/www/).

I also added "timeouts none" to the caddyfile in addition to the changes to php.ini (post #837). That did not help however until I changed the fastcgi timeouts.

Now I can for instance download a 4,2 GiB file in ~3 min without problem.

It would still be interesting to see if the speeds could be increased, any suggestions?
 

matttheew

Dabbler
Joined
Apr 30, 2017
Messages
14
Hello again,

After playing around some more I think I actually managed to fix the failed download issue. I added these lines:

connect_timeout 3600s
read_timeout 3600s
send_timeout 3600s

under
fastcgi / 127.0.0.1:9000 php {
in Caddyfile (located in /usr/local/www/).

I also added "timeouts none" to the caddyfile in addition to the changes to php.ini (post #837). That did not help however until I changed the fastcgi timeouts.

Now I can for instance download a 4,2 GiB file in ~3 min without problem.

It would still be interesting to see if the speeds could be increased, any suggestions?

you added timeouts none underneath the 3 lines you added to the caddy file? or did you replace the 3 with timeouts none?

edit - and did you keep the changes you made to php.ini? I copied all of of your tweaks to the Caddy file and most of the php.ini tweaks. I'm reuploading my data - about 200gb. Right some pictures are uploading to my NC @ 500kbs so there's approx 5 days left to upload everything.
 
Last edited:
Top