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 configuration files. Changes manually added to configuration files will eventually rewritten at some stage by the system.

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 does not 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 we are going to change the default sftp server for SSH service.


Make your changes and save them. To apply the custom settings you need to execute:

# monit restart omv-engined
# omv-mkconf ssh
# systemctrl restart ssh

The list of environmental variables used for /etc/fstab filesystem with the defaults options and how to use 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 that server will not overwrite the files every time you change something in the web interface.

Examples using mkconf folders

Network interfaces file

The file /etc/network/interfaces will be (re-)generated by openmediavault on demand. Thus custom changes that are done by the user will get lost. To prevent this, the config generation supports custom scripts to add additional configuration to the ‘/etc/network/interfaces’ file when openmediavault 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 guide 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.