Scripted installation of Nextcloud 29 in iocage jail

You will need to make a small adjustment if using a reverse proxy though. Inside the nextcloud “config.php” file, you will want to change the “overwritehost” variable to your domain name, the “overwriteprotocol” to https, and the “overwritecliurl” to https://yourdomain.com

This is because the script will set all that to http and IP address, but since you have a reverse proxy, it won’t work unless you change the above values.

The file will be at “/usr/local/www/nextcloud/config/config.php”

The file is at “/usr/local/etc/php.ini”
The value is here

Aha I found it. Thank you!

I had already been using the overwritehost variable with my old install and it worked with that setup. I haven’t even got to the point of changing variables like that yet

used NO_CERT and now the IP is directed at the TrueNAS UI

I’m assuming you used a different IP than your actual TrueNAS box?

Absolutely

The TrueNAS is x.x.x.251, the NextCloud Instance is x.x.x.28

I wonder if it has something to do with the way you are visualizing. I’m unsure what to try next.

I am switching it back to the type of clone jail instead of base jail… AKA in Tinker mode again…

When you ping your domain, what IP is it resolving to?

The ping resolves to my public IP and a dynamic DNS host name. I utilize a paid Dynamic DNS provider to assign the dynamic host name to my public IP and utilize a CNAME entry to assign it to a subdomain on one of my owned domains.

In your config file you have specified “INTERFACE=hn1”

This is incorrect. Try removing that line. The script sets it by default to “vnet0” which is inside the jail. It doesn’t refer to the host interface.

Remove that line from your config and rerun the script (or just head to the jail settings and manually change it to vnet0)

Every time I tried to use VNET while trying to build this before specifying “INTERFACE=hn1”, I was getting a failure on the startup of the jail specifying VNET failure.

Just removed

INTERFACE=“hn1”
VNET=“off”

and switched to

JAIL_INTERFACES=“vnet0:bridge0”

and got “Stopped NextCloud due to VNET failure”

changed IP addresses to change from CIDR notation and now the jail creates to the point where it checks DNS, which fails.

VNET defaults to on, so leave that.

Does you TrueNAS machine have a default gateway and DNS server set in network settings?

Affirmative, default gateway is set on the TrueNAS instance and 1.1.1.1, 1.0.0.1 and 8.8.8.8 as DNS servers.

Since I have only two existing mount points should I create the other two and move the content from the themes and the config directory to them before I run the script?

Will the script update config.php with the new dbhost config? I believe /tmp/mysql.sock is no longer valid with the newer mariadb versions.

I just had a look at the script and saw that it uses php83. I believe nextcloud 26 (and 27) require php81 or php82?

Correct.

No the config file will not update itself. You will have to just edit the one string for MySQL.

1 Like

Also correct.

Which version did you say you were on?

You could just clone the script, the replace all the *83 with *82 if you’re installing version 26 or 27.

@dan You should probably add a PHP_VERSION=8.x to you script to easily change it. I’ll see if I can’t submit a PR for that.

1 Like

Thanks.

I have NC 26 and php80.

Not sure if I can update to NC 27 before running the script and this version will work with php83.
Else I will do is you suggested and update the script…