First of all I wanted to thank you very very much!
I have spend hours and hours with guides which tell you to set this up in a pluginjail and every time I ran into unexpected errors which I did not manage to fix.
I also thought about switching my NAS to Ubuntu to get this work, but I really like the stuff Freenas offers.
My Setup: HP N54L with FreeNAS 11.1 and of cause ZFS Raid-Z1.
Now (with the help of this guide) I'm running Nextcloud 13.0.4 in an iocage with php7.2.
I had to change five things which were written in your guide in order to get this work for me.
I wanted to tell you, so maybe you can improve this excellent guide even more.
----------------------------------------------------------------------------------------------------------
Code:
- Create a Jail using iocage
For me vnet="on" did not work as my jail had no internet connection after that.
I tried to fix that by setting ip, gateway and nameserver manually in console, but had no success.
So i did use: iocage create -n "nextcloud" -r 11.1-RELEASE ip4_addr="bge0|192.168.1.3/24" defaultrouter="192.168.1.1" vnet="off" allow_raw_sockets="1" boot="on"
I read that a shared ip setup is even more stable and as this works for me out of the box I use this.
----------------------------------------------------------------------------------------------------------
Code:
- Download Nextcloud:
I used: wget https://download.nextcloud.com/server/releases/latest.zip
to get the latest Nextcloud release which was 13.0.4 at this time.
----------------------------------------------------------------------------------------------------------
Code:
- Add virtual Host info :
You should say here, that the file should end with a ".conf". At first I only named the file like my domain, without .conf at the end.
I ran into the error that my https did not work, because the conf file was not loaded beacause the httpd.conf wants to load *.conf files from "Inlcude" only.
----------------------------------------------------------------------------------------------------------
Code:
- Additional steps for php 7.1
Maybe it's because I'm on php7.2 but when i try to change memcache.locale from APCu to Redis I get a server error.
Only when I use it this way it works for me. I have to uncomment locking and use APCu for local (also no error message in Nextcloud)
'memcache.local' => '\\OC\\Memcache\\APCu',
#'memcache.locking' => '\\OC\\Memcache\\Redis',
----------------------------------------------------------------------------------------------------------
Code:
- SSL using Certbot:
Did not work for me at first because in the httpd.conf the webroot wa set to /usr/local/www/apache24/data/, not /usr/local/www/apache24/data/nextcloud.
at first I changes the command to: certbot certonly --webroot -w /usr/local/www/apache24/data/ -d YOURSITE.COM which worked out of the box.
Then I thought this might be not good for autorenewal. So I canged the webroot in the httpd.conf to /usr/local/www/apache24/data/nextcloud and it worked like in the guide.
But maybe this was also an error of the ".conf" Problem not loaded mentioned above. I did this befor renaming the VirtualHost conf file. Think this file also tells where the webroot should be.
Of cause you also mean "nano /usr/local/etc/apache24/httpd.conf" instead of "cd /usr/local/etc/apache24/httpd.conf".
----------------------------------------------------------------------------------------------------------
So all in all minor things that i was able to fix by myself. It tool about 4 hours to install this system completely.
Again, thank you very much for this! This is a very excellent guide!