defmodule Alisinabh.Blog do

def NanoPi_Neo_as_Webserver do # UTC Pub Date: 3/11/2017 15:9

This weekend i was really bored. I just thought maybe its a good idea to play with the nerves-project a bit, So i went to find my raspberry pi from the closet and oh boy, It was a giant mess :| Throw the process of finding the rpi_2 something caught my eye. A NanoPi NEO I bought it around a year ago to make an automatic garden keeper. but things went wrong after i sank it in mineral oil for cooling. the board went crazy and froze 10 seconds after bootup. I’ve wrapped it inside some paper towels and left it inside closet.

“Let’s try and see if it’s still broken.” I downloaded UbuntuCore with Qt-Embedded Image File for NanoPi NEO, flashed image into sd card and pluged it in. It worked!! Best said: “It’s better give time for some problems”

Anyways, it was stable. I liked the performance of Allwinner H3 SOC and it is absolutely a charming feeling watching such a tiny computer working with fair performance. Wait a minute… Can i host this blog on it?

This single seed of idea has taken my entire weekend. I first tried to install Erlang on it. but binaries for arm71 was old. I’ve downloaded otp source code from github and build it on NanoPi NEO. It took about 40 minutes to build. I was not disappointed. In fact, i was surprised because i thought it may take a couple hours.

Then i tried building Elixir from source code. It was all good until it became to compiling unicode. As @josevalim said in issue #5856 to me, compiling unicode module requires loading large amount of unicode tables and optimizing it and because i only have 512mb of RAM and no swap, OS killed the build process. He suggested using precompiled Elixir. (Why i didn’t thought of that?). And Oh boy. It worked.

Elixir 1.4.2 and OTP 19.2 were installed and working on NanoPi NEO.

Now i just needed to run my blog on it. After cloning mix phoenix.server didn’t let me down. has successfully built and run on NanoPi NEO (since i use flat files as database, i don’t need anything else.)

So after all, i decided to host on my NanoPi NEO. there is only a couple things i need to worry about for doing so:

  • Get a housing and a heatsync for it.
  • Get an static IP address for my home internet connection or use DDNS (i don’t like this!)

{:ok, :unbelievable!}



defmodule Alisinabh.Contact do