Build your own NAS with OpenMediaVault

OpenMediaVault is a Debian based special purpose Linux Distribution to build a Network Attached Storage (NAS) System. It provides an easy to use web-based interface, Multilanguage support, Volume Management, Monitoring and a plugin system to extend it with LDAP, Bittorrent, and iSCSI capabilities. This tutorial describes the installation and configuration of OpenMediaVault.

Prerequisites for this tutorial

  • PC with 32 or 64Bit Intel processor.
  • Min. 1GB RAM.
  • 2 Harddisks (or one hard disk with 2 partitions). OpenMediaVault requires a separate disk or partition for the OS install and a separate disk or partition for the data.

1) Download OpenMediaVault

The first step is to download the OpenMediaVailt ISO file from Sourceforge. 

https://sourceforge.net/projects/openmediavault/files/

The software exists in flavors for 32- and 64Bit Intel/AMD processors and for some other platforms like Raspberry PI, Odroid and Cubox i. I will choose the version for 64Bit processors (amd64). The direct download link for the current 2.1 version is:

http://downloads.sourceforge.net/project/openmediavault/2.1/openmediavault_2.1_amd64.iso?r=&ts=1438327317&use_mirror=netcologne

2) Prepare the Boot Media

The ISO image can be used to install OpenMediaVault into a virtual machine like VMWare or Virtualbox directly. To install the software on real hardware, you need a boot media like a CD / DVD or a bootable USB stick.

Burn the downloaded ISO file on a CD or DVD or load it on a USB stick.

2.1) Create a bootable USB Stick on Linux

The following command can be used to write the ISO file on the USB Stick on Linux

sudo dd if=openmediavault_2.1_amd64.iso of=/dev/sdX bs=4096

Replace /dev/sdX with the device name of the USB drive. Please be careful, the dd command can cause severe damage if you select a wrong drive as target.

2.2) Create a bootable USB Stick on Windows

When you downloaded OpenMediaVault onto your Windows Desktop, then you can use e.g. unetbootin to prepare the USB Stick.

http://unetbootin.github.io/

3) OpenMediaVault Installation

Insert the boot Media that you prepared for the installation into the PC or Server were OpenMediaVault shall be installed and start or reboot the system. It might be necessary to select the correct boot media device in the BIOS.

When the System booted successfully you will see the following screen of the OpenMediaVault installer. Select the "Install" option and press enter or wait until the installation starts automatically.

Select the language for the installation process.

And your location. The location will be used to define the timezone in one of the next steps and to preselect the keyboard layout.

Now select the keyboard Layout. In my case, I'll select "German" as layout and press <Enter>.

The installer starts to load some additional packages from installation media.

Enter the hostname of your server. The domain name is requested in the next screen, so the hostname here is the first part of the fully qualified domain name. When the server shall have the fqdn "server1.example.com" then the hostname is "server1".

Enter the domain name of the server.

Enter the root password. This password is used for the shell login, it is not the password of the OpenMediaVault Web interface. Confirm the password by entering it again in the next screen when requested.

Select the server time zone and press <Enter>. The time zone is important for date / time in log files and for the timestamps of saved files.

The installer starts to copy the system files to Disk now.

Configure the location from where the apt package manager will load the software packages. Choose a location near to you.

And then select the mirror server. You can just choose the first one if none of the listed mirrors is from your Internet access provider.

When you use a http proxy to access the internet, then enter it's details here. Otherwise press <Enter>.

Apt will now Download the packages.

The installation is finished. Press <Enter> to reboot the server.

The Grub boot screen appears. Press <Enter> or wait until it starts automatically.

The System ready. You can now login to OpenMediaVault on the shell as root user or in the Web interface.

4) Login details

Web interface

  • User: admin
  • Password: openmediavault

Client (SSH, console)

  • User: root
  • Password: <The password that you have set during installation>

The server has been configured by DHCP. Login as root user on the shell and run the command:

ifconfig

to get the current IP address. In my case, the IP address is 192.168.1.30.

Open a web browser and enter http:// followed by your IP address: http://192.168.1.30/ to go to the web login:

Enter the default login details user: admin, password: openmediavault:

And the OpenMediaVault Admin interface appears.

5) First steps in OpenMediaVault

This chapter shows the steps to secure the login, enable an FTP and SMB/CIFS share and how to enable access by SSH.

5.1) Change the web admin password

To change the web administrator password, go to "General Settings" and change to the tab "Web Administrator Password:

Enter the new password and press on the "Save" button in the upper left corner of the input form.

Services like FTP, SMB and SSH are disabled by default. In the next step, I will enable FTP and SMB (Microsoft Windows Share).

5.1) Enable FTP

Go to Services > FTP and enable the "Enable" Checkbox.

Press the "Save" button in the upper left corner.

And click on "Apply" in the yellow bar that appears above the the form.

Finally, confirm that the changes shall really be applied.

5.2) Enable SMB / CIFS

Now go to Services > SMB/CIFS and enable this service like you did with FTP.

5.3) Enable SSH

Same procedure for the SSH service. Go to Services > SSH and enable the service.

5.4) Create a file system as data storage volume

OpenMediaVault needs a separate hard disk or partition to store data (storage volume). In my case, I'll use a second hard disk /dev/sdb. Click on Storage > File Systems > Create to add the second hard disk as a storage volume. The name of tmy storage volume is "data". 

The final list of storage devices shall look like this. Select the "data" volume in the list and click on the "Mount" button to mount the volume. Only mounted volumes will appear as option in the shared folders volume list.

5.5) Add a user

Now we can add a user to access your file shares. Click on "Access Rights Management" > "User" > Add:

Enter the user details: username, email address, and password. Then confirm the changes.

5.5) Add a file share

To store files on the NAS drive, we need a file share that can be accessed by our user. Click on "Access Rights Management" > "Shared Folders" > "Add".

I will add a folder named "Documents" with the path "Documents/" on the data volume.

The next step is to grant read/write permissions to the user "till". Click on the "Documents" share in the list and then on the Icon "Priveliges" in the menu above the list. This will open the priveliges Window, enable "Read/Write" for the user and press save.

Finally add the share to the services that shall be able to use them. To enable the share for FTP, go to Services > FTP > Shares, Click on "Add", Select the "Documents" share and press save. Confirm the changes.

Use the same procedure for SMB/CIFS: go to Services > SMB/CIFS > Shares, Click on "Add", Select the "Documents" share and press save. Confirm the changes.

Now you have a NAS device with a Documents folder that can be accessed by your user with FTP and with the SMB/CIFS protocol.

6) VMWare / Virtualbox Image

The resulting setup of this tutorial is available as ready to use virtual machine image in ovf format (compatible with VMWare and Virtualbox) for Howtoforge subscribers.

The Login details of the VM are:

Root password on the shell: howtoforge

OpenMediaVault Web interface

Usernam: admin
Password: howtoforge

Dont forget to change the passwords!

Share this page:

Suggested articles

23 Comment(s)

Add comment

Comments

By: thctlo

Hai, a nice howto but please stop use-ing .local as domainname in your examples.  .local is a reserved domainname for apple's mDNS (zeroconf). and same for these names :

.local.localdomain.domain.lan.home.host.corp.priv

see also:  https://tools.ietf.org/html/draft-chapin-rfc2606bis-00

 

By: EvilShiloh

I don't understand the statement concerning the use of domain name in the instructions. The document refenced specifically stated certain top level domains like .local are reserved so they will not be used on the internet for just this kind of purpose when you are using it on your local network so it would be unlikley to interfere with your communication on your local network to a real internet domain of the same name IF it actually existed. So the example in the instructions is a valid use of .local and most people should know when they see that, if in their case a different domain should be used, change to fit the situation. So if that list of top level names are reservered for no one to use on the internet, how can Apple reserve the name?

By: Dhiman

Very useful steps. I installed OMV on my laptop. But The files can only be accessible by android apps or windows file explorer. Is there any way to access them using browser interface, like what we can do in case of synology or qnap products? Is there any free os to do so?

By: FieldWolf

No, there is no way to access your files over the browser interface.

By: TheBulgarian

https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-extplorer

eXtplorer is a web-based File Manager. You can use it to:

browse directories & files on the server edit, copy, move, delete files search, upload and download files create and extract archives create new files and directories change file permissions (chmod) and much more...

By: noname

there should be an owncloud addon available to perform this task for you

By: MonkeyDemon

It would be helpful if you posted a howto for creating a bootable USB stick on Macs.

By: Mike

The dd command used here works on OS X as well. 

By: James

VERY, Super helpful tutorial. I was trying for hours too add the HDD to the SMB shares and have now done so, thanks to you. From a complete omv noob, THANKYOU...

By: john

Root password on the shell: howtoforge on the VM...???

This ore openvault dosnt work.

 

By: Thomas Dukes

login/password is invalid

By: rusty

Great tutorial, the clearest I have found, thank you very much. One thing to keep in mind (and took me ages to find a solution) is that although my OMV server was set up, Win7 in all its wisdom applied security settings that didn't allow me to connect. I had to

1. Add the server name as a trusted intranet site in 'Internet Options' in control panel.

2. Use the 'Credentials Manager' in control panel to remember the name/pass so I didn't have to enter every time.

A big thanks also to the youtube video containing this information at https://www.youtube.com/watch?v=sk0iDoAJhgk

 

 

By: Di

Thank you for a lucid how-to.

As a Linux noob, can you please clarify, if a folder is shared using SMB / Samba as public/guest access, do I need to share it using NFS / FTP also. 

So do multiple services for access like FTP / NFS / Samba / SMB / Appletalk need to be enabled?

Which is the optimal one for a home NAS system accessed by Windows / Apple based users?

By: TLb Thunder

Hi there,

I can't create a seperate volume. When I click on the button, to select the device, it shows the loading screen and then it closes itself. How can I fix it?

By: wenkernboysnas01

I try ifconfig but it gives this error:

-bash: ifconfig: command not found

Please help! :(

ifconfig is deprecated.  The new Debian command is IP, so "ip address" or the short form "ip a."

 

By: BAZZ

I have loaded openmediavault onto my spare computer looks like it's in there but when I go to my windows machine WIN 7 it will not connect, on my IP address, basic linux user. It did work once but now nothing have I done something wrong, I loaded OMV on usb stick loads ok but will not load any of the mirrors in at all, as I said earlier it work once now nothing,

By: Galane

They've not released an install ISO for OMV 4.x i386 (or 32 bit) but there still is a 23 bit version of "Arrakis".

What I want to do with Open Media Vault is to have a folder accessible on my LAN for video so that a Samsung Smart TV and Android phones and tablets can play videos from it over local WiFi. Having to have a user/pass may not work for the TV.

There are plenty of sites showing how to do that sharing a folder from a Windows PC, with no need to install any special app on the TV, as long as the TV is new enough.

After installing OMV and getting it setup, I want to completely cut the box off from the outside world, so it's only accessible from my 192.168.0.xxx LAN. Would be nice to have a shared folder that's just open, no login required to open files in it.

Why? So it's *easy to use* for family members who don't want to mess with having to login to something just to watch a movie.

By: norman

How do you install this plugin?

By: dave

great tutorial! So good in fact when I ran into trouble I knew it was a hardware issue and not the programs fault. 

turned out bad solder joint on hdd 1 connector. "Orange pi Lite 2 ", WD mybook duo 8TB usb 3.0 W/hub 3.0 x 2 on board, occupied by 2x500Gb 2.5" portables. all components stripped down reconfigured to run on single PSU w/batt backup. all ran as a headless unit as well as using wlan only. thanks to the author who took the time create this tutorial so a Noob can make the step up to amateur,....LOL. what would the world look like if we all used linux

By: MzA

I have a question for the item 5.4. What is the minimum partition to allocate for data storage volume? I want avoid using extra sata port just for this

By: Silvabak

Worked like a charm even today.  Awesome doc!

By: Robert Cooper

Awesome Help !  Thank You. Just to help others using Windows 10 Home Edition if no connection via Windows Explorer Network. You will need to install the Group Policy Editor and Adjust LAN Security Options to "Send NTLMv2 response only. Refuse LM & NTLM