status-go
status-go copied to clipboard
Raspberry Pi Mailserver
Problem
Go 1.12.4 is able to run on Arm platforms, so I wanted to try and take a crack at getting status-go to run on a Raspberry Pi 3 B+ (ARMv8). It appears that this should be doable, but there's a few issues I ran into I wanted to share.
Implementation
- Install Go 1.12.4 using the Armv6L binary. This appears to work on both. I use the ARMv8 version of a PI to install and it worked fine.
go get github.com/status-im/status-go. This worked fine obviously.- Run
Make Setup. This is where things got weird. I had to circumvent a few necessary packages for development to get it running. I had to remove the go linter and the go deps checker specifically calls in the Makefile. - I had to remove the
install_deps.shcall. Something during the running would not release the dpkg lock so I just installed the dependencies manually. - After this all ran, I realized there a docker mailserver image RIGHT THERE. I installed a docker setup but realized there is a current bug with how it works with
systemctland it simply doesn't work at all when trying to run the image. I ended up saying screw it and trying to build thestatusdfrom source. - Building
statusdfrom source was a bit hard, but not difficult. I just used the build instruction in the Makefile to do this. There were a few packages I ran into that it couldn't find, likex/unix. Each time I hit a could not find error, I just went and rango getfor the missing package. I want sure if there was an issue here with go's installations and how it manages dependencies or me not having thedepslibrary.depsdoesn't even work on ARM so I'm not sure why these weren't in. Eventually I got through it by manually installing and gotstatusdbuilt.
Current implementation problems
- Let's update the docs to do a shallow git install. It's kind of weird but for a Pi I don't want to install using
git clonealone without a shallow clone with an exact tar. Let's also make sure there's instructions to link this correctly in the GOPATH. Luckily when I ranmake setup, it explicitly said where it wanted the folder, so I just usedmkdirto add the appropriate folder in the GOPATH/src -dockerdidn't work. Raspis apparently don't work well with docker images since it seems the binaries for dependencies must be built for the ARM architecture. I just built and ran the code from source, but didn't look too deeply into whether I could get this working. You just have tomake setupand buildstatusd. golangci-lintis a lint dependency that isn't really necessary for building. When runningmake setup, the architecture is checked but since they haven't updated their architecture to accept ARMv7 it fails on install. To circumvent this, I removed golangci-lint from the Makefile.dep ensure -update github.com/golang/mocktimes out due to a lock file issue when doing themock-installstep. Had to remove it completely._assets/scripts/install_deps.shininstall-os-dependenciesdidn't work. I just manually installed them with sudo apt get and removed this step.- There was a few packages like
x/unixandx/cryptopackage that couldn't be found during the build ofstatusd. I'm not sure if this was a installation error since it seemed like a lot of people had problems with this ok Stack overflow. When building, I just had togo getevery package I hit that wasn't installed.
Current Status
~~I was able to get through the setup, and should update on running the mailserver soon. I'm currently working on installing docker. Docker is able to run using the get.docker website script, but docker-compose must be installed through pip.~~
I was able to get through the setup and built statusd on the Raspberry Pi 3 B+. Mailserver seems to work fine and have connected to the Status mobile app.
Acceptance Criteria
We're able to run a Mailserver on a Raspberry Pi ARMv8 architecture without these headaches. Maybe a separate bash script and some separate make commands to install these things would be nice. At the very least, docs would be nice.
Notes
It's possible this wont work stand up long since it may take up far too much compute power. It's mostly a POC to support ARM architectures, but given that it seems most people have Pi's just laying around, it might be good to add support for it. I could imagine people who have working PiHoles to be interested in hosting a Mailserver at home.
Future Steps
- [ ] Add some documentation that gives instructions to installing a Raspi version of the mailserver.
- [ ] Possibly make separate Makefile commands +bash to build and run targeting Raspis.
Updated this with a cleaned version. Was able to get it running!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.