Note: This post is sponsored by Scrimba. Scrimba offers interactive coding courses that let you learn by writing and editing code directly in the browser. Get 20% off Scrimba Pro (Click Here)


What’s up, guys! Welcome—or welcome back to my blog. In this post, I’m installing my very first app on TrueNAS SCALE. If you haven’t seen my TrueNAS installation video yet,  you can check it out here (TrueNAS on AOOSTAR WTR PRO)

The app I’m setting up is Nextcloud, an open-source file-sharing and collaboration platform similar to Dropbox or Google Drive. The difference is, with Nextcloud, I have full control over my data—but that also means I’m responsible for managing it. I’m setting this up in my home lab to serve as a centralized file-sharing platform where I can store and manage everything I’ll be working on. 

One of my main goals is to start using Obsidian for note-taking and documentation, but before I can do that, I need a reliable storage solution. I didn’t want to just rely on a basic network share, so setting up Nextcloud felt like the right move.

I’ve broken this guide down into a few parts:

  • Pre-installation – I’ll go over everything I had to do to prepare, including a few issues I ran into along the way.
  • Installation – I’ll walk through the actual installation of the Nextcloud app on TrueNAS SCALE.
  • Post-installation – I’ll show how I accessed Nextcloud, installed Collabora, and connected it for in-browser document editing.

Step 1: Pre-installation

The first step in setting up Nextcloud on TrueNAS SCALE is preparing the datasets where all the application data will be stored. For organization and smooth setup, I created a few folders (datasets) following this structure.

Create the Base Datasets

I started by creating a dataset called Applications with the Dataset Preset set to Apps. This will be the parent folder where all my future apps—including Nextcloud—will live. 

Next, inside the Applications dataset, I created another dataset called Nextcloud, again with the Dataset Preset set to Apps. Inside the Nextcloud dataset, I created three additional datasets that Nextcloud will use during setup:

  • Appdata – Dataset Preset: Apps
  • Userdata – Dataset Preset: Apps
  • Postgresdata – Dataset Preset: Generic

These folders will store the application files, user data, and PostgreSQL database files respectively.

Set Proper Permissions (Important!)

This part is critical. If you don’t apply the correct permissions, the installation can get stuck on “Deploying”, and when you try to access Nextcloud, you’ll see a 403 Forbidden error.

To avoid this, you need to set the right permissions on the Applications dataset:

  1. Go to the Applications dataset settings.
  2. Set both the Owner and Group to www-data.
  3. Give full Read/Write/Execute access.
  4. Make sure to check the box to Apply permissions recursively so that all subfolders inherit these settings.

Even after doing this, I ran into an issue where the app stayed stuck on “Deploying” and I still got a 403 error. Here’s how I fixed it:

Fixing the 403 Error (If It Happens)

I opened the TrueNAS Shell, switched to the admin user, and manually changed ownership of all datasets under Applications using this command:

  • chown -R www-data:www-data /mnt/Koromalab/*

This command recursively applies the correct permissions to every folder inside the Koromalab dataset, ensuring the www-data user has access. After this step, all permission issues were resolved, and I was ready to move on to the installation phase.

Step 2: Installation

Now that the datasets and permissions are properly set up, I’m ready to move on to the actual installation of Nextcloud on TrueNAS SCALE. This part is pretty straightforward thanks to the built-in app catalog, but there are still a few key settings to pay attention to during setup.

 Install the Nextcloud App

To begin, click on “Apps” in the TrueNAS SCALE sidebar, then click “Discover Apps.” Use the search bar to find Nextcloud, click on it, and then hit “Install.”

Set a username and password for your Nextcloud admin account. You’ll use these credentials to log in after the installation is complete.

You can select optional packages to pre-install inside the Nextcloud container. Here’s a quick overview of what each one does:

  • ffmpeg:Enables video thumbnail previews (highly recommended).
  • smbclient: Allows access to Windows SMB/CIFS shares.
  • ocrmypdf: Adds OCR support for scanned PDF documents.
  • libreoffice: Enables document previews and file conversion (e.g., DOCX to PDF).

Nextcloud uses:

  • Redis for in-memory caching, improving performance by reducing disk access.
  • PostgreSQL as the main database for storing user accounts, file metadata, settings, and more. Make sure to enter strong passwords for both.

Now it’s time to point the app to the datasets you created earlier. Each mount path should correspond to the appropriate folder:

  • /mnt/Koromalab/Applications/Nextcloud/Appdata
  • /mnt/Koromalab/Applications/Nextcloud/Userdata
  • /mnt/Koromalab/Applications/Nextcloud/Postgresdata

Make sure “Automatic Permissions” is checked for the Postgresdata path. If you’d rather set permissions manually, you’ll need to:

  • Go to the Postgresdata folder
  • Set Owner to "netdata" and Group to "docker"
  • Give full access
  • Apply changes recursively

Otherwise, the deployment may fail.

You can allocate resources depending on your system. For my setup, I chose:

  • 4 CPUs
  • 8 GB RAM

These are the basic settings needed to get you up and running. You can always come back and make changes later if needed. Click “Install” to start the process. Keep in mind—installation can take a few minutes, so be patient. Once complete, you’ll see Nextcloud listed among your applications with a “Running” status.

Step 3: Post-Installation

Now that the app is installed, it’s time to access the Nextcloud Web UI and finish a few final steps to get everything working properly.

You can access the Web UI by clicking the “Web Portal” (or “Web UI”) button under the application info section in TrueNAS.

Dealing with Trusted Domain Errors

When accessing Nextcloud for the first time, you might run into a warning about an untrusted domain—this usually happens when you try to access it via your IP address or a domain name that isn’t yet registered in the Nextcloud config.

To fix this, you’ll need to manually edit the Nextcloud configuration file and add your IP address (or domain name) to the list of trusted domains.

Go to System > Shell in TrueNAS. Switch to the admin user. Navigate to your Appdata folder where the Nextcloud data is stored (/mnt/Koromalab/Applications/Nextcloud/Appdata). Inside, look for a folder named config. 

Open the config.php file. Look for the "trusted_domains" section and add your IP address or domain name as a new entry.

At this point, you should now be able to access Nextcloud in all its glory, running smoothly on your TrueNAS SCALE setup.

Final Thoughts

As I mentioned earlier, I’m using Nextcloud as a central drop zone for all files in this environment. I don’t need Collabora installed just yet since I plan to run it locally on my computer and point it to the container when needed. I’ll cover that in a future video.

There’s still a lot more to set up—like DNS, certificates, and a few other services. But we’ll get into all of that next time.Thanks for hanging out, and as always—stay geeking. Peace!

About the author

Quiet Engineer

A lifelong learner with a passion for tech and soccer. Koroma Tech is where I share my journey and help others along the way. I enjoy taking on challenges and see each one as a chance to learn and grow.

>