Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Is this the best way to autostart an encrypted array?

Featured Replies

I tried a few searches and as far as I can tell this seems to be the latest for unraid 6.x

https://gist.github.com/LeonStoldt/51baa2ba2b879254cf5f50d381264bcc

Below is a copy and paste of the content from the link. Is anyone still using this method on their unraid 7.x servers? I am just looking for a thumbs up if this is still the way to go today.

Modify /boot/config/go

nano /boot/config/go

Edit this file to look something like this:

#!/bin/bash
# auto unlock array by making use of events to fetch keyfile and delete it after decryption
mkdir -p /usr/local/emhttp/webGui/event/starting
mkdir -p /usr/local/emhttp/webGui/event/started
mkdir -p /usr/local/emhttp/webGui/event/stopped
cp -f /boot/custom/bin/fetch_key /usr/local/emhttp/webGui/event/starting
cp -f /boot/custom/bin/delete_key /usr/local/emhttp/webGui/event/started
cp -f /boot/custom/bin/fetch_key /usr/local/emhttp/webGui/event/stopped
chmod a+x /usr/local/emhttp/webGui/event/starting/fetch_key
chmod a+x /usr/local/emhttp/webGui/event/started/delete_key
chmod a+x /usr/local/emhttp/webGui/event/stopped/fetch_key
# Start WebGUI
/usr/local/sbin/emhttp &

Create fetch_key file

mkdir -p /boot/custom/bin/
nano /boot/custom/bin/fetch_key

and paste the following code if you want to fetch the key by sftp:

In case you want to fetch the key by another method - you need to change the fetch_key script.

Method 1: mount your keyfile

#!/bin/bash

if [[ ! -e /root/keyfile ]]; then
  mkdir -p /unlock
  mount -t cifs -o user=name,password='password',iocharset=utf8 //192.168.1.99/index /unlock
  cp -f /unlock/keyfile /root/keyfile
  umount /unlock
  rm -r /unlock
fi

Method 2: fetch your keyfile by wget

#!/bin/bash

if [[ ! -e /root/keyfile ]]; then
  wget --ftps-implicit --user=name --password='password' ftp://url_or_IP>/files/keyfile -O /root/keyfile
fi

If it doesn't work with --ftps-implicit, try without --ftps-implicit flag.

remember to exchange "name", "password" and "url_or_IP" by correct values make sure your file you want to access (keyfile on source system) has the needed permissions to be read by your target system check permissions with stat filename for testing purposes you can grant all rights to this file temporarely chmod 777 filename

Create delete_key file

To create the delete_key file, run the following commands:

nano /boot/custom/bin/delete_key

and paste the following code to delete the keyfile:

#!/bin/bash

rm -f /root/keyfile

Solved by Kilrah

  • Community Expert
  • Solution

See this plugin

image.png

  • Author
On 2/3/2026 at 8:31 PM, Kilrah said:

See this plugin

image.png

Looks like this plugin came at the right time. Thank you!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.