How do I add an external hard drive for transmission

I have been struggling with this for quite a while. Tried a few things but never went to hard at it. Today I decided to make it work and finally it is! I have a USB drive mounted which I have configured to work with Plex and Radarr. While all apps see the drive, they take additional configuration to be able to read/write so you have to repeat parts of the guide for each app you want to use the external storage.

Obviously, this is intended for Umbrel on Ubuntu - I have a PI as well but haven’t tried to figure it out there. I sued exFat as this drive goes to Windows, Mac and Linux machines - can’t comment on it working with other file formats.

Hope it helps! I’ll be adding this to my blog with prettier markup and such - wanted to get it here first but I will post the link when it is up. BLOG LINK IS HERE:

Integrating an External exFAT Drive with Umbrel (umbrelOS 0.5.4) on Ubuntu within Docker

Pre-requisites:

  • An external drive formatted in exFAT.
  • An Ubuntu system with umbrelOS 0.5.4 installed via Docker.
  • A Windows machine with Windows Terminal installed.
  • Umbrel’s home directory is on a separate partition from the Ubuntu installation.

Step-by-Step Guide:

Step 1: SSH Access to Your Umbrel:

  1. SSH into Your Umbrel:
  • To access your Umbrel, SSH into your Ubuntu system running Umbrel using the following command in Windows Terminal:
bashCopy code
    • ssh username@umbrel.localReplace username with your Ubuntu username and umbrel with the name of your Umbrel server. For example, if your Umbrel server is named “casa,” use:
bashCopy code
    • ssh username@casa.local

Step 2: Initial Setup:

  1. Install exFAT Tools:
  • Before connecting your exFAT external drive, install the required exFAT tools by running the following command:
bashCopy code
    • sudo apt-get install exfatprogsThis ensures that your system has the necessary tools to support the exFAT filesystem.

Step 3: Mounting and Permissions:

  1. Identify the Device Identifier or Label of Your External Drive:
  • Before proceeding with mounting, you need to identify the actual device identifier or label of your external drive. You can do this by running the following command:
bashCopy code
    • sudo blkidThis command will display a list of block devices along with their labels, UUIDs, and other information. Look for your external drive in the list and note down its device identifier or label.For example, it might appear as /dev/sdc1 or have a label like MyExternalDrive. You will use this identifier or label in the subsequent steps when mounting the drive.
  1. Unmount the Automatically Mounted Drive (If Necessary):
  • If the exFAT drive has been automatically mounted and you wish to use a different mount point, unmount it first. Replace /path/to/automount with the actual automatically mounted path found in the previous step:
bashCopy code
    • sudo umount /path/to/automountEnsure that the drive is unmounted successfully.
  1. Mount the exFAT Drive to the Desired Path (e.g., /umbrelstorage):
  • Create a directory where you want to mount the external drive. In this guide, we’ll use /umbrelstorage as the default example:
bashCopy code
    • sudo mkdir /umbrelstorage
  • Now, mount the exFAT external drive to the /umbrelstorage directory. Replace /dev/your-drive-label with the label or device identifier of your external drive:
bashCopy code
    • sudo mount -t exfat /dev/your-drive-label /umbrelstorageBe cautious about using /storage as a mount point, as it may conflict with existing Umbrel configurations.
  • Ensure that the mounted directory has appropriate permissions by making it world-writable (adjust as needed for security):
bashCopy code
    • sudo chmod -R 777 /umbrelstorage

Step 4: Persisting the Mount Point:

  1. Edit the /etc/fstab File for Automatic Mounting on Boot:
  • Open the /etc/fstab file for editing:
bashCopy code
    • sudo nano /etc/fstab
  • Add the following line to the /etc/fstab file, replacing your-drive-label with the label or device identifier of your external drive:
bashCopy code
    • /dev/your-drive-label /umbrelstorage exfat defaults,uid=1000,gid=1000 0 0
  • Save your changes and exit the text editor.
  1. Reboot Your Ubuntu System:
  • To ensure that the external drive is automatically mounted on startup, reboot your Ubuntu system:
bashCopy code
    • sudo reboot

Step 5: Using the Mounted Drive with an Umbrel App (e.g., Plex):

  1. Choose the Umbrel App:
  • Decide which Umbrel app (e.g., Plex) you want to configure to use the mounted drive. In this example, we’ll use Plex.
  1. Stop the App Container:
  • Stop an app container in Umbrel using the following convention. Replace plex with the name of the app you want to stop (e.g., sonarr, lidarr, etc.):
bashCopy code
    • cd ~/umbrel/scripts sudo ./app stop plex
  1. Edit the Docker Compose File:
  • To edit the Docker Compose file, use the sudo command since system-level changes are required. The Docker Compose file for each Umbrel app is located under the path ~/umbrel/app-data/"appname". For example, if you are configuring Plex, the path would be ~/umbrel/app-data/plex.
bashCopy code
    • sudo nano ~/umbrel/app-data/plex/docker-compose.yml
  1. Modify the Docker Compose File:
  • Within the Docker Compose file, locate the volume entry for the app’s configuration and data. Add a new volume mapping for the external drive. Ensure that it includes the appropriate permissions. Here’s an example of what the volume entry might look like:
yamlCopy code
    • volumes: - /umbrelstorage:/umbrelstorage:rwThis example mounts the external drive to the same path within Plex’s container with read and write permissions.
  1. Save Changes and Exit Nano (for Beginners):
  • To save changes in Nano, follow these steps:a. Press Ctrl + O (Control key and the letter ‘O’) to write the file.b. You’ll be prompted to confirm the file name. Press Enter to confirm and save the changes.
  • To exit Nano, follow these steps:a. Press Ctrl + X (Control key and the letter ‘X’).b. Nano will ask if you want to save changes. If you’ve already saved your changes in step 5a, you can press Enter to confirm and exit Nano.
  1. Start the App Container:
  • After making the necessary changes to the Docker Compose file and saving them, start the app container using the following command (replace plex with the app’s name):
bashCopy code
    • cd ~/umbrel/scripts sudo ./app start plex

With these updated instructions, you should be able to configure Plex (or any other Umbrel app) to use the mounted external drive within your Umbrel setup while ensuring proper permissions with sudo for starting or stopping apps and Umbrel.