Resource icon

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

xiSlickix

Dabbler
Joined
Feb 5, 2014
Messages
47
or (better) SSH to your FreeNAS box and then do iocage console nextcloud.
Brilliant - that works perfect. Nextcloud was definitely responding to SSH requests, so I presumed (incorrectly) that it was enabled.

But I thought I'd already made the necessary changes for BigInt.
Nextcloud-upgrade-warnings.png

That's the message I'm seeing. This jail was setup with version 15.

One last question - in my test environment, I have my.domain (thanks freenom). How much variance can I use with your script? Could I have my.domain/nextcloud or if a different domain name was pre-existing, could I setup nextcloud.my.domain? I presume as long as that particular name / page directs visitors to your IP on ports 80 and 443, things will just work? (This could be a terribly misinformed assumption).

Thanks!
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
Hi Danb!

Do you know why when I want to update nextcloud from 15.0.7 to 16.0.0 it's not possible? Indeed, when I'm in shell iocage nextcloud and I writing
Code:
pkg upgrade
it tells me that it is already up to date while version 16.0.0 was released more than a week ago...

thanks ^^
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Hi Danb!

Do you know why when I want to update nextcloud from 15.0.7 to 16.0.0 it's not possible? Indeed, when I'm in shell iocage nextcloud and I writing
Code:
pkg upgrade
it tells me that it is already up to date while version 16.0.0 was released more than a week ago...

thanks ^^
Nextcloud roles out their updates incrementally, you will get an email at some point when the update is available from the settings page. Until then you can update manually by downloading nextcloud just like the script does.. the script is not using pkg to fetch nextcloud
 
Last edited:

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
thank you Garm, thank all the community for all the help you bring us daily
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
it tells me that it is already up to date while version 16.0.0 was released more than a week ago...
My script installs Nextcloud using the sources, not the FreeBSD package, so pkg upgrade wouldn't do anything for you at all. You'd see the update available in Nextcloud, though, once they make it available--it could be a couple of weeks though.
the script inst using pkg to fetch nextcloud
No, it doesn't--see above. (edit: I see I've mis-read your post--you're right, the script is not using pkg).
 
Last edited:

Sanfe

Dabbler
Joined
Apr 23, 2016
Messages
14
Hi @danb35
In order to setup //preview Generator// i need to setup via occ commands. But im looking for /path/to/php /path/to/occ into the jail, and im unable to find it...
any ideas?
Thank you!
 

Sanfe

Dabbler
Joined
Apr 23, 2016
Messages
14
You'd run occ commands using su -m www -c 'php /usr/local/www/apache24/data/nextcloud/occ (command)'.
i try this...
Code:
su -m www -c 'php /usr/local/www/apache24/data/nextcloud/occ preview:pre-generate-all -vvv

but system says:
zsh:1: command not found: php su: permission denied (shell)

so, i think php path is wrong?

Thanks!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Feel like living on the edge? I've made a new branch using Caddy rather than Apache as the web server. This greatly simplifies the web server configuration (the entire web server and virtual host configuration is now only 80 lines, compared to over 600 with Apache), and completely automates TLS configuration, including obtaining and renewing certificates from Let's Encrypt. To download this version of the script, run git clone -b nextcloud-16-caddy https://github.com/danb35/freenas-iocage-nextcloud. To see the new README, visit https://github.com/danb35/freenas-iocage-nextcloud/tree/nextcloud-16-caddy.

Note: This branch removes the ability to operate without TLS at all, or to operate using a self-signed certificate. It will only work for you if you'll be able to get a cert from Let's Encrypt, using either HTTP validation, or DNS with one of Caddy's compatible DNS providers.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
OK, the Nextcloud folks have now posted the latest-16.tar.bz2 file to their server, which is what I download in my script to get the latest point release within a major release. I've updated both nextcloud-16 branches to download this one, but I'd really like some feedback on the -caddy branch.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I've pushed another update to the nextcloud-16-caddy branch allowing for a non-SSL installation. I'll probably merge this into master in the next few days unless I hear of problems with it.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Another update to the nextcloud-16-caddy branch to allow for use with a self-signed certificate. At this point, that branch should be at feature parity with master.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Nextcloud-16-caddy is working fine for me irrespective of TLS configuration, and I've heard no objections, so I've merged that into the master branch. The master branch will now install the latest Nextcloud 16 release using Caddy as the webserver. This update also adds quite a bit of error checking to the script, so it will stop if certain critical steps fail.
 

Zenman2010

Cadet
Joined
May 18, 2019
Messages
2
Just installed it today, had a few problems but I worked them out, mainly where to put the Nextcloud folder (in the iocage) and a few settings to get nextcloud to give me the green check in the admin/general tab

now if i could just get a public folder (using external folders plugin) for all the users to access (just me and the wife) to have read and write access, only have read access atm!
 

silverback

Contributor
Joined
Jun 26, 2016
Messages
134
Nextcloud-16-caddy is working fine for me irrespective of TLS configuration, and I've heard no objections, so I've merged that into the master branch. The master branch will now install the latest Nextcloud 16 release using Caddy as the webserver. This update also adds quite a bit of error checking to the script, so it will stop if certain critical steps fail.
I have all my services proxied with caddy, thanks to your tutorial. Do we have still have the no cert. option in your script?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Do we have still have the no cert. option in your script?
Yep, it's still there, and works the same way. All documented on the github page, and in the resource.
 
Last edited:
Joined
May 22, 2019
Messages
5
When running the script, I make it about 3 minutes in and then it terminates with this error:
"./nextcloud-jail.sh: 181: Syntax error: redirection unexpected (expecting word)"

line 181 is "<<<<<<< HEAD" shown here:

<<<<<<< HEAD​
iocage exec ${JAIL_NAME} mkdir -p /mnt/configs​
iocage exec ${JAIL_NAME} mkdir -p /var/log/apache​
iocage fstab -a ${JAIL_NAME} ${PORTS_PATH}/ports /usr/ports nullfs rw 0 0​
iocage fstab -a ${JAIL_NAME} ${PORTS_PATH}/db /var/db/portsnap nullfs rw 0 0​
iocage fstab -a ${JAIL_NAME} ${FILES_PATH} /mnt/files nullfs rw 0 0​
=======​

My configuration file:
JAIL_IP="192.168.50.204"​
DEFAULT_GW_IP="192.168.50.1"​
POOL_PATH="/mnt/Storage/apps/nextcloud"​
TIME_ZONE="America/Chicago"​
HOST_NAME="YOUR_FQDN"​
STANDALONE_CERT=0​
SELFSIGNED_CERT=1​
CERT_EMAIL="me@example.com"​
DB_PATH="/mnt/Storage/apps/nextcloud/db"​
FILES_PATH="/mnt/Storage/apps/nextcloud/files"​
Its my configuration file isn't it?

Thank you,
 
Top