Ubuntu File Server

17,054

56

2

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.

Be the First to Share

    Recommendations

    • For the Home Contest

      For the Home Contest
    • Make It Bridge

      Make It Bridge
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge

    2 Comments

    0
    zavorra
    zavorra

    6 years ago

    Thanks for the instructable.

    You may also want to:

    - configure a VPN between your smartphone and your server to access your data from anywere. You may have to sign to some dynamic DNS server (dyndns, noip.org, ...)

    - Modify your instructable. No need to reboot after editing smb.conf. Simply do "sud service smbd restart"

    - Modify the password for the user (smbpasswd <user>)

    - Uninstall ES file manager which since it has been acquired by Cheeta Mobile it is a huge pot of privacy issues, advertisement and bloatware. You my want to use Amaze, fully open sorce, light and smooth, or MIXplorer, full of features, not on play store but on XDA.

    0
    Nav N
    Nav N

    Reply 6 years ago

    Thanks for the info! I will update soon! :-)