Installing selfoss on a Raspberry Pi

Selfoss is an RSS reader.
We are going to install it and configure it using Nginx.

Preparing the vhost

In this example I’m using selfoss.local as the url to set it up. Change the url to whatever you want.

sudo mkdir -p /var/www/selfoss.local/public_html
sudo chown www-data:www-data /var/www/selfoss.local -R
cd /var/www/selfoss.local/public_html

Create the vhost file: sudo nano /etc/nginx/sites-enabled/selfoss.local.conf

server {
    listen 80;

    server_name selfoss.local;
    root /var/www/selfoss.local/public_html;

    index index.php index.html;

    location ~* \ (gif|jpg|png) {
        expires 30d;

    location ~ ^/(favicons|thumbnails)/.*$ {
        try_files $uri /data/$uri;

    location ~* ^/(data\/logs|data\/sqlite|config\.ini|\.ht) {
        deny all;

    location / {
        index index.php;
        try_files $uri /public/$uri /index.php$is_args$args;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
        fastcgi_intercept_errors on;
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;

And finally reload nginx: sudo nginx -t && sudo service nginx reload

Download Selfoss

Next we download Selfoss. On the Selfoss home page there is a download button. Copy the destination of that link.
At the time of writing it is on version 2.18 and the download zip is: []/2.18/
Replace the url if needed.

sudo wget -O
sudo unzip
sudo rm
sudo chown www-data:www-data /var/www/selfoss.local -R

Now visit the uel. You should see an empty -but working- selfoss screen. Screenshot of selfoss empty installation


Although this installation works we are going co configure some aspects of it.

DB connection.

Be default Selfoss uses sqlite. Mysql has a better performance. Instructions to install Mysql are in a separate article.
More detailed instruction are there. So here are the quick instructions to create a database.

Login to mysql as root: sudo mysql -uroot
Create a db, and assign a new user. !Replace the password
You can set your own database name and user.

CREATE DATABASE misc_selfoss;
CREATE USER 'selfoss'@'localhost' IDENTIFIED BY '%%SAFE_PASSWORD%%';
GRANT ALL PRIVILEGES ON `misc_selfoss`.* TO `selfoss`@`localhost`;

Creating the database for Selfoss

Next we set the db connection in the config file: sudo nano config.ini


A few cleanup commands afterwards

sudo rm data/sqlite/selfoss.db
sudo chown www-data:www-data /var/www/selfoss.local -R

Password protection

To protect your selfoss installation we will set a password.
Go to your url/password in my case: http://selfoss.local/password

Screenshot of the Seelfoss password generation screen

After go got the hash add it to the config file: sudo nano config.ini


Other configurations.

There are more configurations. See the official documentation Personally I prefer that items get marked as read when I open them.


Now you are ready to start using Selfoss. Have fun!