Ok. Truth - I have been avoiding my blog. The world seems to be a total shit show right now and while there are lots of good bullish things happening in the Bitcoin space, I don’t really feel like I have had any specific or super insightful things to add that I didn’t already cover in a tweet (xeet?) of 256 characters.
What I have been thinking a LOT about is my own hypocrisy on the self-sovereign freedom tech side of things. Man I have to get off of Windows, anything META related, X etc. etc. So I have been going down rabbit hole after rabbit hole on Linux desktop versions and open-source software, more NOSTR stuff etc. Invariably every night I end up in front of Netflix looking to escape SO I cancelled Netflix. Thing is I like watching a movie or documentary or even some super smart but stupid high level conditioning TV shows (Futurama anyone?)
What I don’t like is my support and dependence of all these services like I am some serf in a digital feudal world. How to reconcile?
Freedom tech again. Don’t worry we aren’t at the deep end yet - just dipping our toes. As many of you know I am a BIG fan of Umbrel which is a free personal server OS that allows you to run a bunch of open-source apps in a very user-friendly way. I have mostly used it to roll my own bitcoin and LN nodes, connect my wallet (Sparrow and Zeus) run a NOSTR relay etc. There is a lot more you can do with it however!
I setup a second instance recently on a sweet little Beelink mini pc and am configuring it to replace a lot of the cloud apps we normally use. Like what you say? Well back to that Netflix problem. You see it turns out I have hundreds of movies and tv shows from back in the day when I used to rip my own DVD’s and play them through Windows Media Center and then Windows Home Server (worked with those guys when they got swallowed by Small Business Server (I was a PM on that team) a long time back). Guess what? There are all kinds of apps for managing and playing movies, tv shows, music and even audiobooks and a lot of them run on Umbrel. Hell, you can even get rid of cloud storage like iCloud or OneDrive for backing up your phone or more likely your photos and videos on your phone. So goodbye Audible and hello Audiobookshelf and goodbye Netflix and hello Jellyfin or Plex. etc.
The biggest downfall I have come across in this whole endeavor is adding external storage to Umbrel. For some reason which I have to yet to hear a really good explanation for - it is not really supported. Security maybe? Raspberry Pi centric and not possible there? Not sure.
Hence, I spent a few hours (yes it took me that long - even with Chat GTP) to make it work for me. My contribution to those who find themselves in the same conundrum is provided as a How To guide below:
Integrating an External exFAT Drive with Umbrel installed on Ubuntu
Pre-requisites:
An external drive formatted in exFAT.
An up-to-date Ubuntu system with latest version of Umbrel.
A Windows machine with Windows Terminal installed. (This is what I used so mileage may vary if using something else)
In my case - Umbrel's home directory is on a separate partition from the Ubuntu installation, this was configured at installation. Probably does not matter.
Step-by-Step Guide:
Step 1: SSH Access to Your Umbrel
SSH into Your Umbrel:
To access your Umbrel, SSH into your Ubuntu system running Umbrel using the following command in Windows Terminal:
ssh username@umbrel.local
Replace username with your Ubuntu username and umbrel with the name of your Umbrel server. For example, if your Umbrel server is named "casa," use:ssh username@casa.local
Step 2: Initial Setup
Install exFAT Tools
Before connecting your exFAT external drive, install the required exFAT tools by running the following command:
sudo apt-get install exfatprogs
This ensures that your system has the necessary tools to support the exFAT filesystem.
Step 3: Mounting and Permissions
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:
sudo blkid
This 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 likeMyExternalDrive
. You will use this identifier or label in the subsequent steps when mounting the drive.
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:
Ensure that the drive is unmounted successfully.
sudo umount /path/to/automount
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:
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:
Be cautious about using /storage as a mount point, as it may conflict with existing Umbrel configurations.
sudo mount -t exfat /dev/your-drive-label /umbrelstorageEnsure that the mounted directory has appropriate permissions by making it world-writable (adjust as needed for security):
sudo chmod -R 777 /umbrelstorage
Step 4: Persisting the Mount Point
Edit the /etc/fstab File for Automatic Mounting on Boot
Open the /etc/fstab file for editing:
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:
/dev/your-drive-label /umbrelstorage exfat defaults,uid=1000,gid=1000 0 0
Save your changes and exit the text editor.
To save changes in Nano, follow these steps:
Press Ctrl + O (Control key and the letter 'O') to write the file.
You'll be prompted to confirm the file name. Press Enter to confirm and save the changes.
To exit Nano, follow these steps:
Press Ctrl + X (Control key and the letter 'X').
Reboot Your Ubuntu System
Shutdown Umbrel first
cd ~/umbrel/scriptssudo ./stop
To ensure that the external drive is automatically mounted on startup, reboot your Ubuntu system:
sudo reboot
Step 5: Using the Mounted Drive with an Umbrel App (e.g., Plex)
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.
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.):
cd ~/umbrel/scripts
sudo ./app stop plex
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.
sudo nano ~/umbrel/app-data/plex/docker-compose.yml
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:
volumes:- /umbrelstorage:/umbrelstorage:rw
This example mounts the external drive to the same path within Plex's container with read and write permissions.
Save Changes and Exit Nano
To save changes in Nano, follow these steps:
Press Ctrl + O (Control key and the letter 'O') to write the file.
You'll be prompted to confirm the file name. Press Enter to confirm and save the changes.
To exit Nano, follow these steps:
Press Ctrl + X (Control key and the letter 'X').
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):
cd ~/umbrel/scriptssudo ./app start plex
Add the folder via the app
After you restart the app container you should be able to log into Umbrel and launch the app. Then you can use the app to search for and add the folder.
With these 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. This was tested with three apps so far and all is as expected. Obviously, you only need to do Steps 1 - 4 once unless you are adding additional drives. Otherwise just start at step 5 for each app you want to use the drive with. I should note I am specifically NOT reccomending this for Bitcoin Core, Lighting Node or any of those types of apps. They have special security constraints and other issues like TOR and this may break them. Proceed with any of this with caution and at your own risk.