NextCloud - Compi1er/Homelab_FRIDAY GitHub Wiki
NextCloud Install
- Create the Datasets under a pool(s) of your choice.
- Datasets > add Dataset
- 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
- nextcloud
- 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
- Datasets > Applications > Permissions > Edit
- Change the ACL Editor 'Owner' and 'Group' to www-data
- Select Apply on both the Apply Owner and Apply Group tick boxes
- Under the ACL, change the Group@ - www-data permissions to full control
- Select Apply Permissions Recursively and Apply Permissions to Child Datasets tick boxes
- Select Save Access Control List
-
Finalize permissions to allow access to the datasets through the pool
-
System > Shell
-
This is easier to run as root
sudo su
-
Now change owner using the following command
chown -R www-data:www-data /mnt/management
-
Verify the permissions change by changing directory to the location and running a list all.
ls -la
-
-
Install Nextcloud through the TrueNAS apps
- Apps > Discover
- Search for Nextcloud
- Set a username and password for accessing the WebUI
- Add any APT packages wanted
- set Redis and Database passwords
- 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
- Select Install
-
At this point, Nextcloud should be accessible from the WebUI. However there will be a "Trusted Domain" Error. Let's fix that.
-
System > Shell
-
Again this will be easier to complete as root
sudo su
-
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
-
We then need to edit the config.php file
nano config.php
-
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.
-
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#