Skip to content

Commit

Permalink
Docs-4410 Update Nextcloud and Admin User Articles
Browse files Browse the repository at this point in the history
This commit removes the non-media Nextcloud article that essentially duplicates the InstallNextCloudMedia.md article content, adds an alias for the other article to the media article. It updates the ManageLocalUsersSCALE.md article to include information about the admin user requirement to set Permit Sudo, and fixes a few things in the rootless login article content.
  • Loading branch information
micjohnson777 committed Jan 3, 2023
1 parent 3c18006 commit 85fc77a
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 159 deletions.
92 changes: 48 additions & 44 deletions content/SCALE/SCALETutorials/Apps/InstallNextCloudMedia.md
Expand Up @@ -2,22 +2,26 @@
title: "Adding NextCloud for Media Previews"
description: "This article provides instructions to configure TrueNAS SCALE and install NextCloud to support hosting a wider variety of media file previews such as HEIC, Mp4 and MOV files."
weight: 30
alias:
alias: /scale/scaleuireference/apps/nextcloudscale/
tags:
- scalenextcloud
- scaleapps
- scalenextcloud
- scaleapps
- scaleadmin
---

{{< toc >}}

NextCloud is a drop-in replacement for many popular cloud services, including file sharing, calendar, groupware and more.
One of its more common uses for the home environment is serving as a media backup, and organizing and sharing service.
This procedure demonstrates how to set up NextCloud on TrueNAS SCALE, and configure it to support hosting a wider variety of media file previews, including High Efficiency Image Fromat (HEIC), MP4 and MOV files.
The instructions in this article apply to SCALE 22.02.3 and later.
The instructions in this article apply to SCALE 22.12.0 and later.

## Before You Begin

Before using SCALE to install the NextCloud application you need to configure TrueNAS SCALE storage for NextCloud application to use.

Verify the [local administrator]({{< relref "ManageLocalUsersSCALE.md" >}}) account has sudo permissions enabled.

You also use the SCALE Shell to set the ffmpg binary before you begin the NextCloud installation and configuration.

Set up an account with NextCloud if you don't already have one.
Expand All @@ -34,34 +38,37 @@ In this procedure you:

### Adding NextCloud Storage

NextCloud needs a primary dataset for the application, and four datasets it uses for the primary data volume, a postgres data volume (db) and one as a postgres backup volume (dbbackup), and an one for extra mount path volume (opt).
NextCloud needs a primary dataset for the application (nextcloud), and four datasets, one it uses for the primary data volume (data), a postgres data volume (db) and one as a postgres backup volume (dbbackup), and an one for extra mount path volume (opt).

SCALE Bluefin creates the **ix-applications** dataset in the pool you set as the application pool when you first go to the **Apps** screen. This dataset is internally managed so you cannot use this as the parent when you create the required Nextcloud datasets.

You can either create these datasets under an existing dataset you use for applications (apps), or if you have enough disks on your TrueNAS system and want to create a new pool to use just for media files, create a new pool and then add the NextCloud datasets as child datasets to the root dataset.
To create the Nextcloud datasets, go to **Datasets**, select the dataset you want to use as the parent dataset, then click **Add Dataset** to [add a dataset]({{< relref "DatasetsScale.md" >}}). In this example, we create the Nextcloud datasets under the root parent dataset **tank**.

To create a new pool, go to **Storage** and click **Create Pool** to [add a new pool]({{< relref "CreatePoolScale.md" >}}).
Enter **nextcloud** in **Name**, make any other setting changes you want to make, and click **Save**.

To add under an existing dataset, click the <i class="fa fa-ellipsis-v" aria-hidden="true" title="Options"></i>&nbsp; for the dataset where you want to add the NextCloud datasets, and then select **[Add Dataset]({{< relref "DatasetsSCALE.md" >}})**.
In our Nextcloud example we use pool *tank*, parent dataset *apps** and then created the *nextcloud* dataset.
Next, select the **nextcloud** dataset, click **Add Dataset** to add the **data** child dataset.
Enter **data** in **Name**, make any other setting changes you want to make for the dataset, and click **Save**.

Next, select the **nextcloud** dataset, click <i class="fa fa-ellipsis-v" aria-hidden="true" title="Options"></i>&nbsp; and select **Add Dataset** to add a child dataset. Enter **data** in **Name** and click **Save**.
Repeat this step three more times to add the three child datasets to the **nextcloud** dataset, one named **db**, the next **dbbackup**, and then finally **opt**.
Repeat this three more times to add the other three child datasets to the **nextcloud** non-root parent dataset.
Add one named **db**, the next **dbbackup**, and then finally **opt**.

When finished you should have the *nextcloud* parent dataset with four child datasets under it. Our example paths are:
* */mnt/tank/apps/nextcloud/data*
* */mnt/tank/apps/nextcloud/db*
* */mnt/tank/apps/nextcloud/dbbackup*
* */mnt/tank/apps/nextcloud/opt*
When finished you should have the **nextcloud** parent dataset with four child datasets under it. Our example paths are:
* */mnt/tank/nextcloud/data*
* */mnt/tank/nextcloud/db*
* */mnt/tank/nextcloud/dbbackup*
* */mnt/tank/nextcloud/opt*

![AppsAddNextCloudStorage](/images/SCALE/22.02/AppsAddNextCloudStorage.png "Add Nextcloud Storage")
![AppsAddNextcloudDatasets](/images/SCALE/22.12/AppsAddNextcloudDatasets.png "Add Nextcloud Storage")

### Set Up the ffmpg Binary

To set the ffmp binary, include `sudo` in the command and enter the admin password.
Go to **System > Shell** and enter these six commands:

```
cd /mnt/tank/apps/nextcloud/opt
cd /mnt/tank/nextcloud/opt
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
sudo wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar xvf ffmpeg-release-amd64-static.tar.xz --wildcards \*static/ffmpeg
Expand Down Expand Up @@ -92,47 +99,44 @@ Go to **Apps** to open the **Applications** screen and then click on the **Avail

3. Enter a name for the app in **Application Name** and then click **Next**. This example uses *nextcloud*.

![AddNextcloudEnterApplicationName](/images/SCALE/22.02/AddNextcloudEnterApplicationName.png "Add Nextcloud Application Name")
![AddNextcloudEnterApplicationName](/images/SCALE/22.12/AddNextcloudEnterApplicationName.png "Add Nextcloud Application Name")

4. Enter a user name and password to use as a NextCloud login on the **Nextcloud Configuration** settings screen, and then click **Next**.
4. Enter a user name and password to use as a Nextcloud login on the **Nextcloud Configuration** settings screen, and then click **Next**.
For a basic installation you can leave the default values in all settings except **Username** and **Password**. This example uses *admin* as the user.
TrueNAS populates **Nextcloud host** with the IP address for your server, **Nextcloud data directory** with the correct path, and **Node Port to use for Nextcloud** with the correct port number.

![AddNextcloudUsernameAndPassword](/images/SCALE/22.02/AddNextcloudUsernameAndPassword.png "Add Nextcloud User Name and Password")
![AddNextcloudUsernameAndPassword](/images/SCALE/22.12/AddNextcloudUsernameAndPassword.png "Add Nextcloud User Name and Password")

5. Enter the storage settings for each of the four datasets created for NextCloud.
5. Enter the storage settings for each of the four datasets created for Nextcloud.

Enter or browse to the location where you created the nextcloud/data dataset in **Host Path for Nextcloud Data Volume**.
This example uses the */mnt/tank/apps***/nextcloud/data*** path.

![AddNextcloudDataAndOptPaths](/images/SCALE/22.02/AddNextcloudDataAndOptPaths.png "Add Nextcloud Data and Opt Paths")
a. Enter or browse to the location where you created the nextcloud/data dataset in **Host Path for Nextcloud Data Volume**. This example uses the /mnt/tank/nextcloud/data path.

Click **Add** to display the **Mount Path in Pod** and **Host Path** fields.
Enter **/opt** in **Mount Path in Pod**, and then either enter or browse to the location where you created the **nextcloud/opt** dataset in **Host Path**.
This example uses the */mnt/tank/apps***/nextcloud/opt*** path.
![AddNextcloudDataAndOptPaths](/images/SCALE/22.12/AddNextcloudDataAndOptPaths.png "Add Nextcloud Data and Opt Paths")

Select **Enable Host Path for Postgres Data Volume**, and then enter or browse to the location where you created the **nextcloud/db** dataset in **Host Path for Postgres Data Volume**.
b. Click **Add** to display the **Mount Path in Pod** and **Host Path** fields.
Enter the mount path in the Nextcloud container that you want to use in **Mount Path in Pod**. The example uses the same as the dataset path **/opt**.
Enter or browse to the location where you created the **nextcloud/opt** dataset in **Host Path**. This example uses the **/mnt/tank/nextcloud/opt** path.

![AddNextcloudDbAndDbbackup](/images/SCALE/22.02/AddNextcloudDbAndDbbackup.png "Add Nextcloud DB and DBbackup Paths")
c. Select **Enable Host Path for Postgres Data Volume**, and then enter or browse to the **nextcloud/db** dataset location in **Host Path for Postgres Data Volume**.

Select **Enable Host Path for Postgres Backup Volume**, and then enter or browse to the location where you created the **nextcloud/dbbackup** dataset in the **Host Path for Progres Backup Volume**. This completes the storage setup for NextCloud. Click **Next**.
![AddNextcloudDbAndDbBackup](/images/SCALE/22.12/AddNextcloudDbAndDbBackup.png "Add Nextcloud DB and DBbackup Paths")

6. Select **Enable cronjobs for nextcloud** on the **CronJob configuration** screen, and then click **Next**.
d. Select **Enable Host Path for Postgres Backup Volume**, and then enter or browse to the **nextcloud/dbbackup** dataset location in the **Host Path for Progres Backup Volume**.

![AddNextcloudEnableCronJobs](/images/SCALE/22.02/AddNextcloudEnableCronJobs.png "Nextcloud Enable CronJobs")
6. Select **Enable cronjobs for nextcloud** on the **CronJob configuration** screen.

7. Accept the remaining setting defaults and click **Next** on the **Scaling/Upgrade Policy** and **Advanced DNS Settings** screens.
![AddNextcloudEnableCronJobs](/images/SCALE/22.12/AddNextcloudEnableCronJobs.png "Nextcloud Enable CronJobs")

8. Review the configuration settings and then click **Back** to fix any errors or **Save** to complete the installation.
![AddNextcloudConfirmSettings](/images/SCALE/22.02/AddNextcloudConfirmSettings.png "Confirm Nextcloud Settings")
7. Accept the remaining setting defaults on the **Scaling/Upgrade Policy** and **Advanced DNS Settings** screens.

8. Scroll up to review the configuration settings and fix any errors or **Save** to complete the installation.

9. Click on the **Installed Applications** tab to see the **nextcloud** widget.
Click on the **Installed Applications** tab to see the **nextcloud** widget.

![NextcloudWidgetActive](/images/SCALE/22.02/NextcloudWidgetActive.png "Nextcloud Widget Active")
![NextcloudWidgetActive](/images/SCALE/22.02/NextcloudWidgetActive.png "Nextcloud Widget Active")

When the **nextcloud** widget displays **ACTIVE**, click **Web Portal** to open the NextCloud sign in screen in a new browser window.
When the **nextcloud** widget displays **ACTIVE**, click **Web Portal** to open the NextCloud sign in screen in a new browser window.

![NextCloudSignIn](/images/SCALE/22.02/NextCloudSignIn.png "Nextcloud Sign In Screen")
![NextCloudSignIn](/images/SCALE/22.02/NextCloudSignIn.png "Nextcloud Sign In Screen")

{{< taglist tag="scalenextcloud" limit="10" title="Related NextCloud Articles" >}}
{{< taglist tag="scaleadmin" limit="10" title="Related Admin User Articles" >}}
108 changes: 0 additions & 108 deletions content/SCALE/SCALETutorials/Apps/NextcloudSCALE.md

This file was deleted.

Expand Up @@ -6,6 +6,7 @@ alias: /scale/scaleuireference/credentials/localusers/
tags:
- scaleusers
- scalelogin
- scaleadmin
---

{{< toc >}}
Expand Down Expand Up @@ -36,7 +37,7 @@ To see user accounts, go to **Credentials > Local Users**.
TrueNAS hides all built-in users (except root) by default. Click the toggle **Show Built-In Users** to see all built-in users.

## Creating an Admin User Account
SCALE has implemented rootless login. All systems should create and begin using an admin user as a replacement for the root user.
SCALE has implemented rootless log in. All systems should create and begin using an admin user as a replacement for the root user.
A system warning alert displays until you create the admin user.
If you upgraded to a 22.12.0 release instead of installing fresh from an iso file and setting up the admin user in that process, you can create an admin user with this procedure.

Expand All @@ -52,6 +53,16 @@ Select the **root** and **builtin_administrators** groups on the **Auxiliary Gro

Click **Save**.

### Configuring the Admin User Account for Nextcloud App
The Nextcloud application, configured on the **Apps > Available Applications** screen, requires including sudo permissions for the administrator account.
To verify, or manage the local administrator account, go to **Credentials > Local User** and click on the administrator user row to expand it, then click **Edit** to open the **Edit User** configuration screen.

Scroll down to the **Authentication** settings and select **Permit Sudo**.

Click **Save**.

For information on adding sudo permissions in cli commands, see [Installing Nextcloud for Media Previews]({{< relref "InstallNextCloudMedia.md" >}}).

## Creating User Accounts

To create a new user, click **Add**.
Expand Down

0 comments on commit 85fc77a

Please sign in to comment.