Files
oam/knowledge base/openmediavault.md
2025-12-30 13:59:29 +01:00

9.4 KiB

OpenMediaVault

NAS solution based on Debian Linux.

  1. TL;DR
  2. First access
  3. Suggested first steps
  4. Create users
  5. Make users OpenMediaVault administrators
  6. Disable the default admin user
  7. Configuration backup
  8. Wake On Lan
  9. Power management
    1. CPU governor
    2. Disk power options
  10. OMV Extras
  11. Antivirus
  12. UPS
  13. ZFS
  14. Further readings
    1. Sources

TL;DR

Default web UI login is admin:openmediavault.

# Make users OMV administrators.
usermod -aG 'openmediavault-admin' 'me'
gpasswd -a 'me' 'openmediavault-admin'
adduser 'me' 'openmediavault-admin'

# Allow users to connect via SSH.
usermod -aG '_ssh' 'me'
gpasswd -a 'me' '_ssh'
adduser 'me' '_ssh'

# Revoke WebUI access from the 'admin' user.
gpasswd -d 'admin' 'openmediavault-admin'
deluser 'admin' 'openmediavault-admin'

# Install plugins from the CLI.
apt install 'openmediavault-clamav''openmediavault-nut'

# Install OMV-Extras.
wget -O - 'https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install' | bash

# Use ZFS.
# Requires OMV-Extras.
apt install 'openmediavault-kernel'
# Install the Proxmox kernel and reboot
apt install 'openmediavault-zfs'
zpool import -a

# Upgrade packages.
sudo omv-upgrade

# Move to the next release.
# Includes upgrading the OS to the next version.
# E.g.: Debian 11 -> 12 + OMV 6 -> 7
tmux new-session -As 'omv-release-upgrade' "sudo omv-release-upgrade"

Backup the current OMV configuration by backing up the /etc/openmediavault/config.xml file.

First access

The SSH and web UI servers are active by default on port 22 and 80 respectively.

The default web UI administrator login is admin:openmediavault.
This user cannot login locally, nor connect via SSH by default. It only can access OMV's web UI.

The root user's password is set during OS installation.
This user can connect via SSH by default.

Suggested first steps

  1. Create a custom user.
    Make the new custom user a system administrator to avoid using root for normal usage.
  2. Make the new custom user an OpenMediaVault administrator.
  3. Change the admin user's password and disable it.
  4. Disable SSH access for the root user in Services > SSH.

Create users

Just do it as for any other GNU/Linux system:

useradd -mG 'users' 'me' && passwd 'me'
adduser 'me' && adduser 'me' 'users'

If the user needs administrator privileges, consider adding it to the sudo group:

usermod -aG 'sudo' 'me'
gpasswd -a 'me' 'sudo'
adduser 'me' 'sudo'

Make users OpenMediaVault administrators

Just add the users to the openmediavault-admin group:

usermod -aG 'openmediavault-admin' 'me'
gpasswd -a 'me' 'openmediavault-admin'
adduser 'me' 'openmediavault-admin'

Disable the default admin user

Only do this after you created another user and made it an OMV admin.

From the safest to the less safe option:

  1. Lock the account:

    chage -E0 'admin'
    
  2. Remove it from the openmediavault-admin group:

    gpasswd -d 'admin' 'openmediavault-admin'
    deluser 'admin' 'openmediavault-admin'
    
  3. Delete it completely:

    userdel -r 'admin'
    deluser --remove-home 'admin'
    

Configuration backup

OMV's whole configuration is saved in the /etc/openmediavault/config.xml file.
Keep a backup of it somewhere outside the host running it.

Alternatively, consider using omv-regen as suggested in this thread.

Wake On Lan

The network interface must support this feature and it must be enabled in the BIOS.

WOL is not enabled by default in the kernel driver.
Enable the option under Network > Interfaces, in every NIC's settings you want to respond.

Power management

sudo apt install 'powertop'
sudo powertop --auto-tune
sudo powertop --calibrate

CPU governor

Enabling the Monitoring option under System > Power Management configures cpufrequtils.
For x86 architectures, this also sets the default governor to conservative. If the architecture is different, the governor is set to ondemand.

Disk power options

By default disks have no power management configured.

Editing a disk under Storage > Disks will allow to set these options for it:

  • Advanced power management.
  • Automatic acoustic management.
    Not all drives support this.
  • Spin down time.
  • Write cache.

All the above options are configured using hdparm.

The APM values from the interface are resumed in seven steps.
To experiment with intermediate values:

  • Edit /etc/openmediavault/config.xml.

  • Find the /storage/hdparm xpath.

  • Change the values for the disk.

  • Run this command:

    omv-salt deploy run hdparm
    
  • Reboot.

  • Check if APM has been set:

    hdparm -I "/dev/sdX"
    

When setting a spin down time, make sure the APM value is set lower than 128. It will not work otherwise.
The web framework does not narrow the APM options if the spin down time is set, nor it disables the spin down option when a value higher than 128 is selected for APM.

OMV Extras

From the CLI, as the root user:

  1. Install OMV-Extras:

    wget -O - \
      'https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install' \
    | bash
    

Antivirus

  1. Install the openmediavault-clamav plugin.
  2. Enable the service under Services > Antivirus > Settings.
  3. Apply pending changes.
    The first run will take a long time.

UPS

  1. Install the openmediavault-nut plugin.
  2. Enable the service under Services > UPS.
  3. Apply pending changes.

ZFS

Refer ZFS Plugin For OMV7.

  1. Install OMV-Extras.

  2. Pick one:

    [preferred] Use the Proxmox kernel.

    Note

    Debian does not build ZFS kernel modules into any of their kernels due to licensing conflicts, and doing it manually may result in an extensive build process during installation, which is prone to errors.
    The Proxmox-Debian kernel has the ZFS kernel modules preinstalled by default. As kernel upgrades become available and are performed, the userland for the Proxmox kernel will always have the required packages to support ZFS.

    1. Install the openmediavault-kernel plugin.

    2. Use the kernel plugin to install the Proxmox kernel.

      System > Kernel > Proxmox icon.

    3. Reboot.

    4. Make sure the default kernel ends with -pve, the suffix used for the Proxmox kernel.

    5. [optional, but recommended] Remove non-Proxmox kernels.

    Disable APT's backports sources, and stick to Debian's stable kernel.

    Warning

    Linux backport kernels are released quickly enough to leave the userland incomplete at times.
    This happens often with ZFS, resulting in broken package issues.

    mv -v \
      '/etc/apt/sources.list.d/openmediavault-kernel-backports.list' \
      '/etc/apt/sources.list.d/openmediavault-kernel-backports.list.disabled'
    
  3. Install the openmediavault-zfs plugin.

  4. Create new pools, or import existing ones.

    Note

    One might need to wipe the disks before creating new pools.

ZFS does provide ACL support, but it is not enabled by default.
Just enable that property in the pool or datasets.

Further readings

Sources