I am looking to set up Ubuntu Server as a headless NAS for my home. I would like to have file storage there, as well as a central hub for my MP3s and pictures.
What are the best packages out there to handle this? Can someone post a link to a good tutorial or post some tips?
One constraint I have is that it has to be Windows 7 friendly. By that I mean the shares and streaming should work for a Windows machine.
I just finished doing this myself and I did it using Samba. I'm able to mount the samba shares from my windows & ubuntu computers
Here are some links that helped me get started:
https://help.ubuntu.com/community/SettingUpSamba
http://ubuntuforums.org/showthread.php?t=280473
Simples:
Install Ubuntu Server. Really helps if you can have the server with a keyboard and monitor for this bit... Although you can script a CD to auto-install if you want. More trouble than it's worth if you ask me.
Create a user, set up ssh (
sudo apt-get install openssh-server
), etc. Put your server in its final resting place and ssh in from your desktop.Install & configure samba (see the manual configuration section)
Optionally install NFS for linux clients (faster, less taxing on the server CPU in my experience)
Relax. You're done.
For the filesystem, I have software RAID 5 across my drives, and encrypt the resulting filesystem. This way, I can use this system as a backup server as well.
Once the system is up, I use plain ol' NFS and Samba for the file level access. (apt-get install nfs-kernel-server samba). I also have a PS3 that I like to stream media to, so I use mediatomb for that (apt-get install mediatomb), and my wife uses iTunes on her Mac and netbook, so I also install mt-daapd (apt-get install mt-daapd) to share my music over the daap protocol, which rhythmbox can also use.
You might want to take a look at the Ubuntu based TurnKey File Server appliance. If you don't need a full-fledged appliance, you could use it as a reference for configuration on your own server.
if you wnat DLNA support, then see: MiniDLNA - Community Help Wiki
Posting this so I can find it in the future. Install Ubuntu Cloud VM (add an extra disk 1TB or larger.)
Note: you should replace
username
with your user.Mount and Format the disk:
Make the filesystem
Make a mount path:
Update Fstab
Install the tools you need:
Update Exports for NFS (I'm setting this based on subnet, you can change as needed)
Make Cifs share:
Paste the following
Generate smbpasswd (this will allow windows hosts to connect over smb, granted we are passing them in with the
username
account (smile))Update permissions if needed:
Download some data (this is a good dump of isos)
I made a Ubuntu based NAS with file sharing based on Samba and Nextcloud and works across Windows, Linux or Mac. I haven't yet setup a "real" streaming server (e.g. Plex), but I use Nextcloud which is something like a Google Drive clone, which allows easy viewing of photos, music and videos through web browser.
My Ubuntu NAS:
Samba Setup:
First I mostly followed this guide to set up Samba users.
I edit the samba config (
sudo nano /etc/samba/smb.conf
) and make 2 changes:[global]
section I addedinherit permissions = yes
to make sure permissions for added files are correct.Remember to restart Samba after changes:
And if your server has a firewall, remember to allow it:
Access on Linux:
smb://192.168.1.2/mynas/
Access on Windows File Explorer:
\\192.168.1.2\mynas\
In my case I need to log in as "vijay" to access the shares, but the password can be saved on the client so it is only entered on first access.
Nextcloud Setup:
I used the Snap package which is probably easiest. I usually avoid Snap but in this case it worked well. You can also try Docker or manually set everything up if you are an advanced user.
For Snap version, I just ran the following after installation to allow access to USB drive and ports:
I then set up a reverse proxy (Haproxy) and SSL for secure external access over the web, but that is beyond the scope of this short guide.