How to create your own file server at home

Storing your files securely has never been easier. Those who don’t like storing their data with traditional methods (USB sticks, CDs, DVDs and portable hard drives) can very well take advantage of a wide variety of cloud storage services such as drop box, Google Drive and SkyDrive.

However, let’s say you want more, much more. You don’t want to rely on third-party servers, which could very well run into trouble and be gone with your confidential documents in minutes. While the giant data centers of Microsoft or Google are unlikely to have any problems, the most neurotic always keep this possibility in mind.

So how about setting up your own file server? In addition to being simple and quick, the procedure is quite inexpensive, since you can use parts from old PCs that you no longer use (or buy them from thrift stores). In addition to storing your important data more securely and confidentially, you can also use your server to host websites (thus saving you the money you used to spend on your web host). Tecmundo teaches you how to do all of this in just seven simple steps! To verify.

(Image source: reading/downloading wallpapers)

1) Assemble the hardware

Do you remember that old computer that you no longer use and that has been gathering dust since last year? It’s time to revive it and give the good old man a new job. If you’re less attached and have already gotten rid of your old machine, the solution is to build a PC specifically for the server by buying a few parts easily found at computer supply stores. Checking second-hand e-commerce is also a good option (yes, we are talking about Mercado Livre). Basically, you will need:

  • A motherboard (it does not have to be a very recent model);
  • A processor of at least 2 GHz;
  • At least 512 MB of RAM;
  • A hard disk of the amount you want. How about 1TB?

By doing a quick search on the internet, it is possible to obtain a very precise estimate of the expenses of this server. A reasonable motherboard costs around R$199; a 512MB RAM stick can be easily found for around R$80. If you are on a tight budget, go for an Intel Celeron (around R$100) when buying the processor. If you have a little more money to invest, go for an Intel Dual Core E3300 (between R$149 and R$199).

Finally, we come to the most important element: the hard drive. A good Seagate 1TB 7200 RPM HD can be found for at least R$220. If 500GB was enough for you, just reserve R$150 for a drive of the same brand. How much do we spend altogether? Around R$700.

(Image source: Playback/Wikimedia)

2) Install Linux

It doesn’t matter if you’re a Microsoft fan and can’t give up the classic Windows operating system: you need to install Linux for your server to run smoothly. We recommend that you opt for Ubuntu or Xubuntu distributions. Both are completely free and reasonably lightweight, not taking up much space on your precious hard drive.

Install the ISO by burning it to a bootable CD/DVD or USB – click here to find out how to do that if you don’t already know. Important: For the next steps in this tutorial, consider that we are using Ubuntu 12.04 (one of the most popular) to describe the actions you will take. We install the operating system in Portuguese.

(Image source: Playback/HiTrend)

3) Clean the operating system

Every Linux distribution comes with additional software that must be uninstalled before you can continue. Use Synaptic (package manager also included in distributions) to uninstall programs like AbiWord, OpenOffice/LibreOffice, Thunderbird, Gaim, GIMP, Firefox, Rhythmbox etc.

Then check if the operating system has any updates available. If there are any, download and install them all for security reasons, ensuring the stability of your server. Finally, disable the screen lock (via the menu System Settings > Brightness & Lock).

4) Configure file sharing

Everything is ready, it’s time to start the settings and all the heavy lifting. First, install Samba, the program that will turn your computer into a server and allow you to share files over a network. You can get it through Synaptic itself (by searching for new apps and marking them for installation) or through Ubuntu’s Software Center. The app is also available on Baixaki.

(Image source: Playback/iMasters)

Open the terminal (Control Panel > Terminal or keyboard shortcut Ctrl+Alt+T) and type sudo su to enter root mode. You will need to re-enter your password. Enter the Samba installation directory by typing CD /etc/samba. Write nano smb.conf and press Enter to start the setup process.

Delete all text in the document (hold Ctrl+K until everything is deleted) and paste/type whatever text can be found in this link (replacing “Name” and “Server Name” with the username and machine name). Save the document (Ctrl+O) and close it (Ctrl+X). It is necessary to specify a password to access Samba; to do this type the command sudo smbpasswd -a. Finally, restart the program processes by writing sudo restart smbd and sudo restart nmbd.

5) Added FTP capability

Open the terminal again (again: Control Panel > Terminal or the keyboard shortcut Ctrl+Alt+T) and gain root access again (by typing sudo su and entering your operating system password). write the command sudo apt-get install proftpd to install the ProFTPD software. When asked what type of server you want to configure, choose the “Standalone” option.

Navigate to the installation directory with the message cd /etc/proftpd/. Configure it by typing the command sudo nano /etc/proftpd/proftpd.conf. Replace all contents of the file that opens with the code that can be found in this link.

Save the settings (Ctrl+O then Ctrl+X) and restart the server by entering the command /etc/init.d/proftpd restart.

6) Configure shell access (SSH)

Still in the terminal and in root mode, install OpenSSH (apt-get install openssh-server) and VNC server (sudo apt-get install vnc4server). Set a password for this last application (type vncpasswd and enter a 6-character password twice). Create a custom login command by typing sudo nano /usr/local/bin/sharex11vnc. A new file will open and you will need to paste/type the following content into it:


x11vnc -nap -bg -many -rfbauth ~/.vnc/passwd -desktop “VNC ${USER}@${HOSTNAME}” \

|grep -Eo “[0-9]{4}”>~/.vnc/port

Don’t worry, it’s not over yet! Set user rights via command sudo chmod 755 /usr/local/bin/sharex11vnc. Close the terminal and allow the launch of the newly created VNC Server script with Linux: browse the path Control Panel > Session Applications and click the “Add” button. Write sharex11vnc in the first two fields of the window that opens and press “OK”.

Finally, enable automatic login for your Ubuntu account (via the path Apps > Settings > User Accounts and ticking the “Automatic connection” box).

7) Have fun!

Finally, your server is ready, with all software configured and automatic connection activated! Remove all unnecessary components from the machine (mouse, keyboard, monitor and even the CD and DVD reader/writer) and plug in the internet cable (use of WiFi connection is not recommended).

To connect to your server, you can use various programs like PuTTy or FileZilla. Most of the time, all you have to do is set the server’s IP address (you need to check this information from your Linux PC first), enter the port (5900) and the destination (localhost: 5900).

Also, keep in mind that you can install add-ons at will as needed, such as TorrentFlux, Apache, MySQL, and phpMyAdmin.

Leave a Comment