Resource icon

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

hockeyamd

Cadet
Joined
Mar 22, 2019
Messages
6
+-------+-------------------------------------------------------------------------------------------+

| INDEX | FSTAB ENTRY |

+=======+===========================================================================================+

| 0 | /mnt/documents/files /mnt/jailhouse/iocage/jails/nextcloud/root/media/files nullfs rw 0 0 |

+-------+-------------------------------------------------------------------------------------------+

| 1 | /mnt/documents/db /mnt/jailhouse/iocage/jails/nextcloud/root/var/db/mysql/ nullfs rw 0 0 |

+-------+-------------------------------------------------------------------------------------------+

Getting this when loading the it
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.
 

Yakje

Explorer
Joined
Feb 8, 2017
Messages
82
Thanks for the great script danb3!

It runs fine, but i seem to have some problems regarding the domain. I am not sure how to set it up correctly. In my home situation i share a modem/router combo with other people in the same building, this modem has DHCP enabled, then i have my own router connected to the modem which also has DHCP enabled (double NAT). Eventually i want to be able to reach the Nextcloud instance over a VPN (running on my router) connection, but for now just local access would be fine. I am unsure about what steps i have to take, to make it work for my situation.

I do currently own a domain name, which is "my<something>.com", but don't actually need it to be reachable through that domain name yet (for now just locally would be fine), in the future i want it to be though.
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
Hi everyone,

I want to say a BIG thanks for danb3!! thanks to him I have my freenas and my nextcloud in Https!!!<3<3<3 amazinnnnnng! So now I just have one question: how to automatically renew certificates?


Thank you have a nice day :)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
how to automatically renew certificates?
That should be configured in the jail already. To confirm, run iocage exec nextcloud crontab -l. You should see a cron job listed to run acme.sh --renew daily.
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
Hi, I still wanted to thank you for all the work you did for the community, excellent.:D

Regarding your last post here is what I have:
8 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
You think that is okay? So I have cert for Freenas too but I think I have to do a procedure to automate the renewal...

a last question... How will the update of Nextcloud be done now? manually? automatically? because I only have it in the jail iocage and not in the plugins :rolleyes:

Sorry I'm a noob and sorry for my bad English!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
danb35 I hope this is the last time I ask you but I have a new problem since the installation of this essential package for Nextcloud and the SMB sharing of my PC..
I installed this package :

pkg install php71-pecl-smbclient

and since Nextcloud crash, when I try to restart the jail I have this message:

mount_nullfs: /mnt/tank: No such file or directory jail: /sbin/mount -t nullfs -o rw /mnt/tank/portsnap/ports /mnt/Stockage/iocage/jails/nextcloud/root/usr/ports: failed

Problem with the path?

Thank you in advance for you help
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
pkg install php71-pecl-smbclient
I wouldn't expect this to work, as my script uses php 7.2. But be that as it may, what's the output of iocage fstab -l nextcloud?
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
I have reinstalled it with your script since and it is accessible again, I apologise...

So, could you recommend me a package / source to install this 'smbclient'?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
So, could you recommend me a package / source to install this 'smbclient'?
php72-pecl-smbclient would be my guess.
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
Thank you danb35 but after reboot my FreeNAS my Nextcloud is down... (php72-pecl-smbclient is not the problem because I had try without this package)

------------------------------ ------+
| INDEX | FSTAB ENTRY |
+=======+========================================================================================= ======+
| 0 | /mnt/tank/portsnap/ports /mnt/Stockage/iocage/jails/nextcloud/root/usr/ports nullfs rw 0 0 |
+-------+----------------------------------------------------------------------------------------- ------+
| 1 | /mnt/tank/portsnap/db /mnt/Stockage/iocage/jails/nextcloud/root/var/db/portsnap nullfs r w 0 0 |
+-------+----------------------------------------------------------------------------------------- ------+
| 2 | /mnt/tank/files /mnt/Stockage/iocage/jails/nextcloud/root/mnt/files nullfs rw 0 0 |
+-------+----------------------------------------------------------------------------------------- ------+
| 3 | /mnt/tank/db /mnt/Stockage/iocage/jails/nextcloud/root/var/db/mysql nullfs rw 0 0 |
+-------+----------------------------------------------------------------------------------------- ------+

I can not start it :(
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
JID | NAME | STATE | RELEASE | IP4 |
+=====+===========+=======+==============+==============+
| - | nextcloud | down | 11.2-RELEASE | 192.168.1.22 |
+-----+-----------+-------+--------------+--------------+
| 1 | plex | up | 11.2-RELEASE | 192.168.1.19 |
+ ----- + ----------- + ------- + -------------- + -------- ------ +
| 2 | tautulli | up | 11.2-RELEASE | 192.168.1.18 |

After reboot yes, before everything was working properly.
For information Plex and Tautully work with vnet0, nextcloud re0. When I try to change re0 to vnet0 the problem is always de same. Very strange.

my error message in full:
RuntimeError
mount_nullfs: /mnt/tank: No such file or directory jail: /sbin/mount -t nullfs -o rw /mnt/tank/portsnap/ports /mnt/Stockage/iocage/jails/nextcloud/root/usr/ports: failed
remove_circle_outline More info...

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 165, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1141, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1078, in _call
return await self._call_worker(serviceobj, name, *args)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1105, in _call_worker
job,
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1036, in run_in_proc
return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1021, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
RuntimeError: mount_nullfs: /mnt/tank: No such file or directory
jail: /sbin/mount -t nullfs -o rw /mnt/tank/portsnap/ports /mnt/Stockage/iocage/jails/nextcloud/root/usr/ports: failed
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
absolutely not, just one and its name is "Stockage"
Well, that explains the errors you're seeing. It doesn't explain why you have mountpoints of /mnt/tank/blah in the first place, though. Assuming /mnt/Stockage/{db|files|portsnap} exist, I'd do this:
Code:
iocage fstab -e nextcloud /mnt/tank/portsnap/ports /usr/ports nullfs rw 0 0
iocage fstab -e nextcloud /mnt/tank/portsnap/db /var/db/portsnap nullfs rw 0 0
iocage fstab -e nextcloud /mnt/tank/files /mnt/files nullfs rw 0 0
iocage fstab -e nextcloud /mnt/tank/db /var/db/mysql nullfs rw 0 0
iocage fstab -a nextcloud /mnt/Stockage/portsnap/ports /usr/ports nullfs rw 0 0
iocage fstab -a nextcloud /mnt/Stockage/portsnap/db /var/db/portsnap nullfs rw 0 0
iocage fstab -a nextcloud /mnt/Stockage/files /mnt/files nullfs rw 0 0
iocage fstab -a nextcloud /mnt/Stockage/db /var/db/mysql nullfs rw 0 0
iocage start nextcloud
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
I have this when I run your code
not foundode:
: not found
/mnt/tank/portsnap/ports /mnt/Stockage/iocage/jails/nextcloud/root/usr/po
rts nullfs rw 0 0 # Added by iocage on 2019-04-21 18:53:47
/mnt/tank/portsnap/db /mnt/Stockage/iocage/jails/nextcloud/root/var/db/portsna
p nullfs rw 0 0 # Added by iocage on 2019-04-21 18:53:48
/mnt/tank/files /mnt/Stockage/iocage/jails/nextcloud/root/mnt/files nullfs
rw 0 0 # Added by iocage on 2019-04-21 18:53:48
/mnt/tank/db /mnt/Stockage/iocage/jails/nextcloud/root/var/db/mysql nullfs
rw 0 0 # Added by iocage on 2019-04-21 18:53:48
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
/tmp/tmpzgaixu93.iocage: unmodified: line 1
/mnt/tank/portsnap/ports /mnt/Stockage/iocage/jails/nextcloud/root/usr/ports nullfs
rw 0 0 # Added by iocage on 2019-04-21 18:53:47
/mnt/tank/portsnap/db /mnt/Stockage/iocage/jails/nextcloud/root/var/db/portsnap nullfs
rw 0 0 # Added by iocage on 2019-04-21 18:53:48
/mnt/tank/files /mnt/Stockage/iocage/jails/nextcloud/root/mnt/files nullfs rw 0
0 # Added by iocage on 2019-04-21 18:53:48
/mnt/tank/db /mnt/Stockage/iocage/jails/nextcloud/root/var/db/mysql nullfs rw 0
0 # Added by iocage on 2019-04-21 18:53:48
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
yes it's possible! I have:
/mnt/tank/portsnap/ports /mnt/Stockage/iocage/jails/nextcloud/root/usr/ports
/mnt/tank/portsnap/db /mnt/Stockage/iocage/jails/nextcloud/root/var/db/portsnap
/mnt/tank/files /mnt/Stockage/iocage/jails/nextcloud/root/mnt/files
/mnt/tank/db /mnt/Stockage/iocage/jails/nextcloud/root/var/db/mysql

which should I change?
 
Top