Close

Banana Pi Local NAS & Global website Server

nikolaos-conNIkolaos Con wrote 09/17/2019 at 14:41 • 5 min read • Like

Since i have a couple of computers and tablets I decided that i needed to find a way to share my most important files across all my devices. Instead of using a USB to sync them or having one of the PCs running as a server i found a more economic way. A Banana Pi M1.

I browse the internet and found out about Openmediavault which is perfect for this project. I download the image burned it on a 8GB SD card and put it in along with an Ethernet (for internet connection) a sata SSD drive that i connected on the dedicate sata port on the Banana Pi. Then i connected a small LCD (to reconfigure some settings on the Pi) because SSH with root permission are disable by default from Openmediavault. After all those where connected i boot it up for the first time. 

I changed the default password and then i run an update and upgrade on the device. Then I found the IP of the Banana Pi and put it on my computer's Web Browser. I soon found my self in front of a  login page for the Openmediavault configuration page.

The default username and password for this is (admin & openmediavault).

Then the main page of the installed OS will welcome you with all the settings, notifications and monitors.

By default all the services are going to be disabled. At the left hand side there are some options and you can select them from there. In order to allow other computers (Windows mainly) to connect on the server you will have to create a user and password in the users category and then enable the SMB/CIFS and set the drive or the folders that you want to share. 

You can set the permissions and the privileges for each user separate.....

For the next part i changed the  port of the service in the general settings in (90) so i can have the 80 (the default one) free for the apache2 web-server.

Also if you want to use the SSH you will have to enable it from the SSH category and permit root login...

I download and installed the Apache2 web-server and php7.0 along with other packages. By doing that it automatically created some directories and one of them is the html folder (/var/www/html) where the website's files are going to be. You can use what ever you want (HTML-PHP etc)...So for the testing i found some (coming Soon) ready to download and use websites. I Unzip the folder connected on my Banana Pi using WinSCP found the directory and paste the new ones there. I wrote down my Banana's Pi IP address on my web browser and i found the Coming Soon website.

 Yes this is hosted on my Banana Pi.

Now in order to access the website outside your network (with 4G) for examples there are few more steps. The first one is to find a domain. For now because is in very early stages and still making the site I went with duckdns.org services. You select your domain name with there name at the end so it will look something like this (examlpe.duckdns.org). Then go to your router main page which is most common 192.168.0.1 and login. Go to the port forward or virtual server and add your Banana's Pi or Raspberry's Pi IP address. 

Description So you can Know what is that if you ever forget it.

Inbound Port & Local Port must be the same and must be at the region of your apache2 port configure file (default is 80) so put 79 to 81 and add the banana's pi IP address. 

So now if you write your public IP address on the browser or the domain name that you created earlier you should be able to access the Banana's Pi hosting website or any other file you have on the specific folder.

So now I have two servers ( Storage and Website Server)  on one device. I ordered a custom aluminium case (rack style) to place it inside with fan. In order to expand the storage of my personal storage I plan to add a SATA Port Multiplier (there are some cheap ones on eBay) and add 4 more SSDs on the system.

If you have any questions or need help let me know.

Like

Discussions

Ken Yap wrote 09/17/2019 at 16:15 point

Why not just 80 to 80 instead of 79 to 81? I would expect the range to include the endpoints.

  Are you sure? yes | no