Saying Goodbye to Google. Installing Nextcloud! - TrueNAS Scale | SVPC S1E3

3 min read 2 months ago
Published on Aug 20, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial will guide you through the process of migrating from TrueNAS CORE to TrueNAS Scale and installing Nextcloud in a Docker container. You'll learn how to set up Nextcloud for secure access outside your home network using Tailscale. This guide is useful for anyone looking to establish a self-hosted cloud storage solution while emphasizing privacy and control over their data.

Step 1: Upgrade to TrueNAS Scale

  • Understand the Benefits: TrueNAS Scale offers features such as Docker and Kubernetes support, which allow for more flexibility in running applications like Nextcloud.
  • Upgrading Process:
    1. Backup your data from TrueNAS CORE.
    2. Download the TrueNAS Scale ISO from the TrueNAS website.
    3. Create a bootable USB drive with the ISO.
    4. Boot your system from the USB drive and follow the installation prompts to upgrade to TrueNAS Scale.

Step 2: Install Docker

  • Why Docker: Docker allows you to run applications in isolated containers, making it easier to manage dependencies and configurations.
  • Installation Steps:
    1. Open the TrueNAS Scale web interface.
    2. Navigate to the "Apps" section.
    3. Install Docker by selecting the Docker option and following the prompts.

Step 3: Set Up Dockge

  • Dockge vs Portainer: Dockge is a lightweight alternative to Portainer for managing your Docker containers.
  • Installation Steps:
    1. Use the command line or Docker interface to pull the Dockge image:
      docker pull dockge
      
    2. Run the Dockge container:
      docker run -d -p 8080:80 dockge
      
    3. Access Dockge via your browser at http://<your-ip>:8080.

Step 4: Create the Compose.yml File

  • Purpose: The Compose.yml file defines the services, networks, and volumes for your Nextcloud installation.
  • Creating the File:
    1. Use a text editor to create a new file named docker-compose.yml.
    2. Add the following configuration:
      version: '3'
      services:
        nextcloud:
          image: nextcloud
          ports:
            - "8080:80"
          volumes:
            - nextcloud_data:/var/www/html
          networks:
            - nextcloud_network
      volumes:
        nextcloud_data:
      networks:
        nextcloud_network:
      
    3. Save the file in the directory where you want to run your Nextcloud instance.

Step 5: Install Nextcloud

  • Using Docker Compose:
    1. Navigate to the directory containing your docker-compose.yml file.
    2. Run the following command to start Nextcloud:
      docker-compose up -d
      
    3. Once the installation is complete, access Nextcloud via your browser at http://<your-ip>:8080.

Step 6: Configure Tailscale

  • Why Tailscale: Tailscale provides secure access to your Nextcloud instance from outside your home network without the need for complicated VPN setups.
  • Setup Instructions:
    1. Sign up for a Tailscale account at Tailscale's website.
    2. Install Tailscale on your TrueNAS Scale system:
      curl -fsSL https://tailscale.com/install.sh | sh
      tailscale up
      
    3. Follow the prompts to authenticate and connect your device to your Tailscale network.
    4. Access your Nextcloud instance securely through the Tailscale IP.

Conclusion

With these steps, you have successfully migrated to TrueNAS Scale, installed Docker, and set up Nextcloud for remote access using Tailscale. This configuration not only enhances your data privacy but also provides you with a robust self-hosted cloud solution. As a next step, explore the various features of Nextcloud to customize your cloud experience further.