Advanced configuration

From openmediavault
Jump to: navigation, search
Advanced configuration

OpenMediaVault is not a replacement for webmin, where you can configure all options in the web interface. Options are already preconfigured to make it easier for the average user to install and start using the NAS server.

As mentioned before in the FAQ OpenMediaVault takes full control of some services, making difficult to intervene .conf files. Changes manually added to configuration files will eventually rewritten at some stage by the system. The list of common files not to intervene is listed here

To overcome this there are some options available to modify some of the default OpenMediaVault configuration options and values, like the use of environmental variables

Environmental Variables

The web UI cannot provide access to ALL the configuration aspects of a complex system like OpenMediaVault. However, the system allows to change some advanced settings through the use of environment variables. To set or change these variables, login to you OpenMediaVault system using SSH and edit the file:


Put the variable you want to change at the end of the file with the new value. Ensure the value is declared with double quotes

For example


Make your changes, save, restart engined service openmediavault-engined restart and run omv-mkconf ssh, finally reload the SSH service via webUI or systemV

The list of all available environment variables can be found here

The list of environmental variables used for /etc/fstab filesystem with the defaults options and how to used them is described here

The mkconf folder

The other advanced configuration is the use of mkconf/{service}.d/ folder type

The mkconf scripts bundled in openmediavault core and plugins are in /usr/share/openmediavault/mkconf/{service}.d/ folder. Those scripts are executed by run-parts in alphabetical order when a change is done in the webUI so the configuration is piped to the corresponding .conf file on their respective service.

These scripts are useful for placing extra configurations for services in a way the server does not overwrite the files every time you change something in the webUI.

The default files included are:

├── afp
├── ftp
├── nfs
├── rsync
├── smb
├── ssh
├── tftp
└── webadministration
├── 10ssl
└── 20ssh
├── cpu
├── df
├── interface
├── load
└── memory
├── 10filesystem
├── 50loop
└── 90bind
├── 10lo
├── 20ethernet
├── 30bond
├── 30vlan
└── 40wireless
├── collectd
├── filesystem
├── netatalk
├── nginx
├── omv-engined
├── php5-fpm
├── rrdcached
└── system
├── 10default
└── 20exports
└── 10webgui
├── mod_auth
├── mod_ban
├── mod_core
├── mod_tls
└── mod_wrap
├── 10global
├── 20shares
├── 30homes
└── 40recyclebin
├── 10sshd_config
└── 20authorized_keys
├── mdadm
└── nonrot


Network interfaces file

The file '/etc/network/interfaces' will be (re-)generated by OMV on demand. Thus custom changes that are done by the user will get lost. To prevent this, the config generation now supports custom scripts to add additional configuration to the '/etc/network/interfaces' file when OMV is generating it. Using this new feature it is no problem to add bridge or VLAN configurations.

To do that a script must be located at /usr/share/openmediavault/mkconf/interfaces.d/. and has to be executable. The script should look like the following:

# This file is part of OpenMediaVault.
# @license GPL Version 3
# @author    Volker Theile <>
# @copyright Copyright (c) 2009-2015 Volker Theile
# OpenMediaVault is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
# OpenMediaVault is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with OpenMediaVault. If not, see <>.

set -e

. /etc/default/openmediavault
. /usr/share/openmediavault/scripts/helper-functions


# The loopback network interface
auto lo
iface lo inet loopback
iface lo inet6 loopback



Another example was this script published in the forum as a [[1]] for samba. The intention of the user was to hide samba shares (not browsable) to users who did not have privileges to login into that shared folder. So basically the script will read the valid users list and will attempt to create as many files as valid users, appending the username variable to the end.