FreeNAS: NextCloud Access to Mount Points using External Storage and Proper Permissions

Install Nextcloud in FreeNAS
Install Nextcloud in FreeNAS

Nextcloud is a suite of client-server software for creating and using file hosting services, which is most powerfully paired with FreeNAS when you are able to configure it to access your stored data on your server (e.g. beyond just a jail running Nextcloud). These mount points you are likely to share via samba (Windows file sharing)over your local and are likely to backup through whatever means works best for you. As mentioned in the previous article, FreeNAS: Nextcloud Install with SSL Access, the Nextcloud application provides functionally which is similar to Dropbox, however unlike Dropbox, Nextcloud does not offer off-premises file storage hosting. As I have previously noted, it is critical that you have an off-premise copy of all sensitive data (which is encrypted). Unlike Dropbox however, Nextcloud is free and open-source, which means that anyone is allowed to install and operate it on their own private server devices. In contrast to proprietary services like Dropbox, the open architecture allows adding functionality to the server in the form of applications and enables users to have full control of their data and keeps data secure and free from the prying eyes of big companies like Google and Dropbox.

This article is part of my series of FreeNas setup, configuration and install articles.

An updated version of this article is posted on the NEW digiMoot website at:


10 thoughts on “FreeNAS: NextCloud Access to Mount Points using External Storage and Proper Permissions

  1. Thanks for the guide! I’m pretty sure I followed it step by step but when I try to click the check mark I get a red stop sign to the left of the entry. Other than that it looks exactly like yours, including the FTP and smbclient warnings. Any advice? (Freenas 11.2 and whatever the most recent NextCloud is)

    Like

  2. OK, I’m replying to my own reply. Sad. I figured out I was putting the wrong path in the configuration. Once I corrected that and then set permissions correctly so I could access the shares both in NextCloud and on my local network PCs it was golden. Thanks again for the guide.

    Like

  3. Currently I use this method, but I have a problem, why not just mount the directory to nextcloud data directory, instead of use external storage? Thanks.

    Like

  4. I used you previous guide to install SSL certs but was not successful with this guide. I have a server with some HDDs for storage and a SSD for jails. I wanted to install nextcloud in the jail but hold the data on my HDDs. I found a guide that I developed for linux and altered it for Truenas. I access the server from a MAC so don’t need putty.
    I am no expert just an old bloke trying to get a bloody cloud working so this may be completely wrong but sofar it works for me.
    Using MACINTOSH
    Install Truenas on server. 2 pools multiple HDD’s for data and SSD for Jails
    On MAC open Truenas GUI
    In Storeage create pool for jails
    in Services turn on SSH and configure to ‘log in as root with password’ and ‘Allow Password Authentication’
    Install nextcloud plug-in in Jail pool
    When installed and before opening nextcloud
    open terminal
    $ ssh root@192.168.1.XX (Truenas url)
    $ iocage console nextcloud
    $ pkg install sudo nano
    $ service nginx stop
    $ ls -la /usr/local/www/nextcloud/data -check contents
    $ mkdir /usr/local/www/nextcloud/data-bak
    $ cp -a /usr/local/www/nextcloud/data/. /usr/local/www/nextcloud/data-bak
    $ ls -la /usr/local/www/nextcloud/data-bak -check contents are same as above
    $ sudo -u #80 php /usr/local/www/nextcloud/occ maintenance:mode –on
    $ rm -R /usr/local/www/nextcloud/data
    $ mkdir /usr/local/www/nextcloud/data
    Go to Truenass GUI
    setup storeage for your data outside jail
    Setup pool and dataset for your data ( /mnt/tank/ncdata )
    permissions owner/group www:www permissions 770
    In Jail GUI
    stop nextcloud jail
    make ‘mount point’ from /mnt/tank/ncdata to /mnt/jailhouse/iocage/jails/nextcloud/root/usr/local/www/nextcloud/data
    in terminal
    $ ssh root@192.168.1.XX (Truenas url)
    $ cp -a /mnt/jailhouse/iocage/jails/nextcloud/root/usr/local/www/nextcloud/data-bak/. /mnt/tank/ncdata
    $ nano /mnt/jailhouse/iocage/jails/nextcloud/root/usr/local/www/nextcloud/config/config.php
    Make following additions to ‘trusted domains’ array
    2 => ‘192.168.1.XX’,
    3 => ‘your.domain.name’,
    4 => ‘www.your.domain.name’,
    Save and Exit
    exit
    NOTE no need to change data location
    $ sudo -u #80 php /usr/local/www/nextcloud/occ maintenance:mode –off
    If this helps it is a thank you for your guide on ssl.

    Like

  5. Hi! I’m facing a weird problem that I guess it’s related to bad permissions. I’m able to mount the dataset inside the jail and it shows up normally on nextcloud, but, I can access only the root of the mount point. If I try to access a subfolder, it redirects me back to the root.

    The dataset is owned by www. I changed the ownership using ACL. I also marked the “apply permissions recursively” option on the same page.

    Do you have any ideia of what I should do?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s