Yet another RSS Feed Reader - Self Hosted GOlang

Yarr is a simple and efficient golang self-hosted RSS feed reader which you can run locally. In this article/tutorial you’ll learn how to set it up on your own linx server

For this tutorial I expect that you already

  1. setup a linux VPS
  2. Bought a domain and
  3. linked the dns domain for a subdomain called news.yourdomain.com

I’m installing yarr on my raspbery pi .

Install and setup a password config

wget
echo "user:yourpassword" > auth.cfg

If you’re on raspberry PI … there’s a special section at the end of this article, follow the yarr arm build instructions

SystemD service file

vim /etc/systemd/system/yarr.service
[Unit]
Description=Yarr RSS Feed
After=syslog.target
After=network.target
#After=postgresql.service

[Service]
RestartSec=2s
Type=simple
User=youruser
Group=youruser
WorkingDirectory=/home/youruser/apps/yarr/
ExecStart=/home/youruser/apps/yarr/yarr -auth-file auth.cfg
Restart=always

[Install]
WantedBy=multi-user.target

Setup Caddy reverse proxy

We’ll be using Caddy as a reverse proxy which handles automatic TLS/SSl certificates for us. I recommend using caddy, in case you use another webserver/proxy, set that one up.

You can install caddy as simple as

sudo apt install caddy
vim /et/caddy/Caddyfile
https://news.example.com {
   reverse_proxy 127.0.0.1:7070
}

Enabling the service and running it

sudo systemctl enable yarr
sudo systemctl start yarr

For debugging see

sudo journalctl -u yarr

Now go to your domain feed.example.com, login and

You’re done! If you found this usefull you might also like https://ZenDenPen.com and https://LinSublim.com

If you use an arm64 raspberry pi

If you use arm64/arm7 raspberry pi.. there’s no build, you need to build it yourself using golang ON your x86/amd64 host.

You can do this by making use of golang+linux’s cool crosscompilation support.

Install the necessary packages. (You also need to manually install GOlang)

Keep in mind that this is required due to the fact that yarr uses sqlite3 and it usess C bindings for it..

So you’ll need to switch the CC version dpeending on what OS version you’re running on your raspberry pi, arm64 or arm7 32 bits..

OR you can have a look at what other build options you have for building golang apps .

sudo apt install gcc-aarch64-linux-gnu  gcc-arm-linux-gnueabi
git clone https://github.com/nkanaev/yarr.git
export CC=aarch64-linux-gnu-gcc
## OR
export CC=arm-linux-gnueabi-gcc
GOOS=linux GOARCH=arm CGO_ENABLED=1 go build -tags "sqlite_foreign_keys linux" -o yarrarm
scp yarrarm user@raspberrypi.local:~/yarr

Errors you might encoutner

In case you get the following error

Jan 16 11:29:57 raspberrypi yarr[17212]: /home/user/apps/yarr/yarr: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /home/geniuscraft/apps/yarr/yarr)
Jan 16 11:29:57 raspberrypi yarr[17212]: /home/user/apps/yarr/yarr: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.32' not found (required by /home/user/apps/yarr/yarr)
Jan 16 11:29:57 raspberrypi yarr[17212]: /home/user/apps/yarr/yarr: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found (required by /home/user/apps/yarr/yarr)

See my article on dealing with GLIBC version not found for golang apps .

All else fails, just use docker to build yarr for arm on raspberry pi

docker build -t yarr.arm -f etc/dockerfile.arm .
Subscribe to my Newsletter

Receive emails about Linux, Programming, Automation, Life tips & Tricks and information about projects I'm working on