The Banana Pi M1. It runs on a normal micro SD card, operates at 5V, takes almost no space, and does not cost a penny.
In this post, I will share with you all the processes and my experience creating this server, along with WordPress installation and free, open-source domain creation.
Note that I cannot directly connect my domain with Banana Pi, and I require using Cloudflare as a tunnel. If only I had public IPv4, it wouldn't be an issue. But guess what? Cloudflare provides free SSL, DDoS protection, cache reserve, and more for free. I see this as an absolute win!
Watch the videoInstall the Operating SystemThe first thing I did was set up the operating system. The board can easily run Linux, but with such a low configuration, it will struggle to run a full-fledged operating system. So, a headless operating system is best for this case.
A headless OS is basically a computer without a monitor, keyboard, or mouse and controlled from another computer, and is often used in a server.
I downloaded a lightweight Armbian minimal OS from this LINK and used an imager to flash it on the memory card. You can certainly use another Linux distro as well, but Armbian is optimized for this board.
Initiate Remote ControlYou can skip this step by connecting a monitor and a keyboard to the Banana Pi and controlling it independently as a computer. But then you will have to type all the codes and commands manually.
So, it is very useful to just connect to the bananapi from a computer/laptop over the local internet and copy and paste codes. In this way, I could fix several issues easily by googling the error online.
At first, I connected the board to a monitor, keyboard, and Ethernet cable. From the terminal, I can get the ip address by typing "ip addr". It was 192.168.0.100.
On my Mac, I opened a new terminal and typed in "sudo ssh root@192.168.0.100" and wala, I am remotely controlling the bananapi from my mac.
Set Up Webserver on the Banana PiOn the terminal window, follow the directions given below to successfully download and install the nginx server along with CloudFlare tunnel:
- Check for available Linux updates and download.
sudo apt update
sudo apt upgrade -y- Install webserver by typing
sudo apt install nginxThis will also install "nginx-common";
- Check if nginx is properly installed by typing
sudo nginxThis may output several failed attempts, but it means it is working.
- Install CloudFlare
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm- move to the local bin
sudo mv cloudflared-linux-arm /usr/local/bin/cloudflared- Add super user executable permission
sudo chmod +x /usr/local/bin/cloudflared- Check if it is properly installed
cloudflared --versionFinding a Domain & Connecting to the ServerMy name is Al Amin Ashik, so I wanted a domain with my name, and luckily, alaminn.com was available to purchase. I bought it from namecheap.com, and it costs around $11 a year (just for keeping the domain)
However, for this post, I will use an open-source domain that is free to use. But the downside is that you need to use their domain extension, dpdns.org. So, I will create a website for alaminn.dpdns.org.
Follow the steps:
- Go to https://domain.digitalplat.org/ and register for a new domain. (in my case, it is alaminn.dpdns.org)
- Go to https://www.cloudflare.com/en-gb/ and press 'onboard a new domain', enter the domain (alaminn.dpdns.org) and copy the nameservers.
- Paste the two nameservers on digitalplat.
- Wait for some time, and done! Cloudflare now controls your domain.
On your Banana Pi terminal, follow the following steps:
- Authenticate tunnel from bananpi with Cloudflare:
cloudflared tunnel login- Open the URL on the computer where Cloudflare is logged in and authorize.
- If authorization is successful, the terminal output on BananaPi will show success.
- Get the tunnel ID:
cloudflared tunnel create bananapi-tunnel- Copy the tunnel ID.
- Create a tunnel configuration file:
nano ~/.cloudflared/config.yml- Add the following lines to the config file: (do not use tabs. Use only spaces) save & exit.
tunnel: YOUR-TUNNEL-ID
credentials-file: /root/.cloudflared/YOUR-TUNNEL-ID.json
ingress:
- hostname: YOURDOMAIN.com
service: http://localhost:80
- service: http_status:404- Route DNS:
cloudflared tunnel route dns bananapi-tunnel alaminn.dpdns.org- Run the tunnel:
cloudflared tunnel run bananapi-tunnelAnd Boom, the server is up and running. Go to your domain (in my case, alaminn.dpdns.org) from any device or network, and you should see the Nginx server screen.
Prepare EnclosureAt this point, I realized the enclosure I was using is broken :(. Won't it be cool if I could make a premium casing using metal!
Well, JLCCNC now offers custom metal CNC for everyone at an affordable price, starting at just $1. The best thing is that you can get very small and very precise shapes using their 5-axis CNC machines.
Big thanks to JCLCNC for supporting this project! Click on the link below to get a coupon worth $123 at: https://jlccnc.com/?from=alaminashik
The Allwinner A20 processor can get a little toasty if multiple people are browsing the website at the same time, so it is better to add a heat sink along with a cooling fan. A 5V cooling fan can be directly connected to the PCB using a JST connector.
A little air flow makes a lot of difference.
My WebsiteThe server is up and running and is now ready for website deployment. I will not go into details, but on the bananapi, I installed WordPress, created a MySQL database, and took a backup of my previously made portfolio.
Check out details on how I setup Wordpress from my GitHub link: https://github.com/AlAminAshik/Setting-up-a-personal-VPS-using-my-Banana-pi-M01
Feel free to reach out. I will try my best to help. Cheers!




Comments