Deploying OwnCloud and Collabora on TrueNAS Scale Using k3s via CLI

Introduction

In today’s digital landscape, efficient data management and seamless collaboration are critical for both personal and professional environments. OwnCloud and Collabora offer powerful solutions for cloud storage and online document editing, respectively. Deploying these tools on TrueNAS Scale can leverage the robust storage capabilities of TrueNAS while ensuring the applications are scalable and easy to manage using k3s, a lightweight Kubernetes distribution.

In this guide, we’ll walk you through the process of setting up OwnCloud and Collabora on TrueNAS Scale using k3s via the command line interface (CLI). Whether you’re a seasoned IT professional or a hobbyist exploring the possibilities of self-hosted cloud solutions, this tutorial will provide you with the necessary steps to get these services up and running efficiently.

By the end of this guide, you’ll have a fully functional OwnCloud and Collabora setup on TrueNAS Scale, whether you choose to use a reverse proxy or not. Let’s dive in and explore the steps to make this happen.

Overview & Explanation

OwnCloud

OwnCloud is an open-source file sync and share solution that provides universal access to your files through a web interface, sync clients, or WebDAV. It allows you to easily manage your data, providing features like versioning, collaborative editing, and secure sharing. With OwnCloud, you can keep control over your data, whether you host it on your own servers or use a hosted service.

Resources:

Collabora

Collabora Online is a powerful online office suite based on LibreOffice, allowing you to edit documents, spreadsheets, and presentations in your browser. It is designed for integration with various file sync and share platforms, including OwnCloud. Collabora provides collaborative editing, ensuring multiple users can work on the same document simultaneously.

Resources:

TrueNAS Scale

TrueNAS Scale is a highly scalable, open-source storage operating system designed to manage and store large amounts of data. It leverages the power of ZFS for data integrity, supports containerization and virtualization, and is built on a Linux-based architecture. TrueNAS Scale is ideal for both home users and enterprise environments, providing robust storage solutions and ease of management.

Resources:

k3s

k3s is a lightweight, certified Kubernetes distribution designed for production workloads in resource-constrained environments. It is easy to install and maintain, making it ideal for edge, IoT, and small-scale deployments. k3s provides all the benefits of Kubernetes with reduced resource consumption, making it a perfect fit for running on TrueNAS Scale.

Resources:

By understanding the capabilities and resources of these technologies, you can see how they complement each other to create a powerful, scalable, and efficient solution for managing and collaborating on your data. In the next sections, we’ll dive into the details of setting up and integrating OwnCloud and Collabora on TrueNAS Scale using k3s via CLI.

Preparing Your TrueNAS Scale

If you already have TrueNAS Scale installed and configured on your hardware, with your network, storage pools, disks, and datasets set up, you’re ready to prepare your environment for deploying OwnCloud and Collabora using k3s.

Using the App Service

TrueNAS Scale includes an integrated App Service that sets up k3s automatically, simplifying the deployment of applications. Follow these steps to configure the App Service:

Enabling the App Service

  1. In the TrueNAS Scale web interface, go to Apps.
  2. Click on Settings in the top-right corner.
  3. Choose a pool to automatically create a dataset for the App Service inside this pool. This dataset called „ix-applications“ by default will be used for apps from the official TrueNAS Apps Catalog or TrueCharts Catalog. We won’t use TrueCharts or the App Store, but this setup is required for the App Service (k3s).

Configuring Advanced Settings

  1. Navigate to Apps > Settings > Advanced Settings.
  2. Choose the node IP, preferably the IP used to access the TrueNAS Scale GUI, avoiding the 0.0.0.0 node IP.
  3. Select the route v4 interface that has a working internet connection and set a route v4 gateway.
  4. Enable container image updates and the integrated load balancer.
  5. GPU support is not needed but can be added if desired.
  6. The ClusterIPs should remain default but can be changed if necessary. This should only be done by experts who understand the implications.

By following these steps, the App Service will set up k3s on your TrueNAS Scale system. Ensure that the Apps Service is up and running.

While not much will be visible in the GUI, everything will be running properly, as we will see in the next part of the tutorial.

With the App Service running, your TrueNAS Scale system is now prepared for deploying OwnCloud and Collabora. Ensure you have working SSH access to the CLI, or use the shell inside the GUI, as we will continue the tutorial using command line operations. This setup provides the foundation needed to manage and deploy these applications efficiently.

Accessing the Shell

To deploy applications using k3s on TrueNAS Scale, you typically access the command line interface (CLI). While TrueNAS Scale supports deploying apps through the TrueCharts and TrueNAS Apps Catalog for ease of use, this guide will focus on using the CLI for full flexibility and self-management. This approach not only allows for the deployment of OwnCloud and Collabora but also provides the skills to set up other Docker-based applications in the same way, offering significant advantages.

Accessing the Shell in the Web Interface

  1. Log into the TrueNAS Scale web interface.
  2. Navigate to System Settings > Shell.

Accessing the Shell via SSH

  1. For a more convenient experience, use an SSH client like PuTTY.
  2. Download PuTTY from here.
  3. Connect to your TrueNAS Scale system using PuTTY by entering the IP address of your TrueNAS server and logging in with your credentials.

In the next sections, we will cover the detailed deployment process for OwnCloud and Collabora, including necessary configurations and environment variables.

Preparing App-Storage for persistence & access

Before we continue, we’ll create a new dataset to store our applications persistent data for the data that we want to keep after restarting or re-deploying the apps. Follow these steps to set up the dataset and ensure your environment is ready for the next stages.

Creating a New Dataset

  1. Navigate to Datasets:
    • Go to Storage > Pools in the TrueNAS Scale web interface.
    • Select your pool by clicking on it.
  2. Add a New Dataset:
    • Click on Add Dataset on the right side.
    • Enter a name for the dataset. For this tutorial, we will use „apps„.
  3. Set Dataset Preset:
    • Choose the SMB preset.
    • Check the Create SMB box and give the SMB share a name. For this Guide, we will use „appshare„.
    • Go to „Advanced Options“ and scroll down to ACL-Type and ACL-Mode
    • Set ACL-Type: SMB/NFS4
    • Set ACL-Mode: Passthrough
  4. Save the Dataset:
    • Click Save.
  5. Verify Permissions:
    • After saving, click on the new dataset and check its permissions.
    • Ensure it has NFS4 permissions, not POSIX.
    • Click on Edit under permissions.
    • On the next page, select Use Preset at the bottom left.
    • Choose NFS4_OPEN as the preset and click Continue.
    • Click Save Access Control List to ensure the settings are saved.

Now, we have the dataset set up and ready to be used later in the tutorial when we mount our data.

      By ensuring these items are correctly set up, you’ll be ready to proceed with deploying OwnCloud and Collabora using k3s. In the next sections, we will cover the detailed deployment process, including necessary configurations and environment variables.

      Preparing Files & Folders

      Now that we have prepared our TrueNAS, App Service, and dataset, and set the correct permissions, we can start by mounting the SMB share that was created alongside the dataset. If you have already mounted the SMB share, you can skip to the next step. If not, follow these steps to ensure you can access the SMB share.

      Verifying and Adjusting SMB Share Permissions

      1. Navigate to Shares:
        • Go to Shares > Windows Shares (SMB) > View All.
      2. Edit the SMB Share:
        • Locate your SMB share in the list/table (e.g., „appshare“).
        • Click on the three-dot icon next to the share and select Edit Filesystem ACL.
      3. Set Permissions Using Preset:
        • Click on Use Preset and select NFS4_OPEN.
        • Click Continue.
        • Click Save Access Control List.
        This step is necessary if the permissions were not set correctly due to a bug in the GUI of the first Dragonfish release of TrueNAS SCALE.

      Mounting the SMB Share

      If you are using Windows, you can mount the SMB share as follows:

      1. Open Windows Explorer:
        • Open File Explorer on your Windows machine.
      2. Connect to the SMB Share:
        • In the address bar, type the IP address of your TrueNAS server in the following format:
        • \\192.168.250.250 (replace 192.168.250.250 with your actual TrueNAS IP address).
        • Press Enter.
      3. Access the Share:
        • If everything is set up correctly, you should see the folder named „appshare“.
        • You can now access and manage the contents of the „appshare“ folder.
      4. Create the following Folders inside the „appshare“
        • Collabora (will be used for app persistence)
        • Owncloud (will be used for app persistence)
        • Mariadb (will be used for app persistence)
        • Install (will be used for .yaml files to create the deployments and more)
      5. Enter the Install-folder and create 2 more Folders inside named the following:
        • Deploy
        • Volume

      With the SMB share successfully mounted and accessible, we are now ready to proceed to the next steps of deploying OwnCloud and Collabora using k3s. In the next sections, we will dive into the detailed deployment process, including necessary configurations and environment variables.

      Preparing Files & Folders

      Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

      Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

      Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

      Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

      Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

      Schreibe einen Kommentar

      Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert