Introduction: Ubuntu File Server

About: 6 of Clubs

Ubuntu server is a great lightweight OS for servers, and paired with samba you can have the ultimate home file server. Having a file server is a very good idea, because You may want to use it as: a backup, a media streamer and a "shared" folder. But these are just a few reasons you may want to make one, so let's get into it!

Step 1: Install the Software

To start off, you need to make Ubuntu Server capable of file hosting. So to do this we will need to install samba. So type in the command: sudo apt-get install samba. Now wasn't that easy, We have installed ALL the software!

Step 2: Configuring Samba

To decide what you want samba to do, they have made a config file where it contains hundreds or commented commands. So open /etc/samba/smb.conf with a text editor like nano. First uncomment or add security = user, this can be found under the authentication header in the file. Then add these lines of code:

[Fred]
comment = Fred's Files
path = /path/to/folder
writable = yes
read only = yes
create mask = 0755
available = yes

Now add a password to your user with this command: sudo smbpasswd fred

Then type: sudo service smbd restart

Step 3: Drive Auto Mount

If your computer's hard drive is not large enough you may want to use an external hard drive. But cannot simply just plug it in, you will have to make it auto mount with the correct permissions. So you will need to type the command blkid to the the hard drive's uuid then type this code at the end of /etc/fstab:

UUID=XXXXXXXXX /media/NASdrive user,umask=000,utf8 -->noauto
Then save it and type sudo mkdir /media/NASdrive and then sudo reboot.

Step 4: View the Server

Well done! You have finished setting up your server! But how do you access you're files? Well, on Android you can use File Manager by Asus ZenUI and on desktop computers you can simple open your file manager and browse your network.