File server on board - exchange of multimedia files among phones and laptops

With the steady increase in usage and production of multimedia from phones, cameras, laptops and other smart devices the need for sharing very soon arises on board.

Without any internet connection other that local on-board wifi (like Redbox or local router) sharing of files is not trivial. Moving sticks and cards around is not really an option, not everybody is ok with giving access to all pictures, people want to make a selection of what to share. It's here when a small file server comes in handy. A small board with some storage attached serves this purpose nicely. This little server can provide a range of services over Bluetooth, wifi, Samba (CIFS), NFS, sftp, scp, ssh etc. Of which Bluetooth is probably the most versatile for this kind of usage requireing no apps to be installed the phone. Windows laptops connect easy to Samba as it is essential a windows share. In addition there are several apps for mobile phones that provide a Samba client (both for Android and Apple). In this way most devices can connect to the file share and exchange files over the network.


In order to use Samba the phone or pad users need to have a Samba client app, this is a major drawback for many, not top mention that without coverage it impossible. If that was not enough one need to log in to the server and set the wifi credentials, not easy without connection (cable might solve this). Bluetooth offer a simple solution as a stand alone server. Setting up bluetooth to accept any devices is the way to go for an easy solution.

IP address of file server:

Most of the time the IP number of the file server can either be set or extracted from the router via the DHCP log. However, on charter boats where the router is a 3G/4G router one does normally not have access to logs or DHCP lists. In these cases there are nice apps that list the devices, an example is Fing. With this is's easy to get the ip address of the file server. Another approach is to add a small I2C display showing the ip number. For wifi networks that require username and password the cable connections might be needed to use ssh connection to log in and change the settings in the wifi config files.

Connecting a laptop using a cable and run ifconfig eth0 will show the ad hoc ip number assigned to the laptop, while "nmap -v" will list all devices in this network range (the number comes from ifconfig eth0 which yield Then a ssh -l root will enable you to log in. It's a bit tricky, but you'll be able to become root at admin the little server.

Enter SSID and password:

Access to a new Wifi network, how to enter SSID and assord into the OrangePi unit. A small RJ45 cable from a laptop to the OrangePi unit can be used to set up a point to point ad hoc network. Then it's asimple matter of logging in and entering the SSID and password. The files and details and given on github.


For those who require access to the file server from a Windows laptop the Samba software provides this functionality. A short explanation is given here. It's quite simple and it's easy to add more directories as you add storage. USB sticks are limited in size, but small USB spinning disks for travel might be a good option. The files config files are available on github.

Config files are found at github. I have used the Armbian_5.38_Orangepizero_Debian_stretch_next_4.14.14 image from the Orange Pi web site. I had some issues with the Bluetooth with some of the other distros.

Network File System (NFS):

Network File system is mostly used for Linux systems and are not covered in depth here. It quite common for Linux admins so this is fairly common and need little explaining here.

Some software is needed as most distributions are not server distros : "apt-get install nfs-kernel-server" .

Then the setup file (/etc/exports) informing the system of which directories that will be exported must be updated, an example might look like this:

/home *(rw,nohide,insecure,async,no_subtree_check)

/work *(rw,nohide,insecure,async,no_subtree_check)

After upating the file the service must be restarted : service nfs-kernel-server restart. After executing this command clients can connect to the NFS server.

I have used a very small ARM based system as a file server compute engine, I've picked up an Orange Pi zero at the electronics maket in the famous SEG building in Shenzhen. This is a tiny little board 1/2 the size of a RPi and a fraction of the cost. The combo I use (the one on the right is a newer H5 version) comes with WiFi and three USB ports and runs on 5V. The OrangePi has proven a cool alternative to the Raspberry Pi. Generally slightly cheaper and available in many variants. This one has both RJ45 and 1+2 USB ports and wifi built in. Most of the Orange Pi boards have a RJ45 wired Ethernet connection. The Orange Pis run on 5V, this one uses mini USB connector, but some of them require a barrel type power supply connection. Easily available, but need to be ordered. The picture show it attached to a 128 GB USB stick. However, spinning disks still have higher capacity at a lower cost. The usage of removable devices facilitate transfers to a server of a laptop in an easy way. Built in bluetooth is very nice making it an ideal board for this usage, I have however problems using it, hence a USB BT dongle.

All details about the setup is collected at github.