Scripted installation of Nextcloud 29 in iocage jail

It’s as secure as TrueNAS gets. Unfortunately with the abandonment of CORE, that’s really your only option unless you want to migrate to SCALE.

EOL means End Of Life

Can’t I update the jail to 13.3, when TrueNAS itself is running 13.1?

I have an old installation made with the Dan’s script from some years ago. This was still with caddy v1.

Now I want to update from NC26 to NC27 and further, but this requires updating php from 8.0 to 8.1 (or better 8.2). I tried this by updating the jail to 13.3 and then doing a pkg upgrade and pkg install of php 8.2. This removed mariadb 10.3. So I reinstalled a newer version, but then the start of mysql always failed with “WARNING: failed precmd routine for mysql”. And caddy didn’t start at all without any error message. Before I had similiar failures after upgrading the jail to 13.1 instead of 13.2. Always had to rollback to the snapshot which I made before beginning the update.

What are my options? I would really appreciate some advise how to continue.

I would rename the jail, then rerun the script overtop the existing data with NEXTCLOUD_VERSION set to your current version (because you cant skip major versions) and then update that way.

And you should upgrade to 13.3 before anything.

1 Like

Thanks. You mean running the current version of the script over the old jail? Why rename?

Just to clarify, you mean updating TrueNAS to 13.3. or the jail?

Or running the script to create a new jail? And using the existing mount points nc-db and nc-files?

I mean updating truenas.

You rename the old jail, just in case something goes wrong with the install.

Yes you use the existing mount points.

1 Like

If you do, you will be running 13.3 userland on a 13.1 kernel.

In theory it should work, in practise not always.

1 Like

Hello @danb35.

I have a brand-new install of TrueNAS13.3 running in a Hyper-V VM (Generation 2 - UEFI Boot) with multiple virtual NICs assigned to the VM. I have run the script on my TrueNAS instance to create the NextCloud jail with an attempt to assign the second NIC (hn1) as dedicated to the jail.

After creation of the Jail, which goes through all the steps of downloading the packages and such, connectivity to the jail IP does not resolve.

I used the following configuration to create the jail:

Blockquote
JAIL_IP=“[obfuscated]”
DEFAULT_GW_IP=“[obfuscated]”
JAIL_NAME=“NextCloud”
JAIL_BASEJAIL=“true”
INTERFACE=“hn1”
VNET=“off”
JAIL_INTERFACES=“hn1:bridge0”
POOL_PATH=“/mnt/Software”
TIME_ZONE=“America/Chicago”
HOST_NAME=“[obfuscated]”
STANDALONE_CERT=1
DNS_CERT=0
DNS_PLUGIN=“cloudflare”
DNS_TOKEN=“[obfuscated]”
CERT_EMAIL=“[obfuscated]”

What can I do to resolve this issue to continue to use my NextCloud. I previously had a NC instance running via the plugin route on TrueNAS 13.1 that got borked. I started completely over from scratch and decided to try out the script instead (not that I could get the plugin to run anyways)

Can anyone tell me how I’d be able to increase the maximum file size in Nextcloud? The Nextcloud wiki says to edit a php.ini but I’m not sure how to do that with the setup that this script creates.
Reference: Uploading big files > 512MB — Nextcloud latest Administration Manual latest documentation

What limit are you encountering? I’ve uploaded files of tens of GB with the installation resulting from my script, without any changes needed.

I have a 30gb file I’m trying to upload, but I’ve noticed “unknown error” pop up for files around 10gb as well. The upload eventually just terminates with that error popping up. I’m not sure what the lower limit is because most of the files I upload are under 1gb.

I haven’t tried with files that large, but I’m still a little surprised. But nonetheless, the config files are in the normal locations for FreeBSD: /usr/local/etc/php/.

Are you trying to use a DNS cert?

You currently have STANDALONE_CERT selected. With that option you will need to have ports forwarded to your nextcloud IP.

Thanks Dan! I’ll see if I can get it working :slight_smile:

I could have sworn that I set it the other way around… perhaps I missed that change when I was working on it due to my eagerness for getting it running.

I’ll fix the switch and run it again.

same result… no connection to the local IP

Although, the automatic forward to the https port is working…

Firefox on laptop says “PR_END_OF_FILE_ERROR” and on android it says “ERR_SSL_PROTOCOL_ERROR”

The IP will not work if you selected one of the CERT options. It’s by design. You need to use the domain name.

I want to add that I get the same result using my reverse proxy, should I just use NO_CERT then?

If you’re using a reverse proxy already, then yes, the NO_CERT option is best as that will allow connection by IP.

Update: I’ve found the PHP settings in Nextcloud itself limiting the uploads to 16GB but am really unsure how to change them. I can’t find php.ini in /usr/local/etc/php/