How to install Selfoss on a CentOS 7 Linux VPS

how-to-install-selfoss-on-a-centos-7-linux-vpsIn the following article we are going to guide you through the steps of installing Selfoss on a CentOS 7 Linux VPS.

What is Selfoss?

It is a new multipurpose RSS reader, live stream, mashup and aggregation web application with the following features:

  • web based rss reader
  • universal aggregator
  • open source and free
  • easy extendable with an open plugin system (write your own data connectors)
  • mobile support (Android, iOS, iPad)
  • use selfoss to live stream and collect all your posts, tweets, feeds in one place
  • lightweight PHP application with less than 2 MB
  • supports MySQL, PostgreSQL and Sqlite Databases
  • OPML Import
  • restful json api
  • third party apps for iOS and Android available

System Requirements?

  • A Linux VPS Hosting
  • PHP 5.3 or higher
  • MySQL, PostgreSQL or Sqlite
  • Apache, Nginx or Lighttpd Webserver
  • Mod_Rewrite and Mod_Headers



Before proceeding any further, ssh to your CentOS VPS, initiate a screen session and upgrade your system using yum:

## screen -U -S selfoss-centos
## yum update
## yum install unzip vim


INSTALL LEMP (Linux Nginx MariaDB and PHP)

Selfoss requires a webserver, a database server and a PHP server so go ahead and install LEMP on the CentOS 7 VPS. Once you complete the LEMP installation proceed with creating a database for Selfoss.



Selfoss requires a database to store its data, so use your favorite MySQL tools to create a new database or use command line as in:

# mysql -u root -p

MariaDB [(none)]> create database selfoss;
MariaDB [(none)]> grant all on selfoss.* to selfoss@localhost identified by 'SECURE_PASSWORD';
MariaDB [(none)]> \q





We’ll be using /srv/www as webserver document root, so let’s create this directory and download Selfoss using:

## mkdir -p /srv/www
## wget -O /tmp/
## unzip /tmp/ -d /srv/www/

now you should have selfoss extracted in /srv/www/selfoss-master. proceed with selfoss configuration



Any settings in config.ini will override the settings in defaults.ini. To customize settings follow these instructions:

  1. Copy defaults.ini to config.ini
  2. Edit config.ini and delete any lines you do not wish to override.
  3. Do not delete the [globals] line.
## cd /srv/www/selfoss-master
## cp defaults.ini config.ini
## vim config.ini

A sample config.ini may look like the following:




Next, we have to setup a virtual server block so we can serve the Selfoss RSS app using To achieve this, create the following file in /etc/nginx/conf.d/selfoss.conf. Of course, make sure you change the relevant information to match yours.

server {
    listen 80;
    root /srv/www/selfoss-master/;
    access_log /var/log/nginx/rss.access.log;
    error_log /var/log/nginx/rss.error.log;

    location ~* \ (gif|jpg|png) {
        expires 30d;
    location ~ ^/favicons/.*$ {
        try_files $uri /data/$uri;
    location ~ ^/thumbnails/.*$ {
        try_files $uri /data/$uri;
    location ~* ^/(data\/logs|data\/sqlite|config\.ini|\.ht) {
        deny all;
    location / {
        index index.php index.html index.htm;
        try_files $uri /public/$uri /index.php$is_args$args;
    location ~ \.php$ {
    try_files $uri = 404;
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

With the Nginx configuration file in place, proceed with reloading the webserver for the change to take effect using:

## nginx -t
## systemctl restart nginx

Set-up proper ownership:

## chown nginx: -R /srv/www/selfoss-master/



Finally, access your Selfoss RSS reader at using your favorite web browser.

You may also want to setup a cron job which will update your feeds using:

## echo "*/10 * * * * root wget -o /dev/null" >> /etc/cron.d/selfoss

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Selfoss for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


1 thought on “How to install Selfoss on a CentOS 7 Linux VPS”

  1. It’s vital to install php-xml and php-gd, otherwise selfoss will return “Error Fatal error: Class ‘DOMDocument’ not found” (php-xml) or “Error Fatal error: Call to undefined function imagecreatefromstring()” (php-gd)


Leave a Comment

To prove you are human please solve the following *