The expected tutorial: How to install WriteFreely on a Raspberry pi 3 in 10 steps
Update of 19/12/2018. It will only work for versions under 0.5. Version 0.6 requires other changes due to the support for sqlite
Yes, after I made it I promised to make a tutorial
First of all I'd like to thank the Write.as developers for the help.
In the WriteFreely's github they offer with the sources, the binaries for running it on GNU/linux, windows and macOS on 64-bit architectures and for the rest of the architectures one has to build WriteFreely from the source. The thing is that buildin the source on a raspberry pi (ARM architecture) is not recommendable because even if you can install golang on a raspberry pi, the building uses a lot the resources for a long time to compile.
So the alternative is to build the sources on another machine for another architecture and then move the binary to the RPI's folder where writefreely will run. So, let's begin.
In the RPI execute the command
cat /proc/cpuinfo. It's for knowing the version of the architecture that the RPI uses. For example, an RPI 3 model B uses an ARMv7 architecture
Download on the RPI the latest release of writefreely for GNU/linux and extract the tar.gz. Not doing anything else there until later.
On the other machine (I used my computer with GNU/Linux), having golang installed (version 1.10 or superior is required).
Assuming that the environment variable GOPATH points to $HOME/go, create the “go” folder at home.
Create the “bin” folder in the “go”
Here comes the important: executing from the go folder this command
env GOARCH=arm GOARM=7 go get github.com/writeas/writefreely/cmd/writefreely. This command will download the sources and build them for the ARMv7 architecture. If the RPI uses another version, it's just changing the number in the GOARM variable.
After finishing, the binary will be on the bin folder. You have to move the binary to the RPI, and replace the old binary that came on the tar.gz with the new one.
I recommend to apply chmod 755 to the binary
Check that it works executing
./writefeely -von the RPI. If it works, it will display the version of writefreely.
And that's it, the only thing left is to follow the rest of the installation guide.
One last thing. You have to build the binary and replace the previous one everytime you want to upgrade writefreely.