NextCloud - Compi1er/Homelab_FRIDAY GitHub Wiki

NextCloud Install

  • Create the Datasets under a pool(s) of your choice.
    1. Datasets > add Dataset
    2. Add the following datasets:

!! NOTE !! Set the dataset preset drop-down on all except for postgresdata to "apps". Set postgresdata to "generic".

  • applications
    • nextcloud
      • appdata
      • userdata
      • postgresdata
  • Next edit the permissions for the datasets so that Nextcloud will be able to access the file structure properly. It will not be able to use root
    1. Datasets > Applications > Permissions > Edit
    2. Change the ACL Editor 'Owner' and 'Group' to www-data
    3. Select Apply on both the Apply Owner and Apply Group tick boxes
    4. Under the ACL, change the Group@ - www-data permissions to full control
    5. Select Apply Permissions Recursively and Apply Permissions to Child Datasets tick boxes
    6. Select Save Access Control List
  • Finalize permissions to allow access to the datasets through the pool

    1. System > Shell

    2. This is easier to run as root

      sudo su

    3. Now change owner using the following command

      chown -R www-data:www-data /mnt/management

    4. Verify the permissions change by changing directory to the location and running a list all.

      ls -la

  • Install Nextcloud through the TrueNAS apps

    1. Apps > Discover
    2. Search for Nextcloud
    3. Set a username and password for accessing the WebUI
    4. Add any APT packages wanted
    5. set Redis and Database passwords
    6. Under the storage config section make the following changes
      • Change the type to hostpath
      • Insert the correct directory locations for the three paths
      • Enable Automatic Permissions tick box for postgres directory
    7. Select Install
  • At this point, Nextcloud should be accessible from the WebUI. However there will be a "Trusted Domain" Error. Let's fix that.

    1. System > Shell

    2. Again this will be easier to complete as root

      sudo su

    3. Go to the directory where the config.php file is. This will be different depending on what everything is named. In my case, I used my management pool and created the entire dataset structure within it. So my path would look like this:

      cd /mnt/management/applications/nextcloud/appdata/config

    4. We then need to edit the config.php file

      nano config.php

    5. Under trusted_domains change the local host to the ip of the TrueNAS server for local access (in my case the 10.69.69.69) and add a domain url for remote/public access in another line.

    6. Save the file (CTRL+X , Y , Enter)

  • Go to the WebI for Nextcloud and login with the username and password that was configured earlier


Resources:

Koroma Tech Video Guide: https://www.youtube.com/watch?v=1rpeKWGoMRY

Nextcloud Documentation: https://docs.nextcloud.com/server/latest/admin_manual/contents.html#