Login

Please fill in your details to login.





setting up openmediavault

This page is mainly about setting up openmediavault
I use OpenMediaVault as a file server, development web server and backup appliance. It's completely free and will run on anything from a Raspberry Pi to a high end PC. I'm actually using a Dell Wyse Thin Client which is plenty powerful enough to run OMV. From the new user guide...

The purpose of openmediavault, is to provide a NAS system that is highly “extensible” with value added plugin’s and access to numerous Dockers that are desirable and beneficial to home users and small businesses at little to no cost.

Install OMV

I use an amazing tool called Ventoy to hold all my boot .iso images.

1
Download OMV
Visit the OMV download page and download the correct ISO for the target hardware. I will be downloading version 5.5.1 for 64 bit machines.

2
Copy the iso onto your Ventoy drive and boot into the installer
With Ventoy, there is no need to burn the .iso to a disk or a USB stick. Simply copy it into a folder on your Ventoy drive and you are good to go. Insert the drive into an available USB port on the target machine and boot the machine. You may have to change the BIOS settings to enable boot from USB or to change the boot order.

3
Install OMV
Now is the time to get stuff started!

1
Click 'Install' on the boot menu.
2
Choose your target language.
3
Choose your location.
4
Choose keyboard layout (and wait).
5
Select, and connect to, a network.
6
Give your system a 'hostname'. This is the name with which it will identify itself to the network.
7
Choose a domain - if you are unsure, just enter 'home'.
8
Now set a 'root' password. The root user is the main administrator on the OMV box. Make sure your password is secure (i.e. hard to guess but easy to remember). You will have to enter this twice.
9
Now select the storage device to install OMV onto. If you have an internal drive as well as the Ventoy drive, make sure you choose the correct one!
10
Check the settings on this screen and select - be careful - is on the LEFT!
11
The system will install.
12
Configure the package manager Choose a location and then a 'mirror' for the package files. I choose 'ftp.uk.debian.org' - I always choose one that seems reliable (gut feeling).
13
Don't enter a proxy (unless you are behind a proxy)
14
Allow the installation to complete.
15
Wait for reboot - don't unplug the Ventoy drive until the machine reboots but remember to remove it before it starts to load Ventoy again.

With any luck, your machine should boot successfully to the command line prompt
<hostname> login: _
. From now on, you should be able to manage everything remotely 😃

Set up OMV

Everything from now on can be handled through the web interface.

1
Login to the web interface.
Open up your favourite browser and navigate to
http://<hostname>/
(replace with the name you set in step 6 above. You should see the login page. The default username is 'admin' and the default password is 'openmediavault'.

2
Familiarise yourself with the UI
You'll be taken to the dashboard which shows you some information about the platform. Along the left are quick links to the relevant management section. We'll only be focussing on some of these but it's worth having a flick through them now. Try not to change any settings yet though, just in case.

3
Change the administrator password
It's probably a good idea to change the default password.

System > General Settings > Web Administrator Password
Type a secure password (easy to remember, hard to guess) twice and click Save
Check the new password by logging out and back in. The logout button is in the top right where the three dots are.

4
Set the timezone.
Not sure why you need to do this or why mine isn't set but it's worth doing anyway.

System > Date & Time > Settings > Time zone > "Europe/London"
Select 'Use NTP server' if you want the time and date to be automatically updated for you.
"Save" > "Apply" > "Yes"

You have to "Apply" most of the configuration changes - watch for the yellow banner.

5
Run updates
Remember that the OMV interface actually allows you to manage the whole Linux subsystem as well. Now is a good time to run updates to get the system up-to-date before you start.

System > Update Management.
Check (& wait).
Now select all the available packages (tick box next to "Package Information") and click Install.
Wait a long time, whilst OMV is updated.
Now, you will very likely have to repeat this because OMV will find even more updates when it's done.

Change OMV management port to port 81 as we are installing NGINX which will use port 80 (and 443)
Make sure you apply changes and then navigate to http://openmediavault:81/

Add and configure storage disks

It's important that you set up the storage disks correctly. This is individual to your requirements, but this is how I've done it on my system.

1
Create your 'file systems'
I have attached two disks connected to my server - one for 'storage' and one for 'backup'.

Navigate to 'Storage > File Systems'.
Click + Create
Select a device. You'll only be given a choice of creating a file system on new disks.
Give the file system a label - I used 'STORAGE' for the first disk.
Choose the EXT4 file system (it should default to this).
Click OK.

Repeat the whole process for the backup disk labeling it 'BACKUP'.

2
Create 'shared folders'
Creating the filesystems on the disks does not make them available to external users on the network. I will use the Samba network file sharing software to make the drives available.

Enable SMB/CIFS (Samba) from Services > SMB/CIFS
Set Workgroup to HOME if suitable
Scroll to the bottom of the form. In 'Extra options' add...

hide files = aquota*/lost+found/_*_
acl allow execute always = True


Switch to the 'Shares' tab
Click + Add
I used the following options for each shared folder:

For 'storage'...
Shared folder = 'storage [on STORAGE,/]'
Public = 'Only guests'
Enable recycle bin = Enable recycle bin
3 days before emptying
Enable extended attributes
Store DOS attributes
Click Save

For 'backup'...
Shared folder = 'backup [on BACKUP,/]'
Public = 'Only guests'
Read only = Set read only
Enable extended attributes
Store DOS attributes
Click Save

You may have to apply settings before you can see the network shares on other machines on your network.

Install some useful additions


Because OMV is a Debian Linux distribution, you can install lots of really useful stuff but there are a couple of steps required before you do.

1
Install OMV Extras
OMV Extras is a plugin which, amongst other things, allows you to install more plugins.

Firstly, carefully read the instructions for how to download and install OMV Extras.

Download the correct plugin
openmediavault-omvextrasorg_latest_all5.deb
Plugins > Upload > Browse > find the file > Upload
Search for the plugin (omvextras) or Section: Utilities
Tick and install, wait until 'Close' button is enabled.
On left, there will be a new option called "OMV-Extras"

4
Install Docker and Portainer

OMV-Extras > Docker > Docker: Install and wait.
Portainer::Install and wait
Click Open Portainer
Create initial administrator user. Choose a secure password (easy to remember, hard to guess) > Create User
Select "Docker" and "Connect"

5
Install Filebrowser

App Templates > Filebrowser
Name: filebrowser
Advanced options
Port mapping: 1066 > 80
Delete '/srv' volume mapping
Volume mapping: '/data' select BIND > /
Deploy the container and wait
Click on the container to open it.
Click 'Duplicate/Edit'
Advanced container settings > Command
Change content to '--port=80' '--database=/srv/database.db' '--root=/data'
Console > Interactive & TTY
Deploy container > Replace
Browse to http://openmediavault:1066
Login with admin:admin
Be VERY VERY careful - this gives full unrestricted access to the filesystem!
Change your password from 'Settings > User management > admin:pencil'

6
Install Linuxserver (if you want to run a website)

Portainer
Docker > Images
Pull linuxserver/nginx from dockerhub
containers > + Add container
name: linuxserver
image: linuxserver/nginx:latest (should autocomplete if you've already pulled the image)
+ Publish a new network port
host:80 > container:80
+ Publish a new network port
host:443 > container:443
Advanced container settings > Volumes
+ map additional volumes
container "/config/www" > bind > host "/srv/dev-disk-by-uuid-1f62058b-5530-983a-5c93-2cf1fc94bb5a/Websites"
Advanced container settings > Env
Add two new Environment variables
- PUID > 65534
- GUID > 65534
Click 'Deploy container'

7
Set up Rsync for backup of storage drive

Rsync for storage to backup drive
backup - frequency every 12 hours
archive - frequency weekly

rsync

Storage > Backup (every 12 hours)
type: local
Source folder: storage
destination: backup
minute: * > every n minute OFF
hour: 12 > every N hour ON
day of month: * > every N day of month OFF
Month: *
day of week: *
send email: OFF
trial run: OFF
quiet: OFF
archive mode: OFF
recursive: ON
Preserve permissions: ON
preserve group: ON
preserve owner: ON
compress: OFF
preserve ACLs: ON
preserve extended attributes: ON
keep partially transferred files: OFF
delete: OFF
extra options: --exclude "aquota*" --exclude ".*" --size-only
comment: Storage > Backup (every 12 hours)

run this script now to populate backup drive
use ssh / putty to create a folder "(Archive)" on backup drive

Archive deleted files (Saturday 3am)
type: local
Source folder: storage
destination: backup
minute: 0 > every n minute OFF
hour: 3 > every N hour OFF
day of month: * > every N day of month OFF
Month: *
day of week: saturday
send email: OFF
trial run: OFF
quiet: OFF
archive mode: OFF
recursive: ON
Preserve permissions: ON
preserve group: ON
preserve owner: ON
compress: OFF
preserve ACLs: ON
preserve extended attributes: ON
keep partially transferred files: OFF
delete: ON
extra options: --existing --ignore-existing --backup-dir="(Archive)" --exclude "aquota*" --exclude ".*" --exclude "(Archive)" --exclude "lost+found"
comment: Archive deleted files (Saturday 3am)

Create a file in storage
Run backup script
Delete the file
Run backup again - check file is NOT deleted on backup
Run archive script
Check file is moved into Archive folder.

8
Move archived files to cloud storage 24 hours later using rclone

Install Rclone on the server.
At the time of writing, RClone is at version 1.61.1 and versions above 1.6 are required for new Google Drive authentication.

I had to download the .deb file and install it because the version in the repro on my OMV installation was too old.

wget https://downloads.rclone.org/v1.61.1/rclone-v1.61.1-linux-amd64.deb
dpkg -i rclone-v1.61.1-linux-amd64.deb
Wait for install to complete.
Check version of RClone with...
rclone --version

connect rclone to google drive/OneDrive (https://rclone.org/drive/)

rclone config
choose new remote (n) and follow the instructions, accepting the defaults where necessary.
When it comes to authentication, you will likely be running the authentication on your desktop.
When it gets to the point where you are asked to run rclone authorize... you will need to be using a machine with a browser.

I use windows so I downloaded the windows version of rclone (https://downloads.rclone.org/v1.61.1/rclone-v1.61.1-windows-amd64.zip) and moved rclone.exe to the c: drive to make it easy to access.
Start > CMD > Run as administrator
cd c:\

Copy the rclone authorisation message from the server and paste at the command line (normally right click will paste at the cursor). When you press ENTER, a browser window will open which will ask you to sign into your Google drive account/OneDrive account and authorise the connection.

Back in the CMD window, you will get a long secret key which you will need to copy and paste into rclone on the server. This will authorise your connection and you are done.

create move job for archiving - moves all
rclone move "/srv/dev-disk-by-label-backup/(Archive)" OneDrive_MM:"(Archive)" --create-empty-src-dirs --delete-empty-src-dirs -P


Shortcuts
🌐
www.openmediavault.org
🌐
www.ventoy.net
Last modified: March 20th, 2023
The Computing Café works best in landscape mode.
Rotate your device.
Dismiss Warning