Like myself, you may have an old, outdated piece of computing hardware lying around, a great use for it – besides being a dust collector – would be to turn it into a file/media sharing server.
“Server” brings up images of a zillion gaudy-coloured cables and water cooled racks of computers tucked away in some warehouse somewhere. However, a server is simply any computer that “serves” data to another computer and setting up such a thing is actually very simple:
So dig out your relic, plug it in (connect a gaudy Ethernet cable if you want) and, if not already done, download and install your favourite Ubuntu spin.
Next we’ll need to set up a protocol for our server to share files with. I chose Samba mainly for its cross-platform compatibility – i.e. with Windows, Android, etc. – as not all of the devices on my network are running Linux.
For the unfamiliar: Samba is the free software implementation of the SMB/CIFS protocol used for sharing files, printer access, among other things over a local network.
Install & Set-up Samba
First things first, we’ll need to install Samba on the to-be server. Which can be done either from the Ubuntu Software Centre:
Or using the command line:
sudo apt-get install samba
Once that’s complete, we’ll edit the system-wide Samba configuration to set up a new “share”. Run in a terminal:
sudo gedit /etc/samba/smb.conf
This’ll open a lengthy text file, where you can use the following template to create a simple Samba share to append (replacing the values with your own, of course) and save.
[ShareName] comment = An optional description of your share. path = /home/example/directory browseable = yes read only = no guest ok = yes guest only = yes
Just a brief explanation of these options:
- comment: a short (human-readable) description of your share, e.g. “My Share”.
- path: the location of the folder you want to share, for example /home/yourname/Music.
- browseable: whether the share location will be able to be browsed remotely.
- read only: setting to “yes” means computers accessing the share cannot create/delete files.
- guest ok: “yes” here means that computers can access this share without requiring a username or password.
- guest only: this is optional, if ”yes” allows only guest access, i.e. no user login.
Of course, this is a configuration for a simple public share –public, as in anyone on the same network as would have access.
Also, do not edit any other elements of the config file unless you know what you’re doing.
Now after a reboot, your Samba share ought to be up and running.
Connecting to Your New Server
In your favourite file manager you can access the server by browsing your local network –from the sidebar in Nautilus, for example– which would show all devices, including your newly created server, that are connected.
Alternatively in the location bar of your file browser you can enter the network address of the server:
smb://<IP address or hostname of your server>/<share name>
There you have it, your very own file server. Personally, I have a few terabytes of external hard drives hooked up to an old laptop as a backup system and a host for my music, movies, etc. –serving as a media centre as well.
Further Samba information and help can be found on the Ubuntu Wiki:
Powered by WPeMatico